1// Copyright YEAR 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 Cloud Machine Learning Engine.
8//
9// For product documentation, see: https://cloud.google.com/ml/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/ml/v1"
16//   ...
17//   ctx := context.Background()
18//   mlService, err := ml.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   mlService, err := ml.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   mlService, err := ml.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package ml // import "google.golang.org/api/ml/v1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	gensupport "google.golang.org/api/gensupport"
53	googleapi "google.golang.org/api/googleapi"
54	option "google.golang.org/api/option"
55	htransport "google.golang.org/api/transport/http"
56)
57
58// Always reference these packages, just in case the auto-generated code
59// below doesn't.
60var _ = bytes.NewBuffer
61var _ = strconv.Itoa
62var _ = fmt.Sprintf
63var _ = json.NewDecoder
64var _ = io.Copy
65var _ = url.Parse
66var _ = gensupport.MarshalJSON
67var _ = googleapi.Version
68var _ = errors.New
69var _ = strings.Replace
70var _ = context.Canceled
71
72const apiId = "ml:v1"
73const apiName = "ml"
74const apiVersion = "v1"
75const basePath = "https://ml.googleapis.com/"
76
77// OAuth2 scopes used by this API.
78const (
79	// View and manage your data across Google Cloud Platform services
80	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
81)
82
83// NewService creates a new Service.
84func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
85	scopesOption := option.WithScopes(
86		"https://www.googleapis.com/auth/cloud-platform",
87	)
88	// NOTE: prepend, so we don't override user-specified scopes.
89	opts = append([]option.ClientOption{scopesOption}, opts...)
90	client, endpoint, err := htransport.NewClient(ctx, opts...)
91	if err != nil {
92		return nil, err
93	}
94	s, err := New(client)
95	if err != nil {
96		return nil, err
97	}
98	if endpoint != "" {
99		s.BasePath = endpoint
100	}
101	return s, nil
102}
103
104// New creates a new Service. It uses the provided http.Client for requests.
105//
106// Deprecated: please use NewService instead.
107// To provide a custom HTTP client, use option.WithHTTPClient.
108// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
109func New(client *http.Client) (*Service, error) {
110	if client == nil {
111		return nil, errors.New("client is nil")
112	}
113	s := &Service{client: client, BasePath: basePath}
114	s.Projects = NewProjectsService(s)
115	return s, nil
116}
117
118type Service struct {
119	client    *http.Client
120	BasePath  string // API endpoint base URL
121	UserAgent string // optional additional User-Agent fragment
122
123	Projects *ProjectsService
124}
125
126func (s *Service) userAgent() string {
127	if s.UserAgent == "" {
128		return googleapi.UserAgent
129	}
130	return googleapi.UserAgent + " " + s.UserAgent
131}
132
133func NewProjectsService(s *Service) *ProjectsService {
134	rs := &ProjectsService{s: s}
135	rs.Jobs = NewProjectsJobsService(s)
136	rs.Locations = NewProjectsLocationsService(s)
137	rs.Models = NewProjectsModelsService(s)
138	rs.Operations = NewProjectsOperationsService(s)
139	return rs
140}
141
142type ProjectsService struct {
143	s *Service
144
145	Jobs *ProjectsJobsService
146
147	Locations *ProjectsLocationsService
148
149	Models *ProjectsModelsService
150
151	Operations *ProjectsOperationsService
152}
153
154func NewProjectsJobsService(s *Service) *ProjectsJobsService {
155	rs := &ProjectsJobsService{s: s}
156	return rs
157}
158
159type ProjectsJobsService struct {
160	s *Service
161}
162
163func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
164	rs := &ProjectsLocationsService{s: s}
165	return rs
166}
167
168type ProjectsLocationsService struct {
169	s *Service
170}
171
172func NewProjectsModelsService(s *Service) *ProjectsModelsService {
173	rs := &ProjectsModelsService{s: s}
174	rs.Versions = NewProjectsModelsVersionsService(s)
175	return rs
176}
177
178type ProjectsModelsService struct {
179	s *Service
180
181	Versions *ProjectsModelsVersionsService
182}
183
184func NewProjectsModelsVersionsService(s *Service) *ProjectsModelsVersionsService {
185	rs := &ProjectsModelsVersionsService{s: s}
186	return rs
187}
188
189type ProjectsModelsVersionsService struct {
190	s *Service
191}
192
193func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
194	rs := &ProjectsOperationsService{s: s}
195	return rs
196}
197
198type ProjectsOperationsService struct {
199	s *Service
200}
201
202// GoogleApi__HttpBody: Message that represents an arbitrary HTTP body.
203// It should only be used for
204// payload formats that can't be represented as JSON, such as raw binary
205// or
206// an HTML page.
207//
208//
209// This message can be used both in streaming and non-streaming API
210// methods in
211// the request as well as the response.
212//
213// It can be used as a top-level request field, which is convenient if
214// one
215// wants to extract parameters from either the URL or HTTP template into
216// the
217// request fields and also want access to the raw HTTP body.
218//
219// Example:
220//
221//     message GetResourceRequest {
222//       // A unique request id.
223//       string request_id = 1;
224//
225//       // The raw HTTP body is bound to this field.
226//       google.api.HttpBody http_body = 2;
227//     }
228//
229//     service ResourceService {
230//       rpc GetResource(GetResourceRequest) returns
231// (google.api.HttpBody);
232//       rpc UpdateResource(google.api.HttpBody) returns
233// (google.protobuf.Empty);
234//     }
235//
236// Example with streaming methods:
237//
238//     service CaldavService {
239//       rpc GetCalendar(stream google.api.HttpBody)
240//         returns (stream google.api.HttpBody);
241//       rpc UpdateCalendar(stream google.api.HttpBody)
242//         returns (stream google.api.HttpBody);
243//     }
244//
245// Use of this type only changes how the request and response bodies
246// are
247// handled, all other features will continue to work unchanged.
248type GoogleApi__HttpBody struct {
249	// ContentType: The HTTP Content-Type string representing the content
250	// type of the body.
251	ContentType string `json:"contentType,omitempty"`
252
253	// Data: HTTP body binary data.
254	Data string `json:"data,omitempty"`
255
256	// Extensions: Application specific response metadata. Must be set in
257	// the first response
258	// for streaming APIs.
259	Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
260
261	// ServerResponse contains the HTTP response code and headers from the
262	// server.
263	googleapi.ServerResponse `json:"-"`
264
265	// ForceSendFields is a list of field names (e.g. "ContentType") to
266	// unconditionally include in API requests. By default, fields with
267	// empty values are omitted from API requests. However, any non-pointer,
268	// non-interface field appearing in ForceSendFields will be sent to the
269	// server regardless of whether the field is empty or not. This may be
270	// used to include empty fields in Patch requests.
271	ForceSendFields []string `json:"-"`
272
273	// NullFields is a list of field names (e.g. "ContentType") to include
274	// in API requests with the JSON null value. By default, fields with
275	// empty values are omitted from API requests. However, any field with
276	// an empty value appearing in NullFields will be sent to the server as
277	// null. It is an error if a field in this list has a non-empty value.
278	// This may be used to include null fields in Patch requests.
279	NullFields []string `json:"-"`
280}
281
282func (s *GoogleApi__HttpBody) MarshalJSON() ([]byte, error) {
283	type NoMethod GoogleApi__HttpBody
284	raw := NoMethod(*s)
285	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
286}
287
288// GoogleCloudMlV1HyperparameterOutputHyperparameterMetric: An observed
289// value of a metric.
290type GoogleCloudMlV1HyperparameterOutputHyperparameterMetric struct {
291	// ObjectiveValue: The objective value at this training step.
292	ObjectiveValue float64 `json:"objectiveValue,omitempty"`
293
294	// TrainingStep: The global training step for this metric.
295	TrainingStep int64 `json:"trainingStep,omitempty,string"`
296
297	// ForceSendFields is a list of field names (e.g. "ObjectiveValue") to
298	// unconditionally include in API requests. By default, fields with
299	// empty values are omitted from API requests. However, any non-pointer,
300	// non-interface field appearing in ForceSendFields will be sent to the
301	// server regardless of whether the field is empty or not. This may be
302	// used to include empty fields in Patch requests.
303	ForceSendFields []string `json:"-"`
304
305	// NullFields is a list of field names (e.g. "ObjectiveValue") to
306	// include in API requests with the JSON null value. By default, fields
307	// with empty values are omitted from API requests. However, any field
308	// with an empty value appearing in NullFields will be sent to the
309	// server as null. It is an error if a field in this list has a
310	// non-empty value. This may be used to include null fields in Patch
311	// requests.
312	NullFields []string `json:"-"`
313}
314
315func (s *GoogleCloudMlV1HyperparameterOutputHyperparameterMetric) MarshalJSON() ([]byte, error) {
316	type NoMethod GoogleCloudMlV1HyperparameterOutputHyperparameterMetric
317	raw := NoMethod(*s)
318	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
319}
320
321func (s *GoogleCloudMlV1HyperparameterOutputHyperparameterMetric) UnmarshalJSON(data []byte) error {
322	type NoMethod GoogleCloudMlV1HyperparameterOutputHyperparameterMetric
323	var s1 struct {
324		ObjectiveValue gensupport.JSONFloat64 `json:"objectiveValue"`
325		*NoMethod
326	}
327	s1.NoMethod = (*NoMethod)(s)
328	if err := json.Unmarshal(data, &s1); err != nil {
329		return err
330	}
331	s.ObjectiveValue = float64(s1.ObjectiveValue)
332	return nil
333}
334
335// GoogleCloudMlV1__AcceleratorConfig: Represents a hardware accelerator
336// request config.
337type GoogleCloudMlV1__AcceleratorConfig struct {
338	// Count: The number of accelerators to attach to each machine running
339	// the job.
340	Count int64 `json:"count,omitempty,string"`
341
342	// Type: The available types of accelerators.
343	//
344	// Possible values:
345	//   "ACCELERATOR_TYPE_UNSPECIFIED" - Unspecified accelerator type.
346	// Default to no GPU.
347	//   "NVIDIA_TESLA_K80" - Nvidia Tesla K80 GPU.
348	//   "NVIDIA_TESLA_P100" - Nvidia Tesla P100 GPU.
349	//   "NVIDIA_TESLA_V100" - Nvidia Tesla V100 GPU.
350	//   "NVIDIA_TESLA_P4" - Nvidia Tesla P4 GPU.
351	Type string `json:"type,omitempty"`
352
353	// ForceSendFields is a list of field names (e.g. "Count") to
354	// unconditionally include in API requests. By default, fields with
355	// empty values are omitted from API requests. However, any non-pointer,
356	// non-interface field appearing in ForceSendFields will be sent to the
357	// server regardless of whether the field is empty or not. This may be
358	// used to include empty fields in Patch requests.
359	ForceSendFields []string `json:"-"`
360
361	// NullFields is a list of field names (e.g. "Count") to include in API
362	// requests with the JSON null value. By default, fields with empty
363	// values are omitted from API requests. However, any field with an
364	// empty value appearing in NullFields will be sent to the server as
365	// null. It is an error if a field in this list has a non-empty value.
366	// This may be used to include null fields in Patch requests.
367	NullFields []string `json:"-"`
368}
369
370func (s *GoogleCloudMlV1__AcceleratorConfig) MarshalJSON() ([]byte, error) {
371	type NoMethod GoogleCloudMlV1__AcceleratorConfig
372	raw := NoMethod(*s)
373	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
374}
375
376// GoogleCloudMlV1__AutoScaling: Options for automatically scaling a
377// model.
378type GoogleCloudMlV1__AutoScaling struct {
379	// MinNodes: Optional. The minimum number of nodes to allocate for this
380	// model. These
381	// nodes are always up, starting from the time the model is
382	// deployed.
383	// Therefore, the cost of operating this model will be at least
384	// `rate` * `min_nodes` * number of hours since last billing
385	// cycle,
386	// where `rate` is the cost per node-hour as documented in the
387	// [pricing guide](/ml-engine/docs/pricing),
388	// even if no predictions are performed. There is additional cost for
389	// each
390	// prediction performed.
391	//
392	// Unlike manual scaling, if the load gets too heavy for the nodes
393	// that are up, the service will automatically add nodes to handle
394	// the
395	// increased load as well as scale back as traffic drops, always
396	// maintaining
397	// at least `min_nodes`. You will be charged for the time in which
398	// additional
399	// nodes are used.
400	//
401	// If not specified, `min_nodes` defaults to 0, in which case, when
402	// traffic
403	// to a model stops (and after a cool-down period), nodes will be shut
404	// down
405	// and no charges will be incurred until traffic to the model
406	// resumes.
407	//
408	// You can set `min_nodes` when creating the model version, and you can
409	// also
410	// update `min_nodes` for an existing
411	// version:
412	// <pre>
413	// update_body.json:
414	// {
415	//   'autoScaling': {
416	//     'minNodes': 5
417	//   }
418	// }
419	// </pre>
420	// HTTP request:
421	// <pre>
422	// PATCH
423	// https://ml.googleapis.com/v1/{name=projects/*/models/*/versions/*}?update_mask=autoScaling.minNodes -d
424	// @./update_body.json
425	// </pre>
426	MinNodes int64 `json:"minNodes,omitempty"`
427
428	// ForceSendFields is a list of field names (e.g. "MinNodes") to
429	// unconditionally include in API requests. By default, fields with
430	// empty values are omitted from API requests. However, any non-pointer,
431	// non-interface field appearing in ForceSendFields will be sent to the
432	// server regardless of whether the field is empty or not. This may be
433	// used to include empty fields in Patch requests.
434	ForceSendFields []string `json:"-"`
435
436	// NullFields is a list of field names (e.g. "MinNodes") to include in
437	// API requests with the JSON null value. By default, fields with empty
438	// values are omitted from API requests. However, any field with an
439	// empty value appearing in NullFields will be sent to the server as
440	// null. It is an error if a field in this list has a non-empty value.
441	// This may be used to include null fields in Patch requests.
442	NullFields []string `json:"-"`
443}
444
445func (s *GoogleCloudMlV1__AutoScaling) MarshalJSON() ([]byte, error) {
446	type NoMethod GoogleCloudMlV1__AutoScaling
447	raw := NoMethod(*s)
448	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
449}
450
451// GoogleCloudMlV1__CancelJobRequest: Request message for the CancelJob
452// method.
453type GoogleCloudMlV1__CancelJobRequest struct {
454}
455
456type GoogleCloudMlV1__Capability struct {
457	// AvailableAccelerators: Available accelerators for the capability.
458	//
459	// Possible values:
460	//   "ACCELERATOR_TYPE_UNSPECIFIED" - Unspecified accelerator type.
461	// Default to no GPU.
462	//   "NVIDIA_TESLA_K80" - Nvidia Tesla K80 GPU.
463	//   "NVIDIA_TESLA_P100" - Nvidia Tesla P100 GPU.
464	//   "NVIDIA_TESLA_V100" - Nvidia Tesla V100 GPU.
465	//   "NVIDIA_TESLA_P4" - Nvidia Tesla P4 GPU.
466	AvailableAccelerators []string `json:"availableAccelerators,omitempty"`
467
468	// Possible values:
469	//   "TYPE_UNSPECIFIED"
470	//   "TRAINING"
471	//   "BATCH_PREDICTION"
472	//   "ONLINE_PREDICTION"
473	Type string `json:"type,omitempty"`
474
475	// ForceSendFields is a list of field names (e.g.
476	// "AvailableAccelerators") to unconditionally include in API requests.
477	// By default, fields with empty values are omitted from API requests.
478	// However, any non-pointer, non-interface field appearing in
479	// ForceSendFields will be sent to the server regardless of whether the
480	// field is empty or not. This may be used to include empty fields in
481	// Patch requests.
482	ForceSendFields []string `json:"-"`
483
484	// NullFields is a list of field names (e.g. "AvailableAccelerators") to
485	// include in API requests with the JSON null value. By default, fields
486	// with empty values are omitted from API requests. However, any field
487	// with an empty value appearing in NullFields will be sent to the
488	// server as null. It is an error if a field in this list has a
489	// non-empty value. This may be used to include null fields in Patch
490	// requests.
491	NullFields []string `json:"-"`
492}
493
494func (s *GoogleCloudMlV1__Capability) MarshalJSON() ([]byte, error) {
495	type NoMethod GoogleCloudMlV1__Capability
496	raw := NoMethod(*s)
497	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
498}
499
500type GoogleCloudMlV1__Config struct {
501	// TpuServiceAccount: The service account Cloud ML uses to run on TPU
502	// node.
503	TpuServiceAccount string `json:"tpuServiceAccount,omitempty"`
504
505	// ForceSendFields is a list of field names (e.g. "TpuServiceAccount")
506	// to unconditionally include in API requests. By default, fields with
507	// empty values are omitted from API requests. However, any non-pointer,
508	// non-interface field appearing in ForceSendFields will be sent to the
509	// server regardless of whether the field is empty or not. This may be
510	// used to include empty fields in Patch requests.
511	ForceSendFields []string `json:"-"`
512
513	// NullFields is a list of field names (e.g. "TpuServiceAccount") to
514	// include in API requests with the JSON null value. By default, fields
515	// with empty values are omitted from API requests. However, any field
516	// with an empty value appearing in NullFields will be sent to the
517	// server as null. It is an error if a field in this list has a
518	// non-empty value. This may be used to include null fields in Patch
519	// requests.
520	NullFields []string `json:"-"`
521}
522
523func (s *GoogleCloudMlV1__Config) MarshalJSON() ([]byte, error) {
524	type NoMethod GoogleCloudMlV1__Config
525	raw := NoMethod(*s)
526	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
527}
528
529// GoogleCloudMlV1__GetConfigResponse: Returns service account
530// information associated with a project.
531type GoogleCloudMlV1__GetConfigResponse struct {
532	Config *GoogleCloudMlV1__Config `json:"config,omitempty"`
533
534	// ServiceAccount: The service account Cloud ML uses to access resources
535	// in the project.
536	ServiceAccount string `json:"serviceAccount,omitempty"`
537
538	// ServiceAccountProject: The project number for `service_account`.
539	ServiceAccountProject int64 `json:"serviceAccountProject,omitempty,string"`
540
541	// ServerResponse contains the HTTP response code and headers from the
542	// server.
543	googleapi.ServerResponse `json:"-"`
544
545	// ForceSendFields is a list of field names (e.g. "Config") to
546	// unconditionally include in API requests. By default, fields with
547	// empty values are omitted from API requests. However, any non-pointer,
548	// non-interface field appearing in ForceSendFields will be sent to the
549	// server regardless of whether the field is empty or not. This may be
550	// used to include empty fields in Patch requests.
551	ForceSendFields []string `json:"-"`
552
553	// NullFields is a list of field names (e.g. "Config") to include in API
554	// requests with the JSON null value. By default, fields with empty
555	// values are omitted from API requests. However, any field with an
556	// empty value appearing in NullFields will be sent to the server as
557	// null. It is an error if a field in this list has a non-empty value.
558	// This may be used to include null fields in Patch requests.
559	NullFields []string `json:"-"`
560}
561
562func (s *GoogleCloudMlV1__GetConfigResponse) MarshalJSON() ([]byte, error) {
563	type NoMethod GoogleCloudMlV1__GetConfigResponse
564	raw := NoMethod(*s)
565	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
566}
567
568// GoogleCloudMlV1__HyperparameterOutput: Represents the result of a
569// single hyperparameter tuning trial from a
570// training job. The TrainingOutput object that is returned on
571// successful
572// completion of a training job with hyperparameter tuning includes a
573// list
574// of HyperparameterOutput objects, one for each successful trial.
575type GoogleCloudMlV1__HyperparameterOutput struct {
576	// AllMetrics: All recorded object metrics for this trial. This field is
577	// not currently
578	// populated.
579	AllMetrics []*GoogleCloudMlV1HyperparameterOutputHyperparameterMetric `json:"allMetrics,omitempty"`
580
581	// FinalMetric: The final objective metric seen for this trial.
582	FinalMetric *GoogleCloudMlV1HyperparameterOutputHyperparameterMetric `json:"finalMetric,omitempty"`
583
584	// Hyperparameters: The hyperparameters given to this trial.
585	Hyperparameters map[string]string `json:"hyperparameters,omitempty"`
586
587	// IsTrialStoppedEarly: True if the trial is stopped early.
588	IsTrialStoppedEarly bool `json:"isTrialStoppedEarly,omitempty"`
589
590	// TrialId: The trial id for these results.
591	TrialId string `json:"trialId,omitempty"`
592
593	// ForceSendFields is a list of field names (e.g. "AllMetrics") to
594	// unconditionally include in API requests. By default, fields with
595	// empty values are omitted from API requests. However, any non-pointer,
596	// non-interface field appearing in ForceSendFields will be sent to the
597	// server regardless of whether the field is empty or not. This may be
598	// used to include empty fields in Patch requests.
599	ForceSendFields []string `json:"-"`
600
601	// NullFields is a list of field names (e.g. "AllMetrics") to include in
602	// API requests with the JSON null value. By default, fields with empty
603	// values are omitted from API requests. However, any field with an
604	// empty value appearing in NullFields will be sent to the server as
605	// null. It is an error if a field in this list has a non-empty value.
606	// This may be used to include null fields in Patch requests.
607	NullFields []string `json:"-"`
608}
609
610func (s *GoogleCloudMlV1__HyperparameterOutput) MarshalJSON() ([]byte, error) {
611	type NoMethod GoogleCloudMlV1__HyperparameterOutput
612	raw := NoMethod(*s)
613	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
614}
615
616// GoogleCloudMlV1__HyperparameterSpec: Represents a set of
617// hyperparameters to optimize.
618type GoogleCloudMlV1__HyperparameterSpec struct {
619	// Algorithm: Optional. The search algorithm specified for the
620	// hyperparameter
621	// tuning job.
622	// Uses the default CloudML Engine hyperparameter tuning
623	// algorithm if unspecified.
624	//
625	// Possible values:
626	//   "ALGORITHM_UNSPECIFIED" - The default algorithm used by
627	// hyperparameter tuning service.
628	//   "GRID_SEARCH" - Simple grid search within the feasible space. To
629	// use grid search,
630	// all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`.
631	//   "RANDOM_SEARCH" - Simple random search within the feasible space.
632	Algorithm string `json:"algorithm,omitempty"`
633
634	// EnableTrialEarlyStopping: Optional. Indicates if the hyperparameter
635	// tuning job enables auto trial
636	// early stopping.
637	EnableTrialEarlyStopping bool `json:"enableTrialEarlyStopping,omitempty"`
638
639	// Goal: Required. The type of goal to use for tuning. Available types
640	// are
641	// `MAXIMIZE` and `MINIMIZE`.
642	//
643	// Defaults to `MAXIMIZE`.
644	//
645	// Possible values:
646	//   "GOAL_TYPE_UNSPECIFIED" - Goal Type will default to maximize.
647	//   "MAXIMIZE" - Maximize the goal metric.
648	//   "MINIMIZE" - Minimize the goal metric.
649	Goal string `json:"goal,omitempty"`
650
651	// HyperparameterMetricTag: Optional. The Tensorflow summary tag name to
652	// use for optimizing trials. For
653	// current versions of Tensorflow, this tag name should exactly match
654	// what is
655	// shown in Tensorboard, including all scopes.  For versions of
656	// Tensorflow
657	// prior to 0.12, this should be only the tag passed to tf.Summary.
658	// By default, "training/hptuning/metric" will be used.
659	HyperparameterMetricTag string `json:"hyperparameterMetricTag,omitempty"`
660
661	// MaxParallelTrials: Optional. The number of training trials to run
662	// concurrently.
663	// You can reduce the time it takes to perform hyperparameter tuning by
664	// adding
665	// trials in parallel. However, each trail only benefits from the
666	// information
667	// gained in completed trials. That means that a trial does not get
668	// access to
669	// the results of trials running at the same time, which could reduce
670	// the
671	// quality of the overall optimization.
672	//
673	// Each trial will use the same scale tier and machine types.
674	//
675	// Defaults to one.
676	MaxParallelTrials int64 `json:"maxParallelTrials,omitempty"`
677
678	// MaxTrials: Optional. How many training trials should be attempted to
679	// optimize
680	// the specified hyperparameters.
681	//
682	// Defaults to one.
683	MaxTrials int64 `json:"maxTrials,omitempty"`
684
685	// Params: Required. The set of parameters to tune.
686	Params []*GoogleCloudMlV1__ParameterSpec `json:"params,omitempty"`
687
688	// ResumePreviousJobId: Optional. The prior hyperparameter tuning job id
689	// that users hope to
690	// continue with. The job id will be used to find the corresponding
691	// vizier
692	// study guid and resume the study.
693	ResumePreviousJobId string `json:"resumePreviousJobId,omitempty"`
694
695	// ForceSendFields is a list of field names (e.g. "Algorithm") to
696	// unconditionally include in API requests. By default, fields with
697	// empty values are omitted from API requests. However, any non-pointer,
698	// non-interface field appearing in ForceSendFields will be sent to the
699	// server regardless of whether the field is empty or not. This may be
700	// used to include empty fields in Patch requests.
701	ForceSendFields []string `json:"-"`
702
703	// NullFields is a list of field names (e.g. "Algorithm") to include in
704	// API requests with the JSON null value. By default, fields with empty
705	// values are omitted from API requests. However, any field with an
706	// empty value appearing in NullFields will be sent to the server as
707	// null. It is an error if a field in this list has a non-empty value.
708	// This may be used to include null fields in Patch requests.
709	NullFields []string `json:"-"`
710}
711
712func (s *GoogleCloudMlV1__HyperparameterSpec) MarshalJSON() ([]byte, error) {
713	type NoMethod GoogleCloudMlV1__HyperparameterSpec
714	raw := NoMethod(*s)
715	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
716}
717
718// GoogleCloudMlV1__Job: Represents a training or prediction job.
719type GoogleCloudMlV1__Job struct {
720	// CreateTime: Output only. When the job was created.
721	CreateTime string `json:"createTime,omitempty"`
722
723	// EndTime: Output only. When the job processing was completed.
724	EndTime string `json:"endTime,omitempty"`
725
726	// ErrorMessage: Output only. The details of a failure or a
727	// cancellation.
728	ErrorMessage string `json:"errorMessage,omitempty"`
729
730	// Etag: `etag` is used for optimistic concurrency control as a way to
731	// help
732	// prevent simultaneous updates of a job from overwriting each other.
733	// It is strongly suggested that systems make use of the `etag` in
734	// the
735	// read-modify-write cycle to perform job updates in order to avoid
736	// race
737	// conditions: An `etag` is returned in the response to `GetJob`,
738	// and
739	// systems are expected to put that etag in the request to `UpdateJob`
740	// to
741	// ensure that their change will be applied to the same version of the
742	// job.
743	Etag string `json:"etag,omitempty"`
744
745	// JobId: Required. The user-specified id of the job.
746	JobId string `json:"jobId,omitempty"`
747
748	// Labels: Optional. One or more labels that you can add, to organize
749	// your jobs.
750	// Each label is a key-value pair, where both the key and the value
751	// are
752	// arbitrary strings that you supply.
753	// For more information, see the documentation on
754	// <a href="/ml-engine/docs/tensorflow/resource-labels">using
755	// labels</a>.
756	Labels map[string]string `json:"labels,omitempty"`
757
758	// PredictionInput: Input parameters to create a prediction job.
759	PredictionInput *GoogleCloudMlV1__PredictionInput `json:"predictionInput,omitempty"`
760
761	// PredictionOutput: The current prediction job result.
762	PredictionOutput *GoogleCloudMlV1__PredictionOutput `json:"predictionOutput,omitempty"`
763
764	// StartTime: Output only. When the job processing was started.
765	StartTime string `json:"startTime,omitempty"`
766
767	// State: Output only. The detailed state of a job.
768	//
769	// Possible values:
770	//   "STATE_UNSPECIFIED" - The job state is unspecified.
771	//   "QUEUED" - The job has been just created and processing has not yet
772	// begun.
773	//   "PREPARING" - The service is preparing to run the job.
774	//   "RUNNING" - The job is in progress.
775	//   "SUCCEEDED" - The job completed successfully.
776	//   "FAILED" - The job failed.
777	// `error_message` should contain the details of the failure.
778	//   "CANCELLING" - The job is being cancelled.
779	// `error_message` should describe the reason for the cancellation.
780	//   "CANCELLED" - The job has been cancelled.
781	// `error_message` should describe the reason for the cancellation.
782	State string `json:"state,omitempty"`
783
784	// TrainingInput: Input parameters to create a training job.
785	TrainingInput *GoogleCloudMlV1__TrainingInput `json:"trainingInput,omitempty"`
786
787	// TrainingOutput: The current training job result.
788	TrainingOutput *GoogleCloudMlV1__TrainingOutput `json:"trainingOutput,omitempty"`
789
790	// ServerResponse contains the HTTP response code and headers from the
791	// server.
792	googleapi.ServerResponse `json:"-"`
793
794	// ForceSendFields is a list of field names (e.g. "CreateTime") to
795	// unconditionally include in API requests. By default, fields with
796	// empty values are omitted from API requests. However, any non-pointer,
797	// non-interface field appearing in ForceSendFields will be sent to the
798	// server regardless of whether the field is empty or not. This may be
799	// used to include empty fields in Patch requests.
800	ForceSendFields []string `json:"-"`
801
802	// NullFields is a list of field names (e.g. "CreateTime") to include in
803	// API requests with the JSON null value. By default, fields with empty
804	// values are omitted from API requests. However, any field with an
805	// empty value appearing in NullFields will be sent to the server as
806	// null. It is an error if a field in this list has a non-empty value.
807	// This may be used to include null fields in Patch requests.
808	NullFields []string `json:"-"`
809}
810
811func (s *GoogleCloudMlV1__Job) MarshalJSON() ([]byte, error) {
812	type NoMethod GoogleCloudMlV1__Job
813	raw := NoMethod(*s)
814	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
815}
816
817// GoogleCloudMlV1__ListJobsResponse: Response message for the ListJobs
818// method.
819type GoogleCloudMlV1__ListJobsResponse struct {
820	// Jobs: The list of jobs.
821	Jobs []*GoogleCloudMlV1__Job `json:"jobs,omitempty"`
822
823	// NextPageToken: Optional. Pass this token as the `page_token` field of
824	// the request for a
825	// subsequent call.
826	NextPageToken string `json:"nextPageToken,omitempty"`
827
828	// ServerResponse contains the HTTP response code and headers from the
829	// server.
830	googleapi.ServerResponse `json:"-"`
831
832	// ForceSendFields is a list of field names (e.g. "Jobs") to
833	// unconditionally include in API requests. By default, fields with
834	// empty values are omitted from API requests. However, any non-pointer,
835	// non-interface field appearing in ForceSendFields will be sent to the
836	// server regardless of whether the field is empty or not. This may be
837	// used to include empty fields in Patch requests.
838	ForceSendFields []string `json:"-"`
839
840	// NullFields is a list of field names (e.g. "Jobs") to include in API
841	// requests with the JSON null value. By default, fields with empty
842	// values are omitted from API requests. However, any field with an
843	// empty value appearing in NullFields will be sent to the server as
844	// null. It is an error if a field in this list has a non-empty value.
845	// This may be used to include null fields in Patch requests.
846	NullFields []string `json:"-"`
847}
848
849func (s *GoogleCloudMlV1__ListJobsResponse) MarshalJSON() ([]byte, error) {
850	type NoMethod GoogleCloudMlV1__ListJobsResponse
851	raw := NoMethod(*s)
852	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
853}
854
855type GoogleCloudMlV1__ListLocationsResponse struct {
856	// Locations: Locations where at least one type of CMLE capability is
857	// available.
858	Locations []*GoogleCloudMlV1__Location `json:"locations,omitempty"`
859
860	// NextPageToken: Optional. Pass this token as the `page_token` field of
861	// the request for a
862	// subsequent call.
863	NextPageToken string `json:"nextPageToken,omitempty"`
864
865	// ServerResponse contains the HTTP response code and headers from the
866	// server.
867	googleapi.ServerResponse `json:"-"`
868
869	// ForceSendFields is a list of field names (e.g. "Locations") to
870	// unconditionally include in API requests. By default, fields with
871	// empty values are omitted from API requests. However, any non-pointer,
872	// non-interface field appearing in ForceSendFields will be sent to the
873	// server regardless of whether the field is empty or not. This may be
874	// used to include empty fields in Patch requests.
875	ForceSendFields []string `json:"-"`
876
877	// NullFields is a list of field names (e.g. "Locations") to include in
878	// API requests with the JSON null value. By default, fields with empty
879	// values are omitted from API requests. However, any field with an
880	// empty value appearing in NullFields will be sent to the server as
881	// null. It is an error if a field in this list has a non-empty value.
882	// This may be used to include null fields in Patch requests.
883	NullFields []string `json:"-"`
884}
885
886func (s *GoogleCloudMlV1__ListLocationsResponse) MarshalJSON() ([]byte, error) {
887	type NoMethod GoogleCloudMlV1__ListLocationsResponse
888	raw := NoMethod(*s)
889	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
890}
891
892// GoogleCloudMlV1__ListModelsResponse: Response message for the
893// ListModels method.
894type GoogleCloudMlV1__ListModelsResponse struct {
895	// Models: The list of models.
896	Models []*GoogleCloudMlV1__Model `json:"models,omitempty"`
897
898	// NextPageToken: Optional. Pass this token as the `page_token` field of
899	// the request for a
900	// subsequent call.
901	NextPageToken string `json:"nextPageToken,omitempty"`
902
903	// ServerResponse contains the HTTP response code and headers from the
904	// server.
905	googleapi.ServerResponse `json:"-"`
906
907	// ForceSendFields is a list of field names (e.g. "Models") to
908	// unconditionally include in API requests. By default, fields with
909	// empty values are omitted from API requests. However, any non-pointer,
910	// non-interface field appearing in ForceSendFields will be sent to the
911	// server regardless of whether the field is empty or not. This may be
912	// used to include empty fields in Patch requests.
913	ForceSendFields []string `json:"-"`
914
915	// NullFields is a list of field names (e.g. "Models") to include in API
916	// requests with the JSON null value. By default, fields with empty
917	// values are omitted from API requests. However, any field with an
918	// empty value appearing in NullFields will be sent to the server as
919	// null. It is an error if a field in this list has a non-empty value.
920	// This may be used to include null fields in Patch requests.
921	NullFields []string `json:"-"`
922}
923
924func (s *GoogleCloudMlV1__ListModelsResponse) MarshalJSON() ([]byte, error) {
925	type NoMethod GoogleCloudMlV1__ListModelsResponse
926	raw := NoMethod(*s)
927	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
928}
929
930// GoogleCloudMlV1__ListVersionsResponse: Response message for the
931// ListVersions method.
932type GoogleCloudMlV1__ListVersionsResponse struct {
933	// NextPageToken: Optional. Pass this token as the `page_token` field of
934	// the request for a
935	// subsequent call.
936	NextPageToken string `json:"nextPageToken,omitempty"`
937
938	// Versions: The list of versions.
939	Versions []*GoogleCloudMlV1__Version `json:"versions,omitempty"`
940
941	// ServerResponse contains the HTTP response code and headers from the
942	// server.
943	googleapi.ServerResponse `json:"-"`
944
945	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
946	// unconditionally include in API requests. By default, fields with
947	// empty values are omitted from API requests. However, any non-pointer,
948	// non-interface field appearing in ForceSendFields will be sent to the
949	// server regardless of whether the field is empty or not. This may be
950	// used to include empty fields in Patch requests.
951	ForceSendFields []string `json:"-"`
952
953	// NullFields is a list of field names (e.g. "NextPageToken") to include
954	// in API requests with the JSON null value. By default, fields with
955	// empty values are omitted from API requests. However, any field with
956	// an empty value appearing in NullFields will be sent to the server as
957	// null. It is an error if a field in this list has a non-empty value.
958	// This may be used to include null fields in Patch requests.
959	NullFields []string `json:"-"`
960}
961
962func (s *GoogleCloudMlV1__ListVersionsResponse) MarshalJSON() ([]byte, error) {
963	type NoMethod GoogleCloudMlV1__ListVersionsResponse
964	raw := NoMethod(*s)
965	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
966}
967
968type GoogleCloudMlV1__Location struct {
969	// Capabilities: Capabilities available in the location.
970	Capabilities []*GoogleCloudMlV1__Capability `json:"capabilities,omitempty"`
971
972	Name string `json:"name,omitempty"`
973
974	// ServerResponse contains the HTTP response code and headers from the
975	// server.
976	googleapi.ServerResponse `json:"-"`
977
978	// ForceSendFields is a list of field names (e.g. "Capabilities") to
979	// unconditionally include in API requests. By default, fields with
980	// empty values are omitted from API requests. However, any non-pointer,
981	// non-interface field appearing in ForceSendFields will be sent to the
982	// server regardless of whether the field is empty or not. This may be
983	// used to include empty fields in Patch requests.
984	ForceSendFields []string `json:"-"`
985
986	// NullFields is a list of field names (e.g. "Capabilities") to include
987	// in API requests with the JSON null value. By default, fields with
988	// empty values are omitted from API requests. However, any field with
989	// an empty value appearing in NullFields will be sent to the server as
990	// null. It is an error if a field in this list has a non-empty value.
991	// This may be used to include null fields in Patch requests.
992	NullFields []string `json:"-"`
993}
994
995func (s *GoogleCloudMlV1__Location) MarshalJSON() ([]byte, error) {
996	type NoMethod GoogleCloudMlV1__Location
997	raw := NoMethod(*s)
998	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
999}
1000
1001// GoogleCloudMlV1__ManualScaling: Options for manually scaling a model.
1002type GoogleCloudMlV1__ManualScaling struct {
1003	// Nodes: The number of nodes to allocate for this model. These nodes
1004	// are always up,
1005	// starting from the time the model is deployed, so the cost of
1006	// operating
1007	// this model will be proportional to `nodes` * number of hours
1008	// since
1009	// last billing cycle plus the cost for each prediction performed.
1010	Nodes int64 `json:"nodes,omitempty"`
1011
1012	// ForceSendFields is a list of field names (e.g. "Nodes") to
1013	// unconditionally include in API requests. By default, fields with
1014	// empty values are omitted from API requests. However, any non-pointer,
1015	// non-interface field appearing in ForceSendFields will be sent to the
1016	// server regardless of whether the field is empty or not. This may be
1017	// used to include empty fields in Patch requests.
1018	ForceSendFields []string `json:"-"`
1019
1020	// NullFields is a list of field names (e.g. "Nodes") to include in API
1021	// requests with the JSON null value. By default, fields with empty
1022	// values are omitted from API requests. However, any field with an
1023	// empty value appearing in NullFields will be sent to the server as
1024	// null. It is an error if a field in this list has a non-empty value.
1025	// This may be used to include null fields in Patch requests.
1026	NullFields []string `json:"-"`
1027}
1028
1029func (s *GoogleCloudMlV1__ManualScaling) MarshalJSON() ([]byte, error) {
1030	type NoMethod GoogleCloudMlV1__ManualScaling
1031	raw := NoMethod(*s)
1032	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1033}
1034
1035// GoogleCloudMlV1__Model: Represents a machine learning solution.
1036//
1037// A model can have multiple versions, each of which is a deployed,
1038// trained
1039// model ready to receive prediction requests. The model itself is just
1040// a
1041// container.
1042type GoogleCloudMlV1__Model struct {
1043	// DefaultVersion: Output only. The default version of the model. This
1044	// version will be used to
1045	// handle prediction requests that do not specify a version.
1046	//
1047	// You can change the default version by
1048	// calling
1049	// [projects.methods.versions.setDefault](/ml-engine/reference/re
1050	// st/v1/projects.models.versions/setDefault).
1051	DefaultVersion *GoogleCloudMlV1__Version `json:"defaultVersion,omitempty"`
1052
1053	// Description: Optional. The description specified for the model when
1054	// it was created.
1055	Description string `json:"description,omitempty"`
1056
1057	// Etag: `etag` is used for optimistic concurrency control as a way to
1058	// help
1059	// prevent simultaneous updates of a model from overwriting each
1060	// other.
1061	// It is strongly suggested that systems make use of the `etag` in
1062	// the
1063	// read-modify-write cycle to perform model updates in order to avoid
1064	// race
1065	// conditions: An `etag` is returned in the response to `GetModel`,
1066	// and
1067	// systems are expected to put that etag in the request to `UpdateModel`
1068	// to
1069	// ensure that their change will be applied to the model as intended.
1070	Etag string `json:"etag,omitempty"`
1071
1072	// Labels: Optional. One or more labels that you can add, to organize
1073	// your models.
1074	// Each label is a key-value pair, where both the key and the value
1075	// are
1076	// arbitrary strings that you supply.
1077	// For more information, see the documentation on
1078	// <a href="/ml-engine/docs/tensorflow/resource-labels">using
1079	// labels</a>.
1080	Labels map[string]string `json:"labels,omitempty"`
1081
1082	// Name: Required. The name specified for the model when it was
1083	// created.
1084	//
1085	// The model name must be unique within the project it is created in.
1086	Name string `json:"name,omitempty"`
1087
1088	// OnlinePredictionLogging: Optional. If true, enables StackDriver
1089	// Logging for online prediction.
1090	// Default is false.
1091	OnlinePredictionLogging bool `json:"onlinePredictionLogging,omitempty"`
1092
1093	// Regions: Optional. The list of regions where the model is going to be
1094	// deployed.
1095	// Currently only one region per model is supported.
1096	// Defaults to 'us-central1' if nothing is set.
1097	// See the <a href="/ml-engine/docs/tensorflow/regions">available
1098	// regions</a>
1099	// for ML Engine services.
1100	// Note:
1101	// *   No matter where a model is deployed, it can always be accessed
1102	// by
1103	//     users from anywhere, both for online and batch prediction.
1104	// *   The region for a batch prediction job is set by the region field
1105	// when
1106	//     submitting the batch prediction job and does not take its value
1107	// from
1108	//     this field.
1109	Regions []string `json:"regions,omitempty"`
1110
1111	// ServerResponse contains the HTTP response code and headers from the
1112	// server.
1113	googleapi.ServerResponse `json:"-"`
1114
1115	// ForceSendFields is a list of field names (e.g. "DefaultVersion") to
1116	// unconditionally include in API requests. By default, fields with
1117	// empty values are omitted from API requests. However, any non-pointer,
1118	// non-interface field appearing in ForceSendFields will be sent to the
1119	// server regardless of whether the field is empty or not. This may be
1120	// used to include empty fields in Patch requests.
1121	ForceSendFields []string `json:"-"`
1122
1123	// NullFields is a list of field names (e.g. "DefaultVersion") to
1124	// include in API requests with the JSON null value. By default, fields
1125	// with empty values are omitted from API requests. However, any field
1126	// with an empty value appearing in NullFields will be sent to the
1127	// server as null. It is an error if a field in this list has a
1128	// non-empty value. This may be used to include null fields in Patch
1129	// requests.
1130	NullFields []string `json:"-"`
1131}
1132
1133func (s *GoogleCloudMlV1__Model) MarshalJSON() ([]byte, error) {
1134	type NoMethod GoogleCloudMlV1__Model
1135	raw := NoMethod(*s)
1136	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1137}
1138
1139// GoogleCloudMlV1__OperationMetadata: Represents the metadata of the
1140// long-running operation.
1141type GoogleCloudMlV1__OperationMetadata struct {
1142	// CreateTime: The time the operation was submitted.
1143	CreateTime string `json:"createTime,omitempty"`
1144
1145	// EndTime: The time operation processing completed.
1146	EndTime string `json:"endTime,omitempty"`
1147
1148	// IsCancellationRequested: Indicates whether a request to cancel this
1149	// operation has been made.
1150	IsCancellationRequested bool `json:"isCancellationRequested,omitempty"`
1151
1152	// Labels: The user labels, inherited from the model or the model
1153	// version being
1154	// operated on.
1155	Labels map[string]string `json:"labels,omitempty"`
1156
1157	// ModelName: Contains the name of the model associated with the
1158	// operation.
1159	ModelName string `json:"modelName,omitempty"`
1160
1161	// OperationType: The operation type.
1162	//
1163	// Possible values:
1164	//   "OPERATION_TYPE_UNSPECIFIED" - Unspecified operation type.
1165	//   "CREATE_VERSION" - An operation to create a new version.
1166	//   "DELETE_VERSION" - An operation to delete an existing version.
1167	//   "DELETE_MODEL" - An operation to delete an existing model.
1168	//   "UPDATE_MODEL" - An operation to update an existing model.
1169	//   "UPDATE_VERSION" - An operation to update an existing version.
1170	//   "UPDATE_CONFIG" - An operation to update project configuration.
1171	OperationType string `json:"operationType,omitempty"`
1172
1173	// ProjectNumber: Contains the project number associated with the
1174	// operation.
1175	ProjectNumber int64 `json:"projectNumber,omitempty,string"`
1176
1177	// StartTime: The time operation processing started.
1178	StartTime string `json:"startTime,omitempty"`
1179
1180	// Version: Contains the version associated with the operation.
1181	Version *GoogleCloudMlV1__Version `json:"version,omitempty"`
1182
1183	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1184	// unconditionally include in API requests. By default, fields with
1185	// empty values are omitted from API requests. However, any non-pointer,
1186	// non-interface field appearing in ForceSendFields will be sent to the
1187	// server regardless of whether the field is empty or not. This may be
1188	// used to include empty fields in Patch requests.
1189	ForceSendFields []string `json:"-"`
1190
1191	// NullFields is a list of field names (e.g. "CreateTime") to include in
1192	// API requests with the JSON null value. By default, fields with empty
1193	// values are omitted from API requests. However, any field with an
1194	// empty value appearing in NullFields will be sent to the server as
1195	// null. It is an error if a field in this list has a non-empty value.
1196	// This may be used to include null fields in Patch requests.
1197	NullFields []string `json:"-"`
1198}
1199
1200func (s *GoogleCloudMlV1__OperationMetadata) MarshalJSON() ([]byte, error) {
1201	type NoMethod GoogleCloudMlV1__OperationMetadata
1202	raw := NoMethod(*s)
1203	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1204}
1205
1206// GoogleCloudMlV1__ParameterSpec: Represents a single hyperparameter to
1207// optimize.
1208type GoogleCloudMlV1__ParameterSpec struct {
1209	// CategoricalValues: Required if type is `CATEGORICAL`. The list of
1210	// possible categories.
1211	CategoricalValues []string `json:"categoricalValues,omitempty"`
1212
1213	// DiscreteValues: Required if type is `DISCRETE`.
1214	// A list of feasible points.
1215	// The list should be in strictly increasing order. For instance,
1216	// this
1217	// parameter might have possible settings of 1.5, 2.5, and 4.0. This
1218	// list
1219	// should not contain more than 1,000 values.
1220	DiscreteValues []float64 `json:"discreteValues,omitempty"`
1221
1222	// MaxValue: Required if type is `DOUBLE` or `INTEGER`. This
1223	// field
1224	// should be unset if type is `CATEGORICAL`. This value should be
1225	// integers if
1226	// type is `INTEGER`.
1227	MaxValue float64 `json:"maxValue,omitempty"`
1228
1229	// MinValue: Required if type is `DOUBLE` or `INTEGER`. This
1230	// field
1231	// should be unset if type is `CATEGORICAL`. This value should be
1232	// integers if
1233	// type is INTEGER.
1234	MinValue float64 `json:"minValue,omitempty"`
1235
1236	// ParameterName: Required. The parameter name must be unique amongst
1237	// all ParameterConfigs in
1238	// a HyperparameterSpec message. E.g., "learning_rate".
1239	ParameterName string `json:"parameterName,omitempty"`
1240
1241	// ScaleType: Optional. How the parameter should be scaled to the
1242	// hypercube.
1243	// Leave unset for categorical parameters.
1244	// Some kind of scaling is strongly recommended for real or
1245	// integral
1246	// parameters (e.g., `UNIT_LINEAR_SCALE`).
1247	//
1248	// Possible values:
1249	//   "NONE" - By default, no scaling is applied.
1250	//   "UNIT_LINEAR_SCALE" - Scales the feasible space to (0, 1) linearly.
1251	//   "UNIT_LOG_SCALE" - Scales the feasible space logarithmically to (0,
1252	// 1). The entire feasible
1253	// space must be strictly positive.
1254	//   "UNIT_REVERSE_LOG_SCALE" - Scales the feasible space "reverse"
1255	// logarithmically to (0, 1). The result
1256	// is that values close to the top of the feasible space are spread out
1257	// more
1258	// than points near the bottom. The entire feasible space must be
1259	// strictly
1260	// positive.
1261	ScaleType string `json:"scaleType,omitempty"`
1262
1263	// Type: Required. The type of the parameter.
1264	//
1265	// Possible values:
1266	//   "PARAMETER_TYPE_UNSPECIFIED" - You must specify a valid type. Using
1267	// this unspecified type will result in
1268	// an error.
1269	//   "DOUBLE" - Type for real-valued parameters.
1270	//   "INTEGER" - Type for integral parameters.
1271	//   "CATEGORICAL" - The parameter is categorical, with a value chosen
1272	// from the categories
1273	// field.
1274	//   "DISCRETE" - The parameter is real valued, with a fixed set of
1275	// feasible points. If
1276	// `type==DISCRETE`, feasible_points must be provided, and
1277	// {`min_value`, `max_value`} will be ignored.
1278	Type string `json:"type,omitempty"`
1279
1280	// ForceSendFields is a list of field names (e.g. "CategoricalValues")
1281	// to unconditionally include in API requests. By default, fields with
1282	// empty values are omitted from API requests. However, any non-pointer,
1283	// non-interface field appearing in ForceSendFields will be sent to the
1284	// server regardless of whether the field is empty or not. This may be
1285	// used to include empty fields in Patch requests.
1286	ForceSendFields []string `json:"-"`
1287
1288	// NullFields is a list of field names (e.g. "CategoricalValues") to
1289	// include in API requests with the JSON null value. By default, fields
1290	// with empty values are omitted from API requests. However, any field
1291	// with an empty value appearing in NullFields will be sent to the
1292	// server as null. It is an error if a field in this list has a
1293	// non-empty value. This may be used to include null fields in Patch
1294	// requests.
1295	NullFields []string `json:"-"`
1296}
1297
1298func (s *GoogleCloudMlV1__ParameterSpec) MarshalJSON() ([]byte, error) {
1299	type NoMethod GoogleCloudMlV1__ParameterSpec
1300	raw := NoMethod(*s)
1301	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1302}
1303
1304func (s *GoogleCloudMlV1__ParameterSpec) UnmarshalJSON(data []byte) error {
1305	type NoMethod GoogleCloudMlV1__ParameterSpec
1306	var s1 struct {
1307		MaxValue gensupport.JSONFloat64 `json:"maxValue"`
1308		MinValue gensupport.JSONFloat64 `json:"minValue"`
1309		*NoMethod
1310	}
1311	s1.NoMethod = (*NoMethod)(s)
1312	if err := json.Unmarshal(data, &s1); err != nil {
1313		return err
1314	}
1315	s.MaxValue = float64(s1.MaxValue)
1316	s.MinValue = float64(s1.MinValue)
1317	return nil
1318}
1319
1320// GoogleCloudMlV1__PredictRequest: Request for predictions to be issued
1321// against a trained model.
1322type GoogleCloudMlV1__PredictRequest struct {
1323	// HttpBody:
1324	// Required. The prediction request body.
1325	HttpBody *GoogleApi__HttpBody `json:"httpBody,omitempty"`
1326
1327	// ForceSendFields is a list of field names (e.g. "HttpBody") to
1328	// unconditionally include in API requests. By default, fields with
1329	// empty values are omitted from API requests. However, any non-pointer,
1330	// non-interface field appearing in ForceSendFields will be sent to the
1331	// server regardless of whether the field is empty or not. This may be
1332	// used to include empty fields in Patch requests.
1333	ForceSendFields []string `json:"-"`
1334
1335	// NullFields is a list of field names (e.g. "HttpBody") to include in
1336	// API requests with the JSON null value. By default, fields with empty
1337	// values are omitted from API requests. However, any field with an
1338	// empty value appearing in NullFields will be sent to the server as
1339	// null. It is an error if a field in this list has a non-empty value.
1340	// This may be used to include null fields in Patch requests.
1341	NullFields []string `json:"-"`
1342}
1343
1344func (s *GoogleCloudMlV1__PredictRequest) MarshalJSON() ([]byte, error) {
1345	type NoMethod GoogleCloudMlV1__PredictRequest
1346	raw := NoMethod(*s)
1347	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1348}
1349
1350// GoogleCloudMlV1__PredictionInput: Represents input parameters for a
1351// prediction job. Next field: 19
1352type GoogleCloudMlV1__PredictionInput struct {
1353	// Accelerator: Optional. The type and number of accelerators to be
1354	// attached to each
1355	// machine running the job.
1356	Accelerator *GoogleCloudMlV1__AcceleratorConfig `json:"accelerator,omitempty"`
1357
1358	// BatchSize: Optional. Number of records per batch, defaults to 64.
1359	// The service will buffer batch_size number of records in memory
1360	// before
1361	// invoking one Tensorflow prediction call internally. So take the
1362	// record
1363	// size and memory available into consideration when setting this
1364	// parameter.
1365	BatchSize int64 `json:"batchSize,omitempty,string"`
1366
1367	// DataFormat: Required. The format of the input data files.
1368	//
1369	// Possible values:
1370	//   "DATA_FORMAT_UNSPECIFIED" - Unspecified format.
1371	//   "JSON" - Each line of the file is a JSON dictionary representing
1372	// one record.
1373	//   "TEXT" - Deprecated. Use JSON instead.
1374	//   "TF_RECORD" - INPUT ONLY. The source file is a TFRecord file.
1375	//   "TF_RECORD_GZIP" - INPUT ONLY. The source file is a GZIP-compressed
1376	// TFRecord file.
1377	//   "CSV" - OUTPUT ONLY. Output values will be in comma-separated rows,
1378	// with keys
1379	// in a separate file.
1380	DataFormat string `json:"dataFormat,omitempty"`
1381
1382	// InputPaths: Required. The Google Cloud Storage location of the input
1383	// data files.
1384	// May contain wildcards.
1385	InputPaths []string `json:"inputPaths,omitempty"`
1386
1387	// MaxWorkerCount: Optional. The maximum number of workers to be used
1388	// for parallel processing.
1389	// Defaults to 10 if not specified.
1390	MaxWorkerCount int64 `json:"maxWorkerCount,omitempty,string"`
1391
1392	// ModelName: Use this field if you want to use the default version for
1393	// the specified
1394	// model. The string must use the following
1395	// format:
1396	//
1397	// "projects/YOUR_PROJECT/models/YOUR_MODEL"
1398	ModelName string `json:"modelName,omitempty"`
1399
1400	// OutputDataFormat: Optional. Format of the output data files, defaults
1401	// to JSON.
1402	//
1403	// Possible values:
1404	//   "DATA_FORMAT_UNSPECIFIED" - Unspecified format.
1405	//   "JSON" - Each line of the file is a JSON dictionary representing
1406	// one record.
1407	//   "TEXT" - Deprecated. Use JSON instead.
1408	//   "TF_RECORD" - INPUT ONLY. The source file is a TFRecord file.
1409	//   "TF_RECORD_GZIP" - INPUT ONLY. The source file is a GZIP-compressed
1410	// TFRecord file.
1411	//   "CSV" - OUTPUT ONLY. Output values will be in comma-separated rows,
1412	// with keys
1413	// in a separate file.
1414	OutputDataFormat string `json:"outputDataFormat,omitempty"`
1415
1416	// OutputPath: Required. The output Google Cloud Storage location.
1417	OutputPath string `json:"outputPath,omitempty"`
1418
1419	// Region: Required. The Google Compute Engine region to run the
1420	// prediction job in.
1421	// See the <a href="/ml-engine/docs/tensorflow/regions">available
1422	// regions</a>
1423	// for ML Engine services.
1424	Region string `json:"region,omitempty"`
1425
1426	// RuntimeVersion: Optional. The Google Cloud ML runtime version to use
1427	// for this batch
1428	// prediction. If not set, Google Cloud ML will pick the runtime version
1429	// used
1430	// during the CreateVersion request for this model version, or choose
1431	// the
1432	// latest stable version when model version information is not
1433	// available
1434	// such as when the model is specified by uri.
1435	RuntimeVersion string `json:"runtimeVersion,omitempty"`
1436
1437	// SignatureName: Optional. The name of the signature defined in the
1438	// SavedModel to use for
1439	// this job. Please refer
1440	// to
1441	// [SavedModel](https://tensorflow.github.io/serving/serving_basic.htm
1442	// l)
1443	// for information about how to use signatures.
1444	//
1445	// Defaults
1446	// to
1447	// [DEFAULT_SERVING_SIGNATURE_DEF_KEY](https://www.tensorflow.org/api_
1448	// docs/python/tf/saved_model/signature_constants)
1449	// , which is "serving_default".
1450	SignatureName string `json:"signatureName,omitempty"`
1451
1452	// Uri: Use this field if you want to specify a Google Cloud Storage
1453	// path for
1454	// the model to use.
1455	Uri string `json:"uri,omitempty"`
1456
1457	// VersionName: Use this field if you want to specify a version of the
1458	// model to use. The
1459	// string is formatted the same way as `model_version`, with the
1460	// addition
1461	// of the version
1462	// information:
1463	//
1464	// "projects/YOUR_PROJECT/models/YOUR_MODEL/versions/YOUR_
1465	// VERSION"
1466	VersionName string `json:"versionName,omitempty"`
1467
1468	// ForceSendFields is a list of field names (e.g. "Accelerator") to
1469	// unconditionally include in API requests. By default, fields with
1470	// empty values are omitted from API requests. However, any non-pointer,
1471	// non-interface field appearing in ForceSendFields will be sent to the
1472	// server regardless of whether the field is empty or not. This may be
1473	// used to include empty fields in Patch requests.
1474	ForceSendFields []string `json:"-"`
1475
1476	// NullFields is a list of field names (e.g. "Accelerator") to include
1477	// in API requests with the JSON null value. By default, fields with
1478	// empty values are omitted from API requests. However, any field with
1479	// an empty value appearing in NullFields will be sent to the server as
1480	// null. It is an error if a field in this list has a non-empty value.
1481	// This may be used to include null fields in Patch requests.
1482	NullFields []string `json:"-"`
1483}
1484
1485func (s *GoogleCloudMlV1__PredictionInput) MarshalJSON() ([]byte, error) {
1486	type NoMethod GoogleCloudMlV1__PredictionInput
1487	raw := NoMethod(*s)
1488	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1489}
1490
1491// GoogleCloudMlV1__PredictionOutput: Represents results of a prediction
1492// job.
1493type GoogleCloudMlV1__PredictionOutput struct {
1494	// ErrorCount: The number of data instances which resulted in errors.
1495	ErrorCount int64 `json:"errorCount,omitempty,string"`
1496
1497	// NodeHours: Node hours used by the batch prediction job.
1498	NodeHours float64 `json:"nodeHours,omitempty"`
1499
1500	// OutputPath: The output Google Cloud Storage location provided at the
1501	// job creation time.
1502	OutputPath string `json:"outputPath,omitempty"`
1503
1504	// PredictionCount: The number of generated predictions.
1505	PredictionCount int64 `json:"predictionCount,omitempty,string"`
1506
1507	// ForceSendFields is a list of field names (e.g. "ErrorCount") to
1508	// unconditionally include in API requests. By default, fields with
1509	// empty values are omitted from API requests. However, any non-pointer,
1510	// non-interface field appearing in ForceSendFields will be sent to the
1511	// server regardless of whether the field is empty or not. This may be
1512	// used to include empty fields in Patch requests.
1513	ForceSendFields []string `json:"-"`
1514
1515	// NullFields is a list of field names (e.g. "ErrorCount") to include in
1516	// API requests with the JSON null value. By default, fields with empty
1517	// values are omitted from API requests. However, any field with an
1518	// empty value appearing in NullFields will be sent to the server as
1519	// null. It is an error if a field in this list has a non-empty value.
1520	// This may be used to include null fields in Patch requests.
1521	NullFields []string `json:"-"`
1522}
1523
1524func (s *GoogleCloudMlV1__PredictionOutput) MarshalJSON() ([]byte, error) {
1525	type NoMethod GoogleCloudMlV1__PredictionOutput
1526	raw := NoMethod(*s)
1527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1528}
1529
1530func (s *GoogleCloudMlV1__PredictionOutput) UnmarshalJSON(data []byte) error {
1531	type NoMethod GoogleCloudMlV1__PredictionOutput
1532	var s1 struct {
1533		NodeHours gensupport.JSONFloat64 `json:"nodeHours"`
1534		*NoMethod
1535	}
1536	s1.NoMethod = (*NoMethod)(s)
1537	if err := json.Unmarshal(data, &s1); err != nil {
1538		return err
1539	}
1540	s.NodeHours = float64(s1.NodeHours)
1541	return nil
1542}
1543
1544// GoogleCloudMlV1__SetDefaultVersionRequest: Request message for the
1545// SetDefaultVersion request.
1546type GoogleCloudMlV1__SetDefaultVersionRequest struct {
1547}
1548
1549// GoogleCloudMlV1__TrainingInput: Represents input parameters for a
1550// training job. When using the
1551// gcloud command to submit your training job, you can specify
1552// the input parameters as command-line arguments and/or in a YAML
1553// configuration
1554// file referenced from the --config command-line argument. For
1555// details, see the guide to
1556// <a href="/ml-engine/docs/tensorflow/training-jobs">submitting a
1557// training
1558// job</a>.
1559type GoogleCloudMlV1__TrainingInput struct {
1560	// Args: Optional. Command line arguments to pass to the program.
1561	Args []string `json:"args,omitempty"`
1562
1563	// Hyperparameters: Optional. The set of Hyperparameters to tune.
1564	Hyperparameters *GoogleCloudMlV1__HyperparameterSpec `json:"hyperparameters,omitempty"`
1565
1566	// JobDir: Optional. A Google Cloud Storage path in which to store
1567	// training outputs
1568	// and other data needed for training. This path is passed to your
1569	// TensorFlow
1570	// program as the '--job-dir' command-line argument. The benefit of
1571	// specifying
1572	// this field is that Cloud ML validates the path for use in training.
1573	JobDir string `json:"jobDir,omitempty"`
1574
1575	// MasterType: Optional. Specifies the type of virtual machine to use
1576	// for your training
1577	// job's master worker.
1578	//
1579	// The following types are supported:
1580	//
1581	// <dl>
1582	//   <dt>standard</dt>
1583	//   <dd>
1584	//   A basic machine configuration suitable for training simple models
1585	// with
1586	//   small to moderate datasets.
1587	//   </dd>
1588	//   <dt>large_model</dt>
1589	//   <dd>
1590	//   A machine with a lot of memory, specially suited for parameter
1591	// servers
1592	//   when your model is large (having many hidden layers or layers with
1593	// very
1594	//   large numbers of nodes).
1595	//   </dd>
1596	//   <dt>complex_model_s</dt>
1597	//   <dd>
1598	//   A machine suitable for the master and workers of the cluster when
1599	// your
1600	//   model requires more computation than the standard machine can
1601	// handle
1602	//   satisfactorily.
1603	//   </dd>
1604	//   <dt>complex_model_m</dt>
1605	//   <dd>
1606	//   A machine with roughly twice the number of cores and roughly double
1607	// the
1608	//   memory of <i>complex_model_s</i>.
1609	//   </dd>
1610	//   <dt>complex_model_l</dt>
1611	//   <dd>
1612	//   A machine with roughly twice the number of cores and roughly double
1613	// the
1614	//   memory of <i>complex_model_m</i>.
1615	//   </dd>
1616	//   <dt>standard_gpu</dt>
1617	//   <dd>
1618	//   A machine equivalent to <i>standard</i> that
1619	//   also includes a single NVIDIA Tesla K80 GPU. See more about
1620	//   <a href="/ml-engine/docs/tensorflow/using-gpus">using GPUs to
1621	//   train your model</a>.
1622	//   </dd>
1623	//   <dt>complex_model_m_gpu</dt>
1624	//   <dd>
1625	//   A machine equivalent to <i>complex_model_m</i> that also includes
1626	//   four NVIDIA Tesla K80 GPUs.
1627	//   </dd>
1628	//   <dt>complex_model_l_gpu</dt>
1629	//   <dd>
1630	//   A machine equivalent to <i>complex_model_l</i> that also includes
1631	//   eight NVIDIA Tesla K80 GPUs.
1632	//   </dd>
1633	//   <dt>standard_p100</dt>
1634	//   <dd>
1635	//   A machine equivalent to <i>standard</i> that
1636	//   also includes a single NVIDIA Tesla P100 GPU.
1637	//   </dd>
1638	//   <dt>complex_model_m_p100</dt>
1639	//   <dd>
1640	//   A machine equivalent to <i>complex_model_m</i> that also includes
1641	//   four NVIDIA Tesla P100 GPUs.
1642	//   </dd>
1643	//   <dt>standard_v100</dt>
1644	//   <dd>
1645	//   A machine equivalent to <i>standard</i> that
1646	//   also includes a single NVIDIA Tesla V100 GPU. The availability of
1647	// these
1648	//   GPUs is in the <i>Beta</i> launch stage.
1649	//   </dd>
1650	//   <dt>large_model_v100</dt>
1651	//   <dd>
1652	//   A machine equivalent to <i>large_model</i> that
1653	//   also includes a single NVIDIA Tesla V100 GPU. The availability of
1654	// these
1655	//   GPUs is in the <i>Beta</i> launch stage.
1656	//   </dd>
1657	//   <dt>complex_model_m_v100</dt>
1658	//   <dd>
1659	//   A machine equivalent to <i>complex_model_m</i> that
1660	//   also includes four NVIDIA Tesla V100 GPUs. The availability of
1661	// these
1662	//   GPUs is in the <i>Beta</i> launch stage.
1663	//   </dd>
1664	//   <dt>complex_model_l_v100</dt>
1665	//   <dd>
1666	//   A machine equivalent to <i>complex_model_l</i> that
1667	//   also includes eight NVIDIA Tesla V100 GPUs. The availability of
1668	// these
1669	//   GPUs is in the <i>Beta</i> launch stage.
1670	//   </dd>
1671	//   <dt>cloud_tpu</dt>
1672	//   <dd>
1673	//   A TPU VM including one Cloud TPU. See more about
1674	//   <a href="/ml-engine/docs/tensorflow/using-tpus">using TPUs to
1675	// train
1676	//   your model</a>.
1677	//   </dd>
1678	// </dl>
1679	//
1680	// You must set this value when `scaleTier` is set to `CUSTOM`.
1681	MasterType string `json:"masterType,omitempty"`
1682
1683	// PackageUris: Required. The Google Cloud Storage location of the
1684	// packages with
1685	// the training program and any additional dependencies.
1686	// The maximum number of package URIs is 100.
1687	PackageUris []string `json:"packageUris,omitempty"`
1688
1689	// ParameterServerCount: Optional. The number of parameter server
1690	// replicas to use for the training
1691	// job. Each replica in the cluster will be of the type specified
1692	// in
1693	// `parameter_server_type`.
1694	//
1695	// This value can only be used when `scale_tier` is set to `CUSTOM`.If
1696	// you
1697	// set this value, you must also set `parameter_server_type`.
1698	ParameterServerCount int64 `json:"parameterServerCount,omitempty,string"`
1699
1700	// ParameterServerType: Optional. Specifies the type of virtual machine
1701	// to use for your training
1702	// job's parameter server.
1703	//
1704	// The supported values are the same as those described in the entry
1705	// for
1706	// `master_type`.
1707	//
1708	// This value must be present when `scaleTier` is set to `CUSTOM`
1709	// and
1710	// `parameter_server_count` is greater than zero.
1711	ParameterServerType string `json:"parameterServerType,omitempty"`
1712
1713	// PythonModule: Required. The Python module name to run after
1714	// installing the packages.
1715	PythonModule string `json:"pythonModule,omitempty"`
1716
1717	// PythonVersion: Optional. The version of Python used in training. If
1718	// not set, the default
1719	// version is '2.7'. Python '3.5' is available when `runtime_version` is
1720	// set
1721	// to '1.4' and above. Python '2.7' works with all supported runtime
1722	// versions.
1723	PythonVersion string `json:"pythonVersion,omitempty"`
1724
1725	// Region: Required. The Google Compute Engine region to run the
1726	// training job in.
1727	// See the <a href="/ml-engine/docs/tensorflow/regions">available
1728	// regions</a>
1729	// for ML Engine services.
1730	Region string `json:"region,omitempty"`
1731
1732	// RuntimeVersion: Optional. The Google Cloud ML runtime version to use
1733	// for training.  If not
1734	// set, Google Cloud ML will choose a stable version, which is defined
1735	// in the
1736	// documentation of runtime version list.
1737	RuntimeVersion string `json:"runtimeVersion,omitempty"`
1738
1739	// ScaleTier: Required. Specifies the machine types, the number of
1740	// replicas for workers
1741	// and parameter servers.
1742	//
1743	// Possible values:
1744	//   "BASIC" - A single worker instance. This tier is suitable for
1745	// learning how to use
1746	// Cloud ML, and for experimenting with new models using small datasets.
1747	//   "STANDARD_1" - Many workers and a few parameter servers.
1748	//   "PREMIUM_1" - A large number of workers with many parameter
1749	// servers.
1750	//   "BASIC_GPU" - A single worker instance [with
1751	// a
1752	// GPU](/ml-engine/docs/tensorflow/using-gpus).
1753	//   "BASIC_TPU" - A single worker instance with a
1754	// [Cloud TPU](/ml-engine/docs/tensorflow/using-tpus).
1755	//   "CUSTOM" - The CUSTOM tier is not a set tier, but rather enables
1756	// you to use your
1757	// own cluster specification. When you use this tier, set values
1758	// to
1759	// configure your processing cluster according to these guidelines:
1760	//
1761	// *   You _must_ set `TrainingInput.masterType` to specify the type
1762	//     of machine to use for your master node. This is the only
1763	// required
1764	//     setting.
1765	//
1766	// *   You _may_ set `TrainingInput.workerCount` to specify the number
1767	// of
1768	//     workers to use. If you specify one or more workers, you _must_
1769	// also
1770	//     set `TrainingInput.workerType` to specify the type of machine to
1771	// use
1772	//     for your worker nodes.
1773	//
1774	// *   You _may_ set `TrainingInput.parameterServerCount` to specify
1775	// the
1776	//     number of parameter servers to use. If you specify one or more
1777	//     parameter servers, you _must_ also set
1778	//     `TrainingInput.parameterServerType` to specify the type of
1779	// machine to
1780	//     use for your parameter servers.
1781	//
1782	// Note that all of your workers must use the same machine type, which
1783	// can
1784	// be different from your parameter server type and master type.
1785	// Your
1786	// parameter servers must likewise use the same machine type, which can
1787	// be
1788	// different from your worker type and master type.
1789	ScaleTier string `json:"scaleTier,omitempty"`
1790
1791	// WorkerCount: Optional. The number of worker replicas to use for the
1792	// training job. Each
1793	// replica in the cluster will be of the type specified in
1794	// `worker_type`.
1795	//
1796	// This value can only be used when `scale_tier` is set to `CUSTOM`. If
1797	// you
1798	// set this value, you must also set `worker_type`.
1799	WorkerCount int64 `json:"workerCount,omitempty,string"`
1800
1801	// WorkerType: Optional. Specifies the type of virtual machine to use
1802	// for your training
1803	// job's worker nodes.
1804	//
1805	// The supported values are the same as those described in the entry
1806	// for
1807	// `masterType`.
1808	//
1809	// This value must be present when `scaleTier` is set to `CUSTOM`
1810	// and
1811	// `workerCount` is greater than zero.
1812	WorkerType string `json:"workerType,omitempty"`
1813
1814	// ForceSendFields is a list of field names (e.g. "Args") to
1815	// unconditionally include in API requests. By default, fields with
1816	// empty values are omitted from API requests. However, any non-pointer,
1817	// non-interface field appearing in ForceSendFields will be sent to the
1818	// server regardless of whether the field is empty or not. This may be
1819	// used to include empty fields in Patch requests.
1820	ForceSendFields []string `json:"-"`
1821
1822	// NullFields is a list of field names (e.g. "Args") to include in API
1823	// requests with the JSON null value. By default, fields with empty
1824	// values are omitted from API requests. However, any field with an
1825	// empty value appearing in NullFields will be sent to the server as
1826	// null. It is an error if a field in this list has a non-empty value.
1827	// This may be used to include null fields in Patch requests.
1828	NullFields []string `json:"-"`
1829}
1830
1831func (s *GoogleCloudMlV1__TrainingInput) MarshalJSON() ([]byte, error) {
1832	type NoMethod GoogleCloudMlV1__TrainingInput
1833	raw := NoMethod(*s)
1834	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1835}
1836
1837// GoogleCloudMlV1__TrainingOutput: Represents results of a training
1838// job. Output only.
1839type GoogleCloudMlV1__TrainingOutput struct {
1840	// CompletedTrialCount: The number of hyperparameter tuning trials that
1841	// completed successfully.
1842	// Only set for hyperparameter tuning jobs.
1843	CompletedTrialCount int64 `json:"completedTrialCount,omitempty,string"`
1844
1845	// ConsumedMLUnits: The amount of ML units consumed by the job.
1846	ConsumedMLUnits float64 `json:"consumedMLUnits,omitempty"`
1847
1848	// IsHyperparameterTuningJob: Whether this job is a hyperparameter
1849	// tuning job.
1850	IsHyperparameterTuningJob bool `json:"isHyperparameterTuningJob,omitempty"`
1851
1852	// Trials: Results for individual Hyperparameter trials.
1853	// Only set for hyperparameter tuning jobs.
1854	Trials []*GoogleCloudMlV1__HyperparameterOutput `json:"trials,omitempty"`
1855
1856	// ForceSendFields is a list of field names (e.g. "CompletedTrialCount")
1857	// to unconditionally include in API requests. By default, fields with
1858	// empty values are omitted from API requests. However, any non-pointer,
1859	// non-interface field appearing in ForceSendFields will be sent to the
1860	// server regardless of whether the field is empty or not. This may be
1861	// used to include empty fields in Patch requests.
1862	ForceSendFields []string `json:"-"`
1863
1864	// NullFields is a list of field names (e.g. "CompletedTrialCount") to
1865	// include in API requests with the JSON null value. By default, fields
1866	// with empty values are omitted from API requests. However, any field
1867	// with an empty value appearing in NullFields will be sent to the
1868	// server as null. It is an error if a field in this list has a
1869	// non-empty value. This may be used to include null fields in Patch
1870	// requests.
1871	NullFields []string `json:"-"`
1872}
1873
1874func (s *GoogleCloudMlV1__TrainingOutput) MarshalJSON() ([]byte, error) {
1875	type NoMethod GoogleCloudMlV1__TrainingOutput
1876	raw := NoMethod(*s)
1877	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1878}
1879
1880func (s *GoogleCloudMlV1__TrainingOutput) UnmarshalJSON(data []byte) error {
1881	type NoMethod GoogleCloudMlV1__TrainingOutput
1882	var s1 struct {
1883		ConsumedMLUnits gensupport.JSONFloat64 `json:"consumedMLUnits"`
1884		*NoMethod
1885	}
1886	s1.NoMethod = (*NoMethod)(s)
1887	if err := json.Unmarshal(data, &s1); err != nil {
1888		return err
1889	}
1890	s.ConsumedMLUnits = float64(s1.ConsumedMLUnits)
1891	return nil
1892}
1893
1894// GoogleCloudMlV1__Version: Represents a version of the model.
1895//
1896// Each version is a trained model deployed in the cloud, ready to
1897// handle
1898// prediction requests. A model can have multiple versions. You can
1899// get
1900// information about all of the versions of a given model by
1901// calling
1902// [projects.models.versions.list](/ml-engine/reference/rest/v1/p
1903// rojects.models.versions/list).
1904type GoogleCloudMlV1__Version struct {
1905	// AutoScaling: Automatically scale the number of nodes used to serve
1906	// the model in
1907	// response to increases and decreases in traffic. Care should be
1908	// taken to ramp up traffic according to the model's ability to scale
1909	// or you will start seeing increases in latency and 429 response codes.
1910	AutoScaling *GoogleCloudMlV1__AutoScaling `json:"autoScaling,omitempty"`
1911
1912	// CreateTime: Output only. The time the version was created.
1913	CreateTime string `json:"createTime,omitempty"`
1914
1915	// DeploymentUri: Required. The Google Cloud Storage location of the
1916	// trained model used to
1917	// create the version. See the
1918	// [guide to
1919	// model
1920	// deployment](/ml-engine/docs/tensorflow/deploying-models) for
1921	// more
1922	// information.
1923	//
1924	// When passing Version
1925	// to
1926	// [projects.models.versions.create](/ml-engine/reference/rest/v1/proj
1927	// ects.models.versions/create)
1928	// the model service uses the specified location as the source of the
1929	// model.
1930	// Once deployed, the model version is hosted by the prediction service,
1931	// so
1932	// this location is useful only as a historical record.
1933	// The total number of model files can't exceed 1000.
1934	DeploymentUri string `json:"deploymentUri,omitempty"`
1935
1936	// Description: Optional. The description specified for the version when
1937	// it was created.
1938	Description string `json:"description,omitempty"`
1939
1940	// ErrorMessage: Output only. The details of a failure or a
1941	// cancellation.
1942	ErrorMessage string `json:"errorMessage,omitempty"`
1943
1944	// Etag: `etag` is used for optimistic concurrency control as a way to
1945	// help
1946	// prevent simultaneous updates of a model from overwriting each
1947	// other.
1948	// It is strongly suggested that systems make use of the `etag` in
1949	// the
1950	// read-modify-write cycle to perform model updates in order to avoid
1951	// race
1952	// conditions: An `etag` is returned in the response to `GetVersion`,
1953	// and
1954	// systems are expected to put that etag in the request to
1955	// `UpdateVersion` to
1956	// ensure that their change will be applied to the model as intended.
1957	Etag string `json:"etag,omitempty"`
1958
1959	// Framework: Optional. The machine learning framework Cloud ML Engine
1960	// uses to train
1961	// this version of the model. Valid values are `TENSORFLOW`,
1962	// `SCIKIT_LEARN`,
1963	// `XGBOOST`. If you do not specify a framework, Cloud ML Engine
1964	// will analyze files in the deployment_uri to determine a framework. If
1965	// you
1966	// choose `SCIKIT_LEARN` or `XGBOOST`, you must also set the runtime
1967	// version
1968	// of the model to 1.4 or greater.
1969	//
1970	// Possible values:
1971	//   "FRAMEWORK_UNSPECIFIED" - Unspecified framework. Defaults to
1972	// TensorFlow.
1973	//   "TENSORFLOW" - Tensorflow framework.
1974	//   "SCIKIT_LEARN" - Scikit-learn framework.
1975	//   "XGBOOST" - XGBoost framework.
1976	Framework string `json:"framework,omitempty"`
1977
1978	// IsDefault: Output only. If true, this version will be used to handle
1979	// prediction
1980	// requests that do not specify a version.
1981	//
1982	// You can change the default version by
1983	// calling
1984	// [projects.methods.versions.setDefault](/ml-engine/reference/re
1985	// st/v1/projects.models.versions/setDefault).
1986	IsDefault bool `json:"isDefault,omitempty"`
1987
1988	// Labels: Optional. One or more labels that you can add, to organize
1989	// your model
1990	// versions. Each label is a key-value pair, where both the key and the
1991	// value
1992	// are arbitrary strings that you supply.
1993	// For more information, see the documentation on
1994	// <a href="/ml-engine/docs/tensorflow/resource-labels">using
1995	// labels</a>.
1996	Labels map[string]string `json:"labels,omitempty"`
1997
1998	// LastUseTime: Output only. The time the version was last used for
1999	// prediction.
2000	LastUseTime string `json:"lastUseTime,omitempty"`
2001
2002	// MachineType: Optional. The type of machine on which to serve the
2003	// model. Currently only
2004	// applies to online prediction service.
2005	// The following are currently supported and will be deprecated in
2006	// Beta release.
2007	//   mls1-highmem-1    1 core    2 Gb RAM
2008	//   mls1-highcpu-4    4 core    2 Gb RAM
2009	// The following are available in Beta:
2010	//   mls1-c1-m2        1 core    2 Gb RAM   Default
2011	//   mls1-c4-m2        4 core    2 Gb RAM
2012	MachineType string `json:"machineType,omitempty"`
2013
2014	// ManualScaling: Manually select the number of nodes to use for serving
2015	// the
2016	// model. You should generally use `auto_scaling` with an
2017	// appropriate
2018	// `min_nodes` instead, but this option is available if you want
2019	// more
2020	// predictable billing. Beware that latency and error rates will
2021	// increase
2022	// if the traffic exceeds that capability of the system to serve it
2023	// based
2024	// on the selected number of nodes.
2025	ManualScaling *GoogleCloudMlV1__ManualScaling `json:"manualScaling,omitempty"`
2026
2027	// Name: Required.The name specified for the version when it was
2028	// created.
2029	//
2030	// The version name must be unique within the model it is created in.
2031	Name string `json:"name,omitempty"`
2032
2033	// PythonVersion: Optional. The version of Python used in prediction. If
2034	// not set, the default
2035	// version is '2.7'. Python '3.5' is available when `runtime_version` is
2036	// set
2037	// to '1.4' and above. Python '2.7' works with all supported runtime
2038	// versions.
2039	PythonVersion string `json:"pythonVersion,omitempty"`
2040
2041	// RuntimeVersion: Optional. The Google Cloud ML runtime version to use
2042	// for this deployment.
2043	// If not set, Google Cloud ML will choose a version.
2044	RuntimeVersion string `json:"runtimeVersion,omitempty"`
2045
2046	// State: Output only. The state of a version.
2047	//
2048	// Possible values:
2049	//   "UNKNOWN" - The version state is unspecified.
2050	//   "READY" - The version is ready for prediction.
2051	//   "CREATING" - The version is being created. New UpdateVersion and
2052	// DeleteVersion
2053	// requests will fail if a version is in the CREATING state.
2054	//   "FAILED" - The version failed to be created, possibly
2055	// cancelled.
2056	// `error_message` should contain the details of the failure.
2057	//   "DELETING" - The version is being deleted. New UpdateVersion and
2058	// DeleteVersion
2059	// requests will fail if a version is in the DELETING state.
2060	//   "UPDATING" - The version is being updated. New UpdateVersion and
2061	// DeleteVersion
2062	// requests will fail if a version is in the UPDATING state.
2063	State string `json:"state,omitempty"`
2064
2065	// ServerResponse contains the HTTP response code and headers from the
2066	// server.
2067	googleapi.ServerResponse `json:"-"`
2068
2069	// ForceSendFields is a list of field names (e.g. "AutoScaling") to
2070	// unconditionally include in API requests. By default, fields with
2071	// empty values are omitted from API requests. However, any non-pointer,
2072	// non-interface field appearing in ForceSendFields will be sent to the
2073	// server regardless of whether the field is empty or not. This may be
2074	// used to include empty fields in Patch requests.
2075	ForceSendFields []string `json:"-"`
2076
2077	// NullFields is a list of field names (e.g. "AutoScaling") to include
2078	// in API requests with the JSON null value. By default, fields with
2079	// empty values are omitted from API requests. However, any field with
2080	// an empty value appearing in NullFields will be sent to the server as
2081	// null. It is an error if a field in this list has a non-empty value.
2082	// This may be used to include null fields in Patch requests.
2083	NullFields []string `json:"-"`
2084}
2085
2086func (s *GoogleCloudMlV1__Version) MarshalJSON() ([]byte, error) {
2087	type NoMethod GoogleCloudMlV1__Version
2088	raw := NoMethod(*s)
2089	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2090}
2091
2092// GoogleIamV1__AuditConfig: Specifies the audit configuration for a
2093// service.
2094// The configuration determines which permission types are logged, and
2095// what
2096// identities, if any, are exempted from logging.
2097// An AuditConfig must have one or more AuditLogConfigs.
2098//
2099// If there are AuditConfigs for both `allServices` and a specific
2100// service,
2101// the union of the two AuditConfigs is used for that service: the
2102// log_types
2103// specified in each AuditConfig are enabled, and the exempted_members
2104// in each
2105// AuditLogConfig are exempted.
2106//
2107// Example Policy with multiple AuditConfigs:
2108//
2109//     {
2110//       "audit_configs": [
2111//         {
2112//           "service": "allServices"
2113//           "audit_log_configs": [
2114//             {
2115//               "log_type": "DATA_READ",
2116//               "exempted_members": [
2117//                 "user:foo@gmail.com"
2118//               ]
2119//             },
2120//             {
2121//               "log_type": "DATA_WRITE",
2122//             },
2123//             {
2124//               "log_type": "ADMIN_READ",
2125//             }
2126//           ]
2127//         },
2128//         {
2129//           "service": "fooservice.googleapis.com"
2130//           "audit_log_configs": [
2131//             {
2132//               "log_type": "DATA_READ",
2133//             },
2134//             {
2135//               "log_type": "DATA_WRITE",
2136//               "exempted_members": [
2137//                 "user:bar@gmail.com"
2138//               ]
2139//             }
2140//           ]
2141//         }
2142//       ]
2143//     }
2144//
2145// For fooservice, this policy enables DATA_READ, DATA_WRITE and
2146// ADMIN_READ
2147// logging. It also exempts foo@gmail.com from DATA_READ logging,
2148// and
2149// bar@gmail.com from DATA_WRITE logging.
2150type GoogleIamV1__AuditConfig struct {
2151	// AuditLogConfigs: The configuration for logging of each type of
2152	// permission.
2153	AuditLogConfigs []*GoogleIamV1__AuditLogConfig `json:"auditLogConfigs,omitempty"`
2154
2155	// Service: Specifies a service that will be enabled for audit
2156	// logging.
2157	// For example, `storage.googleapis.com`,
2158	// `cloudsql.googleapis.com`.
2159	// `allServices` is a special value that covers all services.
2160	Service string `json:"service,omitempty"`
2161
2162	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
2163	// unconditionally include in API requests. By default, fields with
2164	// empty values are omitted from API requests. However, any non-pointer,
2165	// non-interface field appearing in ForceSendFields will be sent to the
2166	// server regardless of whether the field is empty or not. This may be
2167	// used to include empty fields in Patch requests.
2168	ForceSendFields []string `json:"-"`
2169
2170	// NullFields is a list of field names (e.g. "AuditLogConfigs") to
2171	// include in API requests with the JSON null value. By default, fields
2172	// with empty values are omitted from API requests. However, any field
2173	// with an empty value appearing in NullFields will be sent to the
2174	// server as null. It is an error if a field in this list has a
2175	// non-empty value. This may be used to include null fields in Patch
2176	// requests.
2177	NullFields []string `json:"-"`
2178}
2179
2180func (s *GoogleIamV1__AuditConfig) MarshalJSON() ([]byte, error) {
2181	type NoMethod GoogleIamV1__AuditConfig
2182	raw := NoMethod(*s)
2183	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2184}
2185
2186// GoogleIamV1__AuditLogConfig: Provides the configuration for logging a
2187// type of permissions.
2188// Example:
2189//
2190//     {
2191//       "audit_log_configs": [
2192//         {
2193//           "log_type": "DATA_READ",
2194//           "exempted_members": [
2195//             "user:foo@gmail.com"
2196//           ]
2197//         },
2198//         {
2199//           "log_type": "DATA_WRITE",
2200//         }
2201//       ]
2202//     }
2203//
2204// This enables 'DATA_READ' and 'DATA_WRITE' logging, while
2205// exempting
2206// foo@gmail.com from DATA_READ logging.
2207type GoogleIamV1__AuditLogConfig struct {
2208	// ExemptedMembers: Specifies the identities that do not cause logging
2209	// for this type of
2210	// permission.
2211	// Follows the same format of Binding.members.
2212	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
2213
2214	// LogType: The log type that this config enables.
2215	//
2216	// Possible values:
2217	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
2218	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
2219	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
2220	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
2221	LogType string `json:"logType,omitempty"`
2222
2223	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
2224	// unconditionally include in API requests. By default, fields with
2225	// empty values are omitted from API requests. However, any non-pointer,
2226	// non-interface field appearing in ForceSendFields will be sent to the
2227	// server regardless of whether the field is empty or not. This may be
2228	// used to include empty fields in Patch requests.
2229	ForceSendFields []string `json:"-"`
2230
2231	// NullFields is a list of field names (e.g. "ExemptedMembers") to
2232	// include in API requests with the JSON null value. By default, fields
2233	// with empty values are omitted from API requests. However, any field
2234	// with an empty value appearing in NullFields will be sent to the
2235	// server as null. It is an error if a field in this list has a
2236	// non-empty value. This may be used to include null fields in Patch
2237	// requests.
2238	NullFields []string `json:"-"`
2239}
2240
2241func (s *GoogleIamV1__AuditLogConfig) MarshalJSON() ([]byte, error) {
2242	type NoMethod GoogleIamV1__AuditLogConfig
2243	raw := NoMethod(*s)
2244	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2245}
2246
2247// GoogleIamV1__Binding: Associates `members` with a `role`.
2248type GoogleIamV1__Binding struct {
2249	// Condition: Unimplemented. The condition that is associated with this
2250	// binding.
2251	// NOTE: an unsatisfied condition will not allow user access via
2252	// current
2253	// binding. Different bindings, including their conditions, are
2254	// examined
2255	// independently.
2256	Condition *GoogleType__Expr `json:"condition,omitempty"`
2257
2258	// Members: Specifies the identities requesting access for a Cloud
2259	// Platform resource.
2260	// `members` can have the following values:
2261	//
2262	// * `allUsers`: A special identifier that represents anyone who is
2263	//    on the internet; with or without a Google account.
2264	//
2265	// * `allAuthenticatedUsers`: A special identifier that represents
2266	// anyone
2267	//    who is authenticated with a Google account or a service
2268	// account.
2269	//
2270	// * `user:{emailid}`: An email address that represents a specific
2271	// Google
2272	//    account. For example, `alice@gmail.com` .
2273	//
2274	//
2275	// * `serviceAccount:{emailid}`: An email address that represents a
2276	// service
2277	//    account. For example,
2278	// `my-other-app@appspot.gserviceaccount.com`.
2279	//
2280	// * `group:{emailid}`: An email address that represents a Google
2281	// group.
2282	//    For example, `admins@example.com`.
2283	//
2284	//
2285	// * `domain:{domain}`: A Google Apps domain name that represents all
2286	// the
2287	//    users of that domain. For example, `google.com` or
2288	// `example.com`.
2289	//
2290	//
2291	Members []string `json:"members,omitempty"`
2292
2293	// Role: Role that is assigned to `members`.
2294	// For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2295	Role string `json:"role,omitempty"`
2296
2297	// ForceSendFields is a list of field names (e.g. "Condition") to
2298	// unconditionally include in API requests. By default, fields with
2299	// empty values are omitted from API requests. However, any non-pointer,
2300	// non-interface field appearing in ForceSendFields will be sent to the
2301	// server regardless of whether the field is empty or not. This may be
2302	// used to include empty fields in Patch requests.
2303	ForceSendFields []string `json:"-"`
2304
2305	// NullFields is a list of field names (e.g. "Condition") to include in
2306	// API requests with the JSON null value. By default, fields with empty
2307	// values are omitted from API requests. However, any field with an
2308	// empty value appearing in NullFields will be sent to the server as
2309	// null. It is an error if a field in this list has a non-empty value.
2310	// This may be used to include null fields in Patch requests.
2311	NullFields []string `json:"-"`
2312}
2313
2314func (s *GoogleIamV1__Binding) MarshalJSON() ([]byte, error) {
2315	type NoMethod GoogleIamV1__Binding
2316	raw := NoMethod(*s)
2317	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2318}
2319
2320// GoogleIamV1__Policy: Defines an Identity and Access Management (IAM)
2321// policy. It is used to
2322// specify access control policies for Cloud Platform resources.
2323//
2324//
2325// A `Policy` consists of a list of `bindings`. A `binding` binds a list
2326// of
2327// `members` to a `role`, where the members can be user accounts, Google
2328// groups,
2329// Google domains, and service accounts. A `role` is a named list of
2330// permissions
2331// defined by IAM.
2332//
2333// **JSON Example**
2334//
2335//     {
2336//       "bindings": [
2337//         {
2338//           "role": "roles/owner",
2339//           "members": [
2340//             "user:mike@example.com",
2341//             "group:admins@example.com",
2342//             "domain:google.com",
2343//
2344// "serviceAccount:my-other-app@appspot.gserviceaccount.com"
2345//           ]
2346//         },
2347//         {
2348//           "role": "roles/viewer",
2349//           "members": ["user:sean@example.com"]
2350//         }
2351//       ]
2352//     }
2353//
2354// **YAML Example**
2355//
2356//     bindings:
2357//     - members:
2358//       - user:mike@example.com
2359//       - group:admins@example.com
2360//       - domain:google.com
2361//       - serviceAccount:my-other-app@appspot.gserviceaccount.com
2362//       role: roles/owner
2363//     - members:
2364//       - user:sean@example.com
2365//       role: roles/viewer
2366//
2367//
2368// For a description of IAM and its features, see the
2369// [IAM developer's guide](https://cloud.google.com/iam/docs).
2370type GoogleIamV1__Policy struct {
2371	// AuditConfigs: Specifies cloud audit logging configuration for this
2372	// policy.
2373	AuditConfigs []*GoogleIamV1__AuditConfig `json:"auditConfigs,omitempty"`
2374
2375	// Bindings: Associates a list of `members` to a `role`.
2376	// `bindings` with no members will result in an error.
2377	Bindings []*GoogleIamV1__Binding `json:"bindings,omitempty"`
2378
2379	// Etag: `etag` is used for optimistic concurrency control as a way to
2380	// help
2381	// prevent simultaneous updates of a policy from overwriting each
2382	// other.
2383	// It is strongly suggested that systems make use of the `etag` in
2384	// the
2385	// read-modify-write cycle to perform policy updates in order to avoid
2386	// race
2387	// conditions: An `etag` is returned in the response to `getIamPolicy`,
2388	// and
2389	// systems are expected to put that etag in the request to
2390	// `setIamPolicy` to
2391	// ensure that their change will be applied to the same version of the
2392	// policy.
2393	//
2394	// If no `etag` is provided in the call to `setIamPolicy`, then the
2395	// existing
2396	// policy is overwritten blindly.
2397	Etag string `json:"etag,omitempty"`
2398
2399	// Version: Deprecated.
2400	Version int64 `json:"version,omitempty"`
2401
2402	// ServerResponse contains the HTTP response code and headers from the
2403	// server.
2404	googleapi.ServerResponse `json:"-"`
2405
2406	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
2407	// unconditionally include in API requests. By default, fields with
2408	// empty values are omitted from API requests. However, any non-pointer,
2409	// non-interface field appearing in ForceSendFields will be sent to the
2410	// server regardless of whether the field is empty or not. This may be
2411	// used to include empty fields in Patch requests.
2412	ForceSendFields []string `json:"-"`
2413
2414	// NullFields is a list of field names (e.g. "AuditConfigs") to include
2415	// in API requests with the JSON null value. By default, fields with
2416	// empty values are omitted from API requests. However, any field with
2417	// an empty value appearing in NullFields will be sent to the server as
2418	// null. It is an error if a field in this list has a non-empty value.
2419	// This may be used to include null fields in Patch requests.
2420	NullFields []string `json:"-"`
2421}
2422
2423func (s *GoogleIamV1__Policy) MarshalJSON() ([]byte, error) {
2424	type NoMethod GoogleIamV1__Policy
2425	raw := NoMethod(*s)
2426	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2427}
2428
2429// GoogleIamV1__SetIamPolicyRequest: Request message for `SetIamPolicy`
2430// method.
2431type GoogleIamV1__SetIamPolicyRequest struct {
2432	// Policy: REQUIRED: The complete policy to be applied to the
2433	// `resource`. The size of
2434	// the policy is limited to a few 10s of KB. An empty policy is a
2435	// valid policy but certain Cloud Platform services (such as
2436	// Projects)
2437	// might reject them.
2438	Policy *GoogleIamV1__Policy `json:"policy,omitempty"`
2439
2440	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the
2441	// policy to modify. Only
2442	// the fields in the mask will be modified. If no mask is provided,
2443	// the
2444	// following default mask is used:
2445	// paths: "bindings, etag"
2446	// This field is only used by Cloud IAM.
2447	UpdateMask string `json:"updateMask,omitempty"`
2448
2449	// ForceSendFields is a list of field names (e.g. "Policy") to
2450	// unconditionally include in API requests. By default, fields with
2451	// empty values are omitted from API requests. However, any non-pointer,
2452	// non-interface field appearing in ForceSendFields will be sent to the
2453	// server regardless of whether the field is empty or not. This may be
2454	// used to include empty fields in Patch requests.
2455	ForceSendFields []string `json:"-"`
2456
2457	// NullFields is a list of field names (e.g. "Policy") to include in API
2458	// requests with the JSON null value. By default, fields with empty
2459	// values are omitted from API requests. However, any field with an
2460	// empty value appearing in NullFields will be sent to the server as
2461	// null. It is an error if a field in this list has a non-empty value.
2462	// This may be used to include null fields in Patch requests.
2463	NullFields []string `json:"-"`
2464}
2465
2466func (s *GoogleIamV1__SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
2467	type NoMethod GoogleIamV1__SetIamPolicyRequest
2468	raw := NoMethod(*s)
2469	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2470}
2471
2472// GoogleIamV1__TestIamPermissionsRequest: Request message for
2473// `TestIamPermissions` method.
2474type GoogleIamV1__TestIamPermissionsRequest struct {
2475	// Permissions: The set of permissions to check for the `resource`.
2476	// Permissions with
2477	// wildcards (such as '*' or 'storage.*') are not allowed. For
2478	// more
2479	// information see
2480	// [IAM
2481	// Overview](https://cloud.google.com/iam/docs/overview#permissions).
2482	Permissions []string `json:"permissions,omitempty"`
2483
2484	// ForceSendFields is a list of field names (e.g. "Permissions") to
2485	// unconditionally include in API requests. By default, fields with
2486	// empty values are omitted from API requests. However, any non-pointer,
2487	// non-interface field appearing in ForceSendFields will be sent to the
2488	// server regardless of whether the field is empty or not. This may be
2489	// used to include empty fields in Patch requests.
2490	ForceSendFields []string `json:"-"`
2491
2492	// NullFields is a list of field names (e.g. "Permissions") to include
2493	// in API requests with the JSON null value. By default, fields with
2494	// empty values are omitted from API requests. However, any field with
2495	// an empty value appearing in NullFields will be sent to the server as
2496	// null. It is an error if a field in this list has a non-empty value.
2497	// This may be used to include null fields in Patch requests.
2498	NullFields []string `json:"-"`
2499}
2500
2501func (s *GoogleIamV1__TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
2502	type NoMethod GoogleIamV1__TestIamPermissionsRequest
2503	raw := NoMethod(*s)
2504	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2505}
2506
2507// GoogleIamV1__TestIamPermissionsResponse: Response message for
2508// `TestIamPermissions` method.
2509type GoogleIamV1__TestIamPermissionsResponse struct {
2510	// Permissions: A subset of `TestPermissionsRequest.permissions` that
2511	// the caller is
2512	// allowed.
2513	Permissions []string `json:"permissions,omitempty"`
2514
2515	// ServerResponse contains the HTTP response code and headers from the
2516	// server.
2517	googleapi.ServerResponse `json:"-"`
2518
2519	// ForceSendFields is a list of field names (e.g. "Permissions") to
2520	// unconditionally include in API requests. By default, fields with
2521	// empty values are omitted from API requests. However, any non-pointer,
2522	// non-interface field appearing in ForceSendFields will be sent to the
2523	// server regardless of whether the field is empty or not. This may be
2524	// used to include empty fields in Patch requests.
2525	ForceSendFields []string `json:"-"`
2526
2527	// NullFields is a list of field names (e.g. "Permissions") to include
2528	// in API requests with the JSON null value. By default, fields with
2529	// empty values are omitted from API requests. However, any field with
2530	// an empty value appearing in NullFields will be sent to the server as
2531	// null. It is an error if a field in this list has a non-empty value.
2532	// This may be used to include null fields in Patch requests.
2533	NullFields []string `json:"-"`
2534}
2535
2536func (s *GoogleIamV1__TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
2537	type NoMethod GoogleIamV1__TestIamPermissionsResponse
2538	raw := NoMethod(*s)
2539	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2540}
2541
2542// GoogleLongrunning__ListOperationsResponse: The response message for
2543// Operations.ListOperations.
2544type GoogleLongrunning__ListOperationsResponse struct {
2545	// NextPageToken: The standard List next-page token.
2546	NextPageToken string `json:"nextPageToken,omitempty"`
2547
2548	// Operations: A list of operations that matches the specified filter in
2549	// the request.
2550	Operations []*GoogleLongrunning__Operation `json:"operations,omitempty"`
2551
2552	// ServerResponse contains the HTTP response code and headers from the
2553	// server.
2554	googleapi.ServerResponse `json:"-"`
2555
2556	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2557	// unconditionally include in API requests. By default, fields with
2558	// empty values are omitted from API requests. However, any non-pointer,
2559	// non-interface field appearing in ForceSendFields will be sent to the
2560	// server regardless of whether the field is empty or not. This may be
2561	// used to include empty fields in Patch requests.
2562	ForceSendFields []string `json:"-"`
2563
2564	// NullFields is a list of field names (e.g. "NextPageToken") to include
2565	// in API requests with the JSON null value. By default, fields with
2566	// empty values are omitted from API requests. However, any field with
2567	// an empty value appearing in NullFields will be sent to the server as
2568	// null. It is an error if a field in this list has a non-empty value.
2569	// This may be used to include null fields in Patch requests.
2570	NullFields []string `json:"-"`
2571}
2572
2573func (s *GoogleLongrunning__ListOperationsResponse) MarshalJSON() ([]byte, error) {
2574	type NoMethod GoogleLongrunning__ListOperationsResponse
2575	raw := NoMethod(*s)
2576	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2577}
2578
2579// GoogleLongrunning__Operation: This resource represents a long-running
2580// operation that is the result of a
2581// network API call.
2582type GoogleLongrunning__Operation struct {
2583	// Done: If the value is `false`, it means the operation is still in
2584	// progress.
2585	// If `true`, the operation is completed, and either `error` or
2586	// `response` is
2587	// available.
2588	Done bool `json:"done,omitempty"`
2589
2590	// Error: The error result of the operation in case of failure or
2591	// cancellation.
2592	Error *GoogleRpc__Status `json:"error,omitempty"`
2593
2594	// Metadata: Service-specific metadata associated with the operation.
2595	// It typically
2596	// contains progress information and common metadata such as create
2597	// time.
2598	// Some services might not provide such metadata.  Any method that
2599	// returns a
2600	// long-running operation should document the metadata type, if any.
2601	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2602
2603	// Name: The server-assigned name, which is only unique within the same
2604	// service that
2605	// originally returns it. If you use the default HTTP mapping,
2606	// the
2607	// `name` should have the format of `operations/some/unique/name`.
2608	Name string `json:"name,omitempty"`
2609
2610	// Response: The normal response of the operation in case of success.
2611	// If the original
2612	// method returns no data on success, such as `Delete`, the response
2613	// is
2614	// `google.protobuf.Empty`.  If the original method is
2615	// standard
2616	// `Get`/`Create`/`Update`, the response should be the resource.  For
2617	// other
2618	// methods, the response should have the type `XxxResponse`, where
2619	// `Xxx`
2620	// is the original method name.  For example, if the original method
2621	// name
2622	// is `TakeSnapshot()`, the inferred response type
2623	// is
2624	// `TakeSnapshotResponse`.
2625	Response googleapi.RawMessage `json:"response,omitempty"`
2626
2627	// ServerResponse contains the HTTP response code and headers from the
2628	// server.
2629	googleapi.ServerResponse `json:"-"`
2630
2631	// ForceSendFields is a list of field names (e.g. "Done") to
2632	// unconditionally include in API requests. By default, fields with
2633	// empty values are omitted from API requests. However, any non-pointer,
2634	// non-interface field appearing in ForceSendFields will be sent to the
2635	// server regardless of whether the field is empty or not. This may be
2636	// used to include empty fields in Patch requests.
2637	ForceSendFields []string `json:"-"`
2638
2639	// NullFields is a list of field names (e.g. "Done") to include in API
2640	// requests with the JSON null value. By default, fields with empty
2641	// values are omitted from API requests. However, any field with an
2642	// empty value appearing in NullFields will be sent to the server as
2643	// null. It is an error if a field in this list has a non-empty value.
2644	// This may be used to include null fields in Patch requests.
2645	NullFields []string `json:"-"`
2646}
2647
2648func (s *GoogleLongrunning__Operation) MarshalJSON() ([]byte, error) {
2649	type NoMethod GoogleLongrunning__Operation
2650	raw := NoMethod(*s)
2651	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2652}
2653
2654// GoogleProtobuf__Empty: A generic empty message that you can re-use to
2655// avoid defining duplicated
2656// empty messages in your APIs. A typical example is to use it as the
2657// request
2658// or the response type of an API method. For instance:
2659//
2660//     service Foo {
2661//       rpc Bar(google.protobuf.Empty) returns
2662// (google.protobuf.Empty);
2663//     }
2664//
2665// The JSON representation for `Empty` is empty JSON object `{}`.
2666type GoogleProtobuf__Empty struct {
2667	// ServerResponse contains the HTTP response code and headers from the
2668	// server.
2669	googleapi.ServerResponse `json:"-"`
2670}
2671
2672// GoogleRpc__Status: The `Status` type defines a logical error model
2673// that is suitable for different
2674// programming environments, including REST APIs and RPC APIs. It is
2675// used by
2676// [gRPC](https://github.com/grpc). The error model is designed to
2677// be:
2678//
2679// - Simple to use and understand for most users
2680// - Flexible enough to meet unexpected needs
2681//
2682// # Overview
2683//
2684// The `Status` message contains three pieces of data: error code, error
2685// message,
2686// and error details. The error code should be an enum value
2687// of
2688// google.rpc.Code, but it may accept additional error codes if needed.
2689// The
2690// error message should be a developer-facing English message that
2691// helps
2692// developers *understand* and *resolve* the error. If a localized
2693// user-facing
2694// error message is needed, put the localized message in the error
2695// details or
2696// localize it in the client. The optional error details may contain
2697// arbitrary
2698// information about the error. There is a predefined set of error
2699// detail types
2700// in the package `google.rpc` that can be used for common error
2701// conditions.
2702//
2703// # Language mapping
2704//
2705// The `Status` message is the logical representation of the error
2706// model, but it
2707// is not necessarily the actual wire format. When the `Status` message
2708// is
2709// exposed in different client libraries and different wire protocols,
2710// it can be
2711// mapped differently. For example, it will likely be mapped to some
2712// exceptions
2713// in Java, but more likely mapped to some error codes in C.
2714//
2715// # Other uses
2716//
2717// The error model and the `Status` message can be used in a variety
2718// of
2719// environments, either with or without APIs, to provide a
2720// consistent developer experience across different
2721// environments.
2722//
2723// Example uses of this error model include:
2724//
2725// - Partial errors. If a service needs to return partial errors to the
2726// client,
2727//     it may embed the `Status` in the normal response to indicate the
2728// partial
2729//     errors.
2730//
2731// - Workflow errors. A typical workflow has multiple steps. Each step
2732// may
2733//     have a `Status` message for error reporting.
2734//
2735// - Batch operations. If a client uses batch request and batch
2736// response, the
2737//     `Status` message should be used directly inside batch response,
2738// one for
2739//     each error sub-response.
2740//
2741// - Asynchronous operations. If an API call embeds asynchronous
2742// operation
2743//     results in its response, the status of those operations should
2744// be
2745//     represented directly using the `Status` message.
2746//
2747// - Logging. If some API errors are stored in logs, the message
2748// `Status` could
2749//     be used directly after any stripping needed for security/privacy
2750// reasons.
2751type GoogleRpc__Status struct {
2752	// Code: The status code, which should be an enum value of
2753	// google.rpc.Code.
2754	Code int64 `json:"code,omitempty"`
2755
2756	// Details: A list of messages that carry the error details.  There is a
2757	// common set of
2758	// message types for APIs to use.
2759	Details []googleapi.RawMessage `json:"details,omitempty"`
2760
2761	// Message: A developer-facing error message, which should be in
2762	// English. Any
2763	// user-facing error message should be localized and sent in
2764	// the
2765	// google.rpc.Status.details field, or localized by the client.
2766	Message string `json:"message,omitempty"`
2767
2768	// ForceSendFields is a list of field names (e.g. "Code") to
2769	// unconditionally include in API requests. By default, fields with
2770	// empty values are omitted from API requests. However, any non-pointer,
2771	// non-interface field appearing in ForceSendFields will be sent to the
2772	// server regardless of whether the field is empty or not. This may be
2773	// used to include empty fields in Patch requests.
2774	ForceSendFields []string `json:"-"`
2775
2776	// NullFields is a list of field names (e.g. "Code") to include in API
2777	// requests with the JSON null value. By default, fields with empty
2778	// values are omitted from API requests. However, any field with an
2779	// empty value appearing in NullFields will be sent to the server as
2780	// null. It is an error if a field in this list has a non-empty value.
2781	// This may be used to include null fields in Patch requests.
2782	NullFields []string `json:"-"`
2783}
2784
2785func (s *GoogleRpc__Status) MarshalJSON() ([]byte, error) {
2786	type NoMethod GoogleRpc__Status
2787	raw := NoMethod(*s)
2788	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2789}
2790
2791// GoogleType__Expr: Represents an expression text. Example:
2792//
2793//     title: "User account presence"
2794//     description: "Determines whether the request has a user account"
2795//     expression: "size(request.user) > 0"
2796type GoogleType__Expr struct {
2797	// Description: An optional description of the expression. This is a
2798	// longer text which
2799	// describes the expression, e.g. when hovered over it in a UI.
2800	Description string `json:"description,omitempty"`
2801
2802	// Expression: Textual representation of an expression in
2803	// Common Expression Language syntax.
2804	//
2805	// The application context of the containing message determines
2806	// which
2807	// well-known feature set of CEL is supported.
2808	Expression string `json:"expression,omitempty"`
2809
2810	// Location: An optional string indicating the location of the
2811	// expression for error
2812	// reporting, e.g. a file name and a position in the file.
2813	Location string `json:"location,omitempty"`
2814
2815	// Title: An optional title for the expression, i.e. a short string
2816	// describing
2817	// its purpose. This can be used e.g. in UIs which allow to enter
2818	// the
2819	// expression.
2820	Title string `json:"title,omitempty"`
2821
2822	// ForceSendFields is a list of field names (e.g. "Description") to
2823	// unconditionally include in API requests. By default, fields with
2824	// empty values are omitted from API requests. However, any non-pointer,
2825	// non-interface field appearing in ForceSendFields will be sent to the
2826	// server regardless of whether the field is empty or not. This may be
2827	// used to include empty fields in Patch requests.
2828	ForceSendFields []string `json:"-"`
2829
2830	// NullFields is a list of field names (e.g. "Description") to include
2831	// in API requests with the JSON null value. By default, fields with
2832	// empty values are omitted from API requests. However, any field with
2833	// an empty value appearing in NullFields will be sent to the server as
2834	// null. It is an error if a field in this list has a non-empty value.
2835	// This may be used to include null fields in Patch requests.
2836	NullFields []string `json:"-"`
2837}
2838
2839func (s *GoogleType__Expr) MarshalJSON() ([]byte, error) {
2840	type NoMethod GoogleType__Expr
2841	raw := NoMethod(*s)
2842	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2843}
2844
2845// method id "ml.projects.getConfig":
2846
2847type ProjectsGetConfigCall struct {
2848	s            *Service
2849	name         string
2850	urlParams_   gensupport.URLParams
2851	ifNoneMatch_ string
2852	ctx_         context.Context
2853	header_      http.Header
2854}
2855
2856// GetConfig: Get the service account information associated with your
2857// project. You need
2858// this information in order to grant the service account permissions
2859// for
2860// the Google Cloud Storage location where you put your model training
2861// code
2862// for training the model with Google Cloud Machine Learning.
2863func (r *ProjectsService) GetConfig(name string) *ProjectsGetConfigCall {
2864	c := &ProjectsGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2865	c.name = name
2866	return c
2867}
2868
2869// Fields allows partial responses to be retrieved. See
2870// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2871// for more information.
2872func (c *ProjectsGetConfigCall) Fields(s ...googleapi.Field) *ProjectsGetConfigCall {
2873	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2874	return c
2875}
2876
2877// IfNoneMatch sets the optional parameter which makes the operation
2878// fail if the object's ETag matches the given value. This is useful for
2879// getting updates only after the object has changed since the last
2880// request. Use googleapi.IsNotModified to check whether the response
2881// error from Do is the result of In-None-Match.
2882func (c *ProjectsGetConfigCall) IfNoneMatch(entityTag string) *ProjectsGetConfigCall {
2883	c.ifNoneMatch_ = entityTag
2884	return c
2885}
2886
2887// Context sets the context to be used in this call's Do method. Any
2888// pending HTTP request will be aborted if the provided context is
2889// canceled.
2890func (c *ProjectsGetConfigCall) Context(ctx context.Context) *ProjectsGetConfigCall {
2891	c.ctx_ = ctx
2892	return c
2893}
2894
2895// Header returns an http.Header that can be modified by the caller to
2896// add HTTP headers to the request.
2897func (c *ProjectsGetConfigCall) Header() http.Header {
2898	if c.header_ == nil {
2899		c.header_ = make(http.Header)
2900	}
2901	return c.header_
2902}
2903
2904func (c *ProjectsGetConfigCall) doRequest(alt string) (*http.Response, error) {
2905	reqHeaders := make(http.Header)
2906	for k, v := range c.header_ {
2907		reqHeaders[k] = v
2908	}
2909	reqHeaders.Set("User-Agent", c.s.userAgent())
2910	if c.ifNoneMatch_ != "" {
2911		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2912	}
2913	var body io.Reader = nil
2914	c.urlParams_.Set("alt", alt)
2915	c.urlParams_.Set("prettyPrint", "false")
2916	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getConfig")
2917	urls += "?" + c.urlParams_.Encode()
2918	req, err := http.NewRequest("GET", urls, body)
2919	if err != nil {
2920		return nil, err
2921	}
2922	req.Header = reqHeaders
2923	googleapi.Expand(req.URL, map[string]string{
2924		"name": c.name,
2925	})
2926	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2927}
2928
2929// Do executes the "ml.projects.getConfig" call.
2930// Exactly one of *GoogleCloudMlV1__GetConfigResponse or error will be
2931// non-nil. Any non-2xx status code is an error. Response headers are in
2932// either *GoogleCloudMlV1__GetConfigResponse.ServerResponse.Header or
2933// (if a response was returned at all) in
2934// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2935// whether the returned error was because http.StatusNotModified was
2936// returned.
2937func (c *ProjectsGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__GetConfigResponse, error) {
2938	gensupport.SetOptions(c.urlParams_, opts...)
2939	res, err := c.doRequest("json")
2940	if res != nil && res.StatusCode == http.StatusNotModified {
2941		if res.Body != nil {
2942			res.Body.Close()
2943		}
2944		return nil, &googleapi.Error{
2945			Code:   res.StatusCode,
2946			Header: res.Header,
2947		}
2948	}
2949	if err != nil {
2950		return nil, err
2951	}
2952	defer googleapi.CloseBody(res)
2953	if err := googleapi.CheckResponse(res); err != nil {
2954		return nil, err
2955	}
2956	ret := &GoogleCloudMlV1__GetConfigResponse{
2957		ServerResponse: googleapi.ServerResponse{
2958			Header:         res.Header,
2959			HTTPStatusCode: res.StatusCode,
2960		},
2961	}
2962	target := &ret
2963	if err := gensupport.DecodeResponse(target, res); err != nil {
2964		return nil, err
2965	}
2966	return ret, nil
2967	// {
2968	//   "description": "Get the service account information associated with your project. You need\nthis information in order to grant the service account permissions for\nthe Google Cloud Storage location where you put your model training code\nfor training the model with Google Cloud Machine Learning.",
2969	//   "flatPath": "v1/projects/{projectsId}:getConfig",
2970	//   "httpMethod": "GET",
2971	//   "id": "ml.projects.getConfig",
2972	//   "parameterOrder": [
2973	//     "name"
2974	//   ],
2975	//   "parameters": {
2976	//     "name": {
2977	//       "description": "Required. The project name.",
2978	//       "location": "path",
2979	//       "pattern": "^projects/[^/]+$",
2980	//       "required": true,
2981	//       "type": "string"
2982	//     }
2983	//   },
2984	//   "path": "v1/{+name}:getConfig",
2985	//   "response": {
2986	//     "$ref": "GoogleCloudMlV1__GetConfigResponse"
2987	//   },
2988	//   "scopes": [
2989	//     "https://www.googleapis.com/auth/cloud-platform"
2990	//   ]
2991	// }
2992
2993}
2994
2995// method id "ml.projects.predict":
2996
2997type ProjectsPredictCall struct {
2998	s                               *Service
2999	name                            string
3000	googlecloudmlv1__predictrequest *GoogleCloudMlV1__PredictRequest
3001	urlParams_                      gensupport.URLParams
3002	ctx_                            context.Context
3003	header_                         http.Header
3004}
3005
3006// Predict: Performs prediction on the data in the request.
3007// Cloud ML Engine implements a custom `predict` verb on top of an HTTP
3008// POST
3009// method. <p>For details of the request and response format, see the
3010// **guide
3011// to the [predict request
3012// format](/ml-engine/docs/v1/predict-request)**.
3013func (r *ProjectsService) Predict(name string, googlecloudmlv1__predictrequest *GoogleCloudMlV1__PredictRequest) *ProjectsPredictCall {
3014	c := &ProjectsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3015	c.name = name
3016	c.googlecloudmlv1__predictrequest = googlecloudmlv1__predictrequest
3017	return c
3018}
3019
3020// Fields allows partial responses to be retrieved. See
3021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3022// for more information.
3023func (c *ProjectsPredictCall) Fields(s ...googleapi.Field) *ProjectsPredictCall {
3024	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3025	return c
3026}
3027
3028// Context sets the context to be used in this call's Do method. Any
3029// pending HTTP request will be aborted if the provided context is
3030// canceled.
3031func (c *ProjectsPredictCall) Context(ctx context.Context) *ProjectsPredictCall {
3032	c.ctx_ = ctx
3033	return c
3034}
3035
3036// Header returns an http.Header that can be modified by the caller to
3037// add HTTP headers to the request.
3038func (c *ProjectsPredictCall) Header() http.Header {
3039	if c.header_ == nil {
3040		c.header_ = make(http.Header)
3041	}
3042	return c.header_
3043}
3044
3045func (c *ProjectsPredictCall) doRequest(alt string) (*http.Response, error) {
3046	reqHeaders := make(http.Header)
3047	for k, v := range c.header_ {
3048		reqHeaders[k] = v
3049	}
3050	reqHeaders.Set("User-Agent", c.s.userAgent())
3051	var body io.Reader = nil
3052	body = strings.NewReader(c.googlecloudmlv1__predictrequest.HttpBody.Data)
3053	reqHeaders.Set("Content-Type", "application/json")
3054	c.urlParams_.Set("alt", alt)
3055	c.urlParams_.Set("prettyPrint", "false")
3056	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:predict")
3057	urls += "?" + c.urlParams_.Encode()
3058	req, err := http.NewRequest("POST", urls, body)
3059	if err != nil {
3060		return nil, err
3061	}
3062	req.Header = reqHeaders
3063	googleapi.Expand(req.URL, map[string]string{
3064		"name": c.name,
3065	})
3066	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3067}
3068
3069// Do executes the "ml.projects.predict" call.
3070// Exactly one of *GoogleApi__HttpBody or error will be non-nil. Any
3071// non-2xx status code is an error. Response headers are in either
3072// *GoogleApi__HttpBody.ServerResponse.Header or (if a response was
3073// returned at all) in error.(*googleapi.Error).Header. Use
3074// googleapi.IsNotModified to check whether the returned error was
3075// because http.StatusNotModified was returned.
3076func (c *ProjectsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApi__HttpBody, error) {
3077	gensupport.SetOptions(c.urlParams_, opts...)
3078	res, err := c.doRequest("json")
3079	if res != nil && res.StatusCode == http.StatusNotModified {
3080		if res.Body != nil {
3081			res.Body.Close()
3082		}
3083		return nil, &googleapi.Error{
3084			Code:   res.StatusCode,
3085			Header: res.Header,
3086		}
3087	}
3088	if err != nil {
3089		return nil, err
3090	}
3091	defer googleapi.CloseBody(res)
3092	if err := googleapi.CheckResponse(res); err != nil {
3093		return nil, err
3094	}
3095	ret := &GoogleApi__HttpBody{
3096		ServerResponse: googleapi.ServerResponse{
3097			Header:         res.Header,
3098			HTTPStatusCode: res.StatusCode,
3099		},
3100	}
3101	target := &ret
3102	var b bytes.Buffer
3103	if _, err := io.Copy(&b, res.Body); err != nil {
3104		return nil, err
3105	}
3106	if err := res.Body.Close(); err != nil {
3107		return nil, err
3108	}
3109	if err := json.NewDecoder(bytes.NewReader(b.Bytes())).Decode(target); err != nil {
3110		return nil, err
3111	}
3112	ret.Data = b.String()
3113	return ret, nil
3114	// {
3115	//   "description": "Performs prediction on the data in the request.\nCloud ML Engine implements a custom `predict` verb on top of an HTTP POST\nmethod. \u003cp\u003eFor details of the request and response format, see the **guide\nto the [predict request format](/ml-engine/docs/v1/predict-request)**.",
3116	//   "flatPath": "v1/projects/{projectsId}:predict",
3117	//   "httpMethod": "POST",
3118	//   "id": "ml.projects.predict",
3119	//   "parameterOrder": [
3120	//     "name"
3121	//   ],
3122	//   "parameters": {
3123	//     "name": {
3124	//       "description": "Required. The resource name of a model or a version.\n\nAuthorization: requires the `predict` permission on the specified resource.",
3125	//       "location": "path",
3126	//       "pattern": "^projects/.+$",
3127	//       "required": true,
3128	//       "type": "string"
3129	//     }
3130	//   },
3131	//   "path": "v1/{+name}:predict",
3132	//   "request": {
3133	//     "$ref": "GoogleCloudMlV1__PredictRequest"
3134	//   },
3135	//   "response": {
3136	//     "$ref": "GoogleApi__HttpBody"
3137	//   },
3138	//   "scopes": [
3139	//     "https://www.googleapis.com/auth/cloud-platform"
3140	//   ]
3141	// }
3142
3143}
3144
3145// method id "ml.projects.jobs.cancel":
3146
3147type ProjectsJobsCancelCall struct {
3148	s                                 *Service
3149	name                              string
3150	googlecloudmlv1__canceljobrequest *GoogleCloudMlV1__CancelJobRequest
3151	urlParams_                        gensupport.URLParams
3152	ctx_                              context.Context
3153	header_                           http.Header
3154}
3155
3156// Cancel: Cancels a running job.
3157func (r *ProjectsJobsService) Cancel(name string, googlecloudmlv1__canceljobrequest *GoogleCloudMlV1__CancelJobRequest) *ProjectsJobsCancelCall {
3158	c := &ProjectsJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3159	c.name = name
3160	c.googlecloudmlv1__canceljobrequest = googlecloudmlv1__canceljobrequest
3161	return c
3162}
3163
3164// Fields allows partial responses to be retrieved. See
3165// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3166// for more information.
3167func (c *ProjectsJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsJobsCancelCall {
3168	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3169	return c
3170}
3171
3172// Context sets the context to be used in this call's Do method. Any
3173// pending HTTP request will be aborted if the provided context is
3174// canceled.
3175func (c *ProjectsJobsCancelCall) Context(ctx context.Context) *ProjectsJobsCancelCall {
3176	c.ctx_ = ctx
3177	return c
3178}
3179
3180// Header returns an http.Header that can be modified by the caller to
3181// add HTTP headers to the request.
3182func (c *ProjectsJobsCancelCall) Header() http.Header {
3183	if c.header_ == nil {
3184		c.header_ = make(http.Header)
3185	}
3186	return c.header_
3187}
3188
3189func (c *ProjectsJobsCancelCall) doRequest(alt string) (*http.Response, error) {
3190	reqHeaders := make(http.Header)
3191	for k, v := range c.header_ {
3192		reqHeaders[k] = v
3193	}
3194	reqHeaders.Set("User-Agent", c.s.userAgent())
3195	var body io.Reader = nil
3196	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__canceljobrequest)
3197	if err != nil {
3198		return nil, err
3199	}
3200	reqHeaders.Set("Content-Type", "application/json")
3201	c.urlParams_.Set("alt", alt)
3202	c.urlParams_.Set("prettyPrint", "false")
3203	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
3204	urls += "?" + c.urlParams_.Encode()
3205	req, err := http.NewRequest("POST", urls, body)
3206	if err != nil {
3207		return nil, err
3208	}
3209	req.Header = reqHeaders
3210	googleapi.Expand(req.URL, map[string]string{
3211		"name": c.name,
3212	})
3213	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3214}
3215
3216// Do executes the "ml.projects.jobs.cancel" call.
3217// Exactly one of *GoogleProtobuf__Empty or error will be non-nil. Any
3218// non-2xx status code is an error. Response headers are in either
3219// *GoogleProtobuf__Empty.ServerResponse.Header or (if a response was
3220// returned at all) in error.(*googleapi.Error).Header. Use
3221// googleapi.IsNotModified to check whether the returned error was
3222// because http.StatusNotModified was returned.
3223func (c *ProjectsJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
3224	gensupport.SetOptions(c.urlParams_, opts...)
3225	res, err := c.doRequest("json")
3226	if res != nil && res.StatusCode == http.StatusNotModified {
3227		if res.Body != nil {
3228			res.Body.Close()
3229		}
3230		return nil, &googleapi.Error{
3231			Code:   res.StatusCode,
3232			Header: res.Header,
3233		}
3234	}
3235	if err != nil {
3236		return nil, err
3237	}
3238	defer googleapi.CloseBody(res)
3239	if err := googleapi.CheckResponse(res); err != nil {
3240		return nil, err
3241	}
3242	ret := &GoogleProtobuf__Empty{
3243		ServerResponse: googleapi.ServerResponse{
3244			Header:         res.Header,
3245			HTTPStatusCode: res.StatusCode,
3246		},
3247	}
3248	target := &ret
3249	if err := gensupport.DecodeResponse(target, res); err != nil {
3250		return nil, err
3251	}
3252	return ret, nil
3253	// {
3254	//   "description": "Cancels a running job.",
3255	//   "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:cancel",
3256	//   "httpMethod": "POST",
3257	//   "id": "ml.projects.jobs.cancel",
3258	//   "parameterOrder": [
3259	//     "name"
3260	//   ],
3261	//   "parameters": {
3262	//     "name": {
3263	//       "description": "Required. The name of the job to cancel.",
3264	//       "location": "path",
3265	//       "pattern": "^projects/[^/]+/jobs/[^/]+$",
3266	//       "required": true,
3267	//       "type": "string"
3268	//     }
3269	//   },
3270	//   "path": "v1/{+name}:cancel",
3271	//   "request": {
3272	//     "$ref": "GoogleCloudMlV1__CancelJobRequest"
3273	//   },
3274	//   "response": {
3275	//     "$ref": "GoogleProtobuf__Empty"
3276	//   },
3277	//   "scopes": [
3278	//     "https://www.googleapis.com/auth/cloud-platform"
3279	//   ]
3280	// }
3281
3282}
3283
3284// method id "ml.projects.jobs.create":
3285
3286type ProjectsJobsCreateCall struct {
3287	s                    *Service
3288	parent               string
3289	googlecloudmlv1__job *GoogleCloudMlV1__Job
3290	urlParams_           gensupport.URLParams
3291	ctx_                 context.Context
3292	header_              http.Header
3293}
3294
3295// Create: Creates a training or a batch prediction job.
3296func (r *ProjectsJobsService) Create(parent string, googlecloudmlv1__job *GoogleCloudMlV1__Job) *ProjectsJobsCreateCall {
3297	c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3298	c.parent = parent
3299	c.googlecloudmlv1__job = googlecloudmlv1__job
3300	return c
3301}
3302
3303// Fields allows partial responses to be retrieved. See
3304// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3305// for more information.
3306func (c *ProjectsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsJobsCreateCall {
3307	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3308	return c
3309}
3310
3311// Context sets the context to be used in this call's Do method. Any
3312// pending HTTP request will be aborted if the provided context is
3313// canceled.
3314func (c *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall {
3315	c.ctx_ = ctx
3316	return c
3317}
3318
3319// Header returns an http.Header that can be modified by the caller to
3320// add HTTP headers to the request.
3321func (c *ProjectsJobsCreateCall) Header() http.Header {
3322	if c.header_ == nil {
3323		c.header_ = make(http.Header)
3324	}
3325	return c.header_
3326}
3327
3328func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
3329	reqHeaders := make(http.Header)
3330	for k, v := range c.header_ {
3331		reqHeaders[k] = v
3332	}
3333	reqHeaders.Set("User-Agent", c.s.userAgent())
3334	var body io.Reader = nil
3335	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__job)
3336	if err != nil {
3337		return nil, err
3338	}
3339	reqHeaders.Set("Content-Type", "application/json")
3340	c.urlParams_.Set("alt", alt)
3341	c.urlParams_.Set("prettyPrint", "false")
3342	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs")
3343	urls += "?" + c.urlParams_.Encode()
3344	req, err := http.NewRequest("POST", urls, body)
3345	if err != nil {
3346		return nil, err
3347	}
3348	req.Header = reqHeaders
3349	googleapi.Expand(req.URL, map[string]string{
3350		"parent": c.parent,
3351	})
3352	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3353}
3354
3355// Do executes the "ml.projects.jobs.create" call.
3356// Exactly one of *GoogleCloudMlV1__Job or error will be non-nil. Any
3357// non-2xx status code is an error. Response headers are in either
3358// *GoogleCloudMlV1__Job.ServerResponse.Header or (if a response was
3359// returned at all) in error.(*googleapi.Error).Header. Use
3360// googleapi.IsNotModified to check whether the returned error was
3361// because http.StatusNotModified was returned.
3362func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Job, error) {
3363	gensupport.SetOptions(c.urlParams_, opts...)
3364	res, err := c.doRequest("json")
3365	if res != nil && res.StatusCode == http.StatusNotModified {
3366		if res.Body != nil {
3367			res.Body.Close()
3368		}
3369		return nil, &googleapi.Error{
3370			Code:   res.StatusCode,
3371			Header: res.Header,
3372		}
3373	}
3374	if err != nil {
3375		return nil, err
3376	}
3377	defer googleapi.CloseBody(res)
3378	if err := googleapi.CheckResponse(res); err != nil {
3379		return nil, err
3380	}
3381	ret := &GoogleCloudMlV1__Job{
3382		ServerResponse: googleapi.ServerResponse{
3383			Header:         res.Header,
3384			HTTPStatusCode: res.StatusCode,
3385		},
3386	}
3387	target := &ret
3388	if err := gensupport.DecodeResponse(target, res); err != nil {
3389		return nil, err
3390	}
3391	return ret, nil
3392	// {
3393	//   "description": "Creates a training or a batch prediction job.",
3394	//   "flatPath": "v1/projects/{projectsId}/jobs",
3395	//   "httpMethod": "POST",
3396	//   "id": "ml.projects.jobs.create",
3397	//   "parameterOrder": [
3398	//     "parent"
3399	//   ],
3400	//   "parameters": {
3401	//     "parent": {
3402	//       "description": "Required. The project name.",
3403	//       "location": "path",
3404	//       "pattern": "^projects/[^/]+$",
3405	//       "required": true,
3406	//       "type": "string"
3407	//     }
3408	//   },
3409	//   "path": "v1/{+parent}/jobs",
3410	//   "request": {
3411	//     "$ref": "GoogleCloudMlV1__Job"
3412	//   },
3413	//   "response": {
3414	//     "$ref": "GoogleCloudMlV1__Job"
3415	//   },
3416	//   "scopes": [
3417	//     "https://www.googleapis.com/auth/cloud-platform"
3418	//   ]
3419	// }
3420
3421}
3422
3423// method id "ml.projects.jobs.get":
3424
3425type ProjectsJobsGetCall struct {
3426	s            *Service
3427	name         string
3428	urlParams_   gensupport.URLParams
3429	ifNoneMatch_ string
3430	ctx_         context.Context
3431	header_      http.Header
3432}
3433
3434// Get: Describes a job.
3435func (r *ProjectsJobsService) Get(name string) *ProjectsJobsGetCall {
3436	c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3437	c.name = name
3438	return c
3439}
3440
3441// Fields allows partial responses to be retrieved. See
3442// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3443// for more information.
3444func (c *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall {
3445	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3446	return c
3447}
3448
3449// IfNoneMatch sets the optional parameter which makes the operation
3450// fail if the object's ETag matches the given value. This is useful for
3451// getting updates only after the object has changed since the last
3452// request. Use googleapi.IsNotModified to check whether the response
3453// error from Do is the result of In-None-Match.
3454func (c *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall {
3455	c.ifNoneMatch_ = entityTag
3456	return c
3457}
3458
3459// Context sets the context to be used in this call's Do method. Any
3460// pending HTTP request will be aborted if the provided context is
3461// canceled.
3462func (c *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall {
3463	c.ctx_ = ctx
3464	return c
3465}
3466
3467// Header returns an http.Header that can be modified by the caller to
3468// add HTTP headers to the request.
3469func (c *ProjectsJobsGetCall) Header() http.Header {
3470	if c.header_ == nil {
3471		c.header_ = make(http.Header)
3472	}
3473	return c.header_
3474}
3475
3476func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) {
3477	reqHeaders := make(http.Header)
3478	for k, v := range c.header_ {
3479		reqHeaders[k] = v
3480	}
3481	reqHeaders.Set("User-Agent", c.s.userAgent())
3482	if c.ifNoneMatch_ != "" {
3483		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3484	}
3485	var body io.Reader = nil
3486	c.urlParams_.Set("alt", alt)
3487	c.urlParams_.Set("prettyPrint", "false")
3488	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3489	urls += "?" + c.urlParams_.Encode()
3490	req, err := http.NewRequest("GET", urls, body)
3491	if err != nil {
3492		return nil, err
3493	}
3494	req.Header = reqHeaders
3495	googleapi.Expand(req.URL, map[string]string{
3496		"name": c.name,
3497	})
3498	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3499}
3500
3501// Do executes the "ml.projects.jobs.get" call.
3502// Exactly one of *GoogleCloudMlV1__Job or error will be non-nil. Any
3503// non-2xx status code is an error. Response headers are in either
3504// *GoogleCloudMlV1__Job.ServerResponse.Header or (if a response was
3505// returned at all) in error.(*googleapi.Error).Header. Use
3506// googleapi.IsNotModified to check whether the returned error was
3507// because http.StatusNotModified was returned.
3508func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Job, error) {
3509	gensupport.SetOptions(c.urlParams_, opts...)
3510	res, err := c.doRequest("json")
3511	if res != nil && res.StatusCode == http.StatusNotModified {
3512		if res.Body != nil {
3513			res.Body.Close()
3514		}
3515		return nil, &googleapi.Error{
3516			Code:   res.StatusCode,
3517			Header: res.Header,
3518		}
3519	}
3520	if err != nil {
3521		return nil, err
3522	}
3523	defer googleapi.CloseBody(res)
3524	if err := googleapi.CheckResponse(res); err != nil {
3525		return nil, err
3526	}
3527	ret := &GoogleCloudMlV1__Job{
3528		ServerResponse: googleapi.ServerResponse{
3529			Header:         res.Header,
3530			HTTPStatusCode: res.StatusCode,
3531		},
3532	}
3533	target := &ret
3534	if err := gensupport.DecodeResponse(target, res); err != nil {
3535		return nil, err
3536	}
3537	return ret, nil
3538	// {
3539	//   "description": "Describes a job.",
3540	//   "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}",
3541	//   "httpMethod": "GET",
3542	//   "id": "ml.projects.jobs.get",
3543	//   "parameterOrder": [
3544	//     "name"
3545	//   ],
3546	//   "parameters": {
3547	//     "name": {
3548	//       "description": "Required. The name of the job to get the description of.",
3549	//       "location": "path",
3550	//       "pattern": "^projects/[^/]+/jobs/[^/]+$",
3551	//       "required": true,
3552	//       "type": "string"
3553	//     }
3554	//   },
3555	//   "path": "v1/{+name}",
3556	//   "response": {
3557	//     "$ref": "GoogleCloudMlV1__Job"
3558	//   },
3559	//   "scopes": [
3560	//     "https://www.googleapis.com/auth/cloud-platform"
3561	//   ]
3562	// }
3563
3564}
3565
3566// method id "ml.projects.jobs.getIamPolicy":
3567
3568type ProjectsJobsGetIamPolicyCall struct {
3569	s            *Service
3570	resource     string
3571	urlParams_   gensupport.URLParams
3572	ifNoneMatch_ string
3573	ctx_         context.Context
3574	header_      http.Header
3575}
3576
3577// GetIamPolicy: Gets the access control policy for a resource.
3578// Returns an empty policy if the resource exists and does not have a
3579// policy
3580// set.
3581func (r *ProjectsJobsService) GetIamPolicy(resource string) *ProjectsJobsGetIamPolicyCall {
3582	c := &ProjectsJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3583	c.resource = resource
3584	return c
3585}
3586
3587// Fields allows partial responses to be retrieved. See
3588// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3589// for more information.
3590func (c *ProjectsJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsJobsGetIamPolicyCall {
3591	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3592	return c
3593}
3594
3595// IfNoneMatch sets the optional parameter which makes the operation
3596// fail if the object's ETag matches the given value. This is useful for
3597// getting updates only after the object has changed since the last
3598// request. Use googleapi.IsNotModified to check whether the response
3599// error from Do is the result of In-None-Match.
3600func (c *ProjectsJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsJobsGetIamPolicyCall {
3601	c.ifNoneMatch_ = entityTag
3602	return c
3603}
3604
3605// Context sets the context to be used in this call's Do method. Any
3606// pending HTTP request will be aborted if the provided context is
3607// canceled.
3608func (c *ProjectsJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsJobsGetIamPolicyCall {
3609	c.ctx_ = ctx
3610	return c
3611}
3612
3613// Header returns an http.Header that can be modified by the caller to
3614// add HTTP headers to the request.
3615func (c *ProjectsJobsGetIamPolicyCall) Header() http.Header {
3616	if c.header_ == nil {
3617		c.header_ = make(http.Header)
3618	}
3619	return c.header_
3620}
3621
3622func (c *ProjectsJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3623	reqHeaders := make(http.Header)
3624	for k, v := range c.header_ {
3625		reqHeaders[k] = v
3626	}
3627	reqHeaders.Set("User-Agent", c.s.userAgent())
3628	if c.ifNoneMatch_ != "" {
3629		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3630	}
3631	var body io.Reader = nil
3632	c.urlParams_.Set("alt", alt)
3633	c.urlParams_.Set("prettyPrint", "false")
3634	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
3635	urls += "?" + c.urlParams_.Encode()
3636	req, err := http.NewRequest("GET", urls, body)
3637	if err != nil {
3638		return nil, err
3639	}
3640	req.Header = reqHeaders
3641	googleapi.Expand(req.URL, map[string]string{
3642		"resource": c.resource,
3643	})
3644	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3645}
3646
3647// Do executes the "ml.projects.jobs.getIamPolicy" call.
3648// Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any
3649// non-2xx status code is an error. Response headers are in either
3650// *GoogleIamV1__Policy.ServerResponse.Header or (if a response was
3651// returned at all) in error.(*googleapi.Error).Header. Use
3652// googleapi.IsNotModified to check whether the returned error was
3653// because http.StatusNotModified was returned.
3654func (c *ProjectsJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
3655	gensupport.SetOptions(c.urlParams_, opts...)
3656	res, err := c.doRequest("json")
3657	if res != nil && res.StatusCode == http.StatusNotModified {
3658		if res.Body != nil {
3659			res.Body.Close()
3660		}
3661		return nil, &googleapi.Error{
3662			Code:   res.StatusCode,
3663			Header: res.Header,
3664		}
3665	}
3666	if err != nil {
3667		return nil, err
3668	}
3669	defer googleapi.CloseBody(res)
3670	if err := googleapi.CheckResponse(res); err != nil {
3671		return nil, err
3672	}
3673	ret := &GoogleIamV1__Policy{
3674		ServerResponse: googleapi.ServerResponse{
3675			Header:         res.Header,
3676			HTTPStatusCode: res.StatusCode,
3677		},
3678	}
3679	target := &ret
3680	if err := gensupport.DecodeResponse(target, res); err != nil {
3681		return nil, err
3682	}
3683	return ret, nil
3684	// {
3685	//   "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
3686	//   "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:getIamPolicy",
3687	//   "httpMethod": "GET",
3688	//   "id": "ml.projects.jobs.getIamPolicy",
3689	//   "parameterOrder": [
3690	//     "resource"
3691	//   ],
3692	//   "parameters": {
3693	//     "resource": {
3694	//       "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
3695	//       "location": "path",
3696	//       "pattern": "^projects/[^/]+/jobs/[^/]+$",
3697	//       "required": true,
3698	//       "type": "string"
3699	//     }
3700	//   },
3701	//   "path": "v1/{+resource}:getIamPolicy",
3702	//   "response": {
3703	//     "$ref": "GoogleIamV1__Policy"
3704	//   },
3705	//   "scopes": [
3706	//     "https://www.googleapis.com/auth/cloud-platform"
3707	//   ]
3708	// }
3709
3710}
3711
3712// method id "ml.projects.jobs.list":
3713
3714type ProjectsJobsListCall struct {
3715	s            *Service
3716	parent       string
3717	urlParams_   gensupport.URLParams
3718	ifNoneMatch_ string
3719	ctx_         context.Context
3720	header_      http.Header
3721}
3722
3723// List: Lists the jobs in the project.
3724//
3725// If there are no jobs that match the request parameters, the
3726// list
3727// request returns an empty response body: {}.
3728func (r *ProjectsJobsService) List(parent string) *ProjectsJobsListCall {
3729	c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3730	c.parent = parent
3731	return c
3732}
3733
3734// Filter sets the optional parameter "filter": Specifies the subset of
3735// jobs to retrieve.
3736// You can filter on the value of one or more attributes of the job
3737// object.
3738// For example, retrieve jobs with a job identifier that starts with
3739// 'census':
3740// <p><code>gcloud ml-engine jobs list
3741// --filter='jobId:census*'</code>
3742// <p>List all failed jobs with names that start with
3743// 'rnn':
3744// <p><code>gcloud ml-engine jobs list --filter='jobId:rnn*
3745// AND state:FAILED'</code>
3746// <p>For more examples, see the guide to
3747// <a href="/ml-engine/docs/tensorflow/monitor-training">monitoring
3748// jobs</a>.
3749func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall {
3750	c.urlParams_.Set("filter", filter)
3751	return c
3752}
3753
3754// PageSize sets the optional parameter "pageSize": The number of jobs
3755// to retrieve per "page" of results. If there
3756// are more remaining results than this number, the response message
3757// will
3758// contain a valid value in the `next_page_token` field.
3759//
3760// The default value is 20, and the maximum page size is 100.
3761func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall {
3762	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3763	return c
3764}
3765
3766// PageToken sets the optional parameter "pageToken": A page token to
3767// request the next page of results.
3768//
3769// You get the token from the `next_page_token` field of the response
3770// from
3771// the previous call.
3772func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall {
3773	c.urlParams_.Set("pageToken", pageToken)
3774	return c
3775}
3776
3777// Fields allows partial responses to be retrieved. See
3778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3779// for more information.
3780func (c *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall {
3781	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3782	return c
3783}
3784
3785// IfNoneMatch sets the optional parameter which makes the operation
3786// fail if the object's ETag matches the given value. This is useful for
3787// getting updates only after the object has changed since the last
3788// request. Use googleapi.IsNotModified to check whether the response
3789// error from Do is the result of In-None-Match.
3790func (c *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall {
3791	c.ifNoneMatch_ = entityTag
3792	return c
3793}
3794
3795// Context sets the context to be used in this call's Do method. Any
3796// pending HTTP request will be aborted if the provided context is
3797// canceled.
3798func (c *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall {
3799	c.ctx_ = ctx
3800	return c
3801}
3802
3803// Header returns an http.Header that can be modified by the caller to
3804// add HTTP headers to the request.
3805func (c *ProjectsJobsListCall) Header() http.Header {
3806	if c.header_ == nil {
3807		c.header_ = make(http.Header)
3808	}
3809	return c.header_
3810}
3811
3812func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) {
3813	reqHeaders := make(http.Header)
3814	for k, v := range c.header_ {
3815		reqHeaders[k] = v
3816	}
3817	reqHeaders.Set("User-Agent", c.s.userAgent())
3818	if c.ifNoneMatch_ != "" {
3819		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3820	}
3821	var body io.Reader = nil
3822	c.urlParams_.Set("alt", alt)
3823	c.urlParams_.Set("prettyPrint", "false")
3824	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs")
3825	urls += "?" + c.urlParams_.Encode()
3826	req, err := http.NewRequest("GET", urls, body)
3827	if err != nil {
3828		return nil, err
3829	}
3830	req.Header = reqHeaders
3831	googleapi.Expand(req.URL, map[string]string{
3832		"parent": c.parent,
3833	})
3834	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3835}
3836
3837// Do executes the "ml.projects.jobs.list" call.
3838// Exactly one of *GoogleCloudMlV1__ListJobsResponse or error will be
3839// non-nil. Any non-2xx status code is an error. Response headers are in
3840// either *GoogleCloudMlV1__ListJobsResponse.ServerResponse.Header or
3841// (if a response was returned at all) in
3842// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3843// whether the returned error was because http.StatusNotModified was
3844// returned.
3845func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListJobsResponse, error) {
3846	gensupport.SetOptions(c.urlParams_, opts...)
3847	res, err := c.doRequest("json")
3848	if res != nil && res.StatusCode == http.StatusNotModified {
3849		if res.Body != nil {
3850			res.Body.Close()
3851		}
3852		return nil, &googleapi.Error{
3853			Code:   res.StatusCode,
3854			Header: res.Header,
3855		}
3856	}
3857	if err != nil {
3858		return nil, err
3859	}
3860	defer googleapi.CloseBody(res)
3861	if err := googleapi.CheckResponse(res); err != nil {
3862		return nil, err
3863	}
3864	ret := &GoogleCloudMlV1__ListJobsResponse{
3865		ServerResponse: googleapi.ServerResponse{
3866			Header:         res.Header,
3867			HTTPStatusCode: res.StatusCode,
3868		},
3869	}
3870	target := &ret
3871	if err := gensupport.DecodeResponse(target, res); err != nil {
3872		return nil, err
3873	}
3874	return ret, nil
3875	// {
3876	//   "description": "Lists the jobs in the project.\n\nIf there are no jobs that match the request parameters, the list\nrequest returns an empty response body: {}.",
3877	//   "flatPath": "v1/projects/{projectsId}/jobs",
3878	//   "httpMethod": "GET",
3879	//   "id": "ml.projects.jobs.list",
3880	//   "parameterOrder": [
3881	//     "parent"
3882	//   ],
3883	//   "parameters": {
3884	//     "filter": {
3885	//       "description": "Optional. Specifies the subset of jobs to retrieve.\nYou can filter on the value of one or more attributes of the job object.\nFor example, retrieve jobs with a job identifier that starts with 'census':\n\u003cp\u003e\u003ccode\u003egcloud ml-engine jobs list --filter='jobId:census*'\u003c/code\u003e\n\u003cp\u003eList all failed jobs with names that start with 'rnn':\n\u003cp\u003e\u003ccode\u003egcloud ml-engine jobs list --filter='jobId:rnn*\nAND state:FAILED'\u003c/code\u003e\n\u003cp\u003eFor more examples, see the guide to\n\u003ca href=\"/ml-engine/docs/tensorflow/monitor-training\"\u003emonitoring jobs\u003c/a\u003e.",
3886	//       "location": "query",
3887	//       "type": "string"
3888	//     },
3889	//     "pageSize": {
3890	//       "description": "Optional. The number of jobs to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.",
3891	//       "format": "int32",
3892	//       "location": "query",
3893	//       "type": "integer"
3894	//     },
3895	//     "pageToken": {
3896	//       "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.",
3897	//       "location": "query",
3898	//       "type": "string"
3899	//     },
3900	//     "parent": {
3901	//       "description": "Required. The name of the project for which to list jobs.",
3902	//       "location": "path",
3903	//       "pattern": "^projects/[^/]+$",
3904	//       "required": true,
3905	//       "type": "string"
3906	//     }
3907	//   },
3908	//   "path": "v1/{+parent}/jobs",
3909	//   "response": {
3910	//     "$ref": "GoogleCloudMlV1__ListJobsResponse"
3911	//   },
3912	//   "scopes": [
3913	//     "https://www.googleapis.com/auth/cloud-platform"
3914	//   ]
3915	// }
3916
3917}
3918
3919// Pages invokes f for each page of results.
3920// A non-nil error returned from f will halt the iteration.
3921// The provided context supersedes any context provided to the Context method.
3922func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListJobsResponse) error) error {
3923	c.ctx_ = ctx
3924	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3925	for {
3926		x, err := c.Do()
3927		if err != nil {
3928			return err
3929		}
3930		if err := f(x); err != nil {
3931			return err
3932		}
3933		if x.NextPageToken == "" {
3934			return nil
3935		}
3936		c.PageToken(x.NextPageToken)
3937	}
3938}
3939
3940// method id "ml.projects.jobs.patch":
3941
3942type ProjectsJobsPatchCall struct {
3943	s                    *Service
3944	name                 string
3945	googlecloudmlv1__job *GoogleCloudMlV1__Job
3946	urlParams_           gensupport.URLParams
3947	ctx_                 context.Context
3948	header_              http.Header
3949}
3950
3951// Patch: Updates a specific job resource.
3952//
3953// Currently the only supported fields to update are `labels`.
3954func (r *ProjectsJobsService) Patch(name string, googlecloudmlv1__job *GoogleCloudMlV1__Job) *ProjectsJobsPatchCall {
3955	c := &ProjectsJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3956	c.name = name
3957	c.googlecloudmlv1__job = googlecloudmlv1__job
3958	return c
3959}
3960
3961// UpdateMask sets the optional parameter "updateMask": Required.
3962// Specifies the path, relative to `Job`, of the field to update.
3963// To adopt etag mechanism, include `etag` field in the mask, and
3964// include the
3965// `etag` value in your job resource.
3966//
3967// For example, to change the labels of a job, the `update_mask`
3968// parameter
3969// would be specified as `labels`, `etag`, and the
3970// `PATCH` request body would specify the new value, as follows:
3971//     {
3972//       "labels": {
3973//          "owner": "Google",
3974//          "color": "Blue"
3975//       }
3976//       "etag": "33a64df551425fcc55e4d42a148795d9f25f89d4"
3977//     }
3978// If `etag` matches the one on the server, the labels of the job will
3979// be
3980// replaced with the given ones, and the server end `etag` will
3981// be
3982// recalculated.
3983//
3984// Currently the only supported update masks are `labels` and `etag`.
3985func (c *ProjectsJobsPatchCall) UpdateMask(updateMask string) *ProjectsJobsPatchCall {
3986	c.urlParams_.Set("updateMask", updateMask)
3987	return c
3988}
3989
3990// Fields allows partial responses to be retrieved. See
3991// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3992// for more information.
3993func (c *ProjectsJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsJobsPatchCall {
3994	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3995	return c
3996}
3997
3998// Context sets the context to be used in this call's Do method. Any
3999// pending HTTP request will be aborted if the provided context is
4000// canceled.
4001func (c *ProjectsJobsPatchCall) Context(ctx context.Context) *ProjectsJobsPatchCall {
4002	c.ctx_ = ctx
4003	return c
4004}
4005
4006// Header returns an http.Header that can be modified by the caller to
4007// add HTTP headers to the request.
4008func (c *ProjectsJobsPatchCall) Header() http.Header {
4009	if c.header_ == nil {
4010		c.header_ = make(http.Header)
4011	}
4012	return c.header_
4013}
4014
4015func (c *ProjectsJobsPatchCall) doRequest(alt string) (*http.Response, error) {
4016	reqHeaders := make(http.Header)
4017	for k, v := range c.header_ {
4018		reqHeaders[k] = v
4019	}
4020	reqHeaders.Set("User-Agent", c.s.userAgent())
4021	var body io.Reader = nil
4022	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__job)
4023	if err != nil {
4024		return nil, err
4025	}
4026	reqHeaders.Set("Content-Type", "application/json")
4027	c.urlParams_.Set("alt", alt)
4028	c.urlParams_.Set("prettyPrint", "false")
4029	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4030	urls += "?" + c.urlParams_.Encode()
4031	req, err := http.NewRequest("PATCH", urls, body)
4032	if err != nil {
4033		return nil, err
4034	}
4035	req.Header = reqHeaders
4036	googleapi.Expand(req.URL, map[string]string{
4037		"name": c.name,
4038	})
4039	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4040}
4041
4042// Do executes the "ml.projects.jobs.patch" call.
4043// Exactly one of *GoogleCloudMlV1__Job or error will be non-nil. Any
4044// non-2xx status code is an error. Response headers are in either
4045// *GoogleCloudMlV1__Job.ServerResponse.Header or (if a response was
4046// returned at all) in error.(*googleapi.Error).Header. Use
4047// googleapi.IsNotModified to check whether the returned error was
4048// because http.StatusNotModified was returned.
4049func (c *ProjectsJobsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Job, error) {
4050	gensupport.SetOptions(c.urlParams_, opts...)
4051	res, err := c.doRequest("json")
4052	if res != nil && res.StatusCode == http.StatusNotModified {
4053		if res.Body != nil {
4054			res.Body.Close()
4055		}
4056		return nil, &googleapi.Error{
4057			Code:   res.StatusCode,
4058			Header: res.Header,
4059		}
4060	}
4061	if err != nil {
4062		return nil, err
4063	}
4064	defer googleapi.CloseBody(res)
4065	if err := googleapi.CheckResponse(res); err != nil {
4066		return nil, err
4067	}
4068	ret := &GoogleCloudMlV1__Job{
4069		ServerResponse: googleapi.ServerResponse{
4070			Header:         res.Header,
4071			HTTPStatusCode: res.StatusCode,
4072		},
4073	}
4074	target := &ret
4075	if err := gensupport.DecodeResponse(target, res); err != nil {
4076		return nil, err
4077	}
4078	return ret, nil
4079	// {
4080	//   "description": "Updates a specific job resource.\n\nCurrently the only supported fields to update are `labels`.",
4081	//   "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}",
4082	//   "httpMethod": "PATCH",
4083	//   "id": "ml.projects.jobs.patch",
4084	//   "parameterOrder": [
4085	//     "name"
4086	//   ],
4087	//   "parameters": {
4088	//     "name": {
4089	//       "description": "Required. The job name.",
4090	//       "location": "path",
4091	//       "pattern": "^projects/[^/]+/jobs/[^/]+$",
4092	//       "required": true,
4093	//       "type": "string"
4094	//     },
4095	//     "updateMask": {
4096	//       "description": "Required. Specifies the path, relative to `Job`, of the field to update.\nTo adopt etag mechanism, include `etag` field in the mask, and include the\n`etag` value in your job resource.\n\nFor example, to change the labels of a job, the `update_mask` parameter\nwould be specified as `labels`, `etag`, and the\n`PATCH` request body would specify the new value, as follows:\n    {\n      \"labels\": {\n         \"owner\": \"Google\",\n         \"color\": \"Blue\"\n      }\n      \"etag\": \"33a64df551425fcc55e4d42a148795d9f25f89d4\"\n    }\nIf `etag` matches the one on the server, the labels of the job will be\nreplaced with the given ones, and the server end `etag` will be\nrecalculated.\n\nCurrently the only supported update masks are `labels` and `etag`.",
4097	//       "format": "google-fieldmask",
4098	//       "location": "query",
4099	//       "type": "string"
4100	//     }
4101	//   },
4102	//   "path": "v1/{+name}",
4103	//   "request": {
4104	//     "$ref": "GoogleCloudMlV1__Job"
4105	//   },
4106	//   "response": {
4107	//     "$ref": "GoogleCloudMlV1__Job"
4108	//   },
4109	//   "scopes": [
4110	//     "https://www.googleapis.com/auth/cloud-platform"
4111	//   ]
4112	// }
4113
4114}
4115
4116// method id "ml.projects.jobs.setIamPolicy":
4117
4118type ProjectsJobsSetIamPolicyCall struct {
4119	s                                *Service
4120	resource                         string
4121	googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest
4122	urlParams_                       gensupport.URLParams
4123	ctx_                             context.Context
4124	header_                          http.Header
4125}
4126
4127// SetIamPolicy: Sets the access control policy on the specified
4128// resource. Replaces any
4129// existing policy.
4130func (r *ProjectsJobsService) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *ProjectsJobsSetIamPolicyCall {
4131	c := &ProjectsJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4132	c.resource = resource
4133	c.googleiamv1__setiampolicyrequest = googleiamv1__setiampolicyrequest
4134	return c
4135}
4136
4137// Fields allows partial responses to be retrieved. See
4138// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4139// for more information.
4140func (c *ProjectsJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsJobsSetIamPolicyCall {
4141	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4142	return c
4143}
4144
4145// Context sets the context to be used in this call's Do method. Any
4146// pending HTTP request will be aborted if the provided context is
4147// canceled.
4148func (c *ProjectsJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsJobsSetIamPolicyCall {
4149	c.ctx_ = ctx
4150	return c
4151}
4152
4153// Header returns an http.Header that can be modified by the caller to
4154// add HTTP headers to the request.
4155func (c *ProjectsJobsSetIamPolicyCall) Header() http.Header {
4156	if c.header_ == nil {
4157		c.header_ = make(http.Header)
4158	}
4159	return c.header_
4160}
4161
4162func (c *ProjectsJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4163	reqHeaders := make(http.Header)
4164	for k, v := range c.header_ {
4165		reqHeaders[k] = v
4166	}
4167	reqHeaders.Set("User-Agent", c.s.userAgent())
4168	var body io.Reader = nil
4169	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__setiampolicyrequest)
4170	if err != nil {
4171		return nil, err
4172	}
4173	reqHeaders.Set("Content-Type", "application/json")
4174	c.urlParams_.Set("alt", alt)
4175	c.urlParams_.Set("prettyPrint", "false")
4176	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
4177	urls += "?" + c.urlParams_.Encode()
4178	req, err := http.NewRequest("POST", urls, body)
4179	if err != nil {
4180		return nil, err
4181	}
4182	req.Header = reqHeaders
4183	googleapi.Expand(req.URL, map[string]string{
4184		"resource": c.resource,
4185	})
4186	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4187}
4188
4189// Do executes the "ml.projects.jobs.setIamPolicy" call.
4190// Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any
4191// non-2xx status code is an error. Response headers are in either
4192// *GoogleIamV1__Policy.ServerResponse.Header or (if a response was
4193// returned at all) in error.(*googleapi.Error).Header. Use
4194// googleapi.IsNotModified to check whether the returned error was
4195// because http.StatusNotModified was returned.
4196func (c *ProjectsJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
4197	gensupport.SetOptions(c.urlParams_, opts...)
4198	res, err := c.doRequest("json")
4199	if res != nil && res.StatusCode == http.StatusNotModified {
4200		if res.Body != nil {
4201			res.Body.Close()
4202		}
4203		return nil, &googleapi.Error{
4204			Code:   res.StatusCode,
4205			Header: res.Header,
4206		}
4207	}
4208	if err != nil {
4209		return nil, err
4210	}
4211	defer googleapi.CloseBody(res)
4212	if err := googleapi.CheckResponse(res); err != nil {
4213		return nil, err
4214	}
4215	ret := &GoogleIamV1__Policy{
4216		ServerResponse: googleapi.ServerResponse{
4217			Header:         res.Header,
4218			HTTPStatusCode: res.StatusCode,
4219		},
4220	}
4221	target := &ret
4222	if err := gensupport.DecodeResponse(target, res); err != nil {
4223		return nil, err
4224	}
4225	return ret, nil
4226	// {
4227	//   "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
4228	//   "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:setIamPolicy",
4229	//   "httpMethod": "POST",
4230	//   "id": "ml.projects.jobs.setIamPolicy",
4231	//   "parameterOrder": [
4232	//     "resource"
4233	//   ],
4234	//   "parameters": {
4235	//     "resource": {
4236	//       "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
4237	//       "location": "path",
4238	//       "pattern": "^projects/[^/]+/jobs/[^/]+$",
4239	//       "required": true,
4240	//       "type": "string"
4241	//     }
4242	//   },
4243	//   "path": "v1/{+resource}:setIamPolicy",
4244	//   "request": {
4245	//     "$ref": "GoogleIamV1__SetIamPolicyRequest"
4246	//   },
4247	//   "response": {
4248	//     "$ref": "GoogleIamV1__Policy"
4249	//   },
4250	//   "scopes": [
4251	//     "https://www.googleapis.com/auth/cloud-platform"
4252	//   ]
4253	// }
4254
4255}
4256
4257// method id "ml.projects.jobs.testIamPermissions":
4258
4259type ProjectsJobsTestIamPermissionsCall struct {
4260	s                                      *Service
4261	resource                               string
4262	googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest
4263	urlParams_                             gensupport.URLParams
4264	ctx_                                   context.Context
4265	header_                                http.Header
4266}
4267
4268// TestIamPermissions: Returns permissions that a caller has on the
4269// specified resource.
4270// If the resource does not exist, this will return an empty set
4271// of
4272// permissions, not a NOT_FOUND error.
4273//
4274// Note: This operation is designed to be used for building
4275// permission-aware
4276// UIs and command-line tools, not for authorization checking. This
4277// operation
4278// may "fail open" without warning.
4279func (r *ProjectsJobsService) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *ProjectsJobsTestIamPermissionsCall {
4280	c := &ProjectsJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4281	c.resource = resource
4282	c.googleiamv1__testiampermissionsrequest = googleiamv1__testiampermissionsrequest
4283	return c
4284}
4285
4286// Fields allows partial responses to be retrieved. See
4287// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4288// for more information.
4289func (c *ProjectsJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsJobsTestIamPermissionsCall {
4290	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4291	return c
4292}
4293
4294// Context sets the context to be used in this call's Do method. Any
4295// pending HTTP request will be aborted if the provided context is
4296// canceled.
4297func (c *ProjectsJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsJobsTestIamPermissionsCall {
4298	c.ctx_ = ctx
4299	return c
4300}
4301
4302// Header returns an http.Header that can be modified by the caller to
4303// add HTTP headers to the request.
4304func (c *ProjectsJobsTestIamPermissionsCall) Header() http.Header {
4305	if c.header_ == nil {
4306		c.header_ = make(http.Header)
4307	}
4308	return c.header_
4309}
4310
4311func (c *ProjectsJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
4312	reqHeaders := make(http.Header)
4313	for k, v := range c.header_ {
4314		reqHeaders[k] = v
4315	}
4316	reqHeaders.Set("User-Agent", c.s.userAgent())
4317	var body io.Reader = nil
4318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__testiampermissionsrequest)
4319	if err != nil {
4320		return nil, err
4321	}
4322	reqHeaders.Set("Content-Type", "application/json")
4323	c.urlParams_.Set("alt", alt)
4324	c.urlParams_.Set("prettyPrint", "false")
4325	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
4326	urls += "?" + c.urlParams_.Encode()
4327	req, err := http.NewRequest("POST", urls, body)
4328	if err != nil {
4329		return nil, err
4330	}
4331	req.Header = reqHeaders
4332	googleapi.Expand(req.URL, map[string]string{
4333		"resource": c.resource,
4334	})
4335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4336}
4337
4338// Do executes the "ml.projects.jobs.testIamPermissions" call.
4339// Exactly one of *GoogleIamV1__TestIamPermissionsResponse or error will
4340// be non-nil. Any non-2xx status code is an error. Response headers are
4341// in either
4342// *GoogleIamV1__TestIamPermissionsResponse.ServerResponse.Header or (if
4343// a response was returned at all) in error.(*googleapi.Error).Header.
4344// Use googleapi.IsNotModified to check whether the returned error was
4345// because http.StatusNotModified was returned.
4346func (c *ProjectsJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__TestIamPermissionsResponse, error) {
4347	gensupport.SetOptions(c.urlParams_, opts...)
4348	res, err := c.doRequest("json")
4349	if res != nil && res.StatusCode == http.StatusNotModified {
4350		if res.Body != nil {
4351			res.Body.Close()
4352		}
4353		return nil, &googleapi.Error{
4354			Code:   res.StatusCode,
4355			Header: res.Header,
4356		}
4357	}
4358	if err != nil {
4359		return nil, err
4360	}
4361	defer googleapi.CloseBody(res)
4362	if err := googleapi.CheckResponse(res); err != nil {
4363		return nil, err
4364	}
4365	ret := &GoogleIamV1__TestIamPermissionsResponse{
4366		ServerResponse: googleapi.ServerResponse{
4367			Header:         res.Header,
4368			HTTPStatusCode: res.StatusCode,
4369		},
4370	}
4371	target := &ret
4372	if err := gensupport.DecodeResponse(target, res); err != nil {
4373		return nil, err
4374	}
4375	return ret, nil
4376	// {
4377	//   "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.",
4378	//   "flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:testIamPermissions",
4379	//   "httpMethod": "POST",
4380	//   "id": "ml.projects.jobs.testIamPermissions",
4381	//   "parameterOrder": [
4382	//     "resource"
4383	//   ],
4384	//   "parameters": {
4385	//     "resource": {
4386	//       "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
4387	//       "location": "path",
4388	//       "pattern": "^projects/[^/]+/jobs/[^/]+$",
4389	//       "required": true,
4390	//       "type": "string"
4391	//     }
4392	//   },
4393	//   "path": "v1/{+resource}:testIamPermissions",
4394	//   "request": {
4395	//     "$ref": "GoogleIamV1__TestIamPermissionsRequest"
4396	//   },
4397	//   "response": {
4398	//     "$ref": "GoogleIamV1__TestIamPermissionsResponse"
4399	//   },
4400	//   "scopes": [
4401	//     "https://www.googleapis.com/auth/cloud-platform"
4402	//   ]
4403	// }
4404
4405}
4406
4407// method id "ml.projects.locations.get":
4408
4409type ProjectsLocationsGetCall struct {
4410	s            *Service
4411	name         string
4412	urlParams_   gensupport.URLParams
4413	ifNoneMatch_ string
4414	ctx_         context.Context
4415	header_      http.Header
4416}
4417
4418// Get: Get the complete list of CMLE capabilities in a location, along
4419// with their
4420// location-specific properties.
4421func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
4422	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4423	c.name = name
4424	return c
4425}
4426
4427// Fields allows partial responses to be retrieved. See
4428// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4429// for more information.
4430func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
4431	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4432	return c
4433}
4434
4435// IfNoneMatch sets the optional parameter which makes the operation
4436// fail if the object's ETag matches the given value. This is useful for
4437// getting updates only after the object has changed since the last
4438// request. Use googleapi.IsNotModified to check whether the response
4439// error from Do is the result of In-None-Match.
4440func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
4441	c.ifNoneMatch_ = entityTag
4442	return c
4443}
4444
4445// Context sets the context to be used in this call's Do method. Any
4446// pending HTTP request will be aborted if the provided context is
4447// canceled.
4448func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
4449	c.ctx_ = ctx
4450	return c
4451}
4452
4453// Header returns an http.Header that can be modified by the caller to
4454// add HTTP headers to the request.
4455func (c *ProjectsLocationsGetCall) Header() http.Header {
4456	if c.header_ == nil {
4457		c.header_ = make(http.Header)
4458	}
4459	return c.header_
4460}
4461
4462func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
4463	reqHeaders := make(http.Header)
4464	for k, v := range c.header_ {
4465		reqHeaders[k] = v
4466	}
4467	reqHeaders.Set("User-Agent", c.s.userAgent())
4468	if c.ifNoneMatch_ != "" {
4469		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4470	}
4471	var body io.Reader = nil
4472	c.urlParams_.Set("alt", alt)
4473	c.urlParams_.Set("prettyPrint", "false")
4474	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4475	urls += "?" + c.urlParams_.Encode()
4476	req, err := http.NewRequest("GET", urls, body)
4477	if err != nil {
4478		return nil, err
4479	}
4480	req.Header = reqHeaders
4481	googleapi.Expand(req.URL, map[string]string{
4482		"name": c.name,
4483	})
4484	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4485}
4486
4487// Do executes the "ml.projects.locations.get" call.
4488// Exactly one of *GoogleCloudMlV1__Location or error will be non-nil.
4489// Any non-2xx status code is an error. Response headers are in either
4490// *GoogleCloudMlV1__Location.ServerResponse.Header or (if a response
4491// was returned at all) in error.(*googleapi.Error).Header. Use
4492// googleapi.IsNotModified to check whether the returned error was
4493// because http.StatusNotModified was returned.
4494func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Location, error) {
4495	gensupport.SetOptions(c.urlParams_, opts...)
4496	res, err := c.doRequest("json")
4497	if res != nil && res.StatusCode == http.StatusNotModified {
4498		if res.Body != nil {
4499			res.Body.Close()
4500		}
4501		return nil, &googleapi.Error{
4502			Code:   res.StatusCode,
4503			Header: res.Header,
4504		}
4505	}
4506	if err != nil {
4507		return nil, err
4508	}
4509	defer googleapi.CloseBody(res)
4510	if err := googleapi.CheckResponse(res); err != nil {
4511		return nil, err
4512	}
4513	ret := &GoogleCloudMlV1__Location{
4514		ServerResponse: googleapi.ServerResponse{
4515			Header:         res.Header,
4516			HTTPStatusCode: res.StatusCode,
4517		},
4518	}
4519	target := &ret
4520	if err := gensupport.DecodeResponse(target, res); err != nil {
4521		return nil, err
4522	}
4523	return ret, nil
4524	// {
4525	//   "description": "Get the complete list of CMLE capabilities in a location, along with their\nlocation-specific properties.",
4526	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}",
4527	//   "httpMethod": "GET",
4528	//   "id": "ml.projects.locations.get",
4529	//   "parameterOrder": [
4530	//     "name"
4531	//   ],
4532	//   "parameters": {
4533	//     "name": {
4534	//       "description": "Required. The name of the location.",
4535	//       "location": "path",
4536	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4537	//       "required": true,
4538	//       "type": "string"
4539	//     }
4540	//   },
4541	//   "path": "v1/{+name}",
4542	//   "response": {
4543	//     "$ref": "GoogleCloudMlV1__Location"
4544	//   },
4545	//   "scopes": [
4546	//     "https://www.googleapis.com/auth/cloud-platform"
4547	//   ]
4548	// }
4549
4550}
4551
4552// method id "ml.projects.locations.list":
4553
4554type ProjectsLocationsListCall struct {
4555	s            *Service
4556	parent       string
4557	urlParams_   gensupport.URLParams
4558	ifNoneMatch_ string
4559	ctx_         context.Context
4560	header_      http.Header
4561}
4562
4563// List: List all locations that provides at least one type of CMLE
4564// capability.
4565func (r *ProjectsLocationsService) List(parent string) *ProjectsLocationsListCall {
4566	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4567	c.parent = parent
4568	return c
4569}
4570
4571// PageSize sets the optional parameter "pageSize": The number of
4572// locations to retrieve per "page" of results. If there
4573// are more remaining results than this number, the response message
4574// will
4575// contain a valid value in the `next_page_token` field.
4576//
4577// The default value is 20, and the maximum page size is 100.
4578func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
4579	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4580	return c
4581}
4582
4583// PageToken sets the optional parameter "pageToken": A page token to
4584// request the next page of results.
4585//
4586// You get the token from the `next_page_token` field of the response
4587// from
4588// the previous call.
4589func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
4590	c.urlParams_.Set("pageToken", pageToken)
4591	return c
4592}
4593
4594// Fields allows partial responses to be retrieved. See
4595// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4596// for more information.
4597func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
4598	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4599	return c
4600}
4601
4602// IfNoneMatch sets the optional parameter which makes the operation
4603// fail if the object's ETag matches the given value. This is useful for
4604// getting updates only after the object has changed since the last
4605// request. Use googleapi.IsNotModified to check whether the response
4606// error from Do is the result of In-None-Match.
4607func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
4608	c.ifNoneMatch_ = entityTag
4609	return c
4610}
4611
4612// Context sets the context to be used in this call's Do method. Any
4613// pending HTTP request will be aborted if the provided context is
4614// canceled.
4615func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
4616	c.ctx_ = ctx
4617	return c
4618}
4619
4620// Header returns an http.Header that can be modified by the caller to
4621// add HTTP headers to the request.
4622func (c *ProjectsLocationsListCall) Header() http.Header {
4623	if c.header_ == nil {
4624		c.header_ = make(http.Header)
4625	}
4626	return c.header_
4627}
4628
4629func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
4630	reqHeaders := make(http.Header)
4631	for k, v := range c.header_ {
4632		reqHeaders[k] = v
4633	}
4634	reqHeaders.Set("User-Agent", c.s.userAgent())
4635	if c.ifNoneMatch_ != "" {
4636		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4637	}
4638	var body io.Reader = nil
4639	c.urlParams_.Set("alt", alt)
4640	c.urlParams_.Set("prettyPrint", "false")
4641	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/locations")
4642	urls += "?" + c.urlParams_.Encode()
4643	req, err := http.NewRequest("GET", urls, body)
4644	if err != nil {
4645		return nil, err
4646	}
4647	req.Header = reqHeaders
4648	googleapi.Expand(req.URL, map[string]string{
4649		"parent": c.parent,
4650	})
4651	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4652}
4653
4654// Do executes the "ml.projects.locations.list" call.
4655// Exactly one of *GoogleCloudMlV1__ListLocationsResponse or error will
4656// be non-nil. Any non-2xx status code is an error. Response headers are
4657// in either
4658// *GoogleCloudMlV1__ListLocationsResponse.ServerResponse.Header or (if
4659// a response was returned at all) in error.(*googleapi.Error).Header.
4660// Use googleapi.IsNotModified to check whether the returned error was
4661// because http.StatusNotModified was returned.
4662func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListLocationsResponse, error) {
4663	gensupport.SetOptions(c.urlParams_, opts...)
4664	res, err := c.doRequest("json")
4665	if res != nil && res.StatusCode == http.StatusNotModified {
4666		if res.Body != nil {
4667			res.Body.Close()
4668		}
4669		return nil, &googleapi.Error{
4670			Code:   res.StatusCode,
4671			Header: res.Header,
4672		}
4673	}
4674	if err != nil {
4675		return nil, err
4676	}
4677	defer googleapi.CloseBody(res)
4678	if err := googleapi.CheckResponse(res); err != nil {
4679		return nil, err
4680	}
4681	ret := &GoogleCloudMlV1__ListLocationsResponse{
4682		ServerResponse: googleapi.ServerResponse{
4683			Header:         res.Header,
4684			HTTPStatusCode: res.StatusCode,
4685		},
4686	}
4687	target := &ret
4688	if err := gensupport.DecodeResponse(target, res); err != nil {
4689		return nil, err
4690	}
4691	return ret, nil
4692	// {
4693	//   "description": "List all locations that provides at least one type of CMLE capability.",
4694	//   "flatPath": "v1/projects/{projectsId}/locations",
4695	//   "httpMethod": "GET",
4696	//   "id": "ml.projects.locations.list",
4697	//   "parameterOrder": [
4698	//     "parent"
4699	//   ],
4700	//   "parameters": {
4701	//     "pageSize": {
4702	//       "description": "Optional. The number of locations to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.",
4703	//       "format": "int32",
4704	//       "location": "query",
4705	//       "type": "integer"
4706	//     },
4707	//     "pageToken": {
4708	//       "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.",
4709	//       "location": "query",
4710	//       "type": "string"
4711	//     },
4712	//     "parent": {
4713	//       "description": "Required. The name of the project for which available locations are to be\nlisted (since some locations might be whitelisted for specific projects).",
4714	//       "location": "path",
4715	//       "pattern": "^projects/[^/]+$",
4716	//       "required": true,
4717	//       "type": "string"
4718	//     }
4719	//   },
4720	//   "path": "v1/{+parent}/locations",
4721	//   "response": {
4722	//     "$ref": "GoogleCloudMlV1__ListLocationsResponse"
4723	//   },
4724	//   "scopes": [
4725	//     "https://www.googleapis.com/auth/cloud-platform"
4726	//   ]
4727	// }
4728
4729}
4730
4731// Pages invokes f for each page of results.
4732// A non-nil error returned from f will halt the iteration.
4733// The provided context supersedes any context provided to the Context method.
4734func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListLocationsResponse) error) error {
4735	c.ctx_ = ctx
4736	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4737	for {
4738		x, err := c.Do()
4739		if err != nil {
4740			return err
4741		}
4742		if err := f(x); err != nil {
4743			return err
4744		}
4745		if x.NextPageToken == "" {
4746			return nil
4747		}
4748		c.PageToken(x.NextPageToken)
4749	}
4750}
4751
4752// method id "ml.projects.models.create":
4753
4754type ProjectsModelsCreateCall struct {
4755	s                      *Service
4756	parent                 string
4757	googlecloudmlv1__model *GoogleCloudMlV1__Model
4758	urlParams_             gensupport.URLParams
4759	ctx_                   context.Context
4760	header_                http.Header
4761}
4762
4763// Create: Creates a model which will later contain one or more
4764// versions.
4765//
4766// You must add at least one version before you can request predictions
4767// from
4768// the model. Add versions by
4769// calling
4770// [projects.models.versions.create](/ml-engine/reference/rest/v1
4771// /projects.models.versions/create).
4772func (r *ProjectsModelsService) Create(parent string, googlecloudmlv1__model *GoogleCloudMlV1__Model) *ProjectsModelsCreateCall {
4773	c := &ProjectsModelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4774	c.parent = parent
4775	c.googlecloudmlv1__model = googlecloudmlv1__model
4776	return c
4777}
4778
4779// Fields allows partial responses to be retrieved. See
4780// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4781// for more information.
4782func (c *ProjectsModelsCreateCall) Fields(s ...googleapi.Field) *ProjectsModelsCreateCall {
4783	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4784	return c
4785}
4786
4787// Context sets the context to be used in this call's Do method. Any
4788// pending HTTP request will be aborted if the provided context is
4789// canceled.
4790func (c *ProjectsModelsCreateCall) Context(ctx context.Context) *ProjectsModelsCreateCall {
4791	c.ctx_ = ctx
4792	return c
4793}
4794
4795// Header returns an http.Header that can be modified by the caller to
4796// add HTTP headers to the request.
4797func (c *ProjectsModelsCreateCall) Header() http.Header {
4798	if c.header_ == nil {
4799		c.header_ = make(http.Header)
4800	}
4801	return c.header_
4802}
4803
4804func (c *ProjectsModelsCreateCall) doRequest(alt string) (*http.Response, error) {
4805	reqHeaders := make(http.Header)
4806	for k, v := range c.header_ {
4807		reqHeaders[k] = v
4808	}
4809	reqHeaders.Set("User-Agent", c.s.userAgent())
4810	var body io.Reader = nil
4811	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__model)
4812	if err != nil {
4813		return nil, err
4814	}
4815	reqHeaders.Set("Content-Type", "application/json")
4816	c.urlParams_.Set("alt", alt)
4817	c.urlParams_.Set("prettyPrint", "false")
4818	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models")
4819	urls += "?" + c.urlParams_.Encode()
4820	req, err := http.NewRequest("POST", urls, body)
4821	if err != nil {
4822		return nil, err
4823	}
4824	req.Header = reqHeaders
4825	googleapi.Expand(req.URL, map[string]string{
4826		"parent": c.parent,
4827	})
4828	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4829}
4830
4831// Do executes the "ml.projects.models.create" call.
4832// Exactly one of *GoogleCloudMlV1__Model or error will be non-nil. Any
4833// non-2xx status code is an error. Response headers are in either
4834// *GoogleCloudMlV1__Model.ServerResponse.Header or (if a response was
4835// returned at all) in error.(*googleapi.Error).Header. Use
4836// googleapi.IsNotModified to check whether the returned error was
4837// because http.StatusNotModified was returned.
4838func (c *ProjectsModelsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Model, error) {
4839	gensupport.SetOptions(c.urlParams_, opts...)
4840	res, err := c.doRequest("json")
4841	if res != nil && res.StatusCode == http.StatusNotModified {
4842		if res.Body != nil {
4843			res.Body.Close()
4844		}
4845		return nil, &googleapi.Error{
4846			Code:   res.StatusCode,
4847			Header: res.Header,
4848		}
4849	}
4850	if err != nil {
4851		return nil, err
4852	}
4853	defer googleapi.CloseBody(res)
4854	if err := googleapi.CheckResponse(res); err != nil {
4855		return nil, err
4856	}
4857	ret := &GoogleCloudMlV1__Model{
4858		ServerResponse: googleapi.ServerResponse{
4859			Header:         res.Header,
4860			HTTPStatusCode: res.StatusCode,
4861		},
4862	}
4863	target := &ret
4864	if err := gensupport.DecodeResponse(target, res); err != nil {
4865		return nil, err
4866	}
4867	return ret, nil
4868	// {
4869	//   "description": "Creates a model which will later contain one or more versions.\n\nYou must add at least one version before you can request predictions from\nthe model. Add versions by calling\n[projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create).",
4870	//   "flatPath": "v1/projects/{projectsId}/models",
4871	//   "httpMethod": "POST",
4872	//   "id": "ml.projects.models.create",
4873	//   "parameterOrder": [
4874	//     "parent"
4875	//   ],
4876	//   "parameters": {
4877	//     "parent": {
4878	//       "description": "Required. The project name.",
4879	//       "location": "path",
4880	//       "pattern": "^projects/[^/]+$",
4881	//       "required": true,
4882	//       "type": "string"
4883	//     }
4884	//   },
4885	//   "path": "v1/{+parent}/models",
4886	//   "request": {
4887	//     "$ref": "GoogleCloudMlV1__Model"
4888	//   },
4889	//   "response": {
4890	//     "$ref": "GoogleCloudMlV1__Model"
4891	//   },
4892	//   "scopes": [
4893	//     "https://www.googleapis.com/auth/cloud-platform"
4894	//   ]
4895	// }
4896
4897}
4898
4899// method id "ml.projects.models.delete":
4900
4901type ProjectsModelsDeleteCall struct {
4902	s          *Service
4903	name       string
4904	urlParams_ gensupport.URLParams
4905	ctx_       context.Context
4906	header_    http.Header
4907}
4908
4909// Delete: Deletes a model.
4910//
4911// You can only delete a model if there are no versions in it. You can
4912// delete
4913// versions by
4914// calling
4915// [projects.models.versions.delete](/ml-engine/reference/rest/v1
4916// /projects.models.versions/delete).
4917func (r *ProjectsModelsService) Delete(name string) *ProjectsModelsDeleteCall {
4918	c := &ProjectsModelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4919	c.name = name
4920	return c
4921}
4922
4923// Fields allows partial responses to be retrieved. See
4924// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4925// for more information.
4926func (c *ProjectsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsModelsDeleteCall {
4927	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4928	return c
4929}
4930
4931// Context sets the context to be used in this call's Do method. Any
4932// pending HTTP request will be aborted if the provided context is
4933// canceled.
4934func (c *ProjectsModelsDeleteCall) Context(ctx context.Context) *ProjectsModelsDeleteCall {
4935	c.ctx_ = ctx
4936	return c
4937}
4938
4939// Header returns an http.Header that can be modified by the caller to
4940// add HTTP headers to the request.
4941func (c *ProjectsModelsDeleteCall) Header() http.Header {
4942	if c.header_ == nil {
4943		c.header_ = make(http.Header)
4944	}
4945	return c.header_
4946}
4947
4948func (c *ProjectsModelsDeleteCall) doRequest(alt string) (*http.Response, error) {
4949	reqHeaders := make(http.Header)
4950	for k, v := range c.header_ {
4951		reqHeaders[k] = v
4952	}
4953	reqHeaders.Set("User-Agent", c.s.userAgent())
4954	var body io.Reader = nil
4955	c.urlParams_.Set("alt", alt)
4956	c.urlParams_.Set("prettyPrint", "false")
4957	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4958	urls += "?" + c.urlParams_.Encode()
4959	req, err := http.NewRequest("DELETE", urls, body)
4960	if err != nil {
4961		return nil, err
4962	}
4963	req.Header = reqHeaders
4964	googleapi.Expand(req.URL, map[string]string{
4965		"name": c.name,
4966	})
4967	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4968}
4969
4970// Do executes the "ml.projects.models.delete" call.
4971// Exactly one of *GoogleLongrunning__Operation or error will be
4972// non-nil. Any non-2xx status code is an error. Response headers are in
4973// either *GoogleLongrunning__Operation.ServerResponse.Header or (if a
4974// response was returned at all) in error.(*googleapi.Error).Header. Use
4975// googleapi.IsNotModified to check whether the returned error was
4976// because http.StatusNotModified was returned.
4977func (c *ProjectsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
4978	gensupport.SetOptions(c.urlParams_, opts...)
4979	res, err := c.doRequest("json")
4980	if res != nil && res.StatusCode == http.StatusNotModified {
4981		if res.Body != nil {
4982			res.Body.Close()
4983		}
4984		return nil, &googleapi.Error{
4985			Code:   res.StatusCode,
4986			Header: res.Header,
4987		}
4988	}
4989	if err != nil {
4990		return nil, err
4991	}
4992	defer googleapi.CloseBody(res)
4993	if err := googleapi.CheckResponse(res); err != nil {
4994		return nil, err
4995	}
4996	ret := &GoogleLongrunning__Operation{
4997		ServerResponse: googleapi.ServerResponse{
4998			Header:         res.Header,
4999			HTTPStatusCode: res.StatusCode,
5000		},
5001	}
5002	target := &ret
5003	if err := gensupport.DecodeResponse(target, res); err != nil {
5004		return nil, err
5005	}
5006	return ret, nil
5007	// {
5008	//   "description": "Deletes a model.\n\nYou can only delete a model if there are no versions in it. You can delete\nversions by calling\n[projects.models.versions.delete](/ml-engine/reference/rest/v1/projects.models.versions/delete).",
5009	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}",
5010	//   "httpMethod": "DELETE",
5011	//   "id": "ml.projects.models.delete",
5012	//   "parameterOrder": [
5013	//     "name"
5014	//   ],
5015	//   "parameters": {
5016	//     "name": {
5017	//       "description": "Required. The name of the model.",
5018	//       "location": "path",
5019	//       "pattern": "^projects/[^/]+/models/[^/]+$",
5020	//       "required": true,
5021	//       "type": "string"
5022	//     }
5023	//   },
5024	//   "path": "v1/{+name}",
5025	//   "response": {
5026	//     "$ref": "GoogleLongrunning__Operation"
5027	//   },
5028	//   "scopes": [
5029	//     "https://www.googleapis.com/auth/cloud-platform"
5030	//   ]
5031	// }
5032
5033}
5034
5035// method id "ml.projects.models.get":
5036
5037type ProjectsModelsGetCall struct {
5038	s            *Service
5039	name         string
5040	urlParams_   gensupport.URLParams
5041	ifNoneMatch_ string
5042	ctx_         context.Context
5043	header_      http.Header
5044}
5045
5046// Get: Gets information about a model, including its name, the
5047// description (if
5048// set), and the default version (if at least one version of the model
5049// has
5050// been deployed).
5051func (r *ProjectsModelsService) Get(name string) *ProjectsModelsGetCall {
5052	c := &ProjectsModelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5053	c.name = name
5054	return c
5055}
5056
5057// Fields allows partial responses to be retrieved. See
5058// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5059// for more information.
5060func (c *ProjectsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsModelsGetCall {
5061	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5062	return c
5063}
5064
5065// IfNoneMatch sets the optional parameter which makes the operation
5066// fail if the object's ETag matches the given value. This is useful for
5067// getting updates only after the object has changed since the last
5068// request. Use googleapi.IsNotModified to check whether the response
5069// error from Do is the result of In-None-Match.
5070func (c *ProjectsModelsGetCall) IfNoneMatch(entityTag string) *ProjectsModelsGetCall {
5071	c.ifNoneMatch_ = entityTag
5072	return c
5073}
5074
5075// Context sets the context to be used in this call's Do method. Any
5076// pending HTTP request will be aborted if the provided context is
5077// canceled.
5078func (c *ProjectsModelsGetCall) Context(ctx context.Context) *ProjectsModelsGetCall {
5079	c.ctx_ = ctx
5080	return c
5081}
5082
5083// Header returns an http.Header that can be modified by the caller to
5084// add HTTP headers to the request.
5085func (c *ProjectsModelsGetCall) Header() http.Header {
5086	if c.header_ == nil {
5087		c.header_ = make(http.Header)
5088	}
5089	return c.header_
5090}
5091
5092func (c *ProjectsModelsGetCall) doRequest(alt string) (*http.Response, error) {
5093	reqHeaders := make(http.Header)
5094	for k, v := range c.header_ {
5095		reqHeaders[k] = v
5096	}
5097	reqHeaders.Set("User-Agent", c.s.userAgent())
5098	if c.ifNoneMatch_ != "" {
5099		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5100	}
5101	var body io.Reader = nil
5102	c.urlParams_.Set("alt", alt)
5103	c.urlParams_.Set("prettyPrint", "false")
5104	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5105	urls += "?" + c.urlParams_.Encode()
5106	req, err := http.NewRequest("GET", urls, body)
5107	if err != nil {
5108		return nil, err
5109	}
5110	req.Header = reqHeaders
5111	googleapi.Expand(req.URL, map[string]string{
5112		"name": c.name,
5113	})
5114	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5115}
5116
5117// Do executes the "ml.projects.models.get" call.
5118// Exactly one of *GoogleCloudMlV1__Model or error will be non-nil. Any
5119// non-2xx status code is an error. Response headers are in either
5120// *GoogleCloudMlV1__Model.ServerResponse.Header or (if a response was
5121// returned at all) in error.(*googleapi.Error).Header. Use
5122// googleapi.IsNotModified to check whether the returned error was
5123// because http.StatusNotModified was returned.
5124func (c *ProjectsModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Model, error) {
5125	gensupport.SetOptions(c.urlParams_, opts...)
5126	res, err := c.doRequest("json")
5127	if res != nil && res.StatusCode == http.StatusNotModified {
5128		if res.Body != nil {
5129			res.Body.Close()
5130		}
5131		return nil, &googleapi.Error{
5132			Code:   res.StatusCode,
5133			Header: res.Header,
5134		}
5135	}
5136	if err != nil {
5137		return nil, err
5138	}
5139	defer googleapi.CloseBody(res)
5140	if err := googleapi.CheckResponse(res); err != nil {
5141		return nil, err
5142	}
5143	ret := &GoogleCloudMlV1__Model{
5144		ServerResponse: googleapi.ServerResponse{
5145			Header:         res.Header,
5146			HTTPStatusCode: res.StatusCode,
5147		},
5148	}
5149	target := &ret
5150	if err := gensupport.DecodeResponse(target, res); err != nil {
5151		return nil, err
5152	}
5153	return ret, nil
5154	// {
5155	//   "description": "Gets information about a model, including its name, the description (if\nset), and the default version (if at least one version of the model has\nbeen deployed).",
5156	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}",
5157	//   "httpMethod": "GET",
5158	//   "id": "ml.projects.models.get",
5159	//   "parameterOrder": [
5160	//     "name"
5161	//   ],
5162	//   "parameters": {
5163	//     "name": {
5164	//       "description": "Required. The name of the model.",
5165	//       "location": "path",
5166	//       "pattern": "^projects/[^/]+/models/[^/]+$",
5167	//       "required": true,
5168	//       "type": "string"
5169	//     }
5170	//   },
5171	//   "path": "v1/{+name}",
5172	//   "response": {
5173	//     "$ref": "GoogleCloudMlV1__Model"
5174	//   },
5175	//   "scopes": [
5176	//     "https://www.googleapis.com/auth/cloud-platform"
5177	//   ]
5178	// }
5179
5180}
5181
5182// method id "ml.projects.models.getIamPolicy":
5183
5184type ProjectsModelsGetIamPolicyCall struct {
5185	s            *Service
5186	resource     string
5187	urlParams_   gensupport.URLParams
5188	ifNoneMatch_ string
5189	ctx_         context.Context
5190	header_      http.Header
5191}
5192
5193// GetIamPolicy: Gets the access control policy for a resource.
5194// Returns an empty policy if the resource exists and does not have a
5195// policy
5196// set.
5197func (r *ProjectsModelsService) GetIamPolicy(resource string) *ProjectsModelsGetIamPolicyCall {
5198	c := &ProjectsModelsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5199	c.resource = resource
5200	return c
5201}
5202
5203// Fields allows partial responses to be retrieved. See
5204// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5205// for more information.
5206func (c *ProjectsModelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsModelsGetIamPolicyCall {
5207	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5208	return c
5209}
5210
5211// IfNoneMatch sets the optional parameter which makes the operation
5212// fail if the object's ETag matches the given value. This is useful for
5213// getting updates only after the object has changed since the last
5214// request. Use googleapi.IsNotModified to check whether the response
5215// error from Do is the result of In-None-Match.
5216func (c *ProjectsModelsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsModelsGetIamPolicyCall {
5217	c.ifNoneMatch_ = entityTag
5218	return c
5219}
5220
5221// Context sets the context to be used in this call's Do method. Any
5222// pending HTTP request will be aborted if the provided context is
5223// canceled.
5224func (c *ProjectsModelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsModelsGetIamPolicyCall {
5225	c.ctx_ = ctx
5226	return c
5227}
5228
5229// Header returns an http.Header that can be modified by the caller to
5230// add HTTP headers to the request.
5231func (c *ProjectsModelsGetIamPolicyCall) Header() http.Header {
5232	if c.header_ == nil {
5233		c.header_ = make(http.Header)
5234	}
5235	return c.header_
5236}
5237
5238func (c *ProjectsModelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5239	reqHeaders := make(http.Header)
5240	for k, v := range c.header_ {
5241		reqHeaders[k] = v
5242	}
5243	reqHeaders.Set("User-Agent", c.s.userAgent())
5244	if c.ifNoneMatch_ != "" {
5245		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5246	}
5247	var body io.Reader = nil
5248	c.urlParams_.Set("alt", alt)
5249	c.urlParams_.Set("prettyPrint", "false")
5250	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
5251	urls += "?" + c.urlParams_.Encode()
5252	req, err := http.NewRequest("GET", urls, body)
5253	if err != nil {
5254		return nil, err
5255	}
5256	req.Header = reqHeaders
5257	googleapi.Expand(req.URL, map[string]string{
5258		"resource": c.resource,
5259	})
5260	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5261}
5262
5263// Do executes the "ml.projects.models.getIamPolicy" call.
5264// Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any
5265// non-2xx status code is an error. Response headers are in either
5266// *GoogleIamV1__Policy.ServerResponse.Header or (if a response was
5267// returned at all) in error.(*googleapi.Error).Header. Use
5268// googleapi.IsNotModified to check whether the returned error was
5269// because http.StatusNotModified was returned.
5270func (c *ProjectsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
5271	gensupport.SetOptions(c.urlParams_, opts...)
5272	res, err := c.doRequest("json")
5273	if res != nil && res.StatusCode == http.StatusNotModified {
5274		if res.Body != nil {
5275			res.Body.Close()
5276		}
5277		return nil, &googleapi.Error{
5278			Code:   res.StatusCode,
5279			Header: res.Header,
5280		}
5281	}
5282	if err != nil {
5283		return nil, err
5284	}
5285	defer googleapi.CloseBody(res)
5286	if err := googleapi.CheckResponse(res); err != nil {
5287		return nil, err
5288	}
5289	ret := &GoogleIamV1__Policy{
5290		ServerResponse: googleapi.ServerResponse{
5291			Header:         res.Header,
5292			HTTPStatusCode: res.StatusCode,
5293		},
5294	}
5295	target := &ret
5296	if err := gensupport.DecodeResponse(target, res); err != nil {
5297		return nil, err
5298	}
5299	return ret, nil
5300	// {
5301	//   "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
5302	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}:getIamPolicy",
5303	//   "httpMethod": "GET",
5304	//   "id": "ml.projects.models.getIamPolicy",
5305	//   "parameterOrder": [
5306	//     "resource"
5307	//   ],
5308	//   "parameters": {
5309	//     "resource": {
5310	//       "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
5311	//       "location": "path",
5312	//       "pattern": "^projects/[^/]+/models/[^/]+$",
5313	//       "required": true,
5314	//       "type": "string"
5315	//     }
5316	//   },
5317	//   "path": "v1/{+resource}:getIamPolicy",
5318	//   "response": {
5319	//     "$ref": "GoogleIamV1__Policy"
5320	//   },
5321	//   "scopes": [
5322	//     "https://www.googleapis.com/auth/cloud-platform"
5323	//   ]
5324	// }
5325
5326}
5327
5328// method id "ml.projects.models.list":
5329
5330type ProjectsModelsListCall struct {
5331	s            *Service
5332	parent       string
5333	urlParams_   gensupport.URLParams
5334	ifNoneMatch_ string
5335	ctx_         context.Context
5336	header_      http.Header
5337}
5338
5339// List: Lists the models in a project.
5340//
5341// Each project can contain multiple models, and each model can have
5342// multiple
5343// versions.
5344//
5345// If there are no models that match the request parameters, the list
5346// request
5347// returns an empty response body: {}.
5348func (r *ProjectsModelsService) List(parent string) *ProjectsModelsListCall {
5349	c := &ProjectsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5350	c.parent = parent
5351	return c
5352}
5353
5354// Filter sets the optional parameter "filter": Specifies the subset of
5355// models to retrieve.
5356func (c *ProjectsModelsListCall) Filter(filter string) *ProjectsModelsListCall {
5357	c.urlParams_.Set("filter", filter)
5358	return c
5359}
5360
5361// PageSize sets the optional parameter "pageSize": The number of models
5362// to retrieve per "page" of results. If there
5363// are more remaining results than this number, the response message
5364// will
5365// contain a valid value in the `next_page_token` field.
5366//
5367// The default value is 20, and the maximum page size is 100.
5368func (c *ProjectsModelsListCall) PageSize(pageSize int64) *ProjectsModelsListCall {
5369	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5370	return c
5371}
5372
5373// PageToken sets the optional parameter "pageToken": A page token to
5374// request the next page of results.
5375//
5376// You get the token from the `next_page_token` field of the response
5377// from
5378// the previous call.
5379func (c *ProjectsModelsListCall) PageToken(pageToken string) *ProjectsModelsListCall {
5380	c.urlParams_.Set("pageToken", pageToken)
5381	return c
5382}
5383
5384// Fields allows partial responses to be retrieved. See
5385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5386// for more information.
5387func (c *ProjectsModelsListCall) Fields(s ...googleapi.Field) *ProjectsModelsListCall {
5388	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5389	return c
5390}
5391
5392// IfNoneMatch sets the optional parameter which makes the operation
5393// fail if the object's ETag matches the given value. This is useful for
5394// getting updates only after the object has changed since the last
5395// request. Use googleapi.IsNotModified to check whether the response
5396// error from Do is the result of In-None-Match.
5397func (c *ProjectsModelsListCall) IfNoneMatch(entityTag string) *ProjectsModelsListCall {
5398	c.ifNoneMatch_ = entityTag
5399	return c
5400}
5401
5402// Context sets the context to be used in this call's Do method. Any
5403// pending HTTP request will be aborted if the provided context is
5404// canceled.
5405func (c *ProjectsModelsListCall) Context(ctx context.Context) *ProjectsModelsListCall {
5406	c.ctx_ = ctx
5407	return c
5408}
5409
5410// Header returns an http.Header that can be modified by the caller to
5411// add HTTP headers to the request.
5412func (c *ProjectsModelsListCall) Header() http.Header {
5413	if c.header_ == nil {
5414		c.header_ = make(http.Header)
5415	}
5416	return c.header_
5417}
5418
5419func (c *ProjectsModelsListCall) doRequest(alt string) (*http.Response, error) {
5420	reqHeaders := make(http.Header)
5421	for k, v := range c.header_ {
5422		reqHeaders[k] = v
5423	}
5424	reqHeaders.Set("User-Agent", c.s.userAgent())
5425	if c.ifNoneMatch_ != "" {
5426		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5427	}
5428	var body io.Reader = nil
5429	c.urlParams_.Set("alt", alt)
5430	c.urlParams_.Set("prettyPrint", "false")
5431	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models")
5432	urls += "?" + c.urlParams_.Encode()
5433	req, err := http.NewRequest("GET", urls, body)
5434	if err != nil {
5435		return nil, err
5436	}
5437	req.Header = reqHeaders
5438	googleapi.Expand(req.URL, map[string]string{
5439		"parent": c.parent,
5440	})
5441	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5442}
5443
5444// Do executes the "ml.projects.models.list" call.
5445// Exactly one of *GoogleCloudMlV1__ListModelsResponse or error will be
5446// non-nil. Any non-2xx status code is an error. Response headers are in
5447// either *GoogleCloudMlV1__ListModelsResponse.ServerResponse.Header or
5448// (if a response was returned at all) in
5449// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5450// whether the returned error was because http.StatusNotModified was
5451// returned.
5452func (c *ProjectsModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListModelsResponse, error) {
5453	gensupport.SetOptions(c.urlParams_, opts...)
5454	res, err := c.doRequest("json")
5455	if res != nil && res.StatusCode == http.StatusNotModified {
5456		if res.Body != nil {
5457			res.Body.Close()
5458		}
5459		return nil, &googleapi.Error{
5460			Code:   res.StatusCode,
5461			Header: res.Header,
5462		}
5463	}
5464	if err != nil {
5465		return nil, err
5466	}
5467	defer googleapi.CloseBody(res)
5468	if err := googleapi.CheckResponse(res); err != nil {
5469		return nil, err
5470	}
5471	ret := &GoogleCloudMlV1__ListModelsResponse{
5472		ServerResponse: googleapi.ServerResponse{
5473			Header:         res.Header,
5474			HTTPStatusCode: res.StatusCode,
5475		},
5476	}
5477	target := &ret
5478	if err := gensupport.DecodeResponse(target, res); err != nil {
5479		return nil, err
5480	}
5481	return ret, nil
5482	// {
5483	//   "description": "Lists the models in a project.\n\nEach project can contain multiple models, and each model can have multiple\nversions.\n\nIf there are no models that match the request parameters, the list request\nreturns an empty response body: {}.",
5484	//   "flatPath": "v1/projects/{projectsId}/models",
5485	//   "httpMethod": "GET",
5486	//   "id": "ml.projects.models.list",
5487	//   "parameterOrder": [
5488	//     "parent"
5489	//   ],
5490	//   "parameters": {
5491	//     "filter": {
5492	//       "description": "Optional. Specifies the subset of models to retrieve.",
5493	//       "location": "query",
5494	//       "type": "string"
5495	//     },
5496	//     "pageSize": {
5497	//       "description": "Optional. The number of models to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.",
5498	//       "format": "int32",
5499	//       "location": "query",
5500	//       "type": "integer"
5501	//     },
5502	//     "pageToken": {
5503	//       "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.",
5504	//       "location": "query",
5505	//       "type": "string"
5506	//     },
5507	//     "parent": {
5508	//       "description": "Required. The name of the project whose models are to be listed.",
5509	//       "location": "path",
5510	//       "pattern": "^projects/[^/]+$",
5511	//       "required": true,
5512	//       "type": "string"
5513	//     }
5514	//   },
5515	//   "path": "v1/{+parent}/models",
5516	//   "response": {
5517	//     "$ref": "GoogleCloudMlV1__ListModelsResponse"
5518	//   },
5519	//   "scopes": [
5520	//     "https://www.googleapis.com/auth/cloud-platform"
5521	//   ]
5522	// }
5523
5524}
5525
5526// Pages invokes f for each page of results.
5527// A non-nil error returned from f will halt the iteration.
5528// The provided context supersedes any context provided to the Context method.
5529func (c *ProjectsModelsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListModelsResponse) error) error {
5530	c.ctx_ = ctx
5531	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5532	for {
5533		x, err := c.Do()
5534		if err != nil {
5535			return err
5536		}
5537		if err := f(x); err != nil {
5538			return err
5539		}
5540		if x.NextPageToken == "" {
5541			return nil
5542		}
5543		c.PageToken(x.NextPageToken)
5544	}
5545}
5546
5547// method id "ml.projects.models.patch":
5548
5549type ProjectsModelsPatchCall struct {
5550	s                      *Service
5551	name                   string
5552	googlecloudmlv1__model *GoogleCloudMlV1__Model
5553	urlParams_             gensupport.URLParams
5554	ctx_                   context.Context
5555	header_                http.Header
5556}
5557
5558// Patch: Updates a specific model resource.
5559//
5560// Currently the only supported fields to update are `description`
5561// and
5562// `default_version.name`.
5563func (r *ProjectsModelsService) Patch(name string, googlecloudmlv1__model *GoogleCloudMlV1__Model) *ProjectsModelsPatchCall {
5564	c := &ProjectsModelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5565	c.name = name
5566	c.googlecloudmlv1__model = googlecloudmlv1__model
5567	return c
5568}
5569
5570// UpdateMask sets the optional parameter "updateMask": Required.
5571// Specifies the path, relative to `Model`, of the field to update.
5572//
5573// For example, to change the description of a model to "foo" and set
5574// its
5575// default version to "version_1", the `update_mask` parameter would
5576// be
5577// specified as `description`, `default_version.name`, and the
5578// `PATCH`
5579// request body would specify the new value, as follows:
5580//     {
5581//       "description": "foo",
5582//       "defaultVersion": {
5583//         "name":"version_1"
5584//       }
5585//     }
5586//
5587// Currently the supported update masks are `description`
5588// and
5589// `default_version.name`.
5590func (c *ProjectsModelsPatchCall) UpdateMask(updateMask string) *ProjectsModelsPatchCall {
5591	c.urlParams_.Set("updateMask", updateMask)
5592	return c
5593}
5594
5595// Fields allows partial responses to be retrieved. See
5596// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5597// for more information.
5598func (c *ProjectsModelsPatchCall) Fields(s ...googleapi.Field) *ProjectsModelsPatchCall {
5599	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5600	return c
5601}
5602
5603// Context sets the context to be used in this call's Do method. Any
5604// pending HTTP request will be aborted if the provided context is
5605// canceled.
5606func (c *ProjectsModelsPatchCall) Context(ctx context.Context) *ProjectsModelsPatchCall {
5607	c.ctx_ = ctx
5608	return c
5609}
5610
5611// Header returns an http.Header that can be modified by the caller to
5612// add HTTP headers to the request.
5613func (c *ProjectsModelsPatchCall) Header() http.Header {
5614	if c.header_ == nil {
5615		c.header_ = make(http.Header)
5616	}
5617	return c.header_
5618}
5619
5620func (c *ProjectsModelsPatchCall) doRequest(alt string) (*http.Response, error) {
5621	reqHeaders := make(http.Header)
5622	for k, v := range c.header_ {
5623		reqHeaders[k] = v
5624	}
5625	reqHeaders.Set("User-Agent", c.s.userAgent())
5626	var body io.Reader = nil
5627	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__model)
5628	if err != nil {
5629		return nil, err
5630	}
5631	reqHeaders.Set("Content-Type", "application/json")
5632	c.urlParams_.Set("alt", alt)
5633	c.urlParams_.Set("prettyPrint", "false")
5634	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5635	urls += "?" + c.urlParams_.Encode()
5636	req, err := http.NewRequest("PATCH", urls, body)
5637	if err != nil {
5638		return nil, err
5639	}
5640	req.Header = reqHeaders
5641	googleapi.Expand(req.URL, map[string]string{
5642		"name": c.name,
5643	})
5644	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5645}
5646
5647// Do executes the "ml.projects.models.patch" call.
5648// Exactly one of *GoogleLongrunning__Operation or error will be
5649// non-nil. Any non-2xx status code is an error. Response headers are in
5650// either *GoogleLongrunning__Operation.ServerResponse.Header or (if a
5651// response was returned at all) in error.(*googleapi.Error).Header. Use
5652// googleapi.IsNotModified to check whether the returned error was
5653// because http.StatusNotModified was returned.
5654func (c *ProjectsModelsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
5655	gensupport.SetOptions(c.urlParams_, opts...)
5656	res, err := c.doRequest("json")
5657	if res != nil && res.StatusCode == http.StatusNotModified {
5658		if res.Body != nil {
5659			res.Body.Close()
5660		}
5661		return nil, &googleapi.Error{
5662			Code:   res.StatusCode,
5663			Header: res.Header,
5664		}
5665	}
5666	if err != nil {
5667		return nil, err
5668	}
5669	defer googleapi.CloseBody(res)
5670	if err := googleapi.CheckResponse(res); err != nil {
5671		return nil, err
5672	}
5673	ret := &GoogleLongrunning__Operation{
5674		ServerResponse: googleapi.ServerResponse{
5675			Header:         res.Header,
5676			HTTPStatusCode: res.StatusCode,
5677		},
5678	}
5679	target := &ret
5680	if err := gensupport.DecodeResponse(target, res); err != nil {
5681		return nil, err
5682	}
5683	return ret, nil
5684	// {
5685	//   "description": "Updates a specific model resource.\n\nCurrently the only supported fields to update are `description` and\n`default_version.name`.",
5686	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}",
5687	//   "httpMethod": "PATCH",
5688	//   "id": "ml.projects.models.patch",
5689	//   "parameterOrder": [
5690	//     "name"
5691	//   ],
5692	//   "parameters": {
5693	//     "name": {
5694	//       "description": "Required. The project name.",
5695	//       "location": "path",
5696	//       "pattern": "^projects/[^/]+/models/[^/]+$",
5697	//       "required": true,
5698	//       "type": "string"
5699	//     },
5700	//     "updateMask": {
5701	//       "description": "Required. Specifies the path, relative to `Model`, of the field to update.\n\nFor example, to change the description of a model to \"foo\" and set its\ndefault version to \"version_1\", the `update_mask` parameter would be\nspecified as `description`, `default_version.name`, and the `PATCH`\nrequest body would specify the new value, as follows:\n    {\n      \"description\": \"foo\",\n      \"defaultVersion\": {\n        \"name\":\"version_1\"\n      }\n    }\n\nCurrently the supported update masks are `description` and\n`default_version.name`.",
5702	//       "format": "google-fieldmask",
5703	//       "location": "query",
5704	//       "type": "string"
5705	//     }
5706	//   },
5707	//   "path": "v1/{+name}",
5708	//   "request": {
5709	//     "$ref": "GoogleCloudMlV1__Model"
5710	//   },
5711	//   "response": {
5712	//     "$ref": "GoogleLongrunning__Operation"
5713	//   },
5714	//   "scopes": [
5715	//     "https://www.googleapis.com/auth/cloud-platform"
5716	//   ]
5717	// }
5718
5719}
5720
5721// method id "ml.projects.models.setIamPolicy":
5722
5723type ProjectsModelsSetIamPolicyCall struct {
5724	s                                *Service
5725	resource                         string
5726	googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest
5727	urlParams_                       gensupport.URLParams
5728	ctx_                             context.Context
5729	header_                          http.Header
5730}
5731
5732// SetIamPolicy: Sets the access control policy on the specified
5733// resource. Replaces any
5734// existing policy.
5735func (r *ProjectsModelsService) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *ProjectsModelsSetIamPolicyCall {
5736	c := &ProjectsModelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5737	c.resource = resource
5738	c.googleiamv1__setiampolicyrequest = googleiamv1__setiampolicyrequest
5739	return c
5740}
5741
5742// Fields allows partial responses to be retrieved. See
5743// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5744// for more information.
5745func (c *ProjectsModelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsModelsSetIamPolicyCall {
5746	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5747	return c
5748}
5749
5750// Context sets the context to be used in this call's Do method. Any
5751// pending HTTP request will be aborted if the provided context is
5752// canceled.
5753func (c *ProjectsModelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsModelsSetIamPolicyCall {
5754	c.ctx_ = ctx
5755	return c
5756}
5757
5758// Header returns an http.Header that can be modified by the caller to
5759// add HTTP headers to the request.
5760func (c *ProjectsModelsSetIamPolicyCall) Header() http.Header {
5761	if c.header_ == nil {
5762		c.header_ = make(http.Header)
5763	}
5764	return c.header_
5765}
5766
5767func (c *ProjectsModelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5768	reqHeaders := make(http.Header)
5769	for k, v := range c.header_ {
5770		reqHeaders[k] = v
5771	}
5772	reqHeaders.Set("User-Agent", c.s.userAgent())
5773	var body io.Reader = nil
5774	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__setiampolicyrequest)
5775	if err != nil {
5776		return nil, err
5777	}
5778	reqHeaders.Set("Content-Type", "application/json")
5779	c.urlParams_.Set("alt", alt)
5780	c.urlParams_.Set("prettyPrint", "false")
5781	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
5782	urls += "?" + c.urlParams_.Encode()
5783	req, err := http.NewRequest("POST", urls, body)
5784	if err != nil {
5785		return nil, err
5786	}
5787	req.Header = reqHeaders
5788	googleapi.Expand(req.URL, map[string]string{
5789		"resource": c.resource,
5790	})
5791	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5792}
5793
5794// Do executes the "ml.projects.models.setIamPolicy" call.
5795// Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any
5796// non-2xx status code is an error. Response headers are in either
5797// *GoogleIamV1__Policy.ServerResponse.Header or (if a response was
5798// returned at all) in error.(*googleapi.Error).Header. Use
5799// googleapi.IsNotModified to check whether the returned error was
5800// because http.StatusNotModified was returned.
5801func (c *ProjectsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
5802	gensupport.SetOptions(c.urlParams_, opts...)
5803	res, err := c.doRequest("json")
5804	if res != nil && res.StatusCode == http.StatusNotModified {
5805		if res.Body != nil {
5806			res.Body.Close()
5807		}
5808		return nil, &googleapi.Error{
5809			Code:   res.StatusCode,
5810			Header: res.Header,
5811		}
5812	}
5813	if err != nil {
5814		return nil, err
5815	}
5816	defer googleapi.CloseBody(res)
5817	if err := googleapi.CheckResponse(res); err != nil {
5818		return nil, err
5819	}
5820	ret := &GoogleIamV1__Policy{
5821		ServerResponse: googleapi.ServerResponse{
5822			Header:         res.Header,
5823			HTTPStatusCode: res.StatusCode,
5824		},
5825	}
5826	target := &ret
5827	if err := gensupport.DecodeResponse(target, res); err != nil {
5828		return nil, err
5829	}
5830	return ret, nil
5831	// {
5832	//   "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
5833	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}:setIamPolicy",
5834	//   "httpMethod": "POST",
5835	//   "id": "ml.projects.models.setIamPolicy",
5836	//   "parameterOrder": [
5837	//     "resource"
5838	//   ],
5839	//   "parameters": {
5840	//     "resource": {
5841	//       "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
5842	//       "location": "path",
5843	//       "pattern": "^projects/[^/]+/models/[^/]+$",
5844	//       "required": true,
5845	//       "type": "string"
5846	//     }
5847	//   },
5848	//   "path": "v1/{+resource}:setIamPolicy",
5849	//   "request": {
5850	//     "$ref": "GoogleIamV1__SetIamPolicyRequest"
5851	//   },
5852	//   "response": {
5853	//     "$ref": "GoogleIamV1__Policy"
5854	//   },
5855	//   "scopes": [
5856	//     "https://www.googleapis.com/auth/cloud-platform"
5857	//   ]
5858	// }
5859
5860}
5861
5862// method id "ml.projects.models.testIamPermissions":
5863
5864type ProjectsModelsTestIamPermissionsCall struct {
5865	s                                      *Service
5866	resource                               string
5867	googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest
5868	urlParams_                             gensupport.URLParams
5869	ctx_                                   context.Context
5870	header_                                http.Header
5871}
5872
5873// TestIamPermissions: Returns permissions that a caller has on the
5874// specified resource.
5875// If the resource does not exist, this will return an empty set
5876// of
5877// permissions, not a NOT_FOUND error.
5878//
5879// Note: This operation is designed to be used for building
5880// permission-aware
5881// UIs and command-line tools, not for authorization checking. This
5882// operation
5883// may "fail open" without warning.
5884func (r *ProjectsModelsService) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *ProjectsModelsTestIamPermissionsCall {
5885	c := &ProjectsModelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5886	c.resource = resource
5887	c.googleiamv1__testiampermissionsrequest = googleiamv1__testiampermissionsrequest
5888	return c
5889}
5890
5891// Fields allows partial responses to be retrieved. See
5892// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5893// for more information.
5894func (c *ProjectsModelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsModelsTestIamPermissionsCall {
5895	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5896	return c
5897}
5898
5899// Context sets the context to be used in this call's Do method. Any
5900// pending HTTP request will be aborted if the provided context is
5901// canceled.
5902func (c *ProjectsModelsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsModelsTestIamPermissionsCall {
5903	c.ctx_ = ctx
5904	return c
5905}
5906
5907// Header returns an http.Header that can be modified by the caller to
5908// add HTTP headers to the request.
5909func (c *ProjectsModelsTestIamPermissionsCall) Header() http.Header {
5910	if c.header_ == nil {
5911		c.header_ = make(http.Header)
5912	}
5913	return c.header_
5914}
5915
5916func (c *ProjectsModelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5917	reqHeaders := make(http.Header)
5918	for k, v := range c.header_ {
5919		reqHeaders[k] = v
5920	}
5921	reqHeaders.Set("User-Agent", c.s.userAgent())
5922	var body io.Reader = nil
5923	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__testiampermissionsrequest)
5924	if err != nil {
5925		return nil, err
5926	}
5927	reqHeaders.Set("Content-Type", "application/json")
5928	c.urlParams_.Set("alt", alt)
5929	c.urlParams_.Set("prettyPrint", "false")
5930	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
5931	urls += "?" + c.urlParams_.Encode()
5932	req, err := http.NewRequest("POST", urls, body)
5933	if err != nil {
5934		return nil, err
5935	}
5936	req.Header = reqHeaders
5937	googleapi.Expand(req.URL, map[string]string{
5938		"resource": c.resource,
5939	})
5940	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5941}
5942
5943// Do executes the "ml.projects.models.testIamPermissions" call.
5944// Exactly one of *GoogleIamV1__TestIamPermissionsResponse or error will
5945// be non-nil. Any non-2xx status code is an error. Response headers are
5946// in either
5947// *GoogleIamV1__TestIamPermissionsResponse.ServerResponse.Header or (if
5948// a response was returned at all) in error.(*googleapi.Error).Header.
5949// Use googleapi.IsNotModified to check whether the returned error was
5950// because http.StatusNotModified was returned.
5951func (c *ProjectsModelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__TestIamPermissionsResponse, error) {
5952	gensupport.SetOptions(c.urlParams_, opts...)
5953	res, err := c.doRequest("json")
5954	if res != nil && res.StatusCode == http.StatusNotModified {
5955		if res.Body != nil {
5956			res.Body.Close()
5957		}
5958		return nil, &googleapi.Error{
5959			Code:   res.StatusCode,
5960			Header: res.Header,
5961		}
5962	}
5963	if err != nil {
5964		return nil, err
5965	}
5966	defer googleapi.CloseBody(res)
5967	if err := googleapi.CheckResponse(res); err != nil {
5968		return nil, err
5969	}
5970	ret := &GoogleIamV1__TestIamPermissionsResponse{
5971		ServerResponse: googleapi.ServerResponse{
5972			Header:         res.Header,
5973			HTTPStatusCode: res.StatusCode,
5974		},
5975	}
5976	target := &ret
5977	if err := gensupport.DecodeResponse(target, res); err != nil {
5978		return nil, err
5979	}
5980	return ret, nil
5981	// {
5982	//   "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.",
5983	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}:testIamPermissions",
5984	//   "httpMethod": "POST",
5985	//   "id": "ml.projects.models.testIamPermissions",
5986	//   "parameterOrder": [
5987	//     "resource"
5988	//   ],
5989	//   "parameters": {
5990	//     "resource": {
5991	//       "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
5992	//       "location": "path",
5993	//       "pattern": "^projects/[^/]+/models/[^/]+$",
5994	//       "required": true,
5995	//       "type": "string"
5996	//     }
5997	//   },
5998	//   "path": "v1/{+resource}:testIamPermissions",
5999	//   "request": {
6000	//     "$ref": "GoogleIamV1__TestIamPermissionsRequest"
6001	//   },
6002	//   "response": {
6003	//     "$ref": "GoogleIamV1__TestIamPermissionsResponse"
6004	//   },
6005	//   "scopes": [
6006	//     "https://www.googleapis.com/auth/cloud-platform"
6007	//   ]
6008	// }
6009
6010}
6011
6012// method id "ml.projects.models.versions.create":
6013
6014type ProjectsModelsVersionsCreateCall struct {
6015	s                        *Service
6016	parent                   string
6017	googlecloudmlv1__version *GoogleCloudMlV1__Version
6018	urlParams_               gensupport.URLParams
6019	ctx_                     context.Context
6020	header_                  http.Header
6021}
6022
6023// Create: Creates a new version of a model from a trained TensorFlow
6024// model.
6025//
6026// If the version created in the cloud by this call is the first
6027// deployed
6028// version of the specified model, it will be made the default version
6029// of the
6030// model. When you add a version to a model that already has one or
6031// more
6032// versions, the default version does not automatically change. If you
6033// want a
6034// new version to be the default, you must
6035// call
6036// [projects.models.versions.setDefault](/ml-engine/reference/rest/v
6037// 1/projects.models.versions/setDefault).
6038func (r *ProjectsModelsVersionsService) Create(parent string, googlecloudmlv1__version *GoogleCloudMlV1__Version) *ProjectsModelsVersionsCreateCall {
6039	c := &ProjectsModelsVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6040	c.parent = parent
6041	c.googlecloudmlv1__version = googlecloudmlv1__version
6042	return c
6043}
6044
6045// Fields allows partial responses to be retrieved. See
6046// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6047// for more information.
6048func (c *ProjectsModelsVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsCreateCall {
6049	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6050	return c
6051}
6052
6053// Context sets the context to be used in this call's Do method. Any
6054// pending HTTP request will be aborted if the provided context is
6055// canceled.
6056func (c *ProjectsModelsVersionsCreateCall) Context(ctx context.Context) *ProjectsModelsVersionsCreateCall {
6057	c.ctx_ = ctx
6058	return c
6059}
6060
6061// Header returns an http.Header that can be modified by the caller to
6062// add HTTP headers to the request.
6063func (c *ProjectsModelsVersionsCreateCall) Header() http.Header {
6064	if c.header_ == nil {
6065		c.header_ = make(http.Header)
6066	}
6067	return c.header_
6068}
6069
6070func (c *ProjectsModelsVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
6071	reqHeaders := make(http.Header)
6072	for k, v := range c.header_ {
6073		reqHeaders[k] = v
6074	}
6075	reqHeaders.Set("User-Agent", c.s.userAgent())
6076	var body io.Reader = nil
6077	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__version)
6078	if err != nil {
6079		return nil, err
6080	}
6081	reqHeaders.Set("Content-Type", "application/json")
6082	c.urlParams_.Set("alt", alt)
6083	c.urlParams_.Set("prettyPrint", "false")
6084	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
6085	urls += "?" + c.urlParams_.Encode()
6086	req, err := http.NewRequest("POST", urls, body)
6087	if err != nil {
6088		return nil, err
6089	}
6090	req.Header = reqHeaders
6091	googleapi.Expand(req.URL, map[string]string{
6092		"parent": c.parent,
6093	})
6094	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6095}
6096
6097// Do executes the "ml.projects.models.versions.create" call.
6098// Exactly one of *GoogleLongrunning__Operation or error will be
6099// non-nil. Any non-2xx status code is an error. Response headers are in
6100// either *GoogleLongrunning__Operation.ServerResponse.Header or (if a
6101// response was returned at all) in error.(*googleapi.Error).Header. Use
6102// googleapi.IsNotModified to check whether the returned error was
6103// because http.StatusNotModified was returned.
6104func (c *ProjectsModelsVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
6105	gensupport.SetOptions(c.urlParams_, opts...)
6106	res, err := c.doRequest("json")
6107	if res != nil && res.StatusCode == http.StatusNotModified {
6108		if res.Body != nil {
6109			res.Body.Close()
6110		}
6111		return nil, &googleapi.Error{
6112			Code:   res.StatusCode,
6113			Header: res.Header,
6114		}
6115	}
6116	if err != nil {
6117		return nil, err
6118	}
6119	defer googleapi.CloseBody(res)
6120	if err := googleapi.CheckResponse(res); err != nil {
6121		return nil, err
6122	}
6123	ret := &GoogleLongrunning__Operation{
6124		ServerResponse: googleapi.ServerResponse{
6125			Header:         res.Header,
6126			HTTPStatusCode: res.StatusCode,
6127		},
6128	}
6129	target := &ret
6130	if err := gensupport.DecodeResponse(target, res); err != nil {
6131		return nil, err
6132	}
6133	return ret, nil
6134	// {
6135	//   "description": "Creates a new version of a model from a trained TensorFlow model.\n\nIf the version created in the cloud by this call is the first deployed\nversion of the specified model, it will be made the default version of the\nmodel. When you add a version to a model that already has one or more\nversions, the default version does not automatically change. If you want a\nnew version to be the default, you must call\n[projects.models.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).",
6136	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions",
6137	//   "httpMethod": "POST",
6138	//   "id": "ml.projects.models.versions.create",
6139	//   "parameterOrder": [
6140	//     "parent"
6141	//   ],
6142	//   "parameters": {
6143	//     "parent": {
6144	//       "description": "Required. The name of the model.",
6145	//       "location": "path",
6146	//       "pattern": "^projects/[^/]+/models/[^/]+$",
6147	//       "required": true,
6148	//       "type": "string"
6149	//     }
6150	//   },
6151	//   "path": "v1/{+parent}/versions",
6152	//   "request": {
6153	//     "$ref": "GoogleCloudMlV1__Version"
6154	//   },
6155	//   "response": {
6156	//     "$ref": "GoogleLongrunning__Operation"
6157	//   },
6158	//   "scopes": [
6159	//     "https://www.googleapis.com/auth/cloud-platform"
6160	//   ]
6161	// }
6162
6163}
6164
6165// method id "ml.projects.models.versions.delete":
6166
6167type ProjectsModelsVersionsDeleteCall struct {
6168	s          *Service
6169	name       string
6170	urlParams_ gensupport.URLParams
6171	ctx_       context.Context
6172	header_    http.Header
6173}
6174
6175// Delete: Deletes a model version.
6176//
6177// Each model can have multiple versions deployed and in use at any
6178// given
6179// time. Use this method to remove a single version.
6180//
6181// Note: You cannot delete the version that is set as the default
6182// version
6183// of the model unless it is the only remaining version.
6184func (r *ProjectsModelsVersionsService) Delete(name string) *ProjectsModelsVersionsDeleteCall {
6185	c := &ProjectsModelsVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6186	c.name = name
6187	return c
6188}
6189
6190// Fields allows partial responses to be retrieved. See
6191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6192// for more information.
6193func (c *ProjectsModelsVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsDeleteCall {
6194	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6195	return c
6196}
6197
6198// Context sets the context to be used in this call's Do method. Any
6199// pending HTTP request will be aborted if the provided context is
6200// canceled.
6201func (c *ProjectsModelsVersionsDeleteCall) Context(ctx context.Context) *ProjectsModelsVersionsDeleteCall {
6202	c.ctx_ = ctx
6203	return c
6204}
6205
6206// Header returns an http.Header that can be modified by the caller to
6207// add HTTP headers to the request.
6208func (c *ProjectsModelsVersionsDeleteCall) Header() http.Header {
6209	if c.header_ == nil {
6210		c.header_ = make(http.Header)
6211	}
6212	return c.header_
6213}
6214
6215func (c *ProjectsModelsVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
6216	reqHeaders := make(http.Header)
6217	for k, v := range c.header_ {
6218		reqHeaders[k] = v
6219	}
6220	reqHeaders.Set("User-Agent", c.s.userAgent())
6221	var body io.Reader = nil
6222	c.urlParams_.Set("alt", alt)
6223	c.urlParams_.Set("prettyPrint", "false")
6224	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6225	urls += "?" + c.urlParams_.Encode()
6226	req, err := http.NewRequest("DELETE", urls, body)
6227	if err != nil {
6228		return nil, err
6229	}
6230	req.Header = reqHeaders
6231	googleapi.Expand(req.URL, map[string]string{
6232		"name": c.name,
6233	})
6234	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6235}
6236
6237// Do executes the "ml.projects.models.versions.delete" call.
6238// Exactly one of *GoogleLongrunning__Operation or error will be
6239// non-nil. Any non-2xx status code is an error. Response headers are in
6240// either *GoogleLongrunning__Operation.ServerResponse.Header or (if a
6241// response was returned at all) in error.(*googleapi.Error).Header. Use
6242// googleapi.IsNotModified to check whether the returned error was
6243// because http.StatusNotModified was returned.
6244func (c *ProjectsModelsVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
6245	gensupport.SetOptions(c.urlParams_, opts...)
6246	res, err := c.doRequest("json")
6247	if res != nil && res.StatusCode == http.StatusNotModified {
6248		if res.Body != nil {
6249			res.Body.Close()
6250		}
6251		return nil, &googleapi.Error{
6252			Code:   res.StatusCode,
6253			Header: res.Header,
6254		}
6255	}
6256	if err != nil {
6257		return nil, err
6258	}
6259	defer googleapi.CloseBody(res)
6260	if err := googleapi.CheckResponse(res); err != nil {
6261		return nil, err
6262	}
6263	ret := &GoogleLongrunning__Operation{
6264		ServerResponse: googleapi.ServerResponse{
6265			Header:         res.Header,
6266			HTTPStatusCode: res.StatusCode,
6267		},
6268	}
6269	target := &ret
6270	if err := gensupport.DecodeResponse(target, res); err != nil {
6271		return nil, err
6272	}
6273	return ret, nil
6274	// {
6275	//   "description": "Deletes a model version.\n\nEach model can have multiple versions deployed and in use at any given\ntime. Use this method to remove a single version.\n\nNote: You cannot delete the version that is set as the default version\nof the model unless it is the only remaining version.",
6276	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}",
6277	//   "httpMethod": "DELETE",
6278	//   "id": "ml.projects.models.versions.delete",
6279	//   "parameterOrder": [
6280	//     "name"
6281	//   ],
6282	//   "parameters": {
6283	//     "name": {
6284	//       "description": "Required. The name of the version. You can get the names of all the\nversions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).",
6285	//       "location": "path",
6286	//       "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$",
6287	//       "required": true,
6288	//       "type": "string"
6289	//     }
6290	//   },
6291	//   "path": "v1/{+name}",
6292	//   "response": {
6293	//     "$ref": "GoogleLongrunning__Operation"
6294	//   },
6295	//   "scopes": [
6296	//     "https://www.googleapis.com/auth/cloud-platform"
6297	//   ]
6298	// }
6299
6300}
6301
6302// method id "ml.projects.models.versions.get":
6303
6304type ProjectsModelsVersionsGetCall struct {
6305	s            *Service
6306	name         string
6307	urlParams_   gensupport.URLParams
6308	ifNoneMatch_ string
6309	ctx_         context.Context
6310	header_      http.Header
6311}
6312
6313// Get: Gets information about a model version.
6314//
6315// Models can have multiple versions. You can
6316// call
6317// [projects.models.versions.list](/ml-engine/reference/rest/v1/proj
6318// ects.models.versions/list)
6319// to get the same information that this method returns for all of
6320// the
6321// versions of a model.
6322func (r *ProjectsModelsVersionsService) Get(name string) *ProjectsModelsVersionsGetCall {
6323	c := &ProjectsModelsVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6324	c.name = name
6325	return c
6326}
6327
6328// Fields allows partial responses to be retrieved. See
6329// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6330// for more information.
6331func (c *ProjectsModelsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsGetCall {
6332	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6333	return c
6334}
6335
6336// IfNoneMatch sets the optional parameter which makes the operation
6337// fail if the object's ETag matches the given value. This is useful for
6338// getting updates only after the object has changed since the last
6339// request. Use googleapi.IsNotModified to check whether the response
6340// error from Do is the result of In-None-Match.
6341func (c *ProjectsModelsVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsModelsVersionsGetCall {
6342	c.ifNoneMatch_ = entityTag
6343	return c
6344}
6345
6346// Context sets the context to be used in this call's Do method. Any
6347// pending HTTP request will be aborted if the provided context is
6348// canceled.
6349func (c *ProjectsModelsVersionsGetCall) Context(ctx context.Context) *ProjectsModelsVersionsGetCall {
6350	c.ctx_ = ctx
6351	return c
6352}
6353
6354// Header returns an http.Header that can be modified by the caller to
6355// add HTTP headers to the request.
6356func (c *ProjectsModelsVersionsGetCall) Header() http.Header {
6357	if c.header_ == nil {
6358		c.header_ = make(http.Header)
6359	}
6360	return c.header_
6361}
6362
6363func (c *ProjectsModelsVersionsGetCall) doRequest(alt string) (*http.Response, error) {
6364	reqHeaders := make(http.Header)
6365	for k, v := range c.header_ {
6366		reqHeaders[k] = v
6367	}
6368	reqHeaders.Set("User-Agent", c.s.userAgent())
6369	if c.ifNoneMatch_ != "" {
6370		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6371	}
6372	var body io.Reader = nil
6373	c.urlParams_.Set("alt", alt)
6374	c.urlParams_.Set("prettyPrint", "false")
6375	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6376	urls += "?" + c.urlParams_.Encode()
6377	req, err := http.NewRequest("GET", urls, body)
6378	if err != nil {
6379		return nil, err
6380	}
6381	req.Header = reqHeaders
6382	googleapi.Expand(req.URL, map[string]string{
6383		"name": c.name,
6384	})
6385	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6386}
6387
6388// Do executes the "ml.projects.models.versions.get" call.
6389// Exactly one of *GoogleCloudMlV1__Version or error will be non-nil.
6390// Any non-2xx status code is an error. Response headers are in either
6391// *GoogleCloudMlV1__Version.ServerResponse.Header or (if a response was
6392// returned at all) in error.(*googleapi.Error).Header. Use
6393// googleapi.IsNotModified to check whether the returned error was
6394// because http.StatusNotModified was returned.
6395func (c *ProjectsModelsVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Version, error) {
6396	gensupport.SetOptions(c.urlParams_, opts...)
6397	res, err := c.doRequest("json")
6398	if res != nil && res.StatusCode == http.StatusNotModified {
6399		if res.Body != nil {
6400			res.Body.Close()
6401		}
6402		return nil, &googleapi.Error{
6403			Code:   res.StatusCode,
6404			Header: res.Header,
6405		}
6406	}
6407	if err != nil {
6408		return nil, err
6409	}
6410	defer googleapi.CloseBody(res)
6411	if err := googleapi.CheckResponse(res); err != nil {
6412		return nil, err
6413	}
6414	ret := &GoogleCloudMlV1__Version{
6415		ServerResponse: googleapi.ServerResponse{
6416			Header:         res.Header,
6417			HTTPStatusCode: res.StatusCode,
6418		},
6419	}
6420	target := &ret
6421	if err := gensupport.DecodeResponse(target, res); err != nil {
6422		return nil, err
6423	}
6424	return ret, nil
6425	// {
6426	//   "description": "Gets information about a model version.\n\nModels can have multiple versions. You can call\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list)\nto get the same information that this method returns for all of the\nversions of a model.",
6427	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}",
6428	//   "httpMethod": "GET",
6429	//   "id": "ml.projects.models.versions.get",
6430	//   "parameterOrder": [
6431	//     "name"
6432	//   ],
6433	//   "parameters": {
6434	//     "name": {
6435	//       "description": "Required. The name of the version.",
6436	//       "location": "path",
6437	//       "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$",
6438	//       "required": true,
6439	//       "type": "string"
6440	//     }
6441	//   },
6442	//   "path": "v1/{+name}",
6443	//   "response": {
6444	//     "$ref": "GoogleCloudMlV1__Version"
6445	//   },
6446	//   "scopes": [
6447	//     "https://www.googleapis.com/auth/cloud-platform"
6448	//   ]
6449	// }
6450
6451}
6452
6453// method id "ml.projects.models.versions.list":
6454
6455type ProjectsModelsVersionsListCall struct {
6456	s            *Service
6457	parent       string
6458	urlParams_   gensupport.URLParams
6459	ifNoneMatch_ string
6460	ctx_         context.Context
6461	header_      http.Header
6462}
6463
6464// List: Gets basic information about all the versions of a model.
6465//
6466// If you expect that a model has many versions, or if you need to
6467// handle
6468// only a limited number of results at a time, you can request that the
6469// list
6470// be retrieved in batches (called pages).
6471//
6472// If there are no versions that match the request parameters, the
6473// list
6474// request returns an empty response body: {}.
6475func (r *ProjectsModelsVersionsService) List(parent string) *ProjectsModelsVersionsListCall {
6476	c := &ProjectsModelsVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6477	c.parent = parent
6478	return c
6479}
6480
6481// Filter sets the optional parameter "filter": Specifies the subset of
6482// versions to retrieve.
6483func (c *ProjectsModelsVersionsListCall) Filter(filter string) *ProjectsModelsVersionsListCall {
6484	c.urlParams_.Set("filter", filter)
6485	return c
6486}
6487
6488// PageSize sets the optional parameter "pageSize": The number of
6489// versions to retrieve per "page" of results. If
6490// there are more remaining results than this number, the response
6491// message
6492// will contain a valid value in the `next_page_token` field.
6493//
6494// The default value is 20, and the maximum page size is 100.
6495func (c *ProjectsModelsVersionsListCall) PageSize(pageSize int64) *ProjectsModelsVersionsListCall {
6496	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6497	return c
6498}
6499
6500// PageToken sets the optional parameter "pageToken": A page token to
6501// request the next page of results.
6502//
6503// You get the token from the `next_page_token` field of the response
6504// from
6505// the previous call.
6506func (c *ProjectsModelsVersionsListCall) PageToken(pageToken string) *ProjectsModelsVersionsListCall {
6507	c.urlParams_.Set("pageToken", pageToken)
6508	return c
6509}
6510
6511// Fields allows partial responses to be retrieved. See
6512// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6513// for more information.
6514func (c *ProjectsModelsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsListCall {
6515	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6516	return c
6517}
6518
6519// IfNoneMatch sets the optional parameter which makes the operation
6520// fail if the object's ETag matches the given value. This is useful for
6521// getting updates only after the object has changed since the last
6522// request. Use googleapi.IsNotModified to check whether the response
6523// error from Do is the result of In-None-Match.
6524func (c *ProjectsModelsVersionsListCall) IfNoneMatch(entityTag string) *ProjectsModelsVersionsListCall {
6525	c.ifNoneMatch_ = entityTag
6526	return c
6527}
6528
6529// Context sets the context to be used in this call's Do method. Any
6530// pending HTTP request will be aborted if the provided context is
6531// canceled.
6532func (c *ProjectsModelsVersionsListCall) Context(ctx context.Context) *ProjectsModelsVersionsListCall {
6533	c.ctx_ = ctx
6534	return c
6535}
6536
6537// Header returns an http.Header that can be modified by the caller to
6538// add HTTP headers to the request.
6539func (c *ProjectsModelsVersionsListCall) Header() http.Header {
6540	if c.header_ == nil {
6541		c.header_ = make(http.Header)
6542	}
6543	return c.header_
6544}
6545
6546func (c *ProjectsModelsVersionsListCall) doRequest(alt string) (*http.Response, error) {
6547	reqHeaders := make(http.Header)
6548	for k, v := range c.header_ {
6549		reqHeaders[k] = v
6550	}
6551	reqHeaders.Set("User-Agent", c.s.userAgent())
6552	if c.ifNoneMatch_ != "" {
6553		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6554	}
6555	var body io.Reader = nil
6556	c.urlParams_.Set("alt", alt)
6557	c.urlParams_.Set("prettyPrint", "false")
6558	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
6559	urls += "?" + c.urlParams_.Encode()
6560	req, err := http.NewRequest("GET", urls, body)
6561	if err != nil {
6562		return nil, err
6563	}
6564	req.Header = reqHeaders
6565	googleapi.Expand(req.URL, map[string]string{
6566		"parent": c.parent,
6567	})
6568	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6569}
6570
6571// Do executes the "ml.projects.models.versions.list" call.
6572// Exactly one of *GoogleCloudMlV1__ListVersionsResponse or error will
6573// be non-nil. Any non-2xx status code is an error. Response headers are
6574// in either
6575// *GoogleCloudMlV1__ListVersionsResponse.ServerResponse.Header or (if a
6576// response was returned at all) in error.(*googleapi.Error).Header. Use
6577// googleapi.IsNotModified to check whether the returned error was
6578// because http.StatusNotModified was returned.
6579func (c *ProjectsModelsVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListVersionsResponse, error) {
6580	gensupport.SetOptions(c.urlParams_, opts...)
6581	res, err := c.doRequest("json")
6582	if res != nil && res.StatusCode == http.StatusNotModified {
6583		if res.Body != nil {
6584			res.Body.Close()
6585		}
6586		return nil, &googleapi.Error{
6587			Code:   res.StatusCode,
6588			Header: res.Header,
6589		}
6590	}
6591	if err != nil {
6592		return nil, err
6593	}
6594	defer googleapi.CloseBody(res)
6595	if err := googleapi.CheckResponse(res); err != nil {
6596		return nil, err
6597	}
6598	ret := &GoogleCloudMlV1__ListVersionsResponse{
6599		ServerResponse: googleapi.ServerResponse{
6600			Header:         res.Header,
6601			HTTPStatusCode: res.StatusCode,
6602		},
6603	}
6604	target := &ret
6605	if err := gensupport.DecodeResponse(target, res); err != nil {
6606		return nil, err
6607	}
6608	return ret, nil
6609	// {
6610	//   "description": "Gets basic information about all the versions of a model.\n\nIf you expect that a model has many versions, or if you need to handle\nonly a limited number of results at a time, you can request that the list\nbe retrieved in batches (called pages).\n\nIf there are no versions that match the request parameters, the list\nrequest returns an empty response body: {}.",
6611	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions",
6612	//   "httpMethod": "GET",
6613	//   "id": "ml.projects.models.versions.list",
6614	//   "parameterOrder": [
6615	//     "parent"
6616	//   ],
6617	//   "parameters": {
6618	//     "filter": {
6619	//       "description": "Optional. Specifies the subset of versions to retrieve.",
6620	//       "location": "query",
6621	//       "type": "string"
6622	//     },
6623	//     "pageSize": {
6624	//       "description": "Optional. The number of versions to retrieve per \"page\" of results. If\nthere are more remaining results than this number, the response message\nwill contain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.",
6625	//       "format": "int32",
6626	//       "location": "query",
6627	//       "type": "integer"
6628	//     },
6629	//     "pageToken": {
6630	//       "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.",
6631	//       "location": "query",
6632	//       "type": "string"
6633	//     },
6634	//     "parent": {
6635	//       "description": "Required. The name of the model for which to list the version.",
6636	//       "location": "path",
6637	//       "pattern": "^projects/[^/]+/models/[^/]+$",
6638	//       "required": true,
6639	//       "type": "string"
6640	//     }
6641	//   },
6642	//   "path": "v1/{+parent}/versions",
6643	//   "response": {
6644	//     "$ref": "GoogleCloudMlV1__ListVersionsResponse"
6645	//   },
6646	//   "scopes": [
6647	//     "https://www.googleapis.com/auth/cloud-platform"
6648	//   ]
6649	// }
6650
6651}
6652
6653// Pages invokes f for each page of results.
6654// A non-nil error returned from f will halt the iteration.
6655// The provided context supersedes any context provided to the Context method.
6656func (c *ProjectsModelsVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListVersionsResponse) error) error {
6657	c.ctx_ = ctx
6658	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6659	for {
6660		x, err := c.Do()
6661		if err != nil {
6662			return err
6663		}
6664		if err := f(x); err != nil {
6665			return err
6666		}
6667		if x.NextPageToken == "" {
6668			return nil
6669		}
6670		c.PageToken(x.NextPageToken)
6671	}
6672}
6673
6674// method id "ml.projects.models.versions.patch":
6675
6676type ProjectsModelsVersionsPatchCall struct {
6677	s                        *Service
6678	name                     string
6679	googlecloudmlv1__version *GoogleCloudMlV1__Version
6680	urlParams_               gensupport.URLParams
6681	ctx_                     context.Context
6682	header_                  http.Header
6683}
6684
6685// Patch: Updates the specified Version resource.
6686//
6687// Currently the only update-able fields are `description`
6688// and
6689// `autoScaling.minNodes`.
6690func (r *ProjectsModelsVersionsService) Patch(name string, googlecloudmlv1__version *GoogleCloudMlV1__Version) *ProjectsModelsVersionsPatchCall {
6691	c := &ProjectsModelsVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6692	c.name = name
6693	c.googlecloudmlv1__version = googlecloudmlv1__version
6694	return c
6695}
6696
6697// UpdateMask sets the optional parameter "updateMask": Required.
6698// Specifies the path, relative to `Version`, of the field to
6699// update. Must be present and non-empty.
6700//
6701// For example, to change the description of a version to "foo",
6702// the
6703// `update_mask` parameter would be specified as `description`, and
6704// the
6705// `PATCH` request body would specify the new value, as follows:
6706//     {
6707//       "description": "foo"
6708//     }
6709//
6710// Currently the only supported update mask fields are `description`
6711// and
6712// `autoScaling.minNodes`.
6713func (c *ProjectsModelsVersionsPatchCall) UpdateMask(updateMask string) *ProjectsModelsVersionsPatchCall {
6714	c.urlParams_.Set("updateMask", updateMask)
6715	return c
6716}
6717
6718// Fields allows partial responses to be retrieved. See
6719// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6720// for more information.
6721func (c *ProjectsModelsVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsPatchCall {
6722	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6723	return c
6724}
6725
6726// Context sets the context to be used in this call's Do method. Any
6727// pending HTTP request will be aborted if the provided context is
6728// canceled.
6729func (c *ProjectsModelsVersionsPatchCall) Context(ctx context.Context) *ProjectsModelsVersionsPatchCall {
6730	c.ctx_ = ctx
6731	return c
6732}
6733
6734// Header returns an http.Header that can be modified by the caller to
6735// add HTTP headers to the request.
6736func (c *ProjectsModelsVersionsPatchCall) Header() http.Header {
6737	if c.header_ == nil {
6738		c.header_ = make(http.Header)
6739	}
6740	return c.header_
6741}
6742
6743func (c *ProjectsModelsVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
6744	reqHeaders := make(http.Header)
6745	for k, v := range c.header_ {
6746		reqHeaders[k] = v
6747	}
6748	reqHeaders.Set("User-Agent", c.s.userAgent())
6749	var body io.Reader = nil
6750	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__version)
6751	if err != nil {
6752		return nil, err
6753	}
6754	reqHeaders.Set("Content-Type", "application/json")
6755	c.urlParams_.Set("alt", alt)
6756	c.urlParams_.Set("prettyPrint", "false")
6757	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6758	urls += "?" + c.urlParams_.Encode()
6759	req, err := http.NewRequest("PATCH", urls, body)
6760	if err != nil {
6761		return nil, err
6762	}
6763	req.Header = reqHeaders
6764	googleapi.Expand(req.URL, map[string]string{
6765		"name": c.name,
6766	})
6767	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6768}
6769
6770// Do executes the "ml.projects.models.versions.patch" call.
6771// Exactly one of *GoogleLongrunning__Operation or error will be
6772// non-nil. Any non-2xx status code is an error. Response headers are in
6773// either *GoogleLongrunning__Operation.ServerResponse.Header or (if a
6774// response was returned at all) in error.(*googleapi.Error).Header. Use
6775// googleapi.IsNotModified to check whether the returned error was
6776// because http.StatusNotModified was returned.
6777func (c *ProjectsModelsVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
6778	gensupport.SetOptions(c.urlParams_, opts...)
6779	res, err := c.doRequest("json")
6780	if res != nil && res.StatusCode == http.StatusNotModified {
6781		if res.Body != nil {
6782			res.Body.Close()
6783		}
6784		return nil, &googleapi.Error{
6785			Code:   res.StatusCode,
6786			Header: res.Header,
6787		}
6788	}
6789	if err != nil {
6790		return nil, err
6791	}
6792	defer googleapi.CloseBody(res)
6793	if err := googleapi.CheckResponse(res); err != nil {
6794		return nil, err
6795	}
6796	ret := &GoogleLongrunning__Operation{
6797		ServerResponse: googleapi.ServerResponse{
6798			Header:         res.Header,
6799			HTTPStatusCode: res.StatusCode,
6800		},
6801	}
6802	target := &ret
6803	if err := gensupport.DecodeResponse(target, res); err != nil {
6804		return nil, err
6805	}
6806	return ret, nil
6807	// {
6808	//   "description": "Updates the specified Version resource.\n\nCurrently the only update-able fields are `description` and\n`autoScaling.minNodes`.",
6809	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}",
6810	//   "httpMethod": "PATCH",
6811	//   "id": "ml.projects.models.versions.patch",
6812	//   "parameterOrder": [
6813	//     "name"
6814	//   ],
6815	//   "parameters": {
6816	//     "name": {
6817	//       "description": "Required. The name of the model.",
6818	//       "location": "path",
6819	//       "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$",
6820	//       "required": true,
6821	//       "type": "string"
6822	//     },
6823	//     "updateMask": {
6824	//       "description": "Required. Specifies the path, relative to `Version`, of the field to\nupdate. Must be present and non-empty.\n\nFor example, to change the description of a version to \"foo\", the\n`update_mask` parameter would be specified as `description`, and the\n`PATCH` request body would specify the new value, as follows:\n    {\n      \"description\": \"foo\"\n    }\n\nCurrently the only supported update mask fields are `description` and\n`autoScaling.minNodes`.",
6825	//       "format": "google-fieldmask",
6826	//       "location": "query",
6827	//       "type": "string"
6828	//     }
6829	//   },
6830	//   "path": "v1/{+name}",
6831	//   "request": {
6832	//     "$ref": "GoogleCloudMlV1__Version"
6833	//   },
6834	//   "response": {
6835	//     "$ref": "GoogleLongrunning__Operation"
6836	//   },
6837	//   "scopes": [
6838	//     "https://www.googleapis.com/auth/cloud-platform"
6839	//   ]
6840	// }
6841
6842}
6843
6844// method id "ml.projects.models.versions.setDefault":
6845
6846type ProjectsModelsVersionsSetDefaultCall struct {
6847	s                                         *Service
6848	name                                      string
6849	googlecloudmlv1__setdefaultversionrequest *GoogleCloudMlV1__SetDefaultVersionRequest
6850	urlParams_                                gensupport.URLParams
6851	ctx_                                      context.Context
6852	header_                                   http.Header
6853}
6854
6855// SetDefault: Designates a version to be the default for the
6856// model.
6857//
6858// The default version is used for prediction requests made against the
6859// model
6860// that don't specify a version.
6861//
6862// The first version to be created for a model is automatically set as
6863// the
6864// default. You must make any subsequent changes to the default
6865// version
6866// setting manually using this method.
6867func (r *ProjectsModelsVersionsService) SetDefault(name string, googlecloudmlv1__setdefaultversionrequest *GoogleCloudMlV1__SetDefaultVersionRequest) *ProjectsModelsVersionsSetDefaultCall {
6868	c := &ProjectsModelsVersionsSetDefaultCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6869	c.name = name
6870	c.googlecloudmlv1__setdefaultversionrequest = googlecloudmlv1__setdefaultversionrequest
6871	return c
6872}
6873
6874// Fields allows partial responses to be retrieved. See
6875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6876// for more information.
6877func (c *ProjectsModelsVersionsSetDefaultCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsSetDefaultCall {
6878	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6879	return c
6880}
6881
6882// Context sets the context to be used in this call's Do method. Any
6883// pending HTTP request will be aborted if the provided context is
6884// canceled.
6885func (c *ProjectsModelsVersionsSetDefaultCall) Context(ctx context.Context) *ProjectsModelsVersionsSetDefaultCall {
6886	c.ctx_ = ctx
6887	return c
6888}
6889
6890// Header returns an http.Header that can be modified by the caller to
6891// add HTTP headers to the request.
6892func (c *ProjectsModelsVersionsSetDefaultCall) Header() http.Header {
6893	if c.header_ == nil {
6894		c.header_ = make(http.Header)
6895	}
6896	return c.header_
6897}
6898
6899func (c *ProjectsModelsVersionsSetDefaultCall) doRequest(alt string) (*http.Response, error) {
6900	reqHeaders := make(http.Header)
6901	for k, v := range c.header_ {
6902		reqHeaders[k] = v
6903	}
6904	reqHeaders.Set("User-Agent", c.s.userAgent())
6905	var body io.Reader = nil
6906	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__setdefaultversionrequest)
6907	if err != nil {
6908		return nil, err
6909	}
6910	reqHeaders.Set("Content-Type", "application/json")
6911	c.urlParams_.Set("alt", alt)
6912	c.urlParams_.Set("prettyPrint", "false")
6913	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setDefault")
6914	urls += "?" + c.urlParams_.Encode()
6915	req, err := http.NewRequest("POST", urls, body)
6916	if err != nil {
6917		return nil, err
6918	}
6919	req.Header = reqHeaders
6920	googleapi.Expand(req.URL, map[string]string{
6921		"name": c.name,
6922	})
6923	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6924}
6925
6926// Do executes the "ml.projects.models.versions.setDefault" call.
6927// Exactly one of *GoogleCloudMlV1__Version or error will be non-nil.
6928// Any non-2xx status code is an error. Response headers are in either
6929// *GoogleCloudMlV1__Version.ServerResponse.Header or (if a response was
6930// returned at all) in error.(*googleapi.Error).Header. Use
6931// googleapi.IsNotModified to check whether the returned error was
6932// because http.StatusNotModified was returned.
6933func (c *ProjectsModelsVersionsSetDefaultCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Version, error) {
6934	gensupport.SetOptions(c.urlParams_, opts...)
6935	res, err := c.doRequest("json")
6936	if res != nil && res.StatusCode == http.StatusNotModified {
6937		if res.Body != nil {
6938			res.Body.Close()
6939		}
6940		return nil, &googleapi.Error{
6941			Code:   res.StatusCode,
6942			Header: res.Header,
6943		}
6944	}
6945	if err != nil {
6946		return nil, err
6947	}
6948	defer googleapi.CloseBody(res)
6949	if err := googleapi.CheckResponse(res); err != nil {
6950		return nil, err
6951	}
6952	ret := &GoogleCloudMlV1__Version{
6953		ServerResponse: googleapi.ServerResponse{
6954			Header:         res.Header,
6955			HTTPStatusCode: res.StatusCode,
6956		},
6957	}
6958	target := &ret
6959	if err := gensupport.DecodeResponse(target, res); err != nil {
6960		return nil, err
6961	}
6962	return ret, nil
6963	// {
6964	//   "description": "Designates a version to be the default for the model.\n\nThe default version is used for prediction requests made against the model\nthat don't specify a version.\n\nThe first version to be created for a model is automatically set as the\ndefault. You must make any subsequent changes to the default version\nsetting manually using this method.",
6965	//   "flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}:setDefault",
6966	//   "httpMethod": "POST",
6967	//   "id": "ml.projects.models.versions.setDefault",
6968	//   "parameterOrder": [
6969	//     "name"
6970	//   ],
6971	//   "parameters": {
6972	//     "name": {
6973	//       "description": "Required. The name of the version to make the default for the model. You\ncan get the names of all the versions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).",
6974	//       "location": "path",
6975	//       "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$",
6976	//       "required": true,
6977	//       "type": "string"
6978	//     }
6979	//   },
6980	//   "path": "v1/{+name}:setDefault",
6981	//   "request": {
6982	//     "$ref": "GoogleCloudMlV1__SetDefaultVersionRequest"
6983	//   },
6984	//   "response": {
6985	//     "$ref": "GoogleCloudMlV1__Version"
6986	//   },
6987	//   "scopes": [
6988	//     "https://www.googleapis.com/auth/cloud-platform"
6989	//   ]
6990	// }
6991
6992}
6993
6994// method id "ml.projects.operations.cancel":
6995
6996type ProjectsOperationsCancelCall struct {
6997	s          *Service
6998	name       string
6999	urlParams_ gensupport.URLParams
7000	ctx_       context.Context
7001	header_    http.Header
7002}
7003
7004// Cancel: Starts asynchronous cancellation on a long-running operation.
7005//  The server
7006// makes a best effort to cancel the operation, but success is
7007// not
7008// guaranteed.  If the server doesn't support this method, it
7009// returns
7010// `google.rpc.Code.UNIMPLEMENTED`.  Clients can
7011// use
7012// Operations.GetOperation or
7013// other methods to check whether the cancellation succeeded or whether
7014// the
7015// operation completed despite cancellation. On successful
7016// cancellation,
7017// the operation is not deleted; instead, it becomes an operation
7018// with
7019// an Operation.error value with a google.rpc.Status.code of
7020// 1,
7021// corresponding to `Code.CANCELLED`.
7022func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall {
7023	c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7024	c.name = name
7025	return c
7026}
7027
7028// Fields allows partial responses to be retrieved. See
7029// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7030// for more information.
7031func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall {
7032	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7033	return c
7034}
7035
7036// Context sets the context to be used in this call's Do method. Any
7037// pending HTTP request will be aborted if the provided context is
7038// canceled.
7039func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall {
7040	c.ctx_ = ctx
7041	return c
7042}
7043
7044// Header returns an http.Header that can be modified by the caller to
7045// add HTTP headers to the request.
7046func (c *ProjectsOperationsCancelCall) Header() http.Header {
7047	if c.header_ == nil {
7048		c.header_ = make(http.Header)
7049	}
7050	return c.header_
7051}
7052
7053func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
7054	reqHeaders := make(http.Header)
7055	for k, v := range c.header_ {
7056		reqHeaders[k] = v
7057	}
7058	reqHeaders.Set("User-Agent", c.s.userAgent())
7059	var body io.Reader = nil
7060	c.urlParams_.Set("alt", alt)
7061	c.urlParams_.Set("prettyPrint", "false")
7062	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
7063	urls += "?" + c.urlParams_.Encode()
7064	req, err := http.NewRequest("POST", urls, body)
7065	if err != nil {
7066		return nil, err
7067	}
7068	req.Header = reqHeaders
7069	googleapi.Expand(req.URL, map[string]string{
7070		"name": c.name,
7071	})
7072	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7073}
7074
7075// Do executes the "ml.projects.operations.cancel" call.
7076// Exactly one of *GoogleProtobuf__Empty or error will be non-nil. Any
7077// non-2xx status code is an error. Response headers are in either
7078// *GoogleProtobuf__Empty.ServerResponse.Header or (if a response was
7079// returned at all) in error.(*googleapi.Error).Header. Use
7080// googleapi.IsNotModified to check whether the returned error was
7081// because http.StatusNotModified was returned.
7082func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
7083	gensupport.SetOptions(c.urlParams_, opts...)
7084	res, err := c.doRequest("json")
7085	if res != nil && res.StatusCode == http.StatusNotModified {
7086		if res.Body != nil {
7087			res.Body.Close()
7088		}
7089		return nil, &googleapi.Error{
7090			Code:   res.StatusCode,
7091			Header: res.Header,
7092		}
7093	}
7094	if err != nil {
7095		return nil, err
7096	}
7097	defer googleapi.CloseBody(res)
7098	if err := googleapi.CheckResponse(res); err != nil {
7099		return nil, err
7100	}
7101	ret := &GoogleProtobuf__Empty{
7102		ServerResponse: googleapi.ServerResponse{
7103			Header:         res.Header,
7104			HTTPStatusCode: res.StatusCode,
7105		},
7106	}
7107	target := &ret
7108	if err := gensupport.DecodeResponse(target, res); err != nil {
7109		return nil, err
7110	}
7111	return ret, nil
7112	// {
7113	//   "description": "Starts asynchronous cancellation on a long-running operation.  The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed.  If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.  Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
7114	//   "flatPath": "v1/projects/{projectsId}/operations/{operationsId}:cancel",
7115	//   "httpMethod": "POST",
7116	//   "id": "ml.projects.operations.cancel",
7117	//   "parameterOrder": [
7118	//     "name"
7119	//   ],
7120	//   "parameters": {
7121	//     "name": {
7122	//       "description": "The name of the operation resource to be cancelled.",
7123	//       "location": "path",
7124	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
7125	//       "required": true,
7126	//       "type": "string"
7127	//     }
7128	//   },
7129	//   "path": "v1/{+name}:cancel",
7130	//   "response": {
7131	//     "$ref": "GoogleProtobuf__Empty"
7132	//   },
7133	//   "scopes": [
7134	//     "https://www.googleapis.com/auth/cloud-platform"
7135	//   ]
7136	// }
7137
7138}
7139
7140// method id "ml.projects.operations.delete":
7141
7142type ProjectsOperationsDeleteCall struct {
7143	s          *Service
7144	name       string
7145	urlParams_ gensupport.URLParams
7146	ctx_       context.Context
7147	header_    http.Header
7148}
7149
7150// Delete: Deletes a long-running operation. This method indicates that
7151// the client is
7152// no longer interested in the operation result. It does not cancel
7153// the
7154// operation. If the server doesn't support this method, it
7155// returns
7156// `google.rpc.Code.UNIMPLEMENTED`.
7157func (r *ProjectsOperationsService) Delete(name string) *ProjectsOperationsDeleteCall {
7158	c := &ProjectsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7159	c.name = name
7160	return c
7161}
7162
7163// Fields allows partial responses to be retrieved. See
7164// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7165// for more information.
7166func (c *ProjectsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsOperationsDeleteCall {
7167	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7168	return c
7169}
7170
7171// Context sets the context to be used in this call's Do method. Any
7172// pending HTTP request will be aborted if the provided context is
7173// canceled.
7174func (c *ProjectsOperationsDeleteCall) Context(ctx context.Context) *ProjectsOperationsDeleteCall {
7175	c.ctx_ = ctx
7176	return c
7177}
7178
7179// Header returns an http.Header that can be modified by the caller to
7180// add HTTP headers to the request.
7181func (c *ProjectsOperationsDeleteCall) Header() http.Header {
7182	if c.header_ == nil {
7183		c.header_ = make(http.Header)
7184	}
7185	return c.header_
7186}
7187
7188func (c *ProjectsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
7189	reqHeaders := make(http.Header)
7190	for k, v := range c.header_ {
7191		reqHeaders[k] = v
7192	}
7193	reqHeaders.Set("User-Agent", c.s.userAgent())
7194	var body io.Reader = nil
7195	c.urlParams_.Set("alt", alt)
7196	c.urlParams_.Set("prettyPrint", "false")
7197	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7198	urls += "?" + c.urlParams_.Encode()
7199	req, err := http.NewRequest("DELETE", urls, body)
7200	if err != nil {
7201		return nil, err
7202	}
7203	req.Header = reqHeaders
7204	googleapi.Expand(req.URL, map[string]string{
7205		"name": c.name,
7206	})
7207	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7208}
7209
7210// Do executes the "ml.projects.operations.delete" call.
7211// Exactly one of *GoogleProtobuf__Empty or error will be non-nil. Any
7212// non-2xx status code is an error. Response headers are in either
7213// *GoogleProtobuf__Empty.ServerResponse.Header or (if a response was
7214// returned at all) in error.(*googleapi.Error).Header. Use
7215// googleapi.IsNotModified to check whether the returned error was
7216// because http.StatusNotModified was returned.
7217func (c *ProjectsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
7218	gensupport.SetOptions(c.urlParams_, opts...)
7219	res, err := c.doRequest("json")
7220	if res != nil && res.StatusCode == http.StatusNotModified {
7221		if res.Body != nil {
7222			res.Body.Close()
7223		}
7224		return nil, &googleapi.Error{
7225			Code:   res.StatusCode,
7226			Header: res.Header,
7227		}
7228	}
7229	if err != nil {
7230		return nil, err
7231	}
7232	defer googleapi.CloseBody(res)
7233	if err := googleapi.CheckResponse(res); err != nil {
7234		return nil, err
7235	}
7236	ret := &GoogleProtobuf__Empty{
7237		ServerResponse: googleapi.ServerResponse{
7238			Header:         res.Header,
7239			HTTPStatusCode: res.StatusCode,
7240		},
7241	}
7242	target := &ret
7243	if err := gensupport.DecodeResponse(target, res); err != nil {
7244		return nil, err
7245	}
7246	return ret, nil
7247	// {
7248	//   "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.",
7249	//   "flatPath": "v1/projects/{projectsId}/operations/{operationsId}",
7250	//   "httpMethod": "DELETE",
7251	//   "id": "ml.projects.operations.delete",
7252	//   "parameterOrder": [
7253	//     "name"
7254	//   ],
7255	//   "parameters": {
7256	//     "name": {
7257	//       "description": "The name of the operation resource to be deleted.",
7258	//       "location": "path",
7259	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
7260	//       "required": true,
7261	//       "type": "string"
7262	//     }
7263	//   },
7264	//   "path": "v1/{+name}",
7265	//   "response": {
7266	//     "$ref": "GoogleProtobuf__Empty"
7267	//   },
7268	//   "scopes": [
7269	//     "https://www.googleapis.com/auth/cloud-platform"
7270	//   ]
7271	// }
7272
7273}
7274
7275// method id "ml.projects.operations.get":
7276
7277type ProjectsOperationsGetCall struct {
7278	s            *Service
7279	name         string
7280	urlParams_   gensupport.URLParams
7281	ifNoneMatch_ string
7282	ctx_         context.Context
7283	header_      http.Header
7284}
7285
7286// Get: Gets the latest state of a long-running operation.  Clients can
7287// use this
7288// method to poll the operation result at intervals as recommended by
7289// the API
7290// service.
7291func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
7292	c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7293	c.name = name
7294	return c
7295}
7296
7297// Fields allows partial responses to be retrieved. See
7298// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7299// for more information.
7300func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
7301	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7302	return c
7303}
7304
7305// IfNoneMatch sets the optional parameter which makes the operation
7306// fail if the object's ETag matches the given value. This is useful for
7307// getting updates only after the object has changed since the last
7308// request. Use googleapi.IsNotModified to check whether the response
7309// error from Do is the result of In-None-Match.
7310func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
7311	c.ifNoneMatch_ = entityTag
7312	return c
7313}
7314
7315// Context sets the context to be used in this call's Do method. Any
7316// pending HTTP request will be aborted if the provided context is
7317// canceled.
7318func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
7319	c.ctx_ = ctx
7320	return c
7321}
7322
7323// Header returns an http.Header that can be modified by the caller to
7324// add HTTP headers to the request.
7325func (c *ProjectsOperationsGetCall) Header() http.Header {
7326	if c.header_ == nil {
7327		c.header_ = make(http.Header)
7328	}
7329	return c.header_
7330}
7331
7332func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
7333	reqHeaders := make(http.Header)
7334	for k, v := range c.header_ {
7335		reqHeaders[k] = v
7336	}
7337	reqHeaders.Set("User-Agent", c.s.userAgent())
7338	if c.ifNoneMatch_ != "" {
7339		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7340	}
7341	var body io.Reader = nil
7342	c.urlParams_.Set("alt", alt)
7343	c.urlParams_.Set("prettyPrint", "false")
7344	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7345	urls += "?" + c.urlParams_.Encode()
7346	req, err := http.NewRequest("GET", urls, body)
7347	if err != nil {
7348		return nil, err
7349	}
7350	req.Header = reqHeaders
7351	googleapi.Expand(req.URL, map[string]string{
7352		"name": c.name,
7353	})
7354	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7355}
7356
7357// Do executes the "ml.projects.operations.get" call.
7358// Exactly one of *GoogleLongrunning__Operation or error will be
7359// non-nil. Any non-2xx status code is an error. Response headers are in
7360// either *GoogleLongrunning__Operation.ServerResponse.Header or (if a
7361// response was returned at all) in error.(*googleapi.Error).Header. Use
7362// googleapi.IsNotModified to check whether the returned error was
7363// because http.StatusNotModified was returned.
7364func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
7365	gensupport.SetOptions(c.urlParams_, opts...)
7366	res, err := c.doRequest("json")
7367	if res != nil && res.StatusCode == http.StatusNotModified {
7368		if res.Body != nil {
7369			res.Body.Close()
7370		}
7371		return nil, &googleapi.Error{
7372			Code:   res.StatusCode,
7373			Header: res.Header,
7374		}
7375	}
7376	if err != nil {
7377		return nil, err
7378	}
7379	defer googleapi.CloseBody(res)
7380	if err := googleapi.CheckResponse(res); err != nil {
7381		return nil, err
7382	}
7383	ret := &GoogleLongrunning__Operation{
7384		ServerResponse: googleapi.ServerResponse{
7385			Header:         res.Header,
7386			HTTPStatusCode: res.StatusCode,
7387		},
7388	}
7389	target := &ret
7390	if err := gensupport.DecodeResponse(target, res); err != nil {
7391		return nil, err
7392	}
7393	return ret, nil
7394	// {
7395	//   "description": "Gets the latest state of a long-running operation.  Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
7396	//   "flatPath": "v1/projects/{projectsId}/operations/{operationsId}",
7397	//   "httpMethod": "GET",
7398	//   "id": "ml.projects.operations.get",
7399	//   "parameterOrder": [
7400	//     "name"
7401	//   ],
7402	//   "parameters": {
7403	//     "name": {
7404	//       "description": "The name of the operation resource.",
7405	//       "location": "path",
7406	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
7407	//       "required": true,
7408	//       "type": "string"
7409	//     }
7410	//   },
7411	//   "path": "v1/{+name}",
7412	//   "response": {
7413	//     "$ref": "GoogleLongrunning__Operation"
7414	//   },
7415	//   "scopes": [
7416	//     "https://www.googleapis.com/auth/cloud-platform"
7417	//   ]
7418	// }
7419
7420}
7421
7422// method id "ml.projects.operations.list":
7423
7424type ProjectsOperationsListCall struct {
7425	s            *Service
7426	name         string
7427	urlParams_   gensupport.URLParams
7428	ifNoneMatch_ string
7429	ctx_         context.Context
7430	header_      http.Header
7431}
7432
7433// List: Lists operations that match the specified filter in the
7434// request. If the
7435// server doesn't support this method, it returns
7436// `UNIMPLEMENTED`.
7437//
7438// NOTE: the `name` binding allows API services to override the
7439// binding
7440// to use different resource name schemes, such as `users/*/operations`.
7441// To
7442// override the binding, API services can add a binding such
7443// as
7444// "/v1/{name=users/*}/operations" to their service configuration.
7445// For backwards compatibility, the default name includes the
7446// operations
7447// collection id, however overriding users must ensure the name
7448// binding
7449// is the parent resource, without the operations collection id.
7450func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall {
7451	c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7452	c.name = name
7453	return c
7454}
7455
7456// Filter sets the optional parameter "filter": The standard list
7457// filter.
7458func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall {
7459	c.urlParams_.Set("filter", filter)
7460	return c
7461}
7462
7463// PageSize sets the optional parameter "pageSize": The standard list
7464// page size.
7465func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall {
7466	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7467	return c
7468}
7469
7470// PageToken sets the optional parameter "pageToken": The standard list
7471// page token.
7472func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall {
7473	c.urlParams_.Set("pageToken", pageToken)
7474	return c
7475}
7476
7477// Fields allows partial responses to be retrieved. See
7478// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7479// for more information.
7480func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall {
7481	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7482	return c
7483}
7484
7485// IfNoneMatch sets the optional parameter which makes the operation
7486// fail if the object's ETag matches the given value. This is useful for
7487// getting updates only after the object has changed since the last
7488// request. Use googleapi.IsNotModified to check whether the response
7489// error from Do is the result of In-None-Match.
7490func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall {
7491	c.ifNoneMatch_ = entityTag
7492	return c
7493}
7494
7495// Context sets the context to be used in this call's Do method. Any
7496// pending HTTP request will be aborted if the provided context is
7497// canceled.
7498func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall {
7499	c.ctx_ = ctx
7500	return c
7501}
7502
7503// Header returns an http.Header that can be modified by the caller to
7504// add HTTP headers to the request.
7505func (c *ProjectsOperationsListCall) Header() http.Header {
7506	if c.header_ == nil {
7507		c.header_ = make(http.Header)
7508	}
7509	return c.header_
7510}
7511
7512func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
7513	reqHeaders := make(http.Header)
7514	for k, v := range c.header_ {
7515		reqHeaders[k] = v
7516	}
7517	reqHeaders.Set("User-Agent", c.s.userAgent())
7518	if c.ifNoneMatch_ != "" {
7519		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7520	}
7521	var body io.Reader = nil
7522	c.urlParams_.Set("alt", alt)
7523	c.urlParams_.Set("prettyPrint", "false")
7524	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
7525	urls += "?" + c.urlParams_.Encode()
7526	req, err := http.NewRequest("GET", urls, body)
7527	if err != nil {
7528		return nil, err
7529	}
7530	req.Header = reqHeaders
7531	googleapi.Expand(req.URL, map[string]string{
7532		"name": c.name,
7533	})
7534	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7535}
7536
7537// Do executes the "ml.projects.operations.list" call.
7538// Exactly one of *GoogleLongrunning__ListOperationsResponse or error
7539// will be non-nil. Any non-2xx status code is an error. Response
7540// headers are in either
7541// *GoogleLongrunning__ListOperationsResponse.ServerResponse.Header or
7542// (if a response was returned at all) in
7543// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7544// whether the returned error was because http.StatusNotModified was
7545// returned.
7546func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__ListOperationsResponse, error) {
7547	gensupport.SetOptions(c.urlParams_, opts...)
7548	res, err := c.doRequest("json")
7549	if res != nil && res.StatusCode == http.StatusNotModified {
7550		if res.Body != nil {
7551			res.Body.Close()
7552		}
7553		return nil, &googleapi.Error{
7554			Code:   res.StatusCode,
7555			Header: res.Header,
7556		}
7557	}
7558	if err != nil {
7559		return nil, err
7560	}
7561	defer googleapi.CloseBody(res)
7562	if err := googleapi.CheckResponse(res); err != nil {
7563		return nil, err
7564	}
7565	ret := &GoogleLongrunning__ListOperationsResponse{
7566		ServerResponse: googleapi.ServerResponse{
7567			Header:         res.Header,
7568			HTTPStatusCode: res.StatusCode,
7569		},
7570	}
7571	target := &ret
7572	if err := gensupport.DecodeResponse(target, res); err != nil {
7573		return nil, err
7574	}
7575	return ret, nil
7576	// {
7577	//   "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
7578	//   "flatPath": "v1/projects/{projectsId}/operations",
7579	//   "httpMethod": "GET",
7580	//   "id": "ml.projects.operations.list",
7581	//   "parameterOrder": [
7582	//     "name"
7583	//   ],
7584	//   "parameters": {
7585	//     "filter": {
7586	//       "description": "The standard list filter.",
7587	//       "location": "query",
7588	//       "type": "string"
7589	//     },
7590	//     "name": {
7591	//       "description": "The name of the operation's parent resource.",
7592	//       "location": "path",
7593	//       "pattern": "^projects/[^/]+$",
7594	//       "required": true,
7595	//       "type": "string"
7596	//     },
7597	//     "pageSize": {
7598	//       "description": "The standard list page size.",
7599	//       "format": "int32",
7600	//       "location": "query",
7601	//       "type": "integer"
7602	//     },
7603	//     "pageToken": {
7604	//       "description": "The standard list page token.",
7605	//       "location": "query",
7606	//       "type": "string"
7607	//     }
7608	//   },
7609	//   "path": "v1/{+name}/operations",
7610	//   "response": {
7611	//     "$ref": "GoogleLongrunning__ListOperationsResponse"
7612	//   },
7613	//   "scopes": [
7614	//     "https://www.googleapis.com/auth/cloud-platform"
7615	//   ]
7616	// }
7617
7618}
7619
7620// Pages invokes f for each page of results.
7621// A non-nil error returned from f will halt the iteration.
7622// The provided context supersedes any context provided to the Context method.
7623func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunning__ListOperationsResponse) error) error {
7624	c.ctx_ = ctx
7625	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7626	for {
7627		x, err := c.Do()
7628		if err != nil {
7629			return err
7630		}
7631		if err := f(x); err != nil {
7632			return err
7633		}
7634		if x.NextPageToken == "" {
7635			return nil
7636		}
7637		c.PageToken(x.NextPageToken)
7638	}
7639}
7640