...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package language provides access to the Cloud Natural Language API.
     8  //
     9  // This package is DEPRECATED. Use package cloud.google.com/go/language/apiv1 instead.
    10  //
    11  // For product documentation, see: https://cloud.google.com/natural-language/
    12  //
    13  // # Library status
    14  //
    15  // These client libraries are officially supported by Google. However, this
    16  // library is considered complete and is in maintenance mode. This means
    17  // that we will address critical bugs and security issues but will not add
    18  // any new features.
    19  //
    20  // When possible, we recommend using our newer
    21  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    22  // that are still actively being worked and iterated on.
    23  //
    24  // # Creating a client
    25  //
    26  // Usage example:
    27  //
    28  //	import "google.golang.org/api/language/v1"
    29  //	...
    30  //	ctx := context.Background()
    31  //	languageService, err := language.NewService(ctx)
    32  //
    33  // In this example, Google Application Default Credentials are used for
    34  // authentication. For information on how to create and obtain Application
    35  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    36  //
    37  // # Other authentication options
    38  //
    39  // By default, all available scopes (see "Constants") are used to authenticate.
    40  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    41  //
    42  //	languageService, err := language.NewService(ctx, option.WithScopes(language.CloudPlatformScope))
    43  //
    44  // To use an API key for authentication (note: some APIs do not support API
    45  // keys), use [google.golang.org/api/option.WithAPIKey]:
    46  //
    47  //	languageService, err := language.NewService(ctx, option.WithAPIKey("AIza..."))
    48  //
    49  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    50  // flow, use [google.golang.org/api/option.WithTokenSource]:
    51  //
    52  //	config := &oauth2.Config{...}
    53  //	// ...
    54  //	token, err := config.Exchange(ctx, ...)
    55  //	languageService, err := language.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    56  //
    57  // See [google.golang.org/api/option.ClientOption] for details on options.
    58  package language // import "google.golang.org/api/language/v1"
    59  
    60  import (
    61  	"bytes"
    62  	"context"
    63  	"encoding/json"
    64  	"errors"
    65  	"fmt"
    66  	"io"
    67  	"net/http"
    68  	"net/url"
    69  	"strconv"
    70  	"strings"
    71  
    72  	googleapi "google.golang.org/api/googleapi"
    73  	internal "google.golang.org/api/internal"
    74  	gensupport "google.golang.org/api/internal/gensupport"
    75  	option "google.golang.org/api/option"
    76  	internaloption "google.golang.org/api/option/internaloption"
    77  	htransport "google.golang.org/api/transport/http"
    78  )
    79  
    80  // Always reference these packages, just in case the auto-generated code
    81  // below doesn't.
    82  var _ = bytes.NewBuffer
    83  var _ = strconv.Itoa
    84  var _ = fmt.Sprintf
    85  var _ = json.NewDecoder
    86  var _ = io.Copy
    87  var _ = url.Parse
    88  var _ = gensupport.MarshalJSON
    89  var _ = googleapi.Version
    90  var _ = errors.New
    91  var _ = strings.Replace
    92  var _ = context.Canceled
    93  var _ = internaloption.WithDefaultEndpoint
    94  var _ = internal.Version
    95  
    96  const apiId = "language:v1"
    97  const apiName = "language"
    98  const apiVersion = "v1"
    99  const basePath = "https://language.googleapis.com/"
   100  const basePathTemplate = "https://language.UNIVERSE_DOMAIN/"
   101  const mtlsBasePath = "https://language.mtls.googleapis.com/"
   102  
   103  // OAuth2 scopes used by this API.
   104  const (
   105  	// Apply machine learning models to reveal the structure and meaning of text
   106  	CloudLanguageScope = "https://www.googleapis.com/auth/cloud-language"
   107  
   108  	// See, edit, configure, and delete your Google Cloud data and see the email
   109  	// address for your Google Account.
   110  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   111  )
   112  
   113  // NewService creates a new Service.
   114  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   115  	scopesOption := internaloption.WithDefaultScopes(
   116  		"https://www.googleapis.com/auth/cloud-language",
   117  		"https://www.googleapis.com/auth/cloud-platform",
   118  	)
   119  	// NOTE: prepend, so we don't override user-specified scopes.
   120  	opts = append([]option.ClientOption{scopesOption}, opts...)
   121  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   122  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   123  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   124  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   125  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   126  	if err != nil {
   127  		return nil, err
   128  	}
   129  	s, err := New(client)
   130  	if err != nil {
   131  		return nil, err
   132  	}
   133  	if endpoint != "" {
   134  		s.BasePath = endpoint
   135  	}
   136  	return s, nil
   137  }
   138  
   139  // New creates a new Service. It uses the provided http.Client for requests.
   140  //
   141  // Deprecated: please use NewService instead.
   142  // To provide a custom HTTP client, use option.WithHTTPClient.
   143  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   144  func New(client *http.Client) (*Service, error) {
   145  	if client == nil {
   146  		return nil, errors.New("client is nil")
   147  	}
   148  	s := &Service{client: client, BasePath: basePath}
   149  	s.Documents = NewDocumentsService(s)
   150  	return s, nil
   151  }
   152  
   153  type Service struct {
   154  	client    *http.Client
   155  	BasePath  string // API endpoint base URL
   156  	UserAgent string // optional additional User-Agent fragment
   157  
   158  	Documents *DocumentsService
   159  }
   160  
   161  func (s *Service) userAgent() string {
   162  	if s.UserAgent == "" {
   163  		return googleapi.UserAgent
   164  	}
   165  	return googleapi.UserAgent + " " + s.UserAgent
   166  }
   167  
   168  func NewDocumentsService(s *Service) *DocumentsService {
   169  	rs := &DocumentsService{s: s}
   170  	return rs
   171  }
   172  
   173  type DocumentsService struct {
   174  	s *Service
   175  }
   176  
   177  // AnalyzeEntitiesRequest: The entity analysis request message.
   178  type AnalyzeEntitiesRequest struct {
   179  	// Document: Required. Input document.
   180  	Document *Document `json:"document,omitempty"`
   181  	// EncodingType: The encoding type used by the API to calculate offsets.
   182  	//
   183  	// Possible values:
   184  	//   "NONE" - If `EncodingType` is not specified, encoding-dependent
   185  	// information (such as `begin_offset`) will be set at `-1`.
   186  	//   "UTF8" - Encoding-dependent information (such as `begin_offset`) is
   187  	// calculated based on the UTF-8 encoding of the input. C++ and Go are examples
   188  	// of languages that use this encoding natively.
   189  	//   "UTF16" - Encoding-dependent information (such as `begin_offset`) is
   190  	// calculated based on the UTF-16 encoding of the input. Java and JavaScript
   191  	// are examples of languages that use this encoding natively.
   192  	//   "UTF32" - Encoding-dependent information (such as `begin_offset`) is
   193  	// calculated based on the UTF-32 encoding of the input. Python is an example
   194  	// of a language that uses this encoding natively.
   195  	EncodingType string `json:"encodingType,omitempty"`
   196  	// ForceSendFields is a list of field names (e.g. "Document") to
   197  	// unconditionally include in API requests. By default, fields with empty or
   198  	// default values are omitted from API requests. See
   199  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   200  	// details.
   201  	ForceSendFields []string `json:"-"`
   202  	// NullFields is a list of field names (e.g. "Document") to include in API
   203  	// requests with the JSON null value. By default, fields with empty values are
   204  	// omitted from API requests. See
   205  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   206  	NullFields []string `json:"-"`
   207  }
   208  
   209  func (s *AnalyzeEntitiesRequest) MarshalJSON() ([]byte, error) {
   210  	type NoMethod AnalyzeEntitiesRequest
   211  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   212  }
   213  
   214  // AnalyzeEntitiesResponse: The entity analysis response message.
   215  type AnalyzeEntitiesResponse struct {
   216  	// Entities: The recognized entities in the input document.
   217  	Entities []*Entity `json:"entities,omitempty"`
   218  	// Language: The language of the text, which will be the same as the language
   219  	// specified in the request or, if not specified, the automatically-detected
   220  	// language. See Document.language field for more details.
   221  	Language string `json:"language,omitempty"`
   222  
   223  	// ServerResponse contains the HTTP response code and headers from the server.
   224  	googleapi.ServerResponse `json:"-"`
   225  	// ForceSendFields is a list of field names (e.g. "Entities") to
   226  	// unconditionally include in API requests. By default, fields with empty or
   227  	// default values are omitted from API requests. See
   228  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   229  	// details.
   230  	ForceSendFields []string `json:"-"`
   231  	// NullFields is a list of field names (e.g. "Entities") to include in API
   232  	// requests with the JSON null value. By default, fields with empty values are
   233  	// omitted from API requests. See
   234  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   235  	NullFields []string `json:"-"`
   236  }
   237  
   238  func (s *AnalyzeEntitiesResponse) MarshalJSON() ([]byte, error) {
   239  	type NoMethod AnalyzeEntitiesResponse
   240  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   241  }
   242  
   243  // AnalyzeEntitySentimentRequest: The entity-level sentiment analysis request
   244  // message.
   245  type AnalyzeEntitySentimentRequest struct {
   246  	// Document: Required. Input document.
   247  	Document *Document `json:"document,omitempty"`
   248  	// EncodingType: The encoding type used by the API to calculate offsets.
   249  	//
   250  	// Possible values:
   251  	//   "NONE" - If `EncodingType` is not specified, encoding-dependent
   252  	// information (such as `begin_offset`) will be set at `-1`.
   253  	//   "UTF8" - Encoding-dependent information (such as `begin_offset`) is
   254  	// calculated based on the UTF-8 encoding of the input. C++ and Go are examples
   255  	// of languages that use this encoding natively.
   256  	//   "UTF16" - Encoding-dependent information (such as `begin_offset`) is
   257  	// calculated based on the UTF-16 encoding of the input. Java and JavaScript
   258  	// are examples of languages that use this encoding natively.
   259  	//   "UTF32" - Encoding-dependent information (such as `begin_offset`) is
   260  	// calculated based on the UTF-32 encoding of the input. Python is an example
   261  	// of a language that uses this encoding natively.
   262  	EncodingType string `json:"encodingType,omitempty"`
   263  	// ForceSendFields is a list of field names (e.g. "Document") to
   264  	// unconditionally include in API requests. By default, fields with empty or
   265  	// default values are omitted from API requests. See
   266  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   267  	// details.
   268  	ForceSendFields []string `json:"-"`
   269  	// NullFields is a list of field names (e.g. "Document") to include in API
   270  	// requests with the JSON null value. By default, fields with empty values are
   271  	// omitted from API requests. See
   272  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   273  	NullFields []string `json:"-"`
   274  }
   275  
   276  func (s *AnalyzeEntitySentimentRequest) MarshalJSON() ([]byte, error) {
   277  	type NoMethod AnalyzeEntitySentimentRequest
   278  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   279  }
   280  
   281  // AnalyzeEntitySentimentResponse: The entity-level sentiment analysis response
   282  // message.
   283  type AnalyzeEntitySentimentResponse struct {
   284  	// Entities: The recognized entities in the input document with associated
   285  	// sentiments.
   286  	Entities []*Entity `json:"entities,omitempty"`
   287  	// Language: The language of the text, which will be the same as the language
   288  	// specified in the request or, if not specified, the automatically-detected
   289  	// language. See Document.language field for more details.
   290  	Language string `json:"language,omitempty"`
   291  
   292  	// ServerResponse contains the HTTP response code and headers from the server.
   293  	googleapi.ServerResponse `json:"-"`
   294  	// ForceSendFields is a list of field names (e.g. "Entities") to
   295  	// unconditionally include in API requests. By default, fields with empty or
   296  	// default values are omitted from API requests. See
   297  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   298  	// details.
   299  	ForceSendFields []string `json:"-"`
   300  	// NullFields is a list of field names (e.g. "Entities") to include in API
   301  	// requests with the JSON null value. By default, fields with empty values are
   302  	// omitted from API requests. See
   303  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   304  	NullFields []string `json:"-"`
   305  }
   306  
   307  func (s *AnalyzeEntitySentimentResponse) MarshalJSON() ([]byte, error) {
   308  	type NoMethod AnalyzeEntitySentimentResponse
   309  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   310  }
   311  
   312  // AnalyzeSentimentRequest: The sentiment analysis request message.
   313  type AnalyzeSentimentRequest struct {
   314  	// Document: Required. Input document.
   315  	Document *Document `json:"document,omitempty"`
   316  	// EncodingType: The encoding type used by the API to calculate sentence
   317  	// offsets.
   318  	//
   319  	// Possible values:
   320  	//   "NONE" - If `EncodingType` is not specified, encoding-dependent
   321  	// information (such as `begin_offset`) will be set at `-1`.
   322  	//   "UTF8" - Encoding-dependent information (such as `begin_offset`) is
   323  	// calculated based on the UTF-8 encoding of the input. C++ and Go are examples
   324  	// of languages that use this encoding natively.
   325  	//   "UTF16" - Encoding-dependent information (such as `begin_offset`) is
   326  	// calculated based on the UTF-16 encoding of the input. Java and JavaScript
   327  	// are examples of languages that use this encoding natively.
   328  	//   "UTF32" - Encoding-dependent information (such as `begin_offset`) is
   329  	// calculated based on the UTF-32 encoding of the input. Python is an example
   330  	// of a language that uses this encoding natively.
   331  	EncodingType string `json:"encodingType,omitempty"`
   332  	// ForceSendFields is a list of field names (e.g. "Document") to
   333  	// unconditionally include in API requests. By default, fields with empty or
   334  	// default values are omitted from API requests. See
   335  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   336  	// details.
   337  	ForceSendFields []string `json:"-"`
   338  	// NullFields is a list of field names (e.g. "Document") to include in API
   339  	// requests with the JSON null value. By default, fields with empty values are
   340  	// omitted from API requests. See
   341  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   342  	NullFields []string `json:"-"`
   343  }
   344  
   345  func (s *AnalyzeSentimentRequest) MarshalJSON() ([]byte, error) {
   346  	type NoMethod AnalyzeSentimentRequest
   347  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   348  }
   349  
   350  // AnalyzeSentimentResponse: The sentiment analysis response message.
   351  type AnalyzeSentimentResponse struct {
   352  	// DocumentSentiment: The overall sentiment of the input document.
   353  	DocumentSentiment *Sentiment `json:"documentSentiment,omitempty"`
   354  	// Language: The language of the text, which will be the same as the language
   355  	// specified in the request or, if not specified, the automatically-detected
   356  	// language. See Document.language field for more details.
   357  	Language string `json:"language,omitempty"`
   358  	// Sentences: The sentiment for all the sentences in the document.
   359  	Sentences []*Sentence `json:"sentences,omitempty"`
   360  
   361  	// ServerResponse contains the HTTP response code and headers from the server.
   362  	googleapi.ServerResponse `json:"-"`
   363  	// ForceSendFields is a list of field names (e.g. "DocumentSentiment") to
   364  	// unconditionally include in API requests. By default, fields with empty or
   365  	// default values are omitted from API requests. See
   366  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   367  	// details.
   368  	ForceSendFields []string `json:"-"`
   369  	// NullFields is a list of field names (e.g. "DocumentSentiment") to include in
   370  	// API requests with the JSON null value. By default, fields with empty values
   371  	// are omitted from API requests. See
   372  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   373  	NullFields []string `json:"-"`
   374  }
   375  
   376  func (s *AnalyzeSentimentResponse) MarshalJSON() ([]byte, error) {
   377  	type NoMethod AnalyzeSentimentResponse
   378  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   379  }
   380  
   381  // AnalyzeSyntaxRequest: The syntax analysis request message.
   382  type AnalyzeSyntaxRequest struct {
   383  	// Document: Required. Input document.
   384  	Document *Document `json:"document,omitempty"`
   385  	// EncodingType: The encoding type used by the API to calculate offsets.
   386  	//
   387  	// Possible values:
   388  	//   "NONE" - If `EncodingType` is not specified, encoding-dependent
   389  	// information (such as `begin_offset`) will be set at `-1`.
   390  	//   "UTF8" - Encoding-dependent information (such as `begin_offset`) is
   391  	// calculated based on the UTF-8 encoding of the input. C++ and Go are examples
   392  	// of languages that use this encoding natively.
   393  	//   "UTF16" - Encoding-dependent information (such as `begin_offset`) is
   394  	// calculated based on the UTF-16 encoding of the input. Java and JavaScript
   395  	// are examples of languages that use this encoding natively.
   396  	//   "UTF32" - Encoding-dependent information (such as `begin_offset`) is
   397  	// calculated based on the UTF-32 encoding of the input. Python is an example
   398  	// of a language that uses this encoding natively.
   399  	EncodingType string `json:"encodingType,omitempty"`
   400  	// ForceSendFields is a list of field names (e.g. "Document") to
   401  	// unconditionally include in API requests. By default, fields with empty or
   402  	// default values are omitted from API requests. See
   403  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   404  	// details.
   405  	ForceSendFields []string `json:"-"`
   406  	// NullFields is a list of field names (e.g. "Document") to include in API
   407  	// requests with the JSON null value. By default, fields with empty values are
   408  	// omitted from API requests. See
   409  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   410  	NullFields []string `json:"-"`
   411  }
   412  
   413  func (s *AnalyzeSyntaxRequest) MarshalJSON() ([]byte, error) {
   414  	type NoMethod AnalyzeSyntaxRequest
   415  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   416  }
   417  
   418  // AnalyzeSyntaxResponse: The syntax analysis response message.
   419  type AnalyzeSyntaxResponse struct {
   420  	// Language: The language of the text, which will be the same as the language
   421  	// specified in the request or, if not specified, the automatically-detected
   422  	// language. See Document.language field for more details.
   423  	Language string `json:"language,omitempty"`
   424  	// Sentences: Sentences in the input document.
   425  	Sentences []*Sentence `json:"sentences,omitempty"`
   426  	// Tokens: Tokens, along with their syntactic information, in the input
   427  	// document.
   428  	Tokens []*Token `json:"tokens,omitempty"`
   429  
   430  	// ServerResponse contains the HTTP response code and headers from the server.
   431  	googleapi.ServerResponse `json:"-"`
   432  	// ForceSendFields is a list of field names (e.g. "Language") to
   433  	// unconditionally include in API requests. By default, fields with empty or
   434  	// default values are omitted from API requests. See
   435  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   436  	// details.
   437  	ForceSendFields []string `json:"-"`
   438  	// NullFields is a list of field names (e.g. "Language") to include in API
   439  	// requests with the JSON null value. By default, fields with empty values are
   440  	// omitted from API requests. See
   441  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   442  	NullFields []string `json:"-"`
   443  }
   444  
   445  func (s *AnalyzeSyntaxResponse) MarshalJSON() ([]byte, error) {
   446  	type NoMethod AnalyzeSyntaxResponse
   447  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   448  }
   449  
   450  // AnnotateTextRequest: The request message for the text annotation API, which
   451  // can perform multiple analysis types (sentiment, entities, and syntax) in one
   452  // call.
   453  type AnnotateTextRequest struct {
   454  	// Document: Required. Input document.
   455  	Document *Document `json:"document,omitempty"`
   456  	// EncodingType: The encoding type used by the API to calculate offsets.
   457  	//
   458  	// Possible values:
   459  	//   "NONE" - If `EncodingType` is not specified, encoding-dependent
   460  	// information (such as `begin_offset`) will be set at `-1`.
   461  	//   "UTF8" - Encoding-dependent information (such as `begin_offset`) is
   462  	// calculated based on the UTF-8 encoding of the input. C++ and Go are examples
   463  	// of languages that use this encoding natively.
   464  	//   "UTF16" - Encoding-dependent information (such as `begin_offset`) is
   465  	// calculated based on the UTF-16 encoding of the input. Java and JavaScript
   466  	// are examples of languages that use this encoding natively.
   467  	//   "UTF32" - Encoding-dependent information (such as `begin_offset`) is
   468  	// calculated based on the UTF-32 encoding of the input. Python is an example
   469  	// of a language that uses this encoding natively.
   470  	EncodingType string `json:"encodingType,omitempty"`
   471  	// Features: Required. The enabled features.
   472  	Features *AnnotateTextRequestFeatures `json:"features,omitempty"`
   473  	// ForceSendFields is a list of field names (e.g. "Document") to
   474  	// unconditionally include in API requests. By default, fields with empty or
   475  	// default values are omitted from API requests. See
   476  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   477  	// details.
   478  	ForceSendFields []string `json:"-"`
   479  	// NullFields is a list of field names (e.g. "Document") to include in API
   480  	// requests with the JSON null value. By default, fields with empty values are
   481  	// omitted from API requests. See
   482  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   483  	NullFields []string `json:"-"`
   484  }
   485  
   486  func (s *AnnotateTextRequest) MarshalJSON() ([]byte, error) {
   487  	type NoMethod AnnotateTextRequest
   488  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   489  }
   490  
   491  // AnnotateTextRequestFeatures: All available features for sentiment, syntax,
   492  // and semantic analysis. Setting each one to true will enable that specific
   493  // analysis for the input.
   494  type AnnotateTextRequestFeatures struct {
   495  	// ClassificationModelOptions: Optional. The model options to use for
   496  	// classification. Defaults to v1 options if not specified. Only used if
   497  	// `classify_text` is set to true.
   498  	ClassificationModelOptions *ClassificationModelOptions `json:"classificationModelOptions,omitempty"`
   499  	// ClassifyText: Classify the full document into categories.
   500  	ClassifyText bool `json:"classifyText,omitempty"`
   501  	// ExtractDocumentSentiment: Extract document-level sentiment.
   502  	ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"`
   503  	// ExtractEntities: Extract entities.
   504  	ExtractEntities bool `json:"extractEntities,omitempty"`
   505  	// ExtractEntitySentiment: Extract entities and their associated sentiment.
   506  	ExtractEntitySentiment bool `json:"extractEntitySentiment,omitempty"`
   507  	// ExtractSyntax: Extract syntax information.
   508  	ExtractSyntax bool `json:"extractSyntax,omitempty"`
   509  	// ModerateText: Moderate the document for harmful and sensitive categories.
   510  	ModerateText bool `json:"moderateText,omitempty"`
   511  	// ForceSendFields is a list of field names (e.g. "ClassificationModelOptions")
   512  	// to unconditionally include in API requests. By default, fields with empty or
   513  	// default values are omitted from API requests. See
   514  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   515  	// details.
   516  	ForceSendFields []string `json:"-"`
   517  	// NullFields is a list of field names (e.g. "ClassificationModelOptions") to
   518  	// include in API requests with the JSON null value. By default, fields with
   519  	// empty values are omitted from API requests. See
   520  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   521  	NullFields []string `json:"-"`
   522  }
   523  
   524  func (s *AnnotateTextRequestFeatures) MarshalJSON() ([]byte, error) {
   525  	type NoMethod AnnotateTextRequestFeatures
   526  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   527  }
   528  
   529  // AnnotateTextResponse: The text annotations response message.
   530  type AnnotateTextResponse struct {
   531  	// Categories: Categories identified in the input document.
   532  	Categories []*ClassificationCategory `json:"categories,omitempty"`
   533  	// DocumentSentiment: The overall sentiment for the document. Populated if the
   534  	// user enables AnnotateTextRequest.Features.extract_document_sentiment.
   535  	DocumentSentiment *Sentiment `json:"documentSentiment,omitempty"`
   536  	// Entities: Entities, along with their semantic information, in the input
   537  	// document. Populated if the user enables
   538  	// AnnotateTextRequest.Features.extract_entities.
   539  	Entities []*Entity `json:"entities,omitempty"`
   540  	// Language: The language of the text, which will be the same as the language
   541  	// specified in the request or, if not specified, the automatically-detected
   542  	// language. See Document.language field for more details.
   543  	Language string `json:"language,omitempty"`
   544  	// ModerationCategories: Harmful and sensitive categories identified in the
   545  	// input document.
   546  	ModerationCategories []*ClassificationCategory `json:"moderationCategories,omitempty"`
   547  	// Sentences: Sentences in the input document. Populated if the user enables
   548  	// AnnotateTextRequest.Features.extract_syntax.
   549  	Sentences []*Sentence `json:"sentences,omitempty"`
   550  	// Tokens: Tokens, along with their syntactic information, in the input
   551  	// document. Populated if the user enables
   552  	// AnnotateTextRequest.Features.extract_syntax.
   553  	Tokens []*Token `json:"tokens,omitempty"`
   554  
   555  	// ServerResponse contains the HTTP response code and headers from the server.
   556  	googleapi.ServerResponse `json:"-"`
   557  	// ForceSendFields is a list of field names (e.g. "Categories") to
   558  	// unconditionally include in API requests. By default, fields with empty or
   559  	// default values are omitted from API requests. See
   560  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   561  	// details.
   562  	ForceSendFields []string `json:"-"`
   563  	// NullFields is a list of field names (e.g. "Categories") to include in API
   564  	// requests with the JSON null value. By default, fields with empty values are
   565  	// omitted from API requests. See
   566  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   567  	NullFields []string `json:"-"`
   568  }
   569  
   570  func (s *AnnotateTextResponse) MarshalJSON() ([]byte, error) {
   571  	type NoMethod AnnotateTextResponse
   572  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   573  }
   574  
   575  // ClassificationCategory: Represents a category returned from the text
   576  // classifier.
   577  type ClassificationCategory struct {
   578  	// Confidence: The classifier's confidence of the category. Number represents
   579  	// how certain the classifier is that this category represents the given text.
   580  	Confidence float64 `json:"confidence,omitempty"`
   581  	// Name: The name of the category representing the document.
   582  	Name string `json:"name,omitempty"`
   583  	// ForceSendFields is a list of field names (e.g. "Confidence") to
   584  	// unconditionally include in API requests. By default, fields with empty or
   585  	// default values are omitted from API requests. See
   586  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   587  	// details.
   588  	ForceSendFields []string `json:"-"`
   589  	// NullFields is a list of field names (e.g. "Confidence") to include in API
   590  	// requests with the JSON null value. By default, fields with empty values are
   591  	// omitted from API requests. See
   592  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   593  	NullFields []string `json:"-"`
   594  }
   595  
   596  func (s *ClassificationCategory) MarshalJSON() ([]byte, error) {
   597  	type NoMethod ClassificationCategory
   598  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   599  }
   600  
   601  func (s *ClassificationCategory) UnmarshalJSON(data []byte) error {
   602  	type NoMethod ClassificationCategory
   603  	var s1 struct {
   604  		Confidence gensupport.JSONFloat64 `json:"confidence"`
   605  		*NoMethod
   606  	}
   607  	s1.NoMethod = (*NoMethod)(s)
   608  	if err := json.Unmarshal(data, &s1); err != nil {
   609  		return err
   610  	}
   611  	s.Confidence = float64(s1.Confidence)
   612  	return nil
   613  }
   614  
   615  // ClassificationModelOptions: Model options available for classification
   616  // requests.
   617  type ClassificationModelOptions struct {
   618  	// V1Model: Setting this field will use the V1 model and V1 content categories
   619  	// version. The V1 model is a legacy model; support for this will be
   620  	// discontinued in the future.
   621  	V1Model *ClassificationModelOptionsV1Model `json:"v1Model,omitempty"`
   622  	// V2Model: Setting this field will use the V2 model with the appropriate
   623  	// content categories version. The V2 model is a better performing model.
   624  	V2Model *ClassificationModelOptionsV2Model `json:"v2Model,omitempty"`
   625  	// ForceSendFields is a list of field names (e.g. "V1Model") to unconditionally
   626  	// include in API requests. By default, fields with empty or default values are
   627  	// omitted from API requests. See
   628  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   629  	// details.
   630  	ForceSendFields []string `json:"-"`
   631  	// NullFields is a list of field names (e.g. "V1Model") to include in API
   632  	// requests with the JSON null value. By default, fields with empty values are
   633  	// omitted from API requests. See
   634  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   635  	NullFields []string `json:"-"`
   636  }
   637  
   638  func (s *ClassificationModelOptions) MarshalJSON() ([]byte, error) {
   639  	type NoMethod ClassificationModelOptions
   640  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   641  }
   642  
   643  // ClassificationModelOptionsV1Model: Options for the V1 model.
   644  type ClassificationModelOptionsV1Model struct {
   645  }
   646  
   647  // ClassificationModelOptionsV2Model: Options for the V2 model.
   648  type ClassificationModelOptionsV2Model struct {
   649  	// ContentCategoriesVersion: The content categories used for classification.
   650  	//
   651  	// Possible values:
   652  	//   "CONTENT_CATEGORIES_VERSION_UNSPECIFIED" - If `ContentCategoriesVersion`
   653  	// is not specified, this option will default to `V1`.
   654  	//   "V1" - Legacy content categories of our initial launch in 2017.
   655  	//   "V2" - Updated content categories in 2022.
   656  	ContentCategoriesVersion string `json:"contentCategoriesVersion,omitempty"`
   657  	// ForceSendFields is a list of field names (e.g. "ContentCategoriesVersion")
   658  	// to unconditionally include in API requests. By default, fields with empty or
   659  	// default values are omitted from API requests. See
   660  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   661  	// details.
   662  	ForceSendFields []string `json:"-"`
   663  	// NullFields is a list of field names (e.g. "ContentCategoriesVersion") to
   664  	// include in API requests with the JSON null value. By default, fields with
   665  	// empty values are omitted from API requests. See
   666  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   667  	NullFields []string `json:"-"`
   668  }
   669  
   670  func (s *ClassificationModelOptionsV2Model) MarshalJSON() ([]byte, error) {
   671  	type NoMethod ClassificationModelOptionsV2Model
   672  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   673  }
   674  
   675  // ClassifyTextRequest: The document classification request message.
   676  type ClassifyTextRequest struct {
   677  	// ClassificationModelOptions: Optional. Model options to use for
   678  	// classification. Defaults to v1 options if not specified.
   679  	ClassificationModelOptions *ClassificationModelOptions `json:"classificationModelOptions,omitempty"`
   680  	// Document: Required. Input document.
   681  	Document *Document `json:"document,omitempty"`
   682  	// ForceSendFields is a list of field names (e.g. "ClassificationModelOptions")
   683  	// to unconditionally include in API requests. By default, fields with empty or
   684  	// default values are omitted from API requests. See
   685  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   686  	// details.
   687  	ForceSendFields []string `json:"-"`
   688  	// NullFields is a list of field names (e.g. "ClassificationModelOptions") to
   689  	// include in API requests with the JSON null value. By default, fields with
   690  	// empty values are omitted from API requests. See
   691  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   692  	NullFields []string `json:"-"`
   693  }
   694  
   695  func (s *ClassifyTextRequest) MarshalJSON() ([]byte, error) {
   696  	type NoMethod ClassifyTextRequest
   697  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   698  }
   699  
   700  // ClassifyTextResponse: The document classification response message.
   701  type ClassifyTextResponse struct {
   702  	// Categories: Categories representing the input document.
   703  	Categories []*ClassificationCategory `json:"categories,omitempty"`
   704  
   705  	// ServerResponse contains the HTTP response code and headers from the server.
   706  	googleapi.ServerResponse `json:"-"`
   707  	// ForceSendFields is a list of field names (e.g. "Categories") to
   708  	// unconditionally include in API requests. By default, fields with empty or
   709  	// default values are omitted from API requests. See
   710  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   711  	// details.
   712  	ForceSendFields []string `json:"-"`
   713  	// NullFields is a list of field names (e.g. "Categories") to include in API
   714  	// requests with the JSON null value. By default, fields with empty values are
   715  	// omitted from API requests. See
   716  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   717  	NullFields []string `json:"-"`
   718  }
   719  
   720  func (s *ClassifyTextResponse) MarshalJSON() ([]byte, error) {
   721  	type NoMethod ClassifyTextResponse
   722  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   723  }
   724  
   725  // Color: Represents a color in the RGBA color space. This representation is
   726  // designed for simplicity of conversion to and from color representations in
   727  // various languages over compactness. For example, the fields of this
   728  // representation can be trivially provided to the constructor of
   729  // `java.awt.Color` in Java; it can also be trivially provided to UIColor's
   730  // `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little
   731  // work, it can be easily formatted into a CSS `rgba()` string in JavaScript.
   732  // This reference page doesn't have information about the absolute color space
   733  // that should be used to interpret the RGB value—for example, sRGB, Adobe
   734  // RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB
   735  // color space. When color equality needs to be decided, implementations,
   736  // unless documented otherwise, treat two colors as equal if all their red,
   737  // green, blue, and alpha values each differ by at most `1e-5`. Example (Java):
   738  // import com.google.type.Color; // ... public static java.awt.Color
   739  // fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ?
   740  // protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color(
   741  // protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); }
   742  // public static Color toProto(java.awt.Color color) { float red = (float)
   743  // color.getRed(); float green = (float) color.getGreen(); float blue = (float)
   744  // color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder =
   745  // Color .newBuilder() .setRed(red / denominator) .setGreen(green /
   746  // denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if
   747  // (alpha != 255) { result.setAlpha( FloatValue .newBuilder()
   748  // .setValue(((float) alpha) / denominator) .build()); } return
   749  // resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static
   750  // UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float
   751  // green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
   752  // alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
   753  // nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red
   754  // green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color)
   755  // { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green
   756  // blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc]
   757  // init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue];
   758  // if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; }
   759  // [result autorelease]; return result; } // ... Example (JavaScript): // ...
   760  // var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red ||
   761  // 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue
   762  // || 0.0; var red = Math.floor(redFrac * 255); var green =
   763  // Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if
   764  // (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var
   765  // alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green,
   766  // blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”);
   767  // }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new
   768  // Number((red << 16) | (green << 8) | blue); var hexString =
   769  // rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
   770  // resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) {
   771  // resultBuilder.push('0'); } resultBuilder.push(hexString); return
   772  // resultBuilder.join(”); }; // ...
   773  type Color struct {
   774  	// Alpha: The fraction of this color that should be applied to the pixel. That
   775  	// is, the final pixel color is defined by the equation: `pixel color = alpha *
   776  	// (this color) + (1.0 - alpha) * (background color)` This means that a value
   777  	// of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a
   778  	// completely transparent color. This uses a wrapper message rather than a
   779  	// simple float scalar so that it is possible to distinguish between a default
   780  	// value and the value being unset. If omitted, this color object is rendered
   781  	// as a solid color (as if the alpha value had been explicitly given a value of
   782  	// 1.0).
   783  	Alpha float64 `json:"alpha,omitempty"`
   784  	// Blue: The amount of blue in the color as a value in the interval [0, 1].
   785  	Blue float64 `json:"blue,omitempty"`
   786  	// Green: The amount of green in the color as a value in the interval [0, 1].
   787  	Green float64 `json:"green,omitempty"`
   788  	// Red: The amount of red in the color as a value in the interval [0, 1].
   789  	Red float64 `json:"red,omitempty"`
   790  	// ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally
   791  	// include in API requests. By default, fields with empty or default values are
   792  	// omitted from API requests. See
   793  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   794  	// details.
   795  	ForceSendFields []string `json:"-"`
   796  	// NullFields is a list of field names (e.g. "Alpha") to include in API
   797  	// requests with the JSON null value. By default, fields with empty values are
   798  	// omitted from API requests. See
   799  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   800  	NullFields []string `json:"-"`
   801  }
   802  
   803  func (s *Color) MarshalJSON() ([]byte, error) {
   804  	type NoMethod Color
   805  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   806  }
   807  
   808  func (s *Color) UnmarshalJSON(data []byte) error {
   809  	type NoMethod Color
   810  	var s1 struct {
   811  		Alpha gensupport.JSONFloat64 `json:"alpha"`
   812  		Blue  gensupport.JSONFloat64 `json:"blue"`
   813  		Green gensupport.JSONFloat64 `json:"green"`
   814  		Red   gensupport.JSONFloat64 `json:"red"`
   815  		*NoMethod
   816  	}
   817  	s1.NoMethod = (*NoMethod)(s)
   818  	if err := json.Unmarshal(data, &s1); err != nil {
   819  		return err
   820  	}
   821  	s.Alpha = float64(s1.Alpha)
   822  	s.Blue = float64(s1.Blue)
   823  	s.Green = float64(s1.Green)
   824  	s.Red = float64(s1.Red)
   825  	return nil
   826  }
   827  
   828  // CpuMetric: Metric for billing reports.
   829  type CpuMetric struct {
   830  	// CoreNumber: Required. Number of CPU cores.
   831  	CoreNumber int64 `json:"coreNumber,omitempty,string"`
   832  	// CoreSec: Required. Total seconds of core usage, e.g. 4.
   833  	CoreSec int64 `json:"coreSec,omitempty,string"`
   834  	// CpuType: Required. Type of cpu, e.g. N2.
   835  	//
   836  	// Possible values:
   837  	//   "UNKNOWN_CPU_TYPE"
   838  	//   "A2" - GPU-based machine, skip quota reporting.
   839  	//   "A3" - GPU-based machine, skip quota reporting.
   840  	//   "C2" - COMPUTE_OPTIMIZED
   841  	//   "C2D"
   842  	//   "CUSTOM"
   843  	//   "E2"
   844  	//   "G2" - GPU-based machine, skip quota reporting.
   845  	//   "C3"
   846  	//   "M2" - MEMORY_OPTIMIZED_UPGRADE_PREMIUM
   847  	//   "M1" - MEMORY_OPTIMIZED
   848  	//   "N1"
   849  	//   "N2_CUSTOM"
   850  	//   "N2"
   851  	//   "N2D"
   852  	CpuType string `json:"cpuType,omitempty"`
   853  	// MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4.
   854  	//
   855  	// Possible values:
   856  	//   "UNKNOWN_MACHINE_SPEC"
   857  	//   "N1_STANDARD_2"
   858  	//   "N1_STANDARD_4"
   859  	//   "N1_STANDARD_8"
   860  	//   "N1_STANDARD_16"
   861  	//   "N1_STANDARD_32"
   862  	//   "N1_STANDARD_64"
   863  	//   "N1_STANDARD_96"
   864  	//   "N1_HIGHMEM_2"
   865  	//   "N1_HIGHMEM_4"
   866  	//   "N1_HIGHMEM_8"
   867  	//   "N1_HIGHMEM_16"
   868  	//   "N1_HIGHMEM_32"
   869  	//   "N1_HIGHMEM_64"
   870  	//   "N1_HIGHMEM_96"
   871  	//   "N1_HIGHCPU_2"
   872  	//   "N1_HIGHCPU_4"
   873  	//   "N1_HIGHCPU_8"
   874  	//   "N1_HIGHCPU_16"
   875  	//   "N1_HIGHCPU_32"
   876  	//   "N1_HIGHCPU_64"
   877  	//   "N1_HIGHCPU_96"
   878  	//   "A2_HIGHGPU_1G"
   879  	//   "A2_HIGHGPU_2G"
   880  	//   "A2_HIGHGPU_4G"
   881  	//   "A2_HIGHGPU_8G"
   882  	//   "A2_MEGAGPU_16G"
   883  	//   "A2_ULTRAGPU_1G"
   884  	//   "A2_ULTRAGPU_2G"
   885  	//   "A2_ULTRAGPU_4G"
   886  	//   "A2_ULTRAGPU_8G"
   887  	//   "A3_HIGHGPU_8G"
   888  	//   "E2_STANDARD_2"
   889  	//   "E2_STANDARD_4"
   890  	//   "E2_STANDARD_8"
   891  	//   "E2_STANDARD_16"
   892  	//   "E2_STANDARD_32"
   893  	//   "E2_HIGHMEM_2"
   894  	//   "E2_HIGHMEM_4"
   895  	//   "E2_HIGHMEM_8"
   896  	//   "E2_HIGHMEM_16"
   897  	//   "E2_HIGHCPU_2"
   898  	//   "E2_HIGHCPU_4"
   899  	//   "E2_HIGHCPU_8"
   900  	//   "E2_HIGHCPU_16"
   901  	//   "E2_HIGHCPU_32"
   902  	//   "N2_STANDARD_2"
   903  	//   "N2_STANDARD_4"
   904  	//   "N2_STANDARD_8"
   905  	//   "N2_STANDARD_16"
   906  	//   "N2_STANDARD_32"
   907  	//   "N2_STANDARD_48"
   908  	//   "N2_STANDARD_64"
   909  	//   "N2_STANDARD_80"
   910  	//   "N2_STANDARD_96"
   911  	//   "N2_STANDARD_128"
   912  	//   "N2_HIGHMEM_2"
   913  	//   "N2_HIGHMEM_4"
   914  	//   "N2_HIGHMEM_8"
   915  	//   "N2_HIGHMEM_16"
   916  	//   "N2_HIGHMEM_32"
   917  	//   "N2_HIGHMEM_48"
   918  	//   "N2_HIGHMEM_64"
   919  	//   "N2_HIGHMEM_80"
   920  	//   "N2_HIGHMEM_96"
   921  	//   "N2_HIGHMEM_128"
   922  	//   "N2_HIGHCPU_2"
   923  	//   "N2_HIGHCPU_4"
   924  	//   "N2_HIGHCPU_8"
   925  	//   "N2_HIGHCPU_16"
   926  	//   "N2_HIGHCPU_32"
   927  	//   "N2_HIGHCPU_48"
   928  	//   "N2_HIGHCPU_64"
   929  	//   "N2_HIGHCPU_80"
   930  	//   "N2_HIGHCPU_96"
   931  	//   "N2D_STANDARD_2"
   932  	//   "N2D_STANDARD_4"
   933  	//   "N2D_STANDARD_8"
   934  	//   "N2D_STANDARD_16"
   935  	//   "N2D_STANDARD_32"
   936  	//   "N2D_STANDARD_48"
   937  	//   "N2D_STANDARD_64"
   938  	//   "N2D_STANDARD_80"
   939  	//   "N2D_STANDARD_96"
   940  	//   "N2D_STANDARD_128"
   941  	//   "N2D_STANDARD_224"
   942  	//   "N2D_HIGHMEM_2"
   943  	//   "N2D_HIGHMEM_4"
   944  	//   "N2D_HIGHMEM_8"
   945  	//   "N2D_HIGHMEM_16"
   946  	//   "N2D_HIGHMEM_32"
   947  	//   "N2D_HIGHMEM_48"
   948  	//   "N2D_HIGHMEM_64"
   949  	//   "N2D_HIGHMEM_80"
   950  	//   "N2D_HIGHMEM_96"
   951  	//   "N2D_HIGHCPU_2"
   952  	//   "N2D_HIGHCPU_4"
   953  	//   "N2D_HIGHCPU_8"
   954  	//   "N2D_HIGHCPU_16"
   955  	//   "N2D_HIGHCPU_32"
   956  	//   "N2D_HIGHCPU_48"
   957  	//   "N2D_HIGHCPU_64"
   958  	//   "N2D_HIGHCPU_80"
   959  	//   "N2D_HIGHCPU_96"
   960  	//   "N2D_HIGHCPU_128"
   961  	//   "N2D_HIGHCPU_224"
   962  	//   "C2_STANDARD_4"
   963  	//   "C2_STANDARD_8"
   964  	//   "C2_STANDARD_16"
   965  	//   "C2_STANDARD_30"
   966  	//   "C2_STANDARD_60"
   967  	//   "C2D_STANDARD_2"
   968  	//   "C2D_STANDARD_4"
   969  	//   "C2D_STANDARD_8"
   970  	//   "C2D_STANDARD_16"
   971  	//   "C2D_STANDARD_32"
   972  	//   "C2D_STANDARD_56"
   973  	//   "C2D_STANDARD_112"
   974  	//   "C2D_HIGHCPU_2"
   975  	//   "C2D_HIGHCPU_4"
   976  	//   "C2D_HIGHCPU_8"
   977  	//   "C2D_HIGHCPU_16"
   978  	//   "C2D_HIGHCPU_32"
   979  	//   "C2D_HIGHCPU_56"
   980  	//   "C2D_HIGHCPU_112"
   981  	//   "C2D_HIGHMEM_2"
   982  	//   "C2D_HIGHMEM_4"
   983  	//   "C2D_HIGHMEM_8"
   984  	//   "C2D_HIGHMEM_16"
   985  	//   "C2D_HIGHMEM_32"
   986  	//   "C2D_HIGHMEM_56"
   987  	//   "C2D_HIGHMEM_112"
   988  	//   "G2_STANDARD_4"
   989  	//   "G2_STANDARD_8"
   990  	//   "G2_STANDARD_12"
   991  	//   "G2_STANDARD_16"
   992  	//   "G2_STANDARD_24"
   993  	//   "G2_STANDARD_32"
   994  	//   "G2_STANDARD_48"
   995  	//   "G2_STANDARD_96"
   996  	//   "C3_STANDARD_4"
   997  	//   "C3_STANDARD_8"
   998  	//   "C3_STANDARD_22"
   999  	//   "C3_STANDARD_44"
  1000  	//   "C3_STANDARD_88"
  1001  	//   "C3_STANDARD_176"
  1002  	//   "C3_HIGHCPU_4"
  1003  	//   "C3_HIGHCPU_8"
  1004  	//   "C3_HIGHCPU_22"
  1005  	//   "C3_HIGHCPU_44"
  1006  	//   "C3_HIGHCPU_88"
  1007  	//   "C3_HIGHCPU_176"
  1008  	//   "C3_HIGHMEM_4"
  1009  	//   "C3_HIGHMEM_8"
  1010  	//   "C3_HIGHMEM_22"
  1011  	//   "C3_HIGHMEM_44"
  1012  	//   "C3_HIGHMEM_88"
  1013  	//   "C3_HIGHMEM_176"
  1014  	MachineSpec string `json:"machineSpec,omitempty"`
  1015  	// TrackingLabels: Billing tracking labels. They do not contain any user data
  1016  	// but only the labels set by Vertex Core Infra itself. Tracking labels' keys
  1017  	// are defined with special format: goog-[\p{Ll}\p{N}]+ E.g. "key":
  1018  	// "goog-k8s-cluster-name","value": "us-east1-b4rk"
  1019  	TrackingLabels map[string]string `json:"trackingLabels,omitempty"`
  1020  	// ForceSendFields is a list of field names (e.g. "CoreNumber") to
  1021  	// unconditionally include in API requests. By default, fields with empty or
  1022  	// default values are omitted from API requests. See
  1023  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1024  	// details.
  1025  	ForceSendFields []string `json:"-"`
  1026  	// NullFields is a list of field names (e.g. "CoreNumber") to include in API
  1027  	// requests with the JSON null value. By default, fields with empty values are
  1028  	// omitted from API requests. See
  1029  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1030  	NullFields []string `json:"-"`
  1031  }
  1032  
  1033  func (s *CpuMetric) MarshalJSON() ([]byte, error) {
  1034  	type NoMethod CpuMetric
  1035  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1036  }
  1037  
  1038  // DependencyEdge: Represents dependency parse tree information for a token.
  1039  // (For more information on dependency labels, see
  1040  // http://www.aclweb.org/anthology/P13-2017
  1041  type DependencyEdge struct {
  1042  	// HeadTokenIndex: Represents the head of this token in the dependency tree.
  1043  	// This is the index of the token which has an arc going to this token. The
  1044  	// index is the position of the token in the array of tokens returned by the
  1045  	// API method. If this token is a root token, then the `head_token_index` is
  1046  	// its own index.
  1047  	HeadTokenIndex int64 `json:"headTokenIndex,omitempty"`
  1048  	// Label: The parse label for the token.
  1049  	//
  1050  	// Possible values:
  1051  	//   "UNKNOWN" - Unknown
  1052  	//   "ABBREV" - Abbreviation modifier
  1053  	//   "ACOMP" - Adjectival complement
  1054  	//   "ADVCL" - Adverbial clause modifier
  1055  	//   "ADVMOD" - Adverbial modifier
  1056  	//   "AMOD" - Adjectival modifier of an NP
  1057  	//   "APPOS" - Appositional modifier of an NP
  1058  	//   "ATTR" - Attribute dependent of a copular verb
  1059  	//   "AUX" - Auxiliary (non-main) verb
  1060  	//   "AUXPASS" - Passive auxiliary
  1061  	//   "CC" - Coordinating conjunction
  1062  	//   "CCOMP" - Clausal complement of a verb or adjective
  1063  	//   "CONJ" - Conjunct
  1064  	//   "CSUBJ" - Clausal subject
  1065  	//   "CSUBJPASS" - Clausal passive subject
  1066  	//   "DEP" - Dependency (unable to determine)
  1067  	//   "DET" - Determiner
  1068  	//   "DISCOURSE" - Discourse
  1069  	//   "DOBJ" - Direct object
  1070  	//   "EXPL" - Expletive
  1071  	//   "GOESWITH" - Goes with (part of a word in a text not well edited)
  1072  	//   "IOBJ" - Indirect object
  1073  	//   "MARK" - Marker (word introducing a subordinate clause)
  1074  	//   "MWE" - Multi-word expression
  1075  	//   "MWV" - Multi-word verbal expression
  1076  	//   "NEG" - Negation modifier
  1077  	//   "NN" - Noun compound modifier
  1078  	//   "NPADVMOD" - Noun phrase used as an adverbial modifier
  1079  	//   "NSUBJ" - Nominal subject
  1080  	//   "NSUBJPASS" - Passive nominal subject
  1081  	//   "NUM" - Numeric modifier of a noun
  1082  	//   "NUMBER" - Element of compound number
  1083  	//   "P" - Punctuation mark
  1084  	//   "PARATAXIS" - Parataxis relation
  1085  	//   "PARTMOD" - Participial modifier
  1086  	//   "PCOMP" - The complement of a preposition is a clause
  1087  	//   "POBJ" - Object of a preposition
  1088  	//   "POSS" - Possession modifier
  1089  	//   "POSTNEG" - Postverbal negative particle
  1090  	//   "PRECOMP" - Predicate complement
  1091  	//   "PRECONJ" - Preconjunt
  1092  	//   "PREDET" - Predeterminer
  1093  	//   "PREF" - Prefix
  1094  	//   "PREP" - Prepositional modifier
  1095  	//   "PRONL" - The relationship between a verb and verbal morpheme
  1096  	//   "PRT" - Particle
  1097  	//   "PS" - Associative or possessive marker
  1098  	//   "QUANTMOD" - Quantifier phrase modifier
  1099  	//   "RCMOD" - Relative clause modifier
  1100  	//   "RCMODREL" - Complementizer in relative clause
  1101  	//   "RDROP" - Ellipsis without a preceding predicate
  1102  	//   "REF" - Referent
  1103  	//   "REMNANT" - Remnant
  1104  	//   "REPARANDUM" - Reparandum
  1105  	//   "ROOT" - Root
  1106  	//   "SNUM" - Suffix specifying a unit of number
  1107  	//   "SUFF" - Suffix
  1108  	//   "TMOD" - Temporal modifier
  1109  	//   "TOPIC" - Topic marker
  1110  	//   "VMOD" - Clause headed by an infinite form of the verb that modifies a
  1111  	// noun
  1112  	//   "VOCATIVE" - Vocative
  1113  	//   "XCOMP" - Open clausal complement
  1114  	//   "SUFFIX" - Name suffix
  1115  	//   "TITLE" - Name title
  1116  	//   "ADVPHMOD" - Adverbial phrase modifier
  1117  	//   "AUXCAUS" - Causative auxiliary
  1118  	//   "AUXVV" - Helper auxiliary
  1119  	//   "DTMOD" - Rentaishi (Prenominal modifier)
  1120  	//   "FOREIGN" - Foreign words
  1121  	//   "KW" - Keyword
  1122  	//   "LIST" - List for chains of comparable items
  1123  	//   "NOMC" - Nominalized clause
  1124  	//   "NOMCSUBJ" - Nominalized clausal subject
  1125  	//   "NOMCSUBJPASS" - Nominalized clausal passive
  1126  	//   "NUMC" - Compound of numeric modifier
  1127  	//   "COP" - Copula
  1128  	//   "DISLOCATED" - Dislocated relation (for fronted/topicalized elements)
  1129  	//   "ASP" - Aspect marker
  1130  	//   "GMOD" - Genitive modifier
  1131  	//   "GOBJ" - Genitive object
  1132  	//   "INFMOD" - Infinitival modifier
  1133  	//   "MES" - Measure
  1134  	//   "NCOMP" - Nominal complement of a noun
  1135  	Label string `json:"label,omitempty"`
  1136  	// ForceSendFields is a list of field names (e.g. "HeadTokenIndex") to
  1137  	// unconditionally include in API requests. By default, fields with empty or
  1138  	// default values are omitted from API requests. See
  1139  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1140  	// details.
  1141  	ForceSendFields []string `json:"-"`
  1142  	// NullFields is a list of field names (e.g. "HeadTokenIndex") to include in
  1143  	// API requests with the JSON null value. By default, fields with empty values
  1144  	// are omitted from API requests. See
  1145  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1146  	NullFields []string `json:"-"`
  1147  }
  1148  
  1149  func (s *DependencyEdge) MarshalJSON() ([]byte, error) {
  1150  	type NoMethod DependencyEdge
  1151  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1152  }
  1153  
  1154  type DiskMetric struct {
  1155  	// DiskType: Required. Type of Disk, e.g. REGIONAL_SSD.
  1156  	//
  1157  	// Possible values:
  1158  	//   "UNKNOWN_DISK_TYPE"
  1159  	//   "REGIONAL_SSD"
  1160  	//   "REGIONAL_STORAGE"
  1161  	//   "PD_SSD"
  1162  	//   "PD_STANDARD"
  1163  	//   "STORAGE_SNAPSHOT"
  1164  	DiskType string `json:"diskType,omitempty"`
  1165  	// GibSec: Required. Seconds of physical disk usage, e.g. 3600.
  1166  	GibSec int64 `json:"gibSec,omitempty,string"`
  1167  	// ForceSendFields is a list of field names (e.g. "DiskType") to
  1168  	// unconditionally include in API requests. By default, fields with empty or
  1169  	// default values are omitted from API requests. See
  1170  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1171  	// details.
  1172  	ForceSendFields []string `json:"-"`
  1173  	// NullFields is a list of field names (e.g. "DiskType") to include in API
  1174  	// requests with the JSON null value. By default, fields with empty values are
  1175  	// omitted from API requests. See
  1176  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1177  	NullFields []string `json:"-"`
  1178  }
  1179  
  1180  func (s *DiskMetric) MarshalJSON() ([]byte, error) {
  1181  	type NoMethod DiskMetric
  1182  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1183  }
  1184  
  1185  // Document: Represents the input to API methods.
  1186  type Document struct {
  1187  	// Content: The content of the input in string format. Cloud audit logging
  1188  	// exempt since it is based on user data.
  1189  	Content string `json:"content,omitempty"`
  1190  	// GcsContentUri: The Google Cloud Storage URI where the file content is
  1191  	// located. This URI must be of the form: gs://bucket_name/object_name. For
  1192  	// more details, see https://cloud.google.com/storage/docs/reference-uris.
  1193  	// NOTE: Cloud Storage object versioning is not supported.
  1194  	GcsContentUri string `json:"gcsContentUri,omitempty"`
  1195  	// Language: The language of the document (if not specified, the language is
  1196  	// automatically detected). Both ISO and BCP-47 language codes are accepted.
  1197  	// Language Support (https://cloud.google.com/natural-language/docs/languages)
  1198  	// lists currently supported languages for each API method. If the language
  1199  	// (either specified by the caller or automatically detected) is not supported
  1200  	// by the called API method, an `INVALID_ARGUMENT` error is returned.
  1201  	Language string `json:"language,omitempty"`
  1202  	// Type: Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an
  1203  	// `INVALID_ARGUMENT` error.
  1204  	//
  1205  	// Possible values:
  1206  	//   "TYPE_UNSPECIFIED" - The content type is not specified.
  1207  	//   "PLAIN_TEXT" - Plain text
  1208  	//   "HTML" - HTML
  1209  	Type string `json:"type,omitempty"`
  1210  	// ForceSendFields is a list of field names (e.g. "Content") to unconditionally
  1211  	// include in API requests. By default, fields with empty or default values are
  1212  	// omitted from API requests. See
  1213  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1214  	// details.
  1215  	ForceSendFields []string `json:"-"`
  1216  	// NullFields is a list of field names (e.g. "Content") to include in API
  1217  	// requests with the JSON null value. By default, fields with empty values are
  1218  	// omitted from API requests. See
  1219  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1220  	NullFields []string `json:"-"`
  1221  }
  1222  
  1223  func (s *Document) MarshalJSON() ([]byte, error) {
  1224  	type NoMethod Document
  1225  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1226  }
  1227  
  1228  // Entity: Represents a phrase in the text that is a known entity, such as a
  1229  // person, an organization, or location. The API associates information, such
  1230  // as salience and mentions, with entities.
  1231  type Entity struct {
  1232  	// Mentions: The mentions of this entity in the input document. The API
  1233  	// currently supports proper noun mentions.
  1234  	Mentions []*EntityMention `json:"mentions,omitempty"`
  1235  	// Metadata: Metadata associated with the entity. For most entity types, the
  1236  	// metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID
  1237  	// (`mid`), if they are available. For the metadata associated with other
  1238  	// entity types, see the Type table below.
  1239  	Metadata map[string]string `json:"metadata,omitempty"`
  1240  	// Name: The representative name for the entity.
  1241  	Name string `json:"name,omitempty"`
  1242  	// Salience: The salience score associated with the entity in the [0, 1.0]
  1243  	// range. The salience score for an entity provides information about the
  1244  	// importance or centrality of that entity to the entire document text. Scores
  1245  	// closer to 0 are less salient, while scores closer to 1.0 are highly salient.
  1246  	Salience float64 `json:"salience,omitempty"`
  1247  	// Sentiment: For calls to AnalyzeEntitySentiment or if
  1248  	// AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this
  1249  	// field will contain the aggregate sentiment expressed for this entity in the
  1250  	// provided document.
  1251  	Sentiment *Sentiment `json:"sentiment,omitempty"`
  1252  	// Type: The entity type.
  1253  	//
  1254  	// Possible values:
  1255  	//   "UNKNOWN" - Unknown
  1256  	//   "PERSON" - Person
  1257  	//   "LOCATION" - Location
  1258  	//   "ORGANIZATION" - Organization
  1259  	//   "EVENT" - Event
  1260  	//   "WORK_OF_ART" - Artwork
  1261  	//   "CONSUMER_GOOD" - Consumer product
  1262  	//   "OTHER" - Other types of entities
  1263  	//   "PHONE_NUMBER" - Phone number The metadata lists the phone number,
  1264  	// formatted according to local convention, plus whichever additional elements
  1265  	// appear in the text: * `number` - the actual number, broken down into
  1266  	// sections as per local convention * `national_prefix` - country code, if
  1267  	// detected * `area_code` - region or area code, if detected * `extension` -
  1268  	// phone extension (to be dialed after connection), if detected
  1269  	//   "ADDRESS" - Address The metadata identifies the street number and locality
  1270  	// plus whichever additional elements appear in the text: * `street_number` -
  1271  	// street number * `locality` - city or town * `street_name` - street/route
  1272  	// name, if detected * `postal_code` - postal code, if detected * `country` -
  1273  	// country, if detected< * `broad_region` - administrative area, such as the
  1274  	// state, if detected * `narrow_region` - smaller administrative area, such as
  1275  	// county, if detected * `sublocality` - used in Asian addresses to demark a
  1276  	// district within a city, if detected
  1277  	//   "DATE" - Date The metadata identifies the components of the date: * `year`
  1278  	// - four digit year, if detected * `month` - two digit month number, if
  1279  	// detected * `day` - two digit day number, if detected
  1280  	//   "NUMBER" - Number The metadata is the number itself.
  1281  	//   "PRICE" - Price The metadata identifies the `value` and `currency`.
  1282  	Type string `json:"type,omitempty"`
  1283  	// ForceSendFields is a list of field names (e.g. "Mentions") to
  1284  	// unconditionally include in API requests. By default, fields with empty or
  1285  	// default values are omitted from API requests. See
  1286  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1287  	// details.
  1288  	ForceSendFields []string `json:"-"`
  1289  	// NullFields is a list of field names (e.g. "Mentions") to include in API
  1290  	// requests with the JSON null value. By default, fields with empty values are
  1291  	// omitted from API requests. See
  1292  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1293  	NullFields []string `json:"-"`
  1294  }
  1295  
  1296  func (s *Entity) MarshalJSON() ([]byte, error) {
  1297  	type NoMethod Entity
  1298  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1299  }
  1300  
  1301  func (s *Entity) UnmarshalJSON(data []byte) error {
  1302  	type NoMethod Entity
  1303  	var s1 struct {
  1304  		Salience gensupport.JSONFloat64 `json:"salience"`
  1305  		*NoMethod
  1306  	}
  1307  	s1.NoMethod = (*NoMethod)(s)
  1308  	if err := json.Unmarshal(data, &s1); err != nil {
  1309  		return err
  1310  	}
  1311  	s.Salience = float64(s1.Salience)
  1312  	return nil
  1313  }
  1314  
  1315  // EntityMention: Represents a mention for an entity in the text. Currently,
  1316  // proper noun mentions are supported.
  1317  type EntityMention struct {
  1318  	// Sentiment: For calls to AnalyzeEntitySentiment or if
  1319  	// AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this
  1320  	// field will contain the sentiment expressed for this mention of the entity in
  1321  	// the provided document.
  1322  	Sentiment *Sentiment `json:"sentiment,omitempty"`
  1323  	// Text: The mention text.
  1324  	Text *TextSpan `json:"text,omitempty"`
  1325  	// Type: The type of the entity mention.
  1326  	//
  1327  	// Possible values:
  1328  	//   "TYPE_UNKNOWN" - Unknown
  1329  	//   "PROPER" - Proper name
  1330  	//   "COMMON" - Common noun (or noun compound)
  1331  	Type string `json:"type,omitempty"`
  1332  	// ForceSendFields is a list of field names (e.g. "Sentiment") to
  1333  	// unconditionally include in API requests. By default, fields with empty or
  1334  	// default values are omitted from API requests. See
  1335  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1336  	// details.
  1337  	ForceSendFields []string `json:"-"`
  1338  	// NullFields is a list of field names (e.g. "Sentiment") to include in API
  1339  	// requests with the JSON null value. By default, fields with empty values are
  1340  	// omitted from API requests. See
  1341  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1342  	NullFields []string `json:"-"`
  1343  }
  1344  
  1345  func (s *EntityMention) MarshalJSON() ([]byte, error) {
  1346  	type NoMethod EntityMention
  1347  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1348  }
  1349  
  1350  type GpuMetric struct {
  1351  	// GpuSec: Required. Seconds of GPU usage, e.g. 3600.
  1352  	GpuSec int64 `json:"gpuSec,omitempty,string"`
  1353  	// GpuType: Required. Type of GPU, e.g. NVIDIA_TESLA_V100.
  1354  	//
  1355  	// Possible values:
  1356  	//   "UNKNOWN_GPU_TYPE"
  1357  	//   "NVIDIA_TESLA_A100"
  1358  	//   "NVIDIA_A100_80GB"
  1359  	//   "NVIDIA_TESLA_K80"
  1360  	//   "NVIDIA_L4"
  1361  	//   "NVIDIA_TESLA_P100"
  1362  	//   "NVIDIA_TESLA_P4"
  1363  	//   "NVIDIA_TESLA_T4"
  1364  	//   "NVIDIA_TESLA_V100"
  1365  	//   "NVIDIA_H100_80GB"
  1366  	GpuType string `json:"gpuType,omitempty"`
  1367  	// MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4.
  1368  	//
  1369  	// Possible values:
  1370  	//   "UNKNOWN_MACHINE_SPEC"
  1371  	//   "N1_STANDARD_2"
  1372  	//   "N1_STANDARD_4"
  1373  	//   "N1_STANDARD_8"
  1374  	//   "N1_STANDARD_16"
  1375  	//   "N1_STANDARD_32"
  1376  	//   "N1_STANDARD_64"
  1377  	//   "N1_STANDARD_96"
  1378  	//   "N1_HIGHMEM_2"
  1379  	//   "N1_HIGHMEM_4"
  1380  	//   "N1_HIGHMEM_8"
  1381  	//   "N1_HIGHMEM_16"
  1382  	//   "N1_HIGHMEM_32"
  1383  	//   "N1_HIGHMEM_64"
  1384  	//   "N1_HIGHMEM_96"
  1385  	//   "N1_HIGHCPU_2"
  1386  	//   "N1_HIGHCPU_4"
  1387  	//   "N1_HIGHCPU_8"
  1388  	//   "N1_HIGHCPU_16"
  1389  	//   "N1_HIGHCPU_32"
  1390  	//   "N1_HIGHCPU_64"
  1391  	//   "N1_HIGHCPU_96"
  1392  	//   "A2_HIGHGPU_1G"
  1393  	//   "A2_HIGHGPU_2G"
  1394  	//   "A2_HIGHGPU_4G"
  1395  	//   "A2_HIGHGPU_8G"
  1396  	//   "A2_MEGAGPU_16G"
  1397  	//   "A2_ULTRAGPU_1G"
  1398  	//   "A2_ULTRAGPU_2G"
  1399  	//   "A2_ULTRAGPU_4G"
  1400  	//   "A2_ULTRAGPU_8G"
  1401  	//   "A3_HIGHGPU_8G"
  1402  	//   "E2_STANDARD_2"
  1403  	//   "E2_STANDARD_4"
  1404  	//   "E2_STANDARD_8"
  1405  	//   "E2_STANDARD_16"
  1406  	//   "E2_STANDARD_32"
  1407  	//   "E2_HIGHMEM_2"
  1408  	//   "E2_HIGHMEM_4"
  1409  	//   "E2_HIGHMEM_8"
  1410  	//   "E2_HIGHMEM_16"
  1411  	//   "E2_HIGHCPU_2"
  1412  	//   "E2_HIGHCPU_4"
  1413  	//   "E2_HIGHCPU_8"
  1414  	//   "E2_HIGHCPU_16"
  1415  	//   "E2_HIGHCPU_32"
  1416  	//   "N2_STANDARD_2"
  1417  	//   "N2_STANDARD_4"
  1418  	//   "N2_STANDARD_8"
  1419  	//   "N2_STANDARD_16"
  1420  	//   "N2_STANDARD_32"
  1421  	//   "N2_STANDARD_48"
  1422  	//   "N2_STANDARD_64"
  1423  	//   "N2_STANDARD_80"
  1424  	//   "N2_STANDARD_96"
  1425  	//   "N2_STANDARD_128"
  1426  	//   "N2_HIGHMEM_2"
  1427  	//   "N2_HIGHMEM_4"
  1428  	//   "N2_HIGHMEM_8"
  1429  	//   "N2_HIGHMEM_16"
  1430  	//   "N2_HIGHMEM_32"
  1431  	//   "N2_HIGHMEM_48"
  1432  	//   "N2_HIGHMEM_64"
  1433  	//   "N2_HIGHMEM_80"
  1434  	//   "N2_HIGHMEM_96"
  1435  	//   "N2_HIGHMEM_128"
  1436  	//   "N2_HIGHCPU_2"
  1437  	//   "N2_HIGHCPU_4"
  1438  	//   "N2_HIGHCPU_8"
  1439  	//   "N2_HIGHCPU_16"
  1440  	//   "N2_HIGHCPU_32"
  1441  	//   "N2_HIGHCPU_48"
  1442  	//   "N2_HIGHCPU_64"
  1443  	//   "N2_HIGHCPU_80"
  1444  	//   "N2_HIGHCPU_96"
  1445  	//   "N2D_STANDARD_2"
  1446  	//   "N2D_STANDARD_4"
  1447  	//   "N2D_STANDARD_8"
  1448  	//   "N2D_STANDARD_16"
  1449  	//   "N2D_STANDARD_32"
  1450  	//   "N2D_STANDARD_48"
  1451  	//   "N2D_STANDARD_64"
  1452  	//   "N2D_STANDARD_80"
  1453  	//   "N2D_STANDARD_96"
  1454  	//   "N2D_STANDARD_128"
  1455  	//   "N2D_STANDARD_224"
  1456  	//   "N2D_HIGHMEM_2"
  1457  	//   "N2D_HIGHMEM_4"
  1458  	//   "N2D_HIGHMEM_8"
  1459  	//   "N2D_HIGHMEM_16"
  1460  	//   "N2D_HIGHMEM_32"
  1461  	//   "N2D_HIGHMEM_48"
  1462  	//   "N2D_HIGHMEM_64"
  1463  	//   "N2D_HIGHMEM_80"
  1464  	//   "N2D_HIGHMEM_96"
  1465  	//   "N2D_HIGHCPU_2"
  1466  	//   "N2D_HIGHCPU_4"
  1467  	//   "N2D_HIGHCPU_8"
  1468  	//   "N2D_HIGHCPU_16"
  1469  	//   "N2D_HIGHCPU_32"
  1470  	//   "N2D_HIGHCPU_48"
  1471  	//   "N2D_HIGHCPU_64"
  1472  	//   "N2D_HIGHCPU_80"
  1473  	//   "N2D_HIGHCPU_96"
  1474  	//   "N2D_HIGHCPU_128"
  1475  	//   "N2D_HIGHCPU_224"
  1476  	//   "C2_STANDARD_4"
  1477  	//   "C2_STANDARD_8"
  1478  	//   "C2_STANDARD_16"
  1479  	//   "C2_STANDARD_30"
  1480  	//   "C2_STANDARD_60"
  1481  	//   "C2D_STANDARD_2"
  1482  	//   "C2D_STANDARD_4"
  1483  	//   "C2D_STANDARD_8"
  1484  	//   "C2D_STANDARD_16"
  1485  	//   "C2D_STANDARD_32"
  1486  	//   "C2D_STANDARD_56"
  1487  	//   "C2D_STANDARD_112"
  1488  	//   "C2D_HIGHCPU_2"
  1489  	//   "C2D_HIGHCPU_4"
  1490  	//   "C2D_HIGHCPU_8"
  1491  	//   "C2D_HIGHCPU_16"
  1492  	//   "C2D_HIGHCPU_32"
  1493  	//   "C2D_HIGHCPU_56"
  1494  	//   "C2D_HIGHCPU_112"
  1495  	//   "C2D_HIGHMEM_2"
  1496  	//   "C2D_HIGHMEM_4"
  1497  	//   "C2D_HIGHMEM_8"
  1498  	//   "C2D_HIGHMEM_16"
  1499  	//   "C2D_HIGHMEM_32"
  1500  	//   "C2D_HIGHMEM_56"
  1501  	//   "C2D_HIGHMEM_112"
  1502  	//   "G2_STANDARD_4"
  1503  	//   "G2_STANDARD_8"
  1504  	//   "G2_STANDARD_12"
  1505  	//   "G2_STANDARD_16"
  1506  	//   "G2_STANDARD_24"
  1507  	//   "G2_STANDARD_32"
  1508  	//   "G2_STANDARD_48"
  1509  	//   "G2_STANDARD_96"
  1510  	//   "C3_STANDARD_4"
  1511  	//   "C3_STANDARD_8"
  1512  	//   "C3_STANDARD_22"
  1513  	//   "C3_STANDARD_44"
  1514  	//   "C3_STANDARD_88"
  1515  	//   "C3_STANDARD_176"
  1516  	//   "C3_HIGHCPU_4"
  1517  	//   "C3_HIGHCPU_8"
  1518  	//   "C3_HIGHCPU_22"
  1519  	//   "C3_HIGHCPU_44"
  1520  	//   "C3_HIGHCPU_88"
  1521  	//   "C3_HIGHCPU_176"
  1522  	//   "C3_HIGHMEM_4"
  1523  	//   "C3_HIGHMEM_8"
  1524  	//   "C3_HIGHMEM_22"
  1525  	//   "C3_HIGHMEM_44"
  1526  	//   "C3_HIGHMEM_88"
  1527  	//   "C3_HIGHMEM_176"
  1528  	MachineSpec string `json:"machineSpec,omitempty"`
  1529  	// TrackingLabels: Billing tracking labels. They do not contain any user data
  1530  	// but only the labels set by Vertex Core Infra itself. Tracking labels' keys
  1531  	// are defined with special format: goog-[\p{Ll}\p{N}]+ E.g. "key":
  1532  	// "goog-k8s-cluster-name","value": "us-east1-b4rk"
  1533  	TrackingLabels map[string]string `json:"trackingLabels,omitempty"`
  1534  	// ForceSendFields is a list of field names (e.g. "GpuSec") to unconditionally
  1535  	// include in API requests. By default, fields with empty or default values are
  1536  	// omitted from API requests. See
  1537  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1538  	// details.
  1539  	ForceSendFields []string `json:"-"`
  1540  	// NullFields is a list of field names (e.g. "GpuSec") to include in API
  1541  	// requests with the JSON null value. By default, fields with empty values are
  1542  	// omitted from API requests. See
  1543  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1544  	NullFields []string `json:"-"`
  1545  }
  1546  
  1547  func (s *GpuMetric) MarshalJSON() ([]byte, error) {
  1548  	type NoMethod GpuMetric
  1549  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1550  }
  1551  
  1552  // InfraUsage: Infra Usage of billing metrics. Next ID: 6
  1553  type InfraUsage struct {
  1554  	// CpuMetrics: Aggregated core metrics since requested start_time.
  1555  	CpuMetrics []*CpuMetric `json:"cpuMetrics,omitempty"`
  1556  	// DiskMetrics: Aggregated persistent disk metrics since requested start_time.
  1557  	DiskMetrics []*DiskMetric `json:"diskMetrics,omitempty"`
  1558  	// GpuMetrics: Aggregated gpu metrics since requested start_time.
  1559  	GpuMetrics []*GpuMetric `json:"gpuMetrics,omitempty"`
  1560  	// RamMetrics: Aggregated ram metrics since requested start_time.
  1561  	RamMetrics []*RamMetric `json:"ramMetrics,omitempty"`
  1562  	// TpuMetrics: Aggregated tpu metrics since requested start_time.
  1563  	TpuMetrics []*TpuMetric `json:"tpuMetrics,omitempty"`
  1564  	// ForceSendFields is a list of field names (e.g. "CpuMetrics") to
  1565  	// unconditionally include in API requests. By default, fields with empty or
  1566  	// default values are omitted from API requests. See
  1567  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1568  	// details.
  1569  	ForceSendFields []string `json:"-"`
  1570  	// NullFields is a list of field names (e.g. "CpuMetrics") to include in API
  1571  	// requests with the JSON null value. By default, fields with empty values are
  1572  	// omitted from API requests. See
  1573  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1574  	NullFields []string `json:"-"`
  1575  }
  1576  
  1577  func (s *InfraUsage) MarshalJSON() ([]byte, error) {
  1578  	type NoMethod InfraUsage
  1579  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1580  }
  1581  
  1582  // ModerateTextRequest: The document moderation request message.
  1583  type ModerateTextRequest struct {
  1584  	// Document: Required. Input document.
  1585  	Document *Document `json:"document,omitempty"`
  1586  	// ForceSendFields is a list of field names (e.g. "Document") to
  1587  	// unconditionally include in API requests. By default, fields with empty or
  1588  	// default values are omitted from API requests. See
  1589  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1590  	// details.
  1591  	ForceSendFields []string `json:"-"`
  1592  	// NullFields is a list of field names (e.g. "Document") to include in API
  1593  	// requests with the JSON null value. By default, fields with empty values are
  1594  	// omitted from API requests. See
  1595  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1596  	NullFields []string `json:"-"`
  1597  }
  1598  
  1599  func (s *ModerateTextRequest) MarshalJSON() ([]byte, error) {
  1600  	type NoMethod ModerateTextRequest
  1601  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1602  }
  1603  
  1604  // ModerateTextResponse: The document moderation response message.
  1605  type ModerateTextResponse struct {
  1606  	// ModerationCategories: Harmful and sensitive categories representing the
  1607  	// input document.
  1608  	ModerationCategories []*ClassificationCategory `json:"moderationCategories,omitempty"`
  1609  
  1610  	// ServerResponse contains the HTTP response code and headers from the server.
  1611  	googleapi.ServerResponse `json:"-"`
  1612  	// ForceSendFields is a list of field names (e.g. "ModerationCategories") to
  1613  	// unconditionally include in API requests. By default, fields with empty or
  1614  	// default values are omitted from API requests. See
  1615  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1616  	// details.
  1617  	ForceSendFields []string `json:"-"`
  1618  	// NullFields is a list of field names (e.g. "ModerationCategories") to include
  1619  	// in API requests with the JSON null value. By default, fields with empty
  1620  	// values are omitted from API requests. See
  1621  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1622  	NullFields []string `json:"-"`
  1623  }
  1624  
  1625  func (s *ModerateTextResponse) MarshalJSON() ([]byte, error) {
  1626  	type NoMethod ModerateTextResponse
  1627  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1628  }
  1629  
  1630  // PartOfSpeech: Represents part of speech information for a token. Parts of
  1631  // speech are as defined in
  1632  // http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf
  1633  type PartOfSpeech struct {
  1634  	// Aspect: The grammatical aspect.
  1635  	//
  1636  	// Possible values:
  1637  	//   "ASPECT_UNKNOWN" - Aspect is not applicable in the analyzed language or is
  1638  	// not predicted.
  1639  	//   "PERFECTIVE" - Perfective
  1640  	//   "IMPERFECTIVE" - Imperfective
  1641  	//   "PROGRESSIVE" - Progressive
  1642  	Aspect string `json:"aspect,omitempty"`
  1643  	// Case: The grammatical case.
  1644  	//
  1645  	// Possible values:
  1646  	//   "CASE_UNKNOWN" - Case is not applicable in the analyzed language or is not
  1647  	// predicted.
  1648  	//   "ACCUSATIVE" - Accusative
  1649  	//   "ADVERBIAL" - Adverbial
  1650  	//   "COMPLEMENTIVE" - Complementive
  1651  	//   "DATIVE" - Dative
  1652  	//   "GENITIVE" - Genitive
  1653  	//   "INSTRUMENTAL" - Instrumental
  1654  	//   "LOCATIVE" - Locative
  1655  	//   "NOMINATIVE" - Nominative
  1656  	//   "OBLIQUE" - Oblique
  1657  	//   "PARTITIVE" - Partitive
  1658  	//   "PREPOSITIONAL" - Prepositional
  1659  	//   "REFLEXIVE_CASE" - Reflexive
  1660  	//   "RELATIVE_CASE" - Relative
  1661  	//   "VOCATIVE" - Vocative
  1662  	Case string `json:"case,omitempty"`
  1663  	// Form: The grammatical form.
  1664  	//
  1665  	// Possible values:
  1666  	//   "FORM_UNKNOWN" - Form is not applicable in the analyzed language or is not
  1667  	// predicted.
  1668  	//   "ADNOMIAL" - Adnomial
  1669  	//   "AUXILIARY" - Auxiliary
  1670  	//   "COMPLEMENTIZER" - Complementizer
  1671  	//   "FINAL_ENDING" - Final ending
  1672  	//   "GERUND" - Gerund
  1673  	//   "REALIS" - Realis
  1674  	//   "IRREALIS" - Irrealis
  1675  	//   "SHORT" - Short form
  1676  	//   "LONG" - Long form
  1677  	//   "ORDER" - Order form
  1678  	//   "SPECIFIC" - Specific form
  1679  	Form string `json:"form,omitempty"`
  1680  	// Gender: The grammatical gender.
  1681  	//
  1682  	// Possible values:
  1683  	//   "GENDER_UNKNOWN" - Gender is not applicable in the analyzed language or is
  1684  	// not predicted.
  1685  	//   "FEMININE" - Feminine
  1686  	//   "MASCULINE" - Masculine
  1687  	//   "NEUTER" - Neuter
  1688  	Gender string `json:"gender,omitempty"`
  1689  	// Mood: The grammatical mood.
  1690  	//
  1691  	// Possible values:
  1692  	//   "MOOD_UNKNOWN" - Mood is not applicable in the analyzed language or is not
  1693  	// predicted.
  1694  	//   "CONDITIONAL_MOOD" - Conditional
  1695  	//   "IMPERATIVE" - Imperative
  1696  	//   "INDICATIVE" - Indicative
  1697  	//   "INTERROGATIVE" - Interrogative
  1698  	//   "JUSSIVE" - Jussive
  1699  	//   "SUBJUNCTIVE" - Subjunctive
  1700  	Mood string `json:"mood,omitempty"`
  1701  	// Number: The grammatical number.
  1702  	//
  1703  	// Possible values:
  1704  	//   "NUMBER_UNKNOWN" - Number is not applicable in the analyzed language or is
  1705  	// not predicted.
  1706  	//   "SINGULAR" - Singular
  1707  	//   "PLURAL" - Plural
  1708  	//   "DUAL" - Dual
  1709  	Number string `json:"number,omitempty"`
  1710  	// Person: The grammatical person.
  1711  	//
  1712  	// Possible values:
  1713  	//   "PERSON_UNKNOWN" - Person is not applicable in the analyzed language or is
  1714  	// not predicted.
  1715  	//   "FIRST" - First
  1716  	//   "SECOND" - Second
  1717  	//   "THIRD" - Third
  1718  	//   "REFLEXIVE_PERSON" - Reflexive
  1719  	Person string `json:"person,omitempty"`
  1720  	// Proper: The grammatical properness.
  1721  	//
  1722  	// Possible values:
  1723  	//   "PROPER_UNKNOWN" - Proper is not applicable in the analyzed language or is
  1724  	// not predicted.
  1725  	//   "PROPER" - Proper
  1726  	//   "NOT_PROPER" - Not proper
  1727  	Proper string `json:"proper,omitempty"`
  1728  	// Reciprocity: The grammatical reciprocity.
  1729  	//
  1730  	// Possible values:
  1731  	//   "RECIPROCITY_UNKNOWN" - Reciprocity is not applicable in the analyzed
  1732  	// language or is not predicted.
  1733  	//   "RECIPROCAL" - Reciprocal
  1734  	//   "NON_RECIPROCAL" - Non-reciprocal
  1735  	Reciprocity string `json:"reciprocity,omitempty"`
  1736  	// Tag: The part of speech tag.
  1737  	//
  1738  	// Possible values:
  1739  	//   "UNKNOWN" - Unknown
  1740  	//   "ADJ" - Adjective
  1741  	//   "ADP" - Adposition (preposition and postposition)
  1742  	//   "ADV" - Adverb
  1743  	//   "CONJ" - Conjunction
  1744  	//   "DET" - Determiner
  1745  	//   "NOUN" - Noun (common and proper)
  1746  	//   "NUM" - Cardinal number
  1747  	//   "PRON" - Pronoun
  1748  	//   "PRT" - Particle or other function word
  1749  	//   "PUNCT" - Punctuation
  1750  	//   "VERB" - Verb (all tenses and modes)
  1751  	//   "X" - Other: foreign words, typos, abbreviations
  1752  	//   "AFFIX" - Affix
  1753  	Tag string `json:"tag,omitempty"`
  1754  	// Tense: The grammatical tense.
  1755  	//
  1756  	// Possible values:
  1757  	//   "TENSE_UNKNOWN" - Tense is not applicable in the analyzed language or is
  1758  	// not predicted.
  1759  	//   "CONDITIONAL_TENSE" - Conditional
  1760  	//   "FUTURE" - Future
  1761  	//   "PAST" - Past
  1762  	//   "PRESENT" - Present
  1763  	//   "IMPERFECT" - Imperfect
  1764  	//   "PLUPERFECT" - Pluperfect
  1765  	Tense string `json:"tense,omitempty"`
  1766  	// Voice: The grammatical voice.
  1767  	//
  1768  	// Possible values:
  1769  	//   "VOICE_UNKNOWN" - Voice is not applicable in the analyzed language or is
  1770  	// not predicted.
  1771  	//   "ACTIVE" - Active
  1772  	//   "CAUSATIVE" - Causative
  1773  	//   "PASSIVE" - Passive
  1774  	Voice string `json:"voice,omitempty"`
  1775  	// ForceSendFields is a list of field names (e.g. "Aspect") to unconditionally
  1776  	// include in API requests. By default, fields with empty or default values are
  1777  	// omitted from API requests. See
  1778  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1779  	// details.
  1780  	ForceSendFields []string `json:"-"`
  1781  	// NullFields is a list of field names (e.g. "Aspect") to include in API
  1782  	// requests with the JSON null value. By default, fields with empty values are
  1783  	// omitted from API requests. See
  1784  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1785  	NullFields []string `json:"-"`
  1786  }
  1787  
  1788  func (s *PartOfSpeech) MarshalJSON() ([]byte, error) {
  1789  	type NoMethod PartOfSpeech
  1790  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1791  }
  1792  
  1793  type RamMetric struct {
  1794  	// GibSec: Required. VM memory in Gigabyte second, e.g. 3600. Using int64 type
  1795  	// to match billing metrics definition.
  1796  	GibSec int64 `json:"gibSec,omitempty,string"`
  1797  	// MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4.
  1798  	//
  1799  	// Possible values:
  1800  	//   "UNKNOWN_MACHINE_SPEC"
  1801  	//   "N1_STANDARD_2"
  1802  	//   "N1_STANDARD_4"
  1803  	//   "N1_STANDARD_8"
  1804  	//   "N1_STANDARD_16"
  1805  	//   "N1_STANDARD_32"
  1806  	//   "N1_STANDARD_64"
  1807  	//   "N1_STANDARD_96"
  1808  	//   "N1_HIGHMEM_2"
  1809  	//   "N1_HIGHMEM_4"
  1810  	//   "N1_HIGHMEM_8"
  1811  	//   "N1_HIGHMEM_16"
  1812  	//   "N1_HIGHMEM_32"
  1813  	//   "N1_HIGHMEM_64"
  1814  	//   "N1_HIGHMEM_96"
  1815  	//   "N1_HIGHCPU_2"
  1816  	//   "N1_HIGHCPU_4"
  1817  	//   "N1_HIGHCPU_8"
  1818  	//   "N1_HIGHCPU_16"
  1819  	//   "N1_HIGHCPU_32"
  1820  	//   "N1_HIGHCPU_64"
  1821  	//   "N1_HIGHCPU_96"
  1822  	//   "A2_HIGHGPU_1G"
  1823  	//   "A2_HIGHGPU_2G"
  1824  	//   "A2_HIGHGPU_4G"
  1825  	//   "A2_HIGHGPU_8G"
  1826  	//   "A2_MEGAGPU_16G"
  1827  	//   "A2_ULTRAGPU_1G"
  1828  	//   "A2_ULTRAGPU_2G"
  1829  	//   "A2_ULTRAGPU_4G"
  1830  	//   "A2_ULTRAGPU_8G"
  1831  	//   "A3_HIGHGPU_8G"
  1832  	//   "E2_STANDARD_2"
  1833  	//   "E2_STANDARD_4"
  1834  	//   "E2_STANDARD_8"
  1835  	//   "E2_STANDARD_16"
  1836  	//   "E2_STANDARD_32"
  1837  	//   "E2_HIGHMEM_2"
  1838  	//   "E2_HIGHMEM_4"
  1839  	//   "E2_HIGHMEM_8"
  1840  	//   "E2_HIGHMEM_16"
  1841  	//   "E2_HIGHCPU_2"
  1842  	//   "E2_HIGHCPU_4"
  1843  	//   "E2_HIGHCPU_8"
  1844  	//   "E2_HIGHCPU_16"
  1845  	//   "E2_HIGHCPU_32"
  1846  	//   "N2_STANDARD_2"
  1847  	//   "N2_STANDARD_4"
  1848  	//   "N2_STANDARD_8"
  1849  	//   "N2_STANDARD_16"
  1850  	//   "N2_STANDARD_32"
  1851  	//   "N2_STANDARD_48"
  1852  	//   "N2_STANDARD_64"
  1853  	//   "N2_STANDARD_80"
  1854  	//   "N2_STANDARD_96"
  1855  	//   "N2_STANDARD_128"
  1856  	//   "N2_HIGHMEM_2"
  1857  	//   "N2_HIGHMEM_4"
  1858  	//   "N2_HIGHMEM_8"
  1859  	//   "N2_HIGHMEM_16"
  1860  	//   "N2_HIGHMEM_32"
  1861  	//   "N2_HIGHMEM_48"
  1862  	//   "N2_HIGHMEM_64"
  1863  	//   "N2_HIGHMEM_80"
  1864  	//   "N2_HIGHMEM_96"
  1865  	//   "N2_HIGHMEM_128"
  1866  	//   "N2_HIGHCPU_2"
  1867  	//   "N2_HIGHCPU_4"
  1868  	//   "N2_HIGHCPU_8"
  1869  	//   "N2_HIGHCPU_16"
  1870  	//   "N2_HIGHCPU_32"
  1871  	//   "N2_HIGHCPU_48"
  1872  	//   "N2_HIGHCPU_64"
  1873  	//   "N2_HIGHCPU_80"
  1874  	//   "N2_HIGHCPU_96"
  1875  	//   "N2D_STANDARD_2"
  1876  	//   "N2D_STANDARD_4"
  1877  	//   "N2D_STANDARD_8"
  1878  	//   "N2D_STANDARD_16"
  1879  	//   "N2D_STANDARD_32"
  1880  	//   "N2D_STANDARD_48"
  1881  	//   "N2D_STANDARD_64"
  1882  	//   "N2D_STANDARD_80"
  1883  	//   "N2D_STANDARD_96"
  1884  	//   "N2D_STANDARD_128"
  1885  	//   "N2D_STANDARD_224"
  1886  	//   "N2D_HIGHMEM_2"
  1887  	//   "N2D_HIGHMEM_4"
  1888  	//   "N2D_HIGHMEM_8"
  1889  	//   "N2D_HIGHMEM_16"
  1890  	//   "N2D_HIGHMEM_32"
  1891  	//   "N2D_HIGHMEM_48"
  1892  	//   "N2D_HIGHMEM_64"
  1893  	//   "N2D_HIGHMEM_80"
  1894  	//   "N2D_HIGHMEM_96"
  1895  	//   "N2D_HIGHCPU_2"
  1896  	//   "N2D_HIGHCPU_4"
  1897  	//   "N2D_HIGHCPU_8"
  1898  	//   "N2D_HIGHCPU_16"
  1899  	//   "N2D_HIGHCPU_32"
  1900  	//   "N2D_HIGHCPU_48"
  1901  	//   "N2D_HIGHCPU_64"
  1902  	//   "N2D_HIGHCPU_80"
  1903  	//   "N2D_HIGHCPU_96"
  1904  	//   "N2D_HIGHCPU_128"
  1905  	//   "N2D_HIGHCPU_224"
  1906  	//   "C2_STANDARD_4"
  1907  	//   "C2_STANDARD_8"
  1908  	//   "C2_STANDARD_16"
  1909  	//   "C2_STANDARD_30"
  1910  	//   "C2_STANDARD_60"
  1911  	//   "C2D_STANDARD_2"
  1912  	//   "C2D_STANDARD_4"
  1913  	//   "C2D_STANDARD_8"
  1914  	//   "C2D_STANDARD_16"
  1915  	//   "C2D_STANDARD_32"
  1916  	//   "C2D_STANDARD_56"
  1917  	//   "C2D_STANDARD_112"
  1918  	//   "C2D_HIGHCPU_2"
  1919  	//   "C2D_HIGHCPU_4"
  1920  	//   "C2D_HIGHCPU_8"
  1921  	//   "C2D_HIGHCPU_16"
  1922  	//   "C2D_HIGHCPU_32"
  1923  	//   "C2D_HIGHCPU_56"
  1924  	//   "C2D_HIGHCPU_112"
  1925  	//   "C2D_HIGHMEM_2"
  1926  	//   "C2D_HIGHMEM_4"
  1927  	//   "C2D_HIGHMEM_8"
  1928  	//   "C2D_HIGHMEM_16"
  1929  	//   "C2D_HIGHMEM_32"
  1930  	//   "C2D_HIGHMEM_56"
  1931  	//   "C2D_HIGHMEM_112"
  1932  	//   "G2_STANDARD_4"
  1933  	//   "G2_STANDARD_8"
  1934  	//   "G2_STANDARD_12"
  1935  	//   "G2_STANDARD_16"
  1936  	//   "G2_STANDARD_24"
  1937  	//   "G2_STANDARD_32"
  1938  	//   "G2_STANDARD_48"
  1939  	//   "G2_STANDARD_96"
  1940  	//   "C3_STANDARD_4"
  1941  	//   "C3_STANDARD_8"
  1942  	//   "C3_STANDARD_22"
  1943  	//   "C3_STANDARD_44"
  1944  	//   "C3_STANDARD_88"
  1945  	//   "C3_STANDARD_176"
  1946  	//   "C3_HIGHCPU_4"
  1947  	//   "C3_HIGHCPU_8"
  1948  	//   "C3_HIGHCPU_22"
  1949  	//   "C3_HIGHCPU_44"
  1950  	//   "C3_HIGHCPU_88"
  1951  	//   "C3_HIGHCPU_176"
  1952  	//   "C3_HIGHMEM_4"
  1953  	//   "C3_HIGHMEM_8"
  1954  	//   "C3_HIGHMEM_22"
  1955  	//   "C3_HIGHMEM_44"
  1956  	//   "C3_HIGHMEM_88"
  1957  	//   "C3_HIGHMEM_176"
  1958  	MachineSpec string `json:"machineSpec,omitempty"`
  1959  	// Memories: Required. VM memory in gb.
  1960  	Memories float64 `json:"memories,omitempty"`
  1961  	// RamType: Required. Type of ram.
  1962  	//
  1963  	// Possible values:
  1964  	//   "UNKNOWN_RAM_TYPE"
  1965  	//   "A2"
  1966  	//   "A3"
  1967  	//   "C2" - COMPUTE_OPTIMIZED
  1968  	//   "C2D"
  1969  	//   "CUSTOM"
  1970  	//   "E2"
  1971  	//   "G2"
  1972  	//   "C3"
  1973  	//   "M2" - MEMORY_OPTIMIZED_UPGRADE_PREMIUM
  1974  	//   "M1" - MEMORY_OPTIMIZED
  1975  	//   "N1"
  1976  	//   "N2_CUSTOM"
  1977  	//   "N2"
  1978  	//   "N2D"
  1979  	RamType string `json:"ramType,omitempty"`
  1980  	// TrackingLabels: Billing tracking labels. They do not contain any user data
  1981  	// but only the labels set by Vertex Core Infra itself. Tracking labels' keys
  1982  	// are defined with special format: goog-[\p{Ll}\p{N}]+ E.g. "key":
  1983  	// "goog-k8s-cluster-name","value": "us-east1-b4rk"
  1984  	TrackingLabels map[string]string `json:"trackingLabels,omitempty"`
  1985  	// ForceSendFields is a list of field names (e.g. "GibSec") to unconditionally
  1986  	// include in API requests. By default, fields with empty or default values are
  1987  	// omitted from API requests. See
  1988  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1989  	// details.
  1990  	ForceSendFields []string `json:"-"`
  1991  	// NullFields is a list of field names (e.g. "GibSec") to include in API
  1992  	// requests with the JSON null value. By default, fields with empty values are
  1993  	// omitted from API requests. See
  1994  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1995  	NullFields []string `json:"-"`
  1996  }
  1997  
  1998  func (s *RamMetric) MarshalJSON() ([]byte, error) {
  1999  	type NoMethod RamMetric
  2000  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2001  }
  2002  
  2003  func (s *RamMetric) UnmarshalJSON(data []byte) error {
  2004  	type NoMethod RamMetric
  2005  	var s1 struct {
  2006  		Memories gensupport.JSONFloat64 `json:"memories"`
  2007  		*NoMethod
  2008  	}
  2009  	s1.NoMethod = (*NoMethod)(s)
  2010  	if err := json.Unmarshal(data, &s1); err != nil {
  2011  		return err
  2012  	}
  2013  	s.Memories = float64(s1.Memories)
  2014  	return nil
  2015  }
  2016  
  2017  // Sentence: Represents a sentence in the input document.
  2018  type Sentence struct {
  2019  	// Sentiment: For calls to AnalyzeSentiment or if
  2020  	// AnnotateTextRequest.Features.extract_document_sentiment is set to true, this
  2021  	// field will contain the sentiment for the sentence.
  2022  	Sentiment *Sentiment `json:"sentiment,omitempty"`
  2023  	// Text: The sentence text.
  2024  	Text *TextSpan `json:"text,omitempty"`
  2025  	// ForceSendFields is a list of field names (e.g. "Sentiment") to
  2026  	// unconditionally include in API requests. By default, fields with empty or
  2027  	// default values are omitted from API requests. See
  2028  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2029  	// details.
  2030  	ForceSendFields []string `json:"-"`
  2031  	// NullFields is a list of field names (e.g. "Sentiment") to include in API
  2032  	// requests with the JSON null value. By default, fields with empty values are
  2033  	// omitted from API requests. See
  2034  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2035  	NullFields []string `json:"-"`
  2036  }
  2037  
  2038  func (s *Sentence) MarshalJSON() ([]byte, error) {
  2039  	type NoMethod Sentence
  2040  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2041  }
  2042  
  2043  // Sentiment: Represents the feeling associated with the entire text or
  2044  // entities in the text.
  2045  type Sentiment struct {
  2046  	// Magnitude: A non-negative number in the [0, +inf) range, which represents
  2047  	// the absolute magnitude of sentiment regardless of score (positive or
  2048  	// negative).
  2049  	Magnitude float64 `json:"magnitude,omitempty"`
  2050  	// Score: Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
  2051  	// sentiment).
  2052  	Score float64 `json:"score,omitempty"`
  2053  	// ForceSendFields is a list of field names (e.g. "Magnitude") to
  2054  	// unconditionally include in API requests. By default, fields with empty or
  2055  	// default values are omitted from API requests. See
  2056  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2057  	// details.
  2058  	ForceSendFields []string `json:"-"`
  2059  	// NullFields is a list of field names (e.g. "Magnitude") to include in API
  2060  	// requests with the JSON null value. By default, fields with empty values are
  2061  	// omitted from API requests. See
  2062  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2063  	NullFields []string `json:"-"`
  2064  }
  2065  
  2066  func (s *Sentiment) MarshalJSON() ([]byte, error) {
  2067  	type NoMethod Sentiment
  2068  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2069  }
  2070  
  2071  func (s *Sentiment) UnmarshalJSON(data []byte) error {
  2072  	type NoMethod Sentiment
  2073  	var s1 struct {
  2074  		Magnitude gensupport.JSONFloat64 `json:"magnitude"`
  2075  		Score     gensupport.JSONFloat64 `json:"score"`
  2076  		*NoMethod
  2077  	}
  2078  	s1.NoMethod = (*NoMethod)(s)
  2079  	if err := json.Unmarshal(data, &s1); err != nil {
  2080  		return err
  2081  	}
  2082  	s.Magnitude = float64(s1.Magnitude)
  2083  	s.Score = float64(s1.Score)
  2084  	return nil
  2085  }
  2086  
  2087  // Status: The `Status` type defines a logical error model that is suitable for
  2088  // different programming environments, including REST APIs and RPC APIs. It is
  2089  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  2090  // pieces of data: error code, error message, and error details. You can find
  2091  // out more about this error model and how to work with it in the API Design
  2092  // Guide (https://cloud.google.com/apis/design/errors).
  2093  type Status struct {
  2094  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2095  	Code int64 `json:"code,omitempty"`
  2096  	// Details: A list of messages that carry the error details. There is a common
  2097  	// set of message types for APIs to use.
  2098  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2099  	// Message: A developer-facing error message, which should be in English. Any
  2100  	// user-facing error message should be localized and sent in the
  2101  	// google.rpc.Status.details field, or localized by the client.
  2102  	Message string `json:"message,omitempty"`
  2103  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2104  	// include in API requests. By default, fields with empty or default values are
  2105  	// omitted from API requests. See
  2106  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2107  	// details.
  2108  	ForceSendFields []string `json:"-"`
  2109  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2110  	// with the JSON null value. By default, fields with empty values are omitted
  2111  	// from API requests. See
  2112  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2113  	NullFields []string `json:"-"`
  2114  }
  2115  
  2116  func (s *Status) MarshalJSON() ([]byte, error) {
  2117  	type NoMethod Status
  2118  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2119  }
  2120  
  2121  // TextSpan: Represents a text span in the input document.
  2122  type TextSpan struct {
  2123  	// BeginOffset: The API calculates the beginning offset of the content in the
  2124  	// original document according to the EncodingType specified in the API
  2125  	// request.
  2126  	BeginOffset int64 `json:"beginOffset,omitempty"`
  2127  	// Content: The content of the text span, which is a substring of the document.
  2128  	Content string `json:"content,omitempty"`
  2129  	// ForceSendFields is a list of field names (e.g. "BeginOffset") to
  2130  	// unconditionally include in API requests. By default, fields with empty or
  2131  	// default values are omitted from API requests. See
  2132  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2133  	// details.
  2134  	ForceSendFields []string `json:"-"`
  2135  	// NullFields is a list of field names (e.g. "BeginOffset") to include in API
  2136  	// requests with the JSON null value. By default, fields with empty values are
  2137  	// omitted from API requests. See
  2138  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2139  	NullFields []string `json:"-"`
  2140  }
  2141  
  2142  func (s *TextSpan) MarshalJSON() ([]byte, error) {
  2143  	type NoMethod TextSpan
  2144  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2145  }
  2146  
  2147  // Token: Represents the smallest syntactic building block of the text.
  2148  type Token struct {
  2149  	// DependencyEdge: Dependency tree parse for this token.
  2150  	DependencyEdge *DependencyEdge `json:"dependencyEdge,omitempty"`
  2151  	// Lemma: Lemma (https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the
  2152  	// token.
  2153  	Lemma string `json:"lemma,omitempty"`
  2154  	// PartOfSpeech: Parts of speech tag for this token.
  2155  	PartOfSpeech *PartOfSpeech `json:"partOfSpeech,omitempty"`
  2156  	// Text: The token text.
  2157  	Text *TextSpan `json:"text,omitempty"`
  2158  	// ForceSendFields is a list of field names (e.g. "DependencyEdge") to
  2159  	// unconditionally include in API requests. By default, fields with empty or
  2160  	// default values are omitted from API requests. See
  2161  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2162  	// details.
  2163  	ForceSendFields []string `json:"-"`
  2164  	// NullFields is a list of field names (e.g. "DependencyEdge") to include in
  2165  	// API requests with the JSON null value. By default, fields with empty values
  2166  	// are omitted from API requests. See
  2167  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2168  	NullFields []string `json:"-"`
  2169  }
  2170  
  2171  func (s *Token) MarshalJSON() ([]byte, error) {
  2172  	type NoMethod Token
  2173  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2174  }
  2175  
  2176  type TpuMetric struct {
  2177  	// TpuSec: Required. Seconds of TPU usage, e.g. 3600.
  2178  	TpuSec int64 `json:"tpuSec,omitempty,string"`
  2179  	// TpuType: Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD.
  2180  	//
  2181  	// Possible values:
  2182  	//   "UNKNOWN_TPU_TYPE"
  2183  	//   "TPU_V2_POD"
  2184  	//   "TPU_V2"
  2185  	//   "TPU_V3_POD"
  2186  	//   "TPU_V3"
  2187  	//   "TPU_V5_LITEPOD"
  2188  	TpuType string `json:"tpuType,omitempty"`
  2189  	// ForceSendFields is a list of field names (e.g. "TpuSec") to unconditionally
  2190  	// include in API requests. By default, fields with empty or default values are
  2191  	// omitted from API requests. See
  2192  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2193  	// details.
  2194  	ForceSendFields []string `json:"-"`
  2195  	// NullFields is a list of field names (e.g. "TpuSec") to include in API
  2196  	// requests with the JSON null value. By default, fields with empty values are
  2197  	// omitted from API requests. See
  2198  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2199  	NullFields []string `json:"-"`
  2200  }
  2201  
  2202  func (s *TpuMetric) MarshalJSON() ([]byte, error) {
  2203  	type NoMethod TpuMetric
  2204  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2205  }
  2206  
  2207  // XPSArrayStats: The data statistics of a series of ARRAY values.
  2208  type XPSArrayStats struct {
  2209  	CommonStats *XPSCommonStats `json:"commonStats,omitempty"`
  2210  	// MemberStats: Stats of all the values of all arrays, as if they were a single
  2211  	// long series of data. The type depends on the element type of the array.
  2212  	MemberStats *XPSDataStats `json:"memberStats,omitempty"`
  2213  	// ForceSendFields is a list of field names (e.g. "CommonStats") to
  2214  	// unconditionally include in API requests. By default, fields with empty or
  2215  	// default values are omitted from API requests. See
  2216  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2217  	// details.
  2218  	ForceSendFields []string `json:"-"`
  2219  	// NullFields is a list of field names (e.g. "CommonStats") to include in API
  2220  	// requests with the JSON null value. By default, fields with empty values are
  2221  	// omitted from API requests. See
  2222  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2223  	NullFields []string `json:"-"`
  2224  }
  2225  
  2226  func (s *XPSArrayStats) MarshalJSON() ([]byte, error) {
  2227  	type NoMethod XPSArrayStats
  2228  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2229  }
  2230  
  2231  type XPSBatchPredictResponse struct {
  2232  	// ExampleSet: Examples for batch prediction result. Under full API
  2233  	// implementation, results are stored in shared RecordIO of AnnotatedExample
  2234  	// protobufs, the annotations field of which is populated by XPS backend.
  2235  	ExampleSet *XPSExampleSet `json:"exampleSet,omitempty"`
  2236  	// ForceSendFields is a list of field names (e.g. "ExampleSet") to
  2237  	// unconditionally include in API requests. By default, fields with empty or
  2238  	// default values are omitted from API requests. See
  2239  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2240  	// details.
  2241  	ForceSendFields []string `json:"-"`
  2242  	// NullFields is a list of field names (e.g. "ExampleSet") to include in API
  2243  	// requests with the JSON null value. By default, fields with empty values are
  2244  	// omitted from API requests. See
  2245  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2246  	NullFields []string `json:"-"`
  2247  }
  2248  
  2249  func (s *XPSBatchPredictResponse) MarshalJSON() ([]byte, error) {
  2250  	type NoMethod XPSBatchPredictResponse
  2251  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2252  }
  2253  
  2254  // XPSBoundingBoxMetricsEntry: Bounding box matching model metrics for a single
  2255  // intersection-over-union threshold and multiple label match confidence
  2256  // thresholds.
  2257  type XPSBoundingBoxMetricsEntry struct {
  2258  	// ConfidenceMetricsEntries: Metrics for each label-match confidence_threshold
  2259  	// from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.
  2260  	ConfidenceMetricsEntries []*XPSBoundingBoxMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"`
  2261  	// IouThreshold: The intersection-over-union threshold value used to compute
  2262  	// this metrics entry.
  2263  	IouThreshold float64 `json:"iouThreshold,omitempty"`
  2264  	// MeanAveragePrecision: The mean average precision.
  2265  	MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"`
  2266  	// ForceSendFields is a list of field names (e.g. "ConfidenceMetricsEntries")
  2267  	// to unconditionally include in API requests. By default, fields with empty or
  2268  	// default values are omitted from API requests. See
  2269  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2270  	// details.
  2271  	ForceSendFields []string `json:"-"`
  2272  	// NullFields is a list of field names (e.g. "ConfidenceMetricsEntries") to
  2273  	// include in API requests with the JSON null value. By default, fields with
  2274  	// empty values are omitted from API requests. See
  2275  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2276  	NullFields []string `json:"-"`
  2277  }
  2278  
  2279  func (s *XPSBoundingBoxMetricsEntry) MarshalJSON() ([]byte, error) {
  2280  	type NoMethod XPSBoundingBoxMetricsEntry
  2281  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2282  }
  2283  
  2284  func (s *XPSBoundingBoxMetricsEntry) UnmarshalJSON(data []byte) error {
  2285  	type NoMethod XPSBoundingBoxMetricsEntry
  2286  	var s1 struct {
  2287  		IouThreshold         gensupport.JSONFloat64 `json:"iouThreshold"`
  2288  		MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"`
  2289  		*NoMethod
  2290  	}
  2291  	s1.NoMethod = (*NoMethod)(s)
  2292  	if err := json.Unmarshal(data, &s1); err != nil {
  2293  		return err
  2294  	}
  2295  	s.IouThreshold = float64(s1.IouThreshold)
  2296  	s.MeanAveragePrecision = float64(s1.MeanAveragePrecision)
  2297  	return nil
  2298  }
  2299  
  2300  // XPSBoundingBoxMetricsEntryConfidenceMetricsEntry: Metrics for a single
  2301  // confidence threshold.
  2302  type XPSBoundingBoxMetricsEntryConfidenceMetricsEntry struct {
  2303  	// ConfidenceThreshold: The confidence threshold value used to compute the
  2304  	// metrics.
  2305  	ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"`
  2306  	// F1Score: The harmonic mean of recall and precision.
  2307  	F1Score float64 `json:"f1Score,omitempty"`
  2308  	// Precision: Precision for the given confidence threshold.
  2309  	Precision float64 `json:"precision,omitempty"`
  2310  	// Recall: Recall for the given confidence threshold.
  2311  	Recall float64 `json:"recall,omitempty"`
  2312  	// ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") to
  2313  	// unconditionally include in API requests. By default, fields with empty or
  2314  	// default values are omitted from API requests. See
  2315  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2316  	// details.
  2317  	ForceSendFields []string `json:"-"`
  2318  	// NullFields is a list of field names (e.g. "ConfidenceThreshold") to include
  2319  	// in API requests with the JSON null value. By default, fields with empty
  2320  	// values are omitted from API requests. See
  2321  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2322  	NullFields []string `json:"-"`
  2323  }
  2324  
  2325  func (s *XPSBoundingBoxMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) {
  2326  	type NoMethod XPSBoundingBoxMetricsEntryConfidenceMetricsEntry
  2327  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2328  }
  2329  
  2330  func (s *XPSBoundingBoxMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error {
  2331  	type NoMethod XPSBoundingBoxMetricsEntryConfidenceMetricsEntry
  2332  	var s1 struct {
  2333  		ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"`
  2334  		F1Score             gensupport.JSONFloat64 `json:"f1Score"`
  2335  		Precision           gensupport.JSONFloat64 `json:"precision"`
  2336  		Recall              gensupport.JSONFloat64 `json:"recall"`
  2337  		*NoMethod
  2338  	}
  2339  	s1.NoMethod = (*NoMethod)(s)
  2340  	if err := json.Unmarshal(data, &s1); err != nil {
  2341  		return err
  2342  	}
  2343  	s.ConfidenceThreshold = float64(s1.ConfidenceThreshold)
  2344  	s.F1Score = float64(s1.F1Score)
  2345  	s.Precision = float64(s1.Precision)
  2346  	s.Recall = float64(s1.Recall)
  2347  	return nil
  2348  }
  2349  
  2350  // XPSCategoryStats: The data statistics of a series of CATEGORY values.
  2351  type XPSCategoryStats struct {
  2352  	CommonStats *XPSCommonStats `json:"commonStats,omitempty"`
  2353  	// TopCategoryStats: The statistics of the top 20 CATEGORY values, ordered by
  2354  	// CategoryStats.SingleCategoryStats.count.
  2355  	TopCategoryStats []*XPSCategoryStatsSingleCategoryStats `json:"topCategoryStats,omitempty"`
  2356  	// ForceSendFields is a list of field names (e.g. "CommonStats") to
  2357  	// unconditionally include in API requests. By default, fields with empty or
  2358  	// default values are omitted from API requests. See
  2359  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2360  	// details.
  2361  	ForceSendFields []string `json:"-"`
  2362  	// NullFields is a list of field names (e.g. "CommonStats") to include in API
  2363  	// requests with the JSON null value. By default, fields with empty values are
  2364  	// omitted from API requests. See
  2365  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2366  	NullFields []string `json:"-"`
  2367  }
  2368  
  2369  func (s *XPSCategoryStats) MarshalJSON() ([]byte, error) {
  2370  	type NoMethod XPSCategoryStats
  2371  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2372  }
  2373  
  2374  // XPSCategoryStatsSingleCategoryStats: The statistics of a single CATEGORY
  2375  // value.
  2376  type XPSCategoryStatsSingleCategoryStats struct {
  2377  	// Count: The number of occurrences of this value in the series.
  2378  	Count int64 `json:"count,omitempty,string"`
  2379  	// Value: The CATEGORY value.
  2380  	Value string `json:"value,omitempty"`
  2381  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
  2382  	// include in API requests. By default, fields with empty or default values are
  2383  	// omitted from API requests. See
  2384  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2385  	// details.
  2386  	ForceSendFields []string `json:"-"`
  2387  	// NullFields is a list of field names (e.g. "Count") to include in API
  2388  	// requests with the JSON null value. By default, fields with empty values are
  2389  	// omitted from API requests. See
  2390  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2391  	NullFields []string `json:"-"`
  2392  }
  2393  
  2394  func (s *XPSCategoryStatsSingleCategoryStats) MarshalJSON() ([]byte, error) {
  2395  	type NoMethod XPSCategoryStatsSingleCategoryStats
  2396  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2397  }
  2398  
  2399  // XPSClassificationEvaluationMetrics: Model evaluation metrics for
  2400  // classification problems. It can be used for image and video classification.
  2401  // Next tag: 9.
  2402  type XPSClassificationEvaluationMetrics struct {
  2403  	// AuPrc: The Area under precision recall curve metric.
  2404  	AuPrc float64 `json:"auPrc,omitempty"`
  2405  	// AuRoc: The Area Under Receiver Operating Characteristic curve metric.
  2406  	// Micro-averaged for the overall evaluation.
  2407  	AuRoc float64 `json:"auRoc,omitempty"`
  2408  	// BaseAuPrc: The Area under precision recall curve metric based on priors.
  2409  	BaseAuPrc float64 `json:"baseAuPrc,omitempty"`
  2410  	// ConfidenceMetricsEntries: Metrics that have confidence thresholds.
  2411  	// Precision-recall curve can be derived from it.
  2412  	ConfidenceMetricsEntries []*XPSConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"`
  2413  	// ConfusionMatrix: Confusion matrix of the evaluation. Only set for MULTICLASS
  2414  	// classification problems where number of annotation specs is no more than 10.
  2415  	// Only set for model level evaluation, not for evaluation per label.
  2416  	ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"`
  2417  	// EvaluatedExamplesCount: The number of examples used for model evaluation.
  2418  	EvaluatedExamplesCount int64 `json:"evaluatedExamplesCount,omitempty"`
  2419  	// LogLoss: The Log Loss metric.
  2420  	LogLoss float64 `json:"logLoss,omitempty"`
  2421  	// ForceSendFields is a list of field names (e.g. "AuPrc") to unconditionally
  2422  	// include in API requests. By default, fields with empty or default values are
  2423  	// omitted from API requests. See
  2424  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2425  	// details.
  2426  	ForceSendFields []string `json:"-"`
  2427  	// NullFields is a list of field names (e.g. "AuPrc") to include in API
  2428  	// requests with the JSON null value. By default, fields with empty values are
  2429  	// omitted from API requests. See
  2430  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2431  	NullFields []string `json:"-"`
  2432  }
  2433  
  2434  func (s *XPSClassificationEvaluationMetrics) MarshalJSON() ([]byte, error) {
  2435  	type NoMethod XPSClassificationEvaluationMetrics
  2436  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2437  }
  2438  
  2439  func (s *XPSClassificationEvaluationMetrics) UnmarshalJSON(data []byte) error {
  2440  	type NoMethod XPSClassificationEvaluationMetrics
  2441  	var s1 struct {
  2442  		AuPrc     gensupport.JSONFloat64 `json:"auPrc"`
  2443  		AuRoc     gensupport.JSONFloat64 `json:"auRoc"`
  2444  		BaseAuPrc gensupport.JSONFloat64 `json:"baseAuPrc"`
  2445  		LogLoss   gensupport.JSONFloat64 `json:"logLoss"`
  2446  		*NoMethod
  2447  	}
  2448  	s1.NoMethod = (*NoMethod)(s)
  2449  	if err := json.Unmarshal(data, &s1); err != nil {
  2450  		return err
  2451  	}
  2452  	s.AuPrc = float64(s1.AuPrc)
  2453  	s.AuRoc = float64(s1.AuRoc)
  2454  	s.BaseAuPrc = float64(s1.BaseAuPrc)
  2455  	s.LogLoss = float64(s1.LogLoss)
  2456  	return nil
  2457  }
  2458  
  2459  // XPSColorMap: Map from color to display name. Will only be used by Image
  2460  // Segmentation for uCAIP.
  2461  type XPSColorMap struct {
  2462  	// AnnotationSpecIdToken: Should be used during training.
  2463  	AnnotationSpecIdToken string `json:"annotationSpecIdToken,omitempty"`
  2464  	// Color: This type is deprecated in favor of the IntColor below. This is
  2465  	// because google.type.Color represent color has a float which semantically
  2466  	// does not reflect discrete classes/categories concept. Moreover, to handle it
  2467  	// well we need to have some tolerance when converting to a discretized color.
  2468  	// As such, the recommendation is to have API surface still use
  2469  	// google.type.Color while internally IntColor is used.
  2470  	Color *Color `json:"color,omitempty"`
  2471  	// DisplayName: Should be used during preprocessing.
  2472  	DisplayName string               `json:"displayName,omitempty"`
  2473  	IntColor    *XPSColorMapIntColor `json:"intColor,omitempty"`
  2474  	// ForceSendFields is a list of field names (e.g. "AnnotationSpecIdToken") to
  2475  	// unconditionally include in API requests. By default, fields with empty or
  2476  	// default values are omitted from API requests. See
  2477  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2478  	// details.
  2479  	ForceSendFields []string `json:"-"`
  2480  	// NullFields is a list of field names (e.g. "AnnotationSpecIdToken") to
  2481  	// include in API requests with the JSON null value. By default, fields with
  2482  	// empty values are omitted from API requests. See
  2483  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2484  	NullFields []string `json:"-"`
  2485  }
  2486  
  2487  func (s *XPSColorMap) MarshalJSON() ([]byte, error) {
  2488  	type NoMethod XPSColorMap
  2489  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2490  }
  2491  
  2492  // XPSColorMapIntColor: RGB color and each channel is represented by an
  2493  // integer.
  2494  type XPSColorMapIntColor struct {
  2495  	// Blue: The value should be in range of [0, 255].
  2496  	Blue int64 `json:"blue,omitempty"`
  2497  	// Green: The value should be in range of [0, 255].
  2498  	Green int64 `json:"green,omitempty"`
  2499  	// Red: The value should be in range of [0, 255].
  2500  	Red int64 `json:"red,omitempty"`
  2501  	// ForceSendFields is a list of field names (e.g. "Blue") to unconditionally
  2502  	// include in API requests. By default, fields with empty or default values are
  2503  	// omitted from API requests. See
  2504  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2505  	// details.
  2506  	ForceSendFields []string `json:"-"`
  2507  	// NullFields is a list of field names (e.g. "Blue") to include in API requests
  2508  	// with the JSON null value. By default, fields with empty values are omitted
  2509  	// from API requests. See
  2510  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2511  	NullFields []string `json:"-"`
  2512  }
  2513  
  2514  func (s *XPSColorMapIntColor) MarshalJSON() ([]byte, error) {
  2515  	type NoMethod XPSColorMapIntColor
  2516  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2517  }
  2518  
  2519  type XPSColumnSpec struct {
  2520  	// ColumnId: The unique id of the column. When Preprocess, the Tables BE will
  2521  	// popuate the order id of the column, which reflects the order of the column
  2522  	// inside the table, i.e. 0 means the first column in the table, N-1 means the
  2523  	// last column. AutoML BE will persist this order id in Spanner and set the
  2524  	// order id here when calling RefreshTablesStats and Train. Note: it's
  2525  	// different than the column_spec_id that is generated in AutoML BE.
  2526  	ColumnId int64 `json:"columnId,omitempty"`
  2527  	// DataStats: The data stats of the column. It's outputed in RefreshTablesStats
  2528  	// and a required input for Train.
  2529  	DataStats *XPSDataStats `json:"dataStats,omitempty"`
  2530  	// DataType: The data type of the column. It's outputed in Preprocess rpc and a
  2531  	// required input for RefreshTablesStats and Train.
  2532  	DataType *XPSDataType `json:"dataType,omitempty"`
  2533  	// DisplayName: The display name of the column. It's outputed in Preprocess and
  2534  	// a required input for RefreshTablesStats and Train.
  2535  	DisplayName         string                            `json:"displayName,omitempty"`
  2536  	ForecastingMetadata *XPSColumnSpecForecastingMetadata `json:"forecastingMetadata,omitempty"`
  2537  	// TopCorrelatedColumns: It's outputed in RefreshTablesStats, and a required
  2538  	// input in Train.
  2539  	TopCorrelatedColumns []*XPSColumnSpecCorrelatedColumn `json:"topCorrelatedColumns,omitempty"`
  2540  	// ForceSendFields is a list of field names (e.g. "ColumnId") to
  2541  	// unconditionally include in API requests. By default, fields with empty or
  2542  	// default values are omitted from API requests. See
  2543  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2544  	// details.
  2545  	ForceSendFields []string `json:"-"`
  2546  	// NullFields is a list of field names (e.g. "ColumnId") to include in API
  2547  	// requests with the JSON null value. By default, fields with empty values are
  2548  	// omitted from API requests. See
  2549  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2550  	NullFields []string `json:"-"`
  2551  }
  2552  
  2553  func (s *XPSColumnSpec) MarshalJSON() ([]byte, error) {
  2554  	type NoMethod XPSColumnSpec
  2555  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2556  }
  2557  
  2558  // XPSColumnSpecCorrelatedColumn: Identifies a table's column, and its
  2559  // correlation with the column this ColumnSpec describes.
  2560  type XPSColumnSpecCorrelatedColumn struct {
  2561  	ColumnId         int64                `json:"columnId,omitempty"`
  2562  	CorrelationStats *XPSCorrelationStats `json:"correlationStats,omitempty"`
  2563  	// ForceSendFields is a list of field names (e.g. "ColumnId") to
  2564  	// unconditionally include in API requests. By default, fields with empty or
  2565  	// default values are omitted from API requests. See
  2566  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2567  	// details.
  2568  	ForceSendFields []string `json:"-"`
  2569  	// NullFields is a list of field names (e.g. "ColumnId") to include in API
  2570  	// requests with the JSON null value. By default, fields with empty values are
  2571  	// omitted from API requests. See
  2572  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2573  	NullFields []string `json:"-"`
  2574  }
  2575  
  2576  func (s *XPSColumnSpecCorrelatedColumn) MarshalJSON() ([]byte, error) {
  2577  	type NoMethod XPSColumnSpecCorrelatedColumn
  2578  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2579  }
  2580  
  2581  // XPSColumnSpecForecastingMetadata:
  2582  // ===========================================================================
  2583  // # The fields below are used exclusively for Forecasting.
  2584  type XPSColumnSpecForecastingMetadata struct {
  2585  	// ColumnType: The type of the column for FORECASTING model training purposes.
  2586  	//
  2587  	// Possible values:
  2588  	//   "COLUMN_TYPE_UNSPECIFIED" - An un-set value of this enum.
  2589  	//   "KEY" - Key columns are used to identify timeseries.
  2590  	//   "KEY_METADATA" - This column contains information describing static
  2591  	// properties of the entities identified by the key column(s) (e.g. city's ZIP
  2592  	// code).
  2593  	//   "TIME_SERIES_AVAILABLE_PAST_ONLY" - This column contains information for
  2594  	// the given entity, at any time poinrt, they are only available in the time
  2595  	// series before.
  2596  	//   "TIME_SERIES_AVAILABLE_PAST_AND_FUTURE" - This column contains information
  2597  	// for the given entity is known both for the past and the sufficiently far
  2598  	// future.
  2599  	ColumnType string `json:"columnType,omitempty"`
  2600  	// ForceSendFields is a list of field names (e.g. "ColumnType") to
  2601  	// unconditionally include in API requests. By default, fields with empty or
  2602  	// default values are omitted from API requests. See
  2603  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2604  	// details.
  2605  	ForceSendFields []string `json:"-"`
  2606  	// NullFields is a list of field names (e.g. "ColumnType") to include in API
  2607  	// requests with the JSON null value. By default, fields with empty values are
  2608  	// omitted from API requests. See
  2609  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2610  	NullFields []string `json:"-"`
  2611  }
  2612  
  2613  func (s *XPSColumnSpecForecastingMetadata) MarshalJSON() ([]byte, error) {
  2614  	type NoMethod XPSColumnSpecForecastingMetadata
  2615  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2616  }
  2617  
  2618  // XPSCommonStats: Common statistics for a column with a specified data type.
  2619  type XPSCommonStats struct {
  2620  	DistinctValueCount int64 `json:"distinctValueCount,omitempty,string"`
  2621  	NullValueCount     int64 `json:"nullValueCount,omitempty,string"`
  2622  	ValidValueCount    int64 `json:"validValueCount,omitempty,string"`
  2623  	// ForceSendFields is a list of field names (e.g. "DistinctValueCount") to
  2624  	// unconditionally include in API requests. By default, fields with empty or
  2625  	// default values are omitted from API requests. See
  2626  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2627  	// details.
  2628  	ForceSendFields []string `json:"-"`
  2629  	// NullFields is a list of field names (e.g. "DistinctValueCount") to include
  2630  	// in API requests with the JSON null value. By default, fields with empty
  2631  	// values are omitted from API requests. See
  2632  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2633  	NullFields []string `json:"-"`
  2634  }
  2635  
  2636  func (s *XPSCommonStats) MarshalJSON() ([]byte, error) {
  2637  	type NoMethod XPSCommonStats
  2638  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2639  }
  2640  
  2641  // XPSConfidenceMetricsEntry: ConfidenceMetricsEntry includes generic
  2642  // precision, recall, f1 score etc. Next tag: 16.
  2643  type XPSConfidenceMetricsEntry struct {
  2644  	// ConfidenceThreshold: Metrics are computed with an assumption that the model
  2645  	// never return predictions with score lower than this value.
  2646  	ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"`
  2647  	// F1Score: The harmonic mean of recall and precision.
  2648  	F1Score float64 `json:"f1Score,omitempty"`
  2649  	// F1ScoreAt1: The harmonic mean of recall_at1 and precision_at1.
  2650  	F1ScoreAt1 float64 `json:"f1ScoreAt1,omitempty"`
  2651  	// FalseNegativeCount: The number of ground truth labels that are not matched
  2652  	// by a model created label.
  2653  	FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"`
  2654  	// FalsePositiveCount: The number of model created labels that do not match a
  2655  	// ground truth label.
  2656  	FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"`
  2657  	// FalsePositiveRate: False Positive Rate for the given confidence threshold.
  2658  	FalsePositiveRate float64 `json:"falsePositiveRate,omitempty"`
  2659  	// FalsePositiveRateAt1: The False Positive Rate when only considering the
  2660  	// label that has the highest prediction score and not below the confidence
  2661  	// threshold for each example.
  2662  	FalsePositiveRateAt1 float64 `json:"falsePositiveRateAt1,omitempty"`
  2663  	// PositionThreshold: Metrics are computed with an assumption that the model
  2664  	// always returns at most this many predictions (ordered by their score,
  2665  	// descendingly), but they all still need to meet the confidence_threshold.
  2666  	PositionThreshold int64 `json:"positionThreshold,omitempty"`
  2667  	// Precision: Precision for the given confidence threshold.
  2668  	Precision float64 `json:"precision,omitempty"`
  2669  	// PrecisionAt1: The precision when only considering the label that has the
  2670  	// highest prediction score and not below the confidence threshold for each
  2671  	// example.
  2672  	PrecisionAt1 float64 `json:"precisionAt1,omitempty"`
  2673  	// Recall: Recall (true positive rate) for the given confidence threshold.
  2674  	Recall float64 `json:"recall,omitempty"`
  2675  	// RecallAt1: The recall (true positive rate) when only considering the label
  2676  	// that has the highest prediction score and not below the confidence threshold
  2677  	// for each example.
  2678  	RecallAt1 float64 `json:"recallAt1,omitempty"`
  2679  	// TrueNegativeCount: The number of labels that were not created by the model,
  2680  	// but if they would, they would not match a ground truth label.
  2681  	TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"`
  2682  	// TruePositiveCount: The number of model created labels that match a ground
  2683  	// truth label.
  2684  	TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"`
  2685  	// ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") to
  2686  	// unconditionally include in API requests. By default, fields with empty or
  2687  	// default values are omitted from API requests. See
  2688  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2689  	// details.
  2690  	ForceSendFields []string `json:"-"`
  2691  	// NullFields is a list of field names (e.g. "ConfidenceThreshold") to include
  2692  	// in API requests with the JSON null value. By default, fields with empty
  2693  	// values are omitted from API requests. See
  2694  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2695  	NullFields []string `json:"-"`
  2696  }
  2697  
  2698  func (s *XPSConfidenceMetricsEntry) MarshalJSON() ([]byte, error) {
  2699  	type NoMethod XPSConfidenceMetricsEntry
  2700  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2701  }
  2702  
  2703  func (s *XPSConfidenceMetricsEntry) UnmarshalJSON(data []byte) error {
  2704  	type NoMethod XPSConfidenceMetricsEntry
  2705  	var s1 struct {
  2706  		ConfidenceThreshold  gensupport.JSONFloat64 `json:"confidenceThreshold"`
  2707  		F1Score              gensupport.JSONFloat64 `json:"f1Score"`
  2708  		F1ScoreAt1           gensupport.JSONFloat64 `json:"f1ScoreAt1"`
  2709  		FalsePositiveRate    gensupport.JSONFloat64 `json:"falsePositiveRate"`
  2710  		FalsePositiveRateAt1 gensupport.JSONFloat64 `json:"falsePositiveRateAt1"`
  2711  		Precision            gensupport.JSONFloat64 `json:"precision"`
  2712  		PrecisionAt1         gensupport.JSONFloat64 `json:"precisionAt1"`
  2713  		Recall               gensupport.JSONFloat64 `json:"recall"`
  2714  		RecallAt1            gensupport.JSONFloat64 `json:"recallAt1"`
  2715  		*NoMethod
  2716  	}
  2717  	s1.NoMethod = (*NoMethod)(s)
  2718  	if err := json.Unmarshal(data, &s1); err != nil {
  2719  		return err
  2720  	}
  2721  	s.ConfidenceThreshold = float64(s1.ConfidenceThreshold)
  2722  	s.F1Score = float64(s1.F1Score)
  2723  	s.F1ScoreAt1 = float64(s1.F1ScoreAt1)
  2724  	s.FalsePositiveRate = float64(s1.FalsePositiveRate)
  2725  	s.FalsePositiveRateAt1 = float64(s1.FalsePositiveRateAt1)
  2726  	s.Precision = float64(s1.Precision)
  2727  	s.PrecisionAt1 = float64(s1.PrecisionAt1)
  2728  	s.Recall = float64(s1.Recall)
  2729  	s.RecallAt1 = float64(s1.RecallAt1)
  2730  	return nil
  2731  }
  2732  
  2733  // XPSConfusionMatrix: Confusion matrix of the model running the
  2734  // classification.
  2735  type XPSConfusionMatrix struct {
  2736  	// AnnotationSpecIdToken: For the following three repeated fields, only one is
  2737  	// intended to be set. annotation_spec_id_token is preferable to be set. ID
  2738  	// tokens of the annotation specs used in the confusion matrix.
  2739  	AnnotationSpecIdToken []string `json:"annotationSpecIdToken,omitempty"`
  2740  	// Category: Category (mainly for segmentation). Set only for image
  2741  	// segmentation models. Note: uCAIP Image Segmentation should use
  2742  	// annotation_spec_id_token.
  2743  	Category []int64 `json:"category,omitempty"`
  2744  	// Row: Rows in the confusion matrix. The number of rows is equal to the size
  2745  	// of `annotation_spec_id_token`. `row[i].value[j]` is the number of examples
  2746  	// that have ground truth of the `annotation_spec_id_token[i]` and are
  2747  	// predicted as `annotation_spec_id_token[j]` by the model being evaluated.
  2748  	Row []*XPSConfusionMatrixRow `json:"row,omitempty"`
  2749  	// SentimentLabel: Sentiment labels used in the confusion matrix. Set only for
  2750  	// text sentiment models. For AutoML Text Revamp, use
  2751  	// `annotation_spec_id_token` instead and leave this field empty.
  2752  	SentimentLabel []int64 `json:"sentimentLabel,omitempty"`
  2753  	// ForceSendFields is a list of field names (e.g. "AnnotationSpecIdToken") to
  2754  	// unconditionally include in API requests. By default, fields with empty or
  2755  	// default values are omitted from API requests. See
  2756  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2757  	// details.
  2758  	ForceSendFields []string `json:"-"`
  2759  	// NullFields is a list of field names (e.g. "AnnotationSpecIdToken") to
  2760  	// include in API requests with the JSON null value. By default, fields with
  2761  	// empty values are omitted from API requests. See
  2762  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2763  	NullFields []string `json:"-"`
  2764  }
  2765  
  2766  func (s *XPSConfusionMatrix) MarshalJSON() ([]byte, error) {
  2767  	type NoMethod XPSConfusionMatrix
  2768  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2769  }
  2770  
  2771  // XPSConfusionMatrixRow: A row in the confusion matrix.
  2772  type XPSConfusionMatrixRow struct {
  2773  	// Count: Same as above except intended to represent other counts (for e.g. for
  2774  	// segmentation this is pixel count). NOTE(params): Only example_count or count
  2775  	// is set (oneoff does not support repeated fields unless they are embedded
  2776  	// inside another message).
  2777  	Count googleapi.Int64s `json:"count,omitempty"`
  2778  	// ExampleCount: Value of the specific cell in the confusion matrix. The number
  2779  	// of values each row has (i.e. the length of the row) is equal to the length
  2780  	// of the annotation_spec_id_token field.
  2781  	ExampleCount []int64 `json:"exampleCount,omitempty"`
  2782  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
  2783  	// include in API requests. By default, fields with empty or default values are
  2784  	// omitted from API requests. See
  2785  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2786  	// details.
  2787  	ForceSendFields []string `json:"-"`
  2788  	// NullFields is a list of field names (e.g. "Count") to include in API
  2789  	// requests with the JSON null value. By default, fields with empty values are
  2790  	// omitted from API requests. See
  2791  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2792  	NullFields []string `json:"-"`
  2793  }
  2794  
  2795  func (s *XPSConfusionMatrixRow) MarshalJSON() ([]byte, error) {
  2796  	type NoMethod XPSConfusionMatrixRow
  2797  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2798  }
  2799  
  2800  // XPSCoreMlFormat: A model format used for iOS mobile devices.
  2801  type XPSCoreMlFormat struct {
  2802  }
  2803  
  2804  // XPSCorrelationStats: A correlation statistics between two series of DataType
  2805  // values. The series may have differing DataType-s, but within a single series
  2806  // the DataType must be the same.
  2807  type XPSCorrelationStats struct {
  2808  	// CramersV: The correlation value using the Cramer's V measure.
  2809  	CramersV float64 `json:"cramersV,omitempty"`
  2810  	// ForceSendFields is a list of field names (e.g. "CramersV") to
  2811  	// unconditionally include in API requests. By default, fields with empty or
  2812  	// default values are omitted from API requests. See
  2813  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2814  	// details.
  2815  	ForceSendFields []string `json:"-"`
  2816  	// NullFields is a list of field names (e.g. "CramersV") to include in API
  2817  	// requests with the JSON null value. By default, fields with empty values are
  2818  	// omitted from API requests. See
  2819  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2820  	NullFields []string `json:"-"`
  2821  }
  2822  
  2823  func (s *XPSCorrelationStats) MarshalJSON() ([]byte, error) {
  2824  	type NoMethod XPSCorrelationStats
  2825  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2826  }
  2827  
  2828  func (s *XPSCorrelationStats) UnmarshalJSON(data []byte) error {
  2829  	type NoMethod XPSCorrelationStats
  2830  	var s1 struct {
  2831  		CramersV gensupport.JSONFloat64 `json:"cramersV"`
  2832  		*NoMethod
  2833  	}
  2834  	s1.NoMethod = (*NoMethod)(s)
  2835  	if err := json.Unmarshal(data, &s1); err != nil {
  2836  		return err
  2837  	}
  2838  	s.CramersV = float64(s1.CramersV)
  2839  	return nil
  2840  }
  2841  
  2842  // XPSDataErrors: Different types of errors and the stats associatesd with each
  2843  // error.
  2844  type XPSDataErrors struct {
  2845  	// Count: Number of records having errors associated with the enum.
  2846  	Count int64 `json:"count,omitempty"`
  2847  	// ErrorType: Type of the error.
  2848  	//
  2849  	// Possible values:
  2850  	//   "ERROR_TYPE_UNSPECIFIED" - Not specified.
  2851  	//   "UNSUPPORTED_AUDIO_FORMAT" - Audio format not in the formats by
  2852  	// cloud-speech AutoML. Currently only wav and flac file formats are supported.
  2853  	//   "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT" - File format differnt from
  2854  	// what is specified in the file name extension.
  2855  	//   "FILE_TOO_LARGE" - File too large. Maximum allowed size is 50 MB.
  2856  	//   "MISSING_TRANSCRIPTION" - Transcript is missing.
  2857  	ErrorType string `json:"errorType,omitempty"`
  2858  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
  2859  	// include in API requests. By default, fields with empty or default values are
  2860  	// omitted from API requests. See
  2861  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2862  	// details.
  2863  	ForceSendFields []string `json:"-"`
  2864  	// NullFields is a list of field names (e.g. "Count") to include in API
  2865  	// requests with the JSON null value. By default, fields with empty values are
  2866  	// omitted from API requests. See
  2867  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2868  	NullFields []string `json:"-"`
  2869  }
  2870  
  2871  func (s *XPSDataErrors) MarshalJSON() ([]byte, error) {
  2872  	type NoMethod XPSDataErrors
  2873  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2874  }
  2875  
  2876  // XPSDataStats: The data statistics of a series of values that share the same
  2877  // DataType.
  2878  type XPSDataStats struct {
  2879  	// ArrayStats: The statistics for ARRAY DataType.
  2880  	ArrayStats *XPSArrayStats `json:"arrayStats,omitempty"`
  2881  	// CategoryStats: The statistics for CATEGORY DataType.
  2882  	CategoryStats *XPSCategoryStats `json:"categoryStats,omitempty"`
  2883  	// DistinctValueCount: The number of distinct values.
  2884  	DistinctValueCount int64 `json:"distinctValueCount,omitempty,string"`
  2885  	// Float64Stats: The statistics for FLOAT64 DataType.
  2886  	Float64Stats *XPSFloat64Stats `json:"float64Stats,omitempty"`
  2887  	// NullValueCount: The number of values that are null.
  2888  	NullValueCount int64 `json:"nullValueCount,omitempty,string"`
  2889  	// StringStats: The statistics for STRING DataType.
  2890  	StringStats *XPSStringStats `json:"stringStats,omitempty"`
  2891  	// StructStats: The statistics for STRUCT DataType.
  2892  	StructStats *XPSStructStats `json:"structStats,omitempty"`
  2893  	// TimestampStats: The statistics for TIMESTAMP DataType.
  2894  	TimestampStats *XPSTimestampStats `json:"timestampStats,omitempty"`
  2895  	// ValidValueCount: The number of values that are valid.
  2896  	ValidValueCount int64 `json:"validValueCount,omitempty,string"`
  2897  	// ForceSendFields is a list of field names (e.g. "ArrayStats") to
  2898  	// unconditionally include in API requests. By default, fields with empty or
  2899  	// default values are omitted from API requests. See
  2900  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2901  	// details.
  2902  	ForceSendFields []string `json:"-"`
  2903  	// NullFields is a list of field names (e.g. "ArrayStats") to include in API
  2904  	// requests with the JSON null value. By default, fields with empty values are
  2905  	// omitted from API requests. See
  2906  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2907  	NullFields []string `json:"-"`
  2908  }
  2909  
  2910  func (s *XPSDataStats) MarshalJSON() ([]byte, error) {
  2911  	type NoMethod XPSDataStats
  2912  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2913  }
  2914  
  2915  // XPSDataType: Indicated the type of data that can be stored in a structured
  2916  // data entity (e.g. a table).
  2917  type XPSDataType struct {
  2918  	// CompatibleDataTypes: The highly compatible data types to this data type.
  2919  	CompatibleDataTypes []*XPSDataType `json:"compatibleDataTypes,omitempty"`
  2920  	// ListElementType: If type_code == ARRAY, then `list_element_type` is the type
  2921  	// of the elements.
  2922  	ListElementType *XPSDataType `json:"listElementType,omitempty"`
  2923  	// Nullable: If true, this DataType can also be `null`.
  2924  	Nullable bool `json:"nullable,omitempty"`
  2925  	// StructType: If type_code == STRUCT, then `struct_type` provides type
  2926  	// information for the struct's fields.
  2927  	StructType *XPSStructType `json:"structType,omitempty"`
  2928  	// TimeFormat: If type_code == TIMESTAMP then `time_format` provides the format
  2929  	// in which that time field is expressed. The time_format must be written in
  2930  	// `strftime` syntax. If time_format is not set, then the default format as
  2931  	// described on the field is used.
  2932  	TimeFormat string `json:"timeFormat,omitempty"`
  2933  	// TypeCode: Required. The TypeCode for this type.
  2934  	//
  2935  	// Possible values:
  2936  	//   "TYPE_CODE_UNSPECIFIED" - Not specified. Should not be used.
  2937  	//   "FLOAT64" - Encoded as `number`, or the strings "NaN", "Infinity", or
  2938  	// "-Infinity".
  2939  	//   "TIMESTAMP" - Must be between 0AD and 9999AD. Encoded as `string`
  2940  	// according to time_format, or, if that format is not set, then in RFC 3339
  2941  	// `date-time` format, where `time-offset` = "Z" (e.g.
  2942  	// 1985-04-12T23:20:50.52Z).
  2943  	//   "STRING" - Encoded as `string`.
  2944  	//   "ARRAY" - Encoded as `list`, where the list elements are represented
  2945  	// according to list_element_type.
  2946  	//   "STRUCT" - Encoded as `struct`, where field values are represented
  2947  	// according to struct_type.
  2948  	//   "CATEGORY" - Values of this type are not further understood by AutoML,
  2949  	// e.g. AutoML is unable to tell the order of values (as it could with
  2950  	// FLOAT64), or is unable to say if one value contains another (as it could
  2951  	// with STRING). Encoded as `string` (bytes should be base64-encoded, as
  2952  	// described in RFC 4648, section 4).
  2953  	TypeCode string `json:"typeCode,omitempty"`
  2954  	// ForceSendFields is a list of field names (e.g. "CompatibleDataTypes") to
  2955  	// unconditionally include in API requests. By default, fields with empty or
  2956  	// default values are omitted from API requests. See
  2957  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2958  	// details.
  2959  	ForceSendFields []string `json:"-"`
  2960  	// NullFields is a list of field names (e.g. "CompatibleDataTypes") to include
  2961  	// in API requests with the JSON null value. By default, fields with empty
  2962  	// values are omitted from API requests. See
  2963  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2964  	NullFields []string `json:"-"`
  2965  }
  2966  
  2967  func (s *XPSDataType) MarshalJSON() ([]byte, error) {
  2968  	type NoMethod XPSDataType
  2969  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2970  }
  2971  
  2972  // XPSDockerFormat: A model format used for Docker containers. Use the params
  2973  // field to customize the container. The container is verified to work
  2974  // correctly on ubuntu 16.04 operating system.
  2975  type XPSDockerFormat struct {
  2976  	// CpuArchitecture: Optional. Additional cpu information describing the
  2977  	// requirements for the to be exported model files.
  2978  	//
  2979  	// Possible values:
  2980  	//   "CPU_ARCHITECTURE_UNSPECIFIED"
  2981  	//   "CPU_ARCHITECTURE_X86_64"
  2982  	CpuArchitecture string `json:"cpuArchitecture,omitempty"`
  2983  	// GpuArchitecture: Optional. Additional gpu information describing the
  2984  	// requirements for the to be exported model files.
  2985  	//
  2986  	// Possible values:
  2987  	//   "GPU_ARCHITECTURE_UNSPECIFIED"
  2988  	//   "GPU_ARCHITECTURE_NVIDIA"
  2989  	GpuArchitecture string `json:"gpuArchitecture,omitempty"`
  2990  	// ForceSendFields is a list of field names (e.g. "CpuArchitecture") to
  2991  	// unconditionally include in API requests. By default, fields with empty or
  2992  	// default values are omitted from API requests. See
  2993  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2994  	// details.
  2995  	ForceSendFields []string `json:"-"`
  2996  	// NullFields is a list of field names (e.g. "CpuArchitecture") to include in
  2997  	// API requests with the JSON null value. By default, fields with empty values
  2998  	// are omitted from API requests. See
  2999  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3000  	NullFields []string `json:"-"`
  3001  }
  3002  
  3003  func (s *XPSDockerFormat) MarshalJSON() ([]byte, error) {
  3004  	type NoMethod XPSDockerFormat
  3005  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3006  }
  3007  
  3008  // XPSEdgeTpuTfLiteFormat: A model format used for Edge TPU
  3009  // (https://cloud.google.com/edge-tpu/) devices.
  3010  type XPSEdgeTpuTfLiteFormat struct {
  3011  }
  3012  
  3013  // XPSEvaluationMetrics: Contains xPS-specific model evaluation metrics either
  3014  // for a single annotation spec (label), or for the model overall. Next tag:
  3015  // 18.
  3016  type XPSEvaluationMetrics struct {
  3017  	// AnnotationSpecIdToken: The annotation_spec for which this evaluation metrics
  3018  	// instance had been created. Empty iff this is an overall model evaluation
  3019  	// (like Tables evaluation metrics), i.e. aggregated across all labels. The
  3020  	// value comes from the input annotations in AnnotatedExample. For MVP product
  3021  	// or for text sentiment models where annotation_spec_id_token is not
  3022  	// available, set label instead.
  3023  	AnnotationSpecIdToken string `json:"annotationSpecIdToken,omitempty"`
  3024  	// Category: The integer category label for which this evaluation metric
  3025  	// instance had been created. Valid categories are 0 or higher. Overall model
  3026  	// evaluation should set this to negative values (rather than implicit zero).
  3027  	// Only used for Image Segmentation (prefer to set annotation_spec_id_token
  3028  	// instead). Note: uCAIP Image Segmentation should use
  3029  	// annotation_spec_id_token.
  3030  	Category int64 `json:"category,omitempty"`
  3031  	// EvaluatedExampleCount: The number of examples used to create this evaluation
  3032  	// metrics instance.
  3033  	EvaluatedExampleCount           int64                                     `json:"evaluatedExampleCount,omitempty"`
  3034  	ImageClassificationEvalMetrics  *XPSClassificationEvaluationMetrics       `json:"imageClassificationEvalMetrics,omitempty"`
  3035  	ImageObjectDetectionEvalMetrics *XPSImageObjectDetectionEvaluationMetrics `json:"imageObjectDetectionEvalMetrics,omitempty"`
  3036  	ImageSegmentationEvalMetrics    *XPSImageSegmentationEvaluationMetrics    `json:"imageSegmentationEvalMetrics,omitempty"`
  3037  	// Label: The label for which this evaluation metrics instance had been
  3038  	// created. Empty iff this is an overall model evaluation (like Tables
  3039  	// evaluation metrics), i.e. aggregated across all labels. The label maps to
  3040  	// AnnotationSpec.display_name in Public API protos. Only used by MVP
  3041  	// implementation and text sentiment FULL implementation.
  3042  	Label                             string                                      `json:"label,omitempty"`
  3043  	RegressionEvalMetrics             *XPSRegressionEvaluationMetrics             `json:"regressionEvalMetrics,omitempty"`
  3044  	TablesClassificationEvalMetrics   *XPSClassificationEvaluationMetrics         `json:"tablesClassificationEvalMetrics,omitempty"`
  3045  	TablesEvalMetrics                 *XPSTablesEvaluationMetrics                 `json:"tablesEvalMetrics,omitempty"`
  3046  	TextClassificationEvalMetrics     *XPSClassificationEvaluationMetrics         `json:"textClassificationEvalMetrics,omitempty"`
  3047  	TextExtractionEvalMetrics         *XPSTextExtractionEvaluationMetrics         `json:"textExtractionEvalMetrics,omitempty"`
  3048  	TextSentimentEvalMetrics          *XPSTextSentimentEvaluationMetrics          `json:"textSentimentEvalMetrics,omitempty"`
  3049  	TranslationEvalMetrics            *XPSTranslationEvaluationMetrics            `json:"translationEvalMetrics,omitempty"`
  3050  	VideoActionRecognitionEvalMetrics *XPSVideoActionRecognitionEvaluationMetrics `json:"videoActionRecognitionEvalMetrics,omitempty"`
  3051  	VideoClassificationEvalMetrics    *XPSClassificationEvaluationMetrics         `json:"videoClassificationEvalMetrics,omitempty"`
  3052  	VideoObjectTrackingEvalMetrics    *XPSVideoObjectTrackingEvaluationMetrics    `json:"videoObjectTrackingEvalMetrics,omitempty"`
  3053  	// ForceSendFields is a list of field names (e.g. "AnnotationSpecIdToken") to
  3054  	// unconditionally include in API requests. By default, fields with empty or
  3055  	// default values are omitted from API requests. See
  3056  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3057  	// details.
  3058  	ForceSendFields []string `json:"-"`
  3059  	// NullFields is a list of field names (e.g. "AnnotationSpecIdToken") to
  3060  	// include in API requests with the JSON null value. By default, fields with
  3061  	// empty values are omitted from API requests. See
  3062  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3063  	NullFields []string `json:"-"`
  3064  }
  3065  
  3066  func (s *XPSEvaluationMetrics) MarshalJSON() ([]byte, error) {
  3067  	type NoMethod XPSEvaluationMetrics
  3068  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3069  }
  3070  
  3071  // XPSEvaluationMetricsSet: Specifies location of model evaluation metrics.
  3072  type XPSEvaluationMetricsSet struct {
  3073  	// EvaluationMetrics: Inline EvaluationMetrics - should be relatively small.
  3074  	// For passing large quantities of exhaustive metrics, use file_spec.
  3075  	EvaluationMetrics []*XPSEvaluationMetrics `json:"evaluationMetrics,omitempty"`
  3076  	// FileSpec: File spec containing evaluation metrics of a model, must point to
  3077  	// RecordIO file(s) of intelligence.cloud.automl.xps.EvaluationMetrics
  3078  	// messages.
  3079  	FileSpec *XPSFileSpec `json:"fileSpec,omitempty"`
  3080  	// NumEvaluationMetrics: Number of the evaluation metrics (usually one per
  3081  	// label plus overall).
  3082  	NumEvaluationMetrics int64 `json:"numEvaluationMetrics,omitempty,string"`
  3083  	// ForceSendFields is a list of field names (e.g. "EvaluationMetrics") to
  3084  	// unconditionally include in API requests. By default, fields with empty or
  3085  	// default values are omitted from API requests. See
  3086  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3087  	// details.
  3088  	ForceSendFields []string `json:"-"`
  3089  	// NullFields is a list of field names (e.g. "EvaluationMetrics") to include in
  3090  	// API requests with the JSON null value. By default, fields with empty values
  3091  	// are omitted from API requests. See
  3092  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3093  	NullFields []string `json:"-"`
  3094  }
  3095  
  3096  func (s *XPSEvaluationMetricsSet) MarshalJSON() ([]byte, error) {
  3097  	type NoMethod XPSEvaluationMetricsSet
  3098  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3099  }
  3100  
  3101  // XPSExampleSet: Set of examples or input sources.
  3102  type XPSExampleSet struct {
  3103  	// FileSpec: File spec of the examples or input sources.
  3104  	FileSpec *XPSFileSpec `json:"fileSpec,omitempty"`
  3105  	// Fingerprint: Fingerprint of the example set.
  3106  	Fingerprint int64 `json:"fingerprint,omitempty,string"`
  3107  	// NumExamples: Number of examples.
  3108  	NumExamples int64 `json:"numExamples,omitempty,string"`
  3109  	// NumInputSources: Number of input sources.
  3110  	NumInputSources int64 `json:"numInputSources,omitempty,string"`
  3111  	// ForceSendFields is a list of field names (e.g. "FileSpec") to
  3112  	// unconditionally include in API requests. By default, fields with empty or
  3113  	// default values are omitted from API requests. See
  3114  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3115  	// details.
  3116  	ForceSendFields []string `json:"-"`
  3117  	// NullFields is a list of field names (e.g. "FileSpec") to include in API
  3118  	// requests with the JSON null value. By default, fields with empty values are
  3119  	// omitted from API requests. See
  3120  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3121  	NullFields []string `json:"-"`
  3122  }
  3123  
  3124  func (s *XPSExampleSet) MarshalJSON() ([]byte, error) {
  3125  	type NoMethod XPSExampleSet
  3126  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3127  }
  3128  
  3129  type XPSExportModelOutputConfig struct {
  3130  	CoreMlFormat        *XPSCoreMlFormat        `json:"coreMlFormat,omitempty"`
  3131  	DockerFormat        *XPSDockerFormat        `json:"dockerFormat,omitempty"`
  3132  	EdgeTpuTfLiteFormat *XPSEdgeTpuTfLiteFormat `json:"edgeTpuTfLiteFormat,omitempty"`
  3133  	// ExportFirebaseAuxiliaryInfo: For any model and format: If true, will
  3134  	// additionally export FirebaseExportedModelInfo in a firebase.txt file.
  3135  	ExportFirebaseAuxiliaryInfo bool `json:"exportFirebaseAuxiliaryInfo,omitempty"`
  3136  	// OutputGcrUri: The Google Contained Registry (GCR) path the exported files to
  3137  	// be pushed to. This location is set if the exported format is DOCKDER.
  3138  	OutputGcrUri string `json:"outputGcrUri,omitempty"`
  3139  	// OutputGcsUri: The Google Cloud Storage (GCS) directory where XPS will output
  3140  	// the exported models and related files. Format: gs://bucket/directory
  3141  	OutputGcsUri       string                 `json:"outputGcsUri,omitempty"`
  3142  	TfJsFormat         *XPSTfJsFormat         `json:"tfJsFormat,omitempty"`
  3143  	TfLiteFormat       *XPSTfLiteFormat       `json:"tfLiteFormat,omitempty"`
  3144  	TfSavedModelFormat *XPSTfSavedModelFormat `json:"tfSavedModelFormat,omitempty"`
  3145  	// ForceSendFields is a list of field names (e.g. "CoreMlFormat") to
  3146  	// unconditionally include in API requests. By default, fields with empty or
  3147  	// default values are omitted from API requests. See
  3148  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3149  	// details.
  3150  	ForceSendFields []string `json:"-"`
  3151  	// NullFields is a list of field names (e.g. "CoreMlFormat") to include in API
  3152  	// requests with the JSON null value. By default, fields with empty values are
  3153  	// omitted from API requests. See
  3154  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3155  	NullFields []string `json:"-"`
  3156  }
  3157  
  3158  func (s *XPSExportModelOutputConfig) MarshalJSON() ([]byte, error) {
  3159  	type NoMethod XPSExportModelOutputConfig
  3160  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3161  }
  3162  
  3163  // XPSFileSpec: Spec of input and output files, on external file systems (CNS,
  3164  // GCS, etc).
  3165  type XPSFileSpec struct {
  3166  	// DirectoryPath: Deprecated. Use file_spec.
  3167  	DirectoryPath string `json:"directoryPath,omitempty"`
  3168  	// Possible values:
  3169  	//   "FILE_FORMAT_UNKNOWN"
  3170  	//   "FILE_FORMAT_SSTABLE"
  3171  	//   "FILE_FORMAT_TRANSLATION_RKV" - Internal format for parallel text data
  3172  	// used by Google Translate. go/rkvtools
  3173  	//   "FILE_FORMAT_RECORDIO"
  3174  	//   "FILE_FORMAT_RAW_CSV" - Only the lexicographically first file described by
  3175  	// the file_spec contains the header line.
  3176  	//   "FILE_FORMAT_RAW_CAPACITOR"
  3177  	FileFormat string `json:"fileFormat,omitempty"`
  3178  	// FileSpec: Single file path, or file pattern of format
  3179  	// "/path/to/file@shard_count". E.g. /cns/cell-d/somewhere/file@2 is expanded
  3180  	// to two files: /cns/cell-d/somewhere/file-00000-of-00002 and
  3181  	// /cns/cell-d/somewhere/file-00001-of-00002.
  3182  	FileSpec string `json:"fileSpec,omitempty"`
  3183  	// SingleFilePath: Deprecated. Use file_spec.
  3184  	SingleFilePath string `json:"singleFilePath,omitempty"`
  3185  	// ForceSendFields is a list of field names (e.g. "DirectoryPath") to
  3186  	// unconditionally include in API requests. By default, fields with empty or
  3187  	// default values are omitted from API requests. See
  3188  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3189  	// details.
  3190  	ForceSendFields []string `json:"-"`
  3191  	// NullFields is a list of field names (e.g. "DirectoryPath") to include in API
  3192  	// requests with the JSON null value. By default, fields with empty values are
  3193  	// omitted from API requests. See
  3194  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3195  	NullFields []string `json:"-"`
  3196  }
  3197  
  3198  func (s *XPSFileSpec) MarshalJSON() ([]byte, error) {
  3199  	type NoMethod XPSFileSpec
  3200  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3201  }
  3202  
  3203  // XPSFloat64Stats: The data statistics of a series of FLOAT64 values.
  3204  type XPSFloat64Stats struct {
  3205  	CommonStats *XPSCommonStats `json:"commonStats,omitempty"`
  3206  	// HistogramBuckets: Histogram buckets of the data series. Sorted by the min
  3207  	// value of the bucket, ascendingly, and the number of the buckets is
  3208  	// dynamically generated. The buckets are non-overlapping and completely cover
  3209  	// whole FLOAT64 range with min of first bucket being "-Infinity", and max of
  3210  	// the last one being "Infinity".
  3211  	HistogramBuckets []*XPSFloat64StatsHistogramBucket `json:"histogramBuckets,omitempty"`
  3212  	// Mean: The mean of the series.
  3213  	Mean float64 `json:"mean,omitempty"`
  3214  	// Quantiles: Ordered from 0 to k k-quantile values of the data series of n
  3215  	// values. The value at index i is, approximately, the i*n/k-th smallest value
  3216  	// in the series; for i = 0 and i = k these are, respectively, the min and max
  3217  	// values.
  3218  	Quantiles []float64 `json:"quantiles,omitempty"`
  3219  	// StandardDeviation: The standard deviation of the series.
  3220  	StandardDeviation float64 `json:"standardDeviation,omitempty"`
  3221  	// ForceSendFields is a list of field names (e.g. "CommonStats") to
  3222  	// unconditionally include in API requests. By default, fields with empty or
  3223  	// default values are omitted from API requests. See
  3224  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3225  	// details.
  3226  	ForceSendFields []string `json:"-"`
  3227  	// NullFields is a list of field names (e.g. "CommonStats") to include in API
  3228  	// requests with the JSON null value. By default, fields with empty values are
  3229  	// omitted from API requests. See
  3230  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3231  	NullFields []string `json:"-"`
  3232  }
  3233  
  3234  func (s *XPSFloat64Stats) MarshalJSON() ([]byte, error) {
  3235  	type NoMethod XPSFloat64Stats
  3236  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3237  }
  3238  
  3239  func (s *XPSFloat64Stats) UnmarshalJSON(data []byte) error {
  3240  	type NoMethod XPSFloat64Stats
  3241  	var s1 struct {
  3242  		Mean              gensupport.JSONFloat64   `json:"mean"`
  3243  		Quantiles         []gensupport.JSONFloat64 `json:"quantiles"`
  3244  		StandardDeviation gensupport.JSONFloat64   `json:"standardDeviation"`
  3245  		*NoMethod
  3246  	}
  3247  	s1.NoMethod = (*NoMethod)(s)
  3248  	if err := json.Unmarshal(data, &s1); err != nil {
  3249  		return err
  3250  	}
  3251  	s.Mean = float64(s1.Mean)
  3252  	s.Quantiles = make([]float64, len(s1.Quantiles))
  3253  	for i := range s1.Quantiles {
  3254  		s.Quantiles[i] = float64(s1.Quantiles[i])
  3255  	}
  3256  	s.StandardDeviation = float64(s1.StandardDeviation)
  3257  	return nil
  3258  }
  3259  
  3260  // XPSFloat64StatsHistogramBucket: A bucket of a histogram.
  3261  type XPSFloat64StatsHistogramBucket struct {
  3262  	// Count: The number of data values that are in the bucket, i.e. are between
  3263  	// min and max values.
  3264  	Count int64 `json:"count,omitempty,string"`
  3265  	// Max: The maximum value of the bucket, exclusive unless max = "Infinity",
  3266  	// in which case it's inclusive.
  3267  	Max float64 `json:"max,omitempty"`
  3268  	// Min: The minimum value of the bucket, inclusive.
  3269  	Min float64 `json:"min,omitempty"`
  3270  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
  3271  	// include in API requests. By default, fields with empty or default values are
  3272  	// omitted from API requests. See
  3273  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3274  	// details.
  3275  	ForceSendFields []string `json:"-"`
  3276  	// NullFields is a list of field names (e.g. "Count") to include in API
  3277  	// requests with the JSON null value. By default, fields with empty values are
  3278  	// omitted from API requests. See
  3279  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3280  	NullFields []string `json:"-"`
  3281  }
  3282  
  3283  func (s *XPSFloat64StatsHistogramBucket) MarshalJSON() ([]byte, error) {
  3284  	type NoMethod XPSFloat64StatsHistogramBucket
  3285  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3286  }
  3287  
  3288  func (s *XPSFloat64StatsHistogramBucket) UnmarshalJSON(data []byte) error {
  3289  	type NoMethod XPSFloat64StatsHistogramBucket
  3290  	var s1 struct {
  3291  		Max gensupport.JSONFloat64 `json:"max"`
  3292  		Min gensupport.JSONFloat64 `json:"min"`
  3293  		*NoMethod
  3294  	}
  3295  	s1.NoMethod = (*NoMethod)(s)
  3296  	if err := json.Unmarshal(data, &s1); err != nil {
  3297  		return err
  3298  	}
  3299  	s.Max = float64(s1.Max)
  3300  	s.Min = float64(s1.Min)
  3301  	return nil
  3302  }
  3303  
  3304  type XPSImageClassificationTrainResponse struct {
  3305  	// ClassCount: Total number of classes.
  3306  	ClassCount int64 `json:"classCount,omitempty,string"`
  3307  	// ExportModelSpec: Information of downloadable models that are pre-generated
  3308  	// as part of training flow and will be persisted in AutoMl backend. Populated
  3309  	// for AutoMl requests.
  3310  	ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"`
  3311  	// ModelArtifactSpec: ## The fields below are only populated under uCAIP
  3312  	// request scope.
  3313  	ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"`
  3314  	ModelServingSpec  *XPSImageModelServingSpec  `json:"modelServingSpec,omitempty"`
  3315  	// StopReason: Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED',
  3316  	// 'MODEL_CONVERGED', 'MODEL_EARLY_STOPPED'.
  3317  	//
  3318  	// Possible values:
  3319  	//   "TRAIN_STOP_REASON_UNSPECIFIED"
  3320  	//   "TRAIN_STOP_REASON_BUDGET_REACHED"
  3321  	//   "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can not be
  3322  	// resumbed training.
  3323  	//   "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, can be
  3324  	// further trained till full convergency.
  3325  	StopReason string `json:"stopReason,omitempty"`
  3326  	// TrainCostInNodeTime: The actual cost to create this model. - For edge type
  3327  	// model, the cost is expressed in node hour. - For cloud type model,the cost
  3328  	// is expressed in compute hour. - Populated for models created before GA. To
  3329  	// be deprecated after GA.
  3330  	TrainCostInNodeTime string `json:"trainCostInNodeTime,omitempty"`
  3331  	// TrainCostNodeSeconds: The actual training cost, expressed in node seconds.
  3332  	// Populated for models trained in node time.
  3333  	TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"`
  3334  	// ForceSendFields is a list of field names (e.g. "ClassCount") to
  3335  	// unconditionally include in API requests. By default, fields with empty or
  3336  	// default values are omitted from API requests. See
  3337  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3338  	// details.
  3339  	ForceSendFields []string `json:"-"`
  3340  	// NullFields is a list of field names (e.g. "ClassCount") to include in API
  3341  	// requests with the JSON null value. By default, fields with empty values are
  3342  	// omitted from API requests. See
  3343  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3344  	NullFields []string `json:"-"`
  3345  }
  3346  
  3347  func (s *XPSImageClassificationTrainResponse) MarshalJSON() ([]byte, error) {
  3348  	type NoMethod XPSImageClassificationTrainResponse
  3349  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3350  }
  3351  
  3352  // XPSImageExportModelSpec: Information of downloadable models that are
  3353  // pre-generated as part of training flow and will be persisted in AutoMl
  3354  // backend. Upon receiving ExportModel request from user, AutoMl backend can
  3355  // serve the pre-generated models to user if exists (by copying the files from
  3356  // internal path to user provided location), otherwise, AutoMl backend will
  3357  // call xPS ExportModel API to generate the model on the fly with the
  3358  // requesting format.
  3359  type XPSImageExportModelSpec struct {
  3360  	// ExportModelOutputConfig: Contains the model format and internal location of
  3361  	// the model files to be exported/downloaded. Use the GCS bucket name which is
  3362  	// provided via TrainRequest.gcs_bucket_name to store the model files.
  3363  	ExportModelOutputConfig []*XPSExportModelOutputConfig `json:"exportModelOutputConfig,omitempty"`
  3364  	// ForceSendFields is a list of field names (e.g. "ExportModelOutputConfig") to
  3365  	// unconditionally include in API requests. By default, fields with empty or
  3366  	// default values are omitted from API requests. See
  3367  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3368  	// details.
  3369  	ForceSendFields []string `json:"-"`
  3370  	// NullFields is a list of field names (e.g. "ExportModelOutputConfig") to
  3371  	// include in API requests with the JSON null value. By default, fields with
  3372  	// empty values are omitted from API requests. See
  3373  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3374  	NullFields []string `json:"-"`
  3375  }
  3376  
  3377  func (s *XPSImageExportModelSpec) MarshalJSON() ([]byte, error) {
  3378  	type NoMethod XPSImageExportModelSpec
  3379  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3380  }
  3381  
  3382  // XPSImageModelArtifactSpec: Stores the locations and related metadata of the
  3383  // model artifacts. Populated for uCAIP requests only.
  3384  type XPSImageModelArtifactSpec struct {
  3385  	// CheckpointArtifact: The Tensorflow checkpoint files. e.g. Used for resumable
  3386  	// training.
  3387  	CheckpointArtifact *XPSModelArtifactItem `json:"checkpointArtifact,omitempty"`
  3388  	// ExportArtifact: The model binary files in different formats for model
  3389  	// export.
  3390  	ExportArtifact []*XPSModelArtifactItem `json:"exportArtifact,omitempty"`
  3391  	// LabelGcsUri: GCS uri of decoded labels file for model export 'dict.txt'.
  3392  	LabelGcsUri string `json:"labelGcsUri,omitempty"`
  3393  	// ServingArtifact: The default model binary file used for serving (e.g. online
  3394  	// predict, batch predict) via public Cloud AI Platform API.
  3395  	ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"`
  3396  	// TfJsBinaryGcsPrefix: GCS uri prefix of Tensorflow JavaScript binary files
  3397  	// 'groupX-shardXofX.bin' Deprecated.
  3398  	TfJsBinaryGcsPrefix string `json:"tfJsBinaryGcsPrefix,omitempty"`
  3399  	// TfLiteMetadataGcsUri: GCS uri of Tensorflow Lite metadata
  3400  	// 'tflite_metadata.json'.
  3401  	TfLiteMetadataGcsUri string `json:"tfLiteMetadataGcsUri,omitempty"`
  3402  	// ForceSendFields is a list of field names (e.g. "CheckpointArtifact") to
  3403  	// unconditionally include in API requests. By default, fields with empty or
  3404  	// default values are omitted from API requests. See
  3405  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3406  	// details.
  3407  	ForceSendFields []string `json:"-"`
  3408  	// NullFields is a list of field names (e.g. "CheckpointArtifact") to include
  3409  	// in API requests with the JSON null value. By default, fields with empty
  3410  	// values are omitted from API requests. See
  3411  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3412  	NullFields []string `json:"-"`
  3413  }
  3414  
  3415  func (s *XPSImageModelArtifactSpec) MarshalJSON() ([]byte, error) {
  3416  	type NoMethod XPSImageModelArtifactSpec
  3417  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3418  }
  3419  
  3420  // XPSImageModelServingSpec: Serving specification for image models.
  3421  type XPSImageModelServingSpec struct {
  3422  	// ModelThroughputEstimation: Populate under uCAIP request scope.
  3423  	ModelThroughputEstimation []*XPSImageModelServingSpecModelThroughputEstimation `json:"modelThroughputEstimation,omitempty"`
  3424  	// NodeQps: An estimated value of how much traffic a node can serve. Populated
  3425  	// for AutoMl request only.
  3426  	NodeQps float64 `json:"nodeQps,omitempty"`
  3427  	// TfRuntimeVersion: ## The fields below are only populated under uCAIP request
  3428  	// scope. https://cloud.google.com/ml-engine/docs/runtime-version-list
  3429  	TfRuntimeVersion string `json:"tfRuntimeVersion,omitempty"`
  3430  	// ForceSendFields is a list of field names (e.g. "ModelThroughputEstimation")
  3431  	// to unconditionally include in API requests. By default, fields with empty or
  3432  	// default values are omitted from API requests. See
  3433  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3434  	// details.
  3435  	ForceSendFields []string `json:"-"`
  3436  	// NullFields is a list of field names (e.g. "ModelThroughputEstimation") to
  3437  	// include in API requests with the JSON null value. By default, fields with
  3438  	// empty values are omitted from API requests. See
  3439  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3440  	NullFields []string `json:"-"`
  3441  }
  3442  
  3443  func (s *XPSImageModelServingSpec) MarshalJSON() ([]byte, error) {
  3444  	type NoMethod XPSImageModelServingSpec
  3445  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3446  }
  3447  
  3448  func (s *XPSImageModelServingSpec) UnmarshalJSON(data []byte) error {
  3449  	type NoMethod XPSImageModelServingSpec
  3450  	var s1 struct {
  3451  		NodeQps gensupport.JSONFloat64 `json:"nodeQps"`
  3452  		*NoMethod
  3453  	}
  3454  	s1.NoMethod = (*NoMethod)(s)
  3455  	if err := json.Unmarshal(data, &s1); err != nil {
  3456  		return err
  3457  	}
  3458  	s.NodeQps = float64(s1.NodeQps)
  3459  	return nil
  3460  }
  3461  
  3462  type XPSImageModelServingSpecModelThroughputEstimation struct {
  3463  	// Possible values:
  3464  	//   "UNSPECIFIED"
  3465  	//   "NVIDIA_TESLA_K80" - Nvidia Tesla K80 GPU.
  3466  	//   "NVIDIA_TESLA_P100" - Nvidia Tesla P100 GPU.
  3467  	//   "NVIDIA_TESLA_V100" - Nvidia Tesla V100 GPU.
  3468  	//   "NVIDIA_TESLA_P4" - Nvidia Tesla P4 GPU.
  3469  	//   "NVIDIA_TESLA_T4" - Nvidia Tesla T4 GPU.
  3470  	//   "NVIDIA_TESLA_A100" - Nvidia Tesla A100 GPU.
  3471  	//   "NVIDIA_A100_80GB" - Nvidia A100 80GB GPU.
  3472  	//   "NVIDIA_L4" - Nvidia L4 GPU.
  3473  	//   "NVIDIA_H100_80GB" - Nvidia H100 80Gb GPU.
  3474  	//   "TPU_V2" - TPU v2 (JellyFish).
  3475  	//   "TPU_V3" - TPU v3 (DragonFish).
  3476  	//   "TPU_V4_POD" - TPU_v4 (PufferFish).
  3477  	//   "TPU_V5_LITEPOD" - TPU v5 Lite Pods.
  3478  	ComputeEngineAcceleratorType string `json:"computeEngineAcceleratorType,omitempty"`
  3479  	// LatencyInMilliseconds: Estimated latency.
  3480  	LatencyInMilliseconds float64 `json:"latencyInMilliseconds,omitempty"`
  3481  	// NodeQps: The approximate qps a deployed node can serve.
  3482  	NodeQps float64 `json:"nodeQps,omitempty"`
  3483  	// Possible values:
  3484  	//   "PARTITION_TYPE_UNSPECIFIED"
  3485  	//   "PARTITION_ZERO" - The default partition.
  3486  	//   "PARTITION_REDUCED_HOMING" - It has significantly lower replication than
  3487  	// partition-0 and is located in the US only. It also has a larger model size
  3488  	// limit and higher default RAM quota than partition-0. Customers with batch
  3489  	// traffic, US-based traffic, or very large models should use this partition.
  3490  	// Capacity in this partition is significantly cheaper than partition-0.
  3491  	//   "PARTITION_JELLYFISH" - To be used by customers with Jellyfish-accelerated
  3492  	// ops. See go/servomatic-jellyfish for details.
  3493  	//   "PARTITION_CPU" - The partition used by regionalized servomatic cloud
  3494  	// regions.
  3495  	//   "PARTITION_CUSTOM_STORAGE_CPU" - The partition used for loading models
  3496  	// from custom storage.
  3497  	ServomaticPartitionType string `json:"servomaticPartitionType,omitempty"`
  3498  	// ForceSendFields is a list of field names (e.g.
  3499  	// "ComputeEngineAcceleratorType") to unconditionally include in API requests.
  3500  	// By default, fields with empty or default values are omitted from API
  3501  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  3502  	// for more details.
  3503  	ForceSendFields []string `json:"-"`
  3504  	// NullFields is a list of field names (e.g. "ComputeEngineAcceleratorType") to
  3505  	// include in API requests with the JSON null value. By default, fields with
  3506  	// empty values are omitted from API requests. See
  3507  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3508  	NullFields []string `json:"-"`
  3509  }
  3510  
  3511  func (s *XPSImageModelServingSpecModelThroughputEstimation) MarshalJSON() ([]byte, error) {
  3512  	type NoMethod XPSImageModelServingSpecModelThroughputEstimation
  3513  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3514  }
  3515  
  3516  func (s *XPSImageModelServingSpecModelThroughputEstimation) UnmarshalJSON(data []byte) error {
  3517  	type NoMethod XPSImageModelServingSpecModelThroughputEstimation
  3518  	var s1 struct {
  3519  		LatencyInMilliseconds gensupport.JSONFloat64 `json:"latencyInMilliseconds"`
  3520  		NodeQps               gensupport.JSONFloat64 `json:"nodeQps"`
  3521  		*NoMethod
  3522  	}
  3523  	s1.NoMethod = (*NoMethod)(s)
  3524  	if err := json.Unmarshal(data, &s1); err != nil {
  3525  		return err
  3526  	}
  3527  	s.LatencyInMilliseconds = float64(s1.LatencyInMilliseconds)
  3528  	s.NodeQps = float64(s1.NodeQps)
  3529  	return nil
  3530  }
  3531  
  3532  // XPSImageObjectDetectionEvaluationMetrics: Model evaluation metrics for image
  3533  // object detection problems. Evaluates prediction quality of labeled bounding
  3534  // boxes.
  3535  type XPSImageObjectDetectionEvaluationMetrics struct {
  3536  	// BoundingBoxMeanAveragePrecision: The single metric for bounding boxes
  3537  	// evaluation: the mean_average_precision averaged over all
  3538  	// bounding_box_metrics_entries.
  3539  	BoundingBoxMeanAveragePrecision float64 `json:"boundingBoxMeanAveragePrecision,omitempty"`
  3540  	// BoundingBoxMetricsEntries: The bounding boxes match metrics for each
  3541  	// Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
  3542  	// each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 pair.
  3543  	BoundingBoxMetricsEntries []*XPSBoundingBoxMetricsEntry `json:"boundingBoxMetricsEntries,omitempty"`
  3544  	// EvaluatedBoundingBoxCount: The total number of bounding boxes (i.e. summed
  3545  	// over all images) the ground truth used to create this evaluation had.
  3546  	EvaluatedBoundingBoxCount int64 `json:"evaluatedBoundingBoxCount,omitempty"`
  3547  	// ForceSendFields is a list of field names (e.g.
  3548  	// "BoundingBoxMeanAveragePrecision") to unconditionally include in API
  3549  	// requests. By default, fields with empty or default values are omitted from
  3550  	// API requests. See
  3551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3552  	// details.
  3553  	ForceSendFields []string `json:"-"`
  3554  	// NullFields is a list of field names (e.g. "BoundingBoxMeanAveragePrecision")
  3555  	// to include in API requests with the JSON null value. By default, fields with
  3556  	// empty values are omitted from API requests. See
  3557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3558  	NullFields []string `json:"-"`
  3559  }
  3560  
  3561  func (s *XPSImageObjectDetectionEvaluationMetrics) MarshalJSON() ([]byte, error) {
  3562  	type NoMethod XPSImageObjectDetectionEvaluationMetrics
  3563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3564  }
  3565  
  3566  func (s *XPSImageObjectDetectionEvaluationMetrics) UnmarshalJSON(data []byte) error {
  3567  	type NoMethod XPSImageObjectDetectionEvaluationMetrics
  3568  	var s1 struct {
  3569  		BoundingBoxMeanAveragePrecision gensupport.JSONFloat64 `json:"boundingBoxMeanAveragePrecision"`
  3570  		*NoMethod
  3571  	}
  3572  	s1.NoMethod = (*NoMethod)(s)
  3573  	if err := json.Unmarshal(data, &s1); err != nil {
  3574  		return err
  3575  	}
  3576  	s.BoundingBoxMeanAveragePrecision = float64(s1.BoundingBoxMeanAveragePrecision)
  3577  	return nil
  3578  }
  3579  
  3580  type XPSImageObjectDetectionModelSpec struct {
  3581  	// ClassCount: Total number of classes.
  3582  	ClassCount      int64                    `json:"classCount,omitempty,string"`
  3583  	ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"`
  3584  	// MaxBoundingBoxCount: Max number of bounding box.
  3585  	MaxBoundingBoxCount int64 `json:"maxBoundingBoxCount,omitempty,string"`
  3586  	// ModelArtifactSpec: ## The fields below are only populated under uCAIP
  3587  	// request scope.
  3588  	ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"`
  3589  	ModelServingSpec  *XPSImageModelServingSpec  `json:"modelServingSpec,omitempty"`
  3590  	// StopReason: Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED',
  3591  	// 'MODEL_CONVERGED'.
  3592  	//
  3593  	// Possible values:
  3594  	//   "TRAIN_STOP_REASON_UNSPECIFIED"
  3595  	//   "TRAIN_STOP_REASON_BUDGET_REACHED"
  3596  	//   "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can not be
  3597  	// resumbed training.
  3598  	//   "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, can be
  3599  	// further trained till full convergency.
  3600  	StopReason string `json:"stopReason,omitempty"`
  3601  	// TrainCostNodeSeconds: The actual train cost of creating this model,
  3602  	// expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.
  3603  	TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"`
  3604  	// ForceSendFields is a list of field names (e.g. "ClassCount") to
  3605  	// unconditionally include in API requests. By default, fields with empty or
  3606  	// default values are omitted from API requests. See
  3607  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3608  	// details.
  3609  	ForceSendFields []string `json:"-"`
  3610  	// NullFields is a list of field names (e.g. "ClassCount") to include in API
  3611  	// requests with the JSON null value. By default, fields with empty values are
  3612  	// omitted from API requests. See
  3613  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3614  	NullFields []string `json:"-"`
  3615  }
  3616  
  3617  func (s *XPSImageObjectDetectionModelSpec) MarshalJSON() ([]byte, error) {
  3618  	type NoMethod XPSImageObjectDetectionModelSpec
  3619  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3620  }
  3621  
  3622  // XPSImageSegmentationEvaluationMetrics: Model evaluation metrics for image
  3623  // segmentation problems. Next tag: 4.
  3624  type XPSImageSegmentationEvaluationMetrics struct {
  3625  	// ConfidenceMetricsEntries: Metrics that have confidence thresholds.
  3626  	// Precision-recall curve can be derived from it.
  3627  	ConfidenceMetricsEntries []*XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"`
  3628  	// ForceSendFields is a list of field names (e.g. "ConfidenceMetricsEntries")
  3629  	// to unconditionally include in API requests. By default, fields with empty or
  3630  	// default values are omitted from API requests. See
  3631  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3632  	// details.
  3633  	ForceSendFields []string `json:"-"`
  3634  	// NullFields is a list of field names (e.g. "ConfidenceMetricsEntries") to
  3635  	// include in API requests with the JSON null value. By default, fields with
  3636  	// empty values are omitted from API requests. See
  3637  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3638  	NullFields []string `json:"-"`
  3639  }
  3640  
  3641  func (s *XPSImageSegmentationEvaluationMetrics) MarshalJSON() ([]byte, error) {
  3642  	type NoMethod XPSImageSegmentationEvaluationMetrics
  3643  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3644  }
  3645  
  3646  // XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry: Metrics for a
  3647  // single confidence threshold.
  3648  type XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry struct {
  3649  	// ConfidenceThreshold: The confidence threshold value used to compute the
  3650  	// metrics.
  3651  	ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"`
  3652  	// ConfusionMatrix: Confusion matrix of the per confidence_threshold
  3653  	// evaluation. Pixel counts are set here. Only set for model level evaluation,
  3654  	// not for evaluation per label.
  3655  	ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"`
  3656  	// DiceScoreCoefficient: DSC or the F1 score: The harmonic mean of recall and
  3657  	// precision.
  3658  	DiceScoreCoefficient float64 `json:"diceScoreCoefficient,omitempty"`
  3659  	// IouScore: IOU score.
  3660  	IouScore float64 `json:"iouScore,omitempty"`
  3661  	// Precision: Precision for the given confidence threshold.
  3662  	Precision float64 `json:"precision,omitempty"`
  3663  	// Recall: Recall for the given confidence threshold.
  3664  	Recall float64 `json:"recall,omitempty"`
  3665  	// ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") to
  3666  	// unconditionally include in API requests. By default, fields with empty or
  3667  	// default values are omitted from API requests. See
  3668  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3669  	// details.
  3670  	ForceSendFields []string `json:"-"`
  3671  	// NullFields is a list of field names (e.g. "ConfidenceThreshold") to include
  3672  	// in API requests with the JSON null value. By default, fields with empty
  3673  	// values are omitted from API requests. See
  3674  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3675  	NullFields []string `json:"-"`
  3676  }
  3677  
  3678  func (s *XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry) MarshalJSON() ([]byte, error) {
  3679  	type NoMethod XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry
  3680  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3681  }
  3682  
  3683  func (s *XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry) UnmarshalJSON(data []byte) error {
  3684  	type NoMethod XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry
  3685  	var s1 struct {
  3686  		ConfidenceThreshold  gensupport.JSONFloat64 `json:"confidenceThreshold"`
  3687  		DiceScoreCoefficient gensupport.JSONFloat64 `json:"diceScoreCoefficient"`
  3688  		IouScore             gensupport.JSONFloat64 `json:"iouScore"`
  3689  		Precision            gensupport.JSONFloat64 `json:"precision"`
  3690  		Recall               gensupport.JSONFloat64 `json:"recall"`
  3691  		*NoMethod
  3692  	}
  3693  	s1.NoMethod = (*NoMethod)(s)
  3694  	if err := json.Unmarshal(data, &s1); err != nil {
  3695  		return err
  3696  	}
  3697  	s.ConfidenceThreshold = float64(s1.ConfidenceThreshold)
  3698  	s.DiceScoreCoefficient = float64(s1.DiceScoreCoefficient)
  3699  	s.IouScore = float64(s1.IouScore)
  3700  	s.Precision = float64(s1.Precision)
  3701  	s.Recall = float64(s1.Recall)
  3702  	return nil
  3703  }
  3704  
  3705  type XPSImageSegmentationTrainResponse struct {
  3706  	// ColorMaps: Color map of the model.
  3707  	ColorMaps []*XPSColorMap `json:"colorMaps,omitempty"`
  3708  	// ExportModelSpec: NOTE: These fields are not used/needed in EAP but will be
  3709  	// set later.
  3710  	ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"`
  3711  	// ModelArtifactSpec: ## The fields below are only populated under uCAIP
  3712  	// request scope. Model artifact spec stores and model gcs pathes and related
  3713  	// metadata
  3714  	ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"`
  3715  	ModelServingSpec  *XPSImageModelServingSpec  `json:"modelServingSpec,omitempty"`
  3716  	// StopReason: Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED',
  3717  	// 'MODEL_CONVERGED'.
  3718  	//
  3719  	// Possible values:
  3720  	//   "TRAIN_STOP_REASON_UNSPECIFIED"
  3721  	//   "TRAIN_STOP_REASON_BUDGET_REACHED"
  3722  	//   "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can not be
  3723  	// resumbed training.
  3724  	//   "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, can be
  3725  	// further trained till full convergency.
  3726  	StopReason string `json:"stopReason,omitempty"`
  3727  	// TrainCostNodeSeconds: The actual train cost of creating this model,
  3728  	// expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.
  3729  	TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"`
  3730  	// ForceSendFields is a list of field names (e.g. "ColorMaps") to
  3731  	// unconditionally include in API requests. By default, fields with empty or
  3732  	// default values are omitted from API requests. See
  3733  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3734  	// details.
  3735  	ForceSendFields []string `json:"-"`
  3736  	// NullFields is a list of field names (e.g. "ColorMaps") to include in API
  3737  	// requests with the JSON null value. By default, fields with empty values are
  3738  	// omitted from API requests. See
  3739  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3740  	NullFields []string `json:"-"`
  3741  }
  3742  
  3743  func (s *XPSImageSegmentationTrainResponse) MarshalJSON() ([]byte, error) {
  3744  	type NoMethod XPSImageSegmentationTrainResponse
  3745  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3746  }
  3747  
  3748  // XPSIntegratedGradientsAttribution: An attribution method that computes the
  3749  // Aumann-Shapley value taking advantage of the model's fully differentiable
  3750  // structure. Refer to this paper for more details:
  3751  // https://arxiv.org/abs/1703.01365
  3752  type XPSIntegratedGradientsAttribution struct {
  3753  	// StepCount: The number of steps for approximating the path integral. A good
  3754  	// value to start is 50 and gradually increase until the sum to diff property
  3755  	// is within the desired error range. Valid range of its value is [1, 100],
  3756  	// inclusively.
  3757  	StepCount int64 `json:"stepCount,omitempty"`
  3758  	// ForceSendFields is a list of field names (e.g. "StepCount") to
  3759  	// unconditionally include in API requests. By default, fields with empty or
  3760  	// default values are omitted from API requests. See
  3761  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3762  	// details.
  3763  	ForceSendFields []string `json:"-"`
  3764  	// NullFields is a list of field names (e.g. "StepCount") to include in API
  3765  	// requests with the JSON null value. By default, fields with empty values are
  3766  	// omitted from API requests. See
  3767  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3768  	NullFields []string `json:"-"`
  3769  }
  3770  
  3771  func (s *XPSIntegratedGradientsAttribution) MarshalJSON() ([]byte, error) {
  3772  	type NoMethod XPSIntegratedGradientsAttribution
  3773  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3774  }
  3775  
  3776  type XPSMetricEntry struct {
  3777  	// ArgentumMetricId: For billing metrics that are using legacy sku's, set the
  3778  	// legacy billing metric id here. This will be sent to Chemist as the
  3779  	// "cloudbilling.googleapis.com/argentum_metric_id" label. Otherwise leave
  3780  	// empty.
  3781  	ArgentumMetricId string `json:"argentumMetricId,omitempty"`
  3782  	// DoubleValue: A double value.
  3783  	DoubleValue float64 `json:"doubleValue,omitempty"`
  3784  	// Int64Value: A signed 64-bit integer value.
  3785  	Int64Value int64 `json:"int64Value,omitempty,string"`
  3786  	// MetricName: The metric name defined in the service configuration.
  3787  	MetricName string `json:"metricName,omitempty"`
  3788  	// SystemLabels: Billing system labels for this (metric, value) pair.
  3789  	SystemLabels []*XPSMetricEntryLabel `json:"systemLabels,omitempty"`
  3790  	// ForceSendFields is a list of field names (e.g. "ArgentumMetricId") to
  3791  	// unconditionally include in API requests. By default, fields with empty or
  3792  	// default values are omitted from API requests. See
  3793  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3794  	// details.
  3795  	ForceSendFields []string `json:"-"`
  3796  	// NullFields is a list of field names (e.g. "ArgentumMetricId") to include in
  3797  	// API requests with the JSON null value. By default, fields with empty values
  3798  	// are omitted from API requests. See
  3799  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3800  	NullFields []string `json:"-"`
  3801  }
  3802  
  3803  func (s *XPSMetricEntry) MarshalJSON() ([]byte, error) {
  3804  	type NoMethod XPSMetricEntry
  3805  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3806  }
  3807  
  3808  func (s *XPSMetricEntry) UnmarshalJSON(data []byte) error {
  3809  	type NoMethod XPSMetricEntry
  3810  	var s1 struct {
  3811  		DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
  3812  		*NoMethod
  3813  	}
  3814  	s1.NoMethod = (*NoMethod)(s)
  3815  	if err := json.Unmarshal(data, &s1); err != nil {
  3816  		return err
  3817  	}
  3818  	s.DoubleValue = float64(s1.DoubleValue)
  3819  	return nil
  3820  }
  3821  
  3822  type XPSMetricEntryLabel struct {
  3823  	// LabelName: The name of the label.
  3824  	LabelName string `json:"labelName,omitempty"`
  3825  	// LabelValue: The value of the label.
  3826  	LabelValue string `json:"labelValue,omitempty"`
  3827  	// ForceSendFields is a list of field names (e.g. "LabelName") to
  3828  	// unconditionally include in API requests. By default, fields with empty or
  3829  	// default values are omitted from API requests. See
  3830  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3831  	// details.
  3832  	ForceSendFields []string `json:"-"`
  3833  	// NullFields is a list of field names (e.g. "LabelName") to include in API
  3834  	// requests with the JSON null value. By default, fields with empty values are
  3835  	// omitted from API requests. See
  3836  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3837  	NullFields []string `json:"-"`
  3838  }
  3839  
  3840  func (s *XPSMetricEntryLabel) MarshalJSON() ([]byte, error) {
  3841  	type NoMethod XPSMetricEntryLabel
  3842  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3843  }
  3844  
  3845  // XPSModelArtifactItem: A single model artifact item.
  3846  type XPSModelArtifactItem struct {
  3847  	// ArtifactFormat: The model artifact format.
  3848  	//
  3849  	// Possible values:
  3850  	//   "ARTIFACT_FORMAT_UNSPECIFIED" - Should not be used.
  3851  	//   "TF_CHECKPOINT" - The Tensorflow checkpoints. See
  3852  	// https://www.tensorflow.org/guide/checkpoint.
  3853  	//   "TF_SAVED_MODEL" - The Tensorflow SavedModel binary.
  3854  	//   "TF_LITE" - Model artifact in generic TensorFlow Lite (.tflite) format.
  3855  	// See https://www.tensorflow.org/lite.
  3856  	//   "EDGE_TPU_TF_LITE" - Used for [Edge
  3857  	// TPU](https://cloud.google.com/edge-tpu/) devices.
  3858  	//   "TF_JS" - A [TensorFlow.js](https://www.tensorflow.org/js) model that can
  3859  	// be used in the browser and in Node.js using JavaScript.
  3860  	//   "CORE_ML" - Used for iOS mobile devices in (.mlmodel) format. See
  3861  	// https://developer.apple.com/documentation/coreml
  3862  	ArtifactFormat string `json:"artifactFormat,omitempty"`
  3863  	// GcsUri: The Google Cloud Storage (GCS) uri that stores the model binary
  3864  	// files.
  3865  	GcsUri string `json:"gcsUri,omitempty"`
  3866  	// ForceSendFields is a list of field names (e.g. "ArtifactFormat") to
  3867  	// unconditionally include in API requests. By default, fields with empty or
  3868  	// default values are omitted from API requests. See
  3869  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3870  	// details.
  3871  	ForceSendFields []string `json:"-"`
  3872  	// NullFields is a list of field names (e.g. "ArtifactFormat") to include in
  3873  	// API requests with the JSON null value. By default, fields with empty values
  3874  	// are omitted from API requests. See
  3875  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3876  	NullFields []string `json:"-"`
  3877  }
  3878  
  3879  func (s *XPSModelArtifactItem) MarshalJSON() ([]byte, error) {
  3880  	type NoMethod XPSModelArtifactItem
  3881  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3882  }
  3883  
  3884  // XPSPreprocessResponse: Next ID: 8
  3885  type XPSPreprocessResponse struct {
  3886  	// OutputExampleSet: Preprocessed examples, that are to be imported into AutoML
  3887  	// storage. This should point to RecordIO file(s) of PreprocessedExample
  3888  	// messages. The PreprocessedExample.mvp_training_data-s returned here are
  3889  	// later verbatim passed to Train() call in TrainExample.mvp_training_data.
  3890  	OutputExampleSet          *XPSExampleSet                    `json:"outputExampleSet,omitempty"`
  3891  	SpeechPreprocessResp      *XPSSpeechPreprocessResponse      `json:"speechPreprocessResp,omitempty"`
  3892  	TablesPreprocessResponse  *XPSTablesPreprocessResponse      `json:"tablesPreprocessResponse,omitempty"`
  3893  	TranslationPreprocessResp *XPSTranslationPreprocessResponse `json:"translationPreprocessResp,omitempty"`
  3894  	// ForceSendFields is a list of field names (e.g. "OutputExampleSet") to
  3895  	// unconditionally include in API requests. By default, fields with empty or
  3896  	// default values are omitted from API requests. See
  3897  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3898  	// details.
  3899  	ForceSendFields []string `json:"-"`
  3900  	// NullFields is a list of field names (e.g. "OutputExampleSet") to include in
  3901  	// API requests with the JSON null value. By default, fields with empty values
  3902  	// are omitted from API requests. See
  3903  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3904  	NullFields []string `json:"-"`
  3905  }
  3906  
  3907  func (s *XPSPreprocessResponse) MarshalJSON() ([]byte, error) {
  3908  	type NoMethod XPSPreprocessResponse
  3909  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3910  }
  3911  
  3912  // XPSRegressionEvaluationMetrics: Model evaluation metrics for regression
  3913  // problems. It can be used for Tables.
  3914  type XPSRegressionEvaluationMetrics struct {
  3915  	// MeanAbsoluteError: Mean Absolute Error (MAE).
  3916  	MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"`
  3917  	// MeanAbsolutePercentageError: Mean absolute percentage error. Only set if all
  3918  	// ground truth values are positive.
  3919  	MeanAbsolutePercentageError float64 `json:"meanAbsolutePercentageError,omitempty"`
  3920  	// RSquared: R squared.
  3921  	RSquared float64 `json:"rSquared,omitempty"`
  3922  	// RegressionMetricsEntries: A list of actual versus predicted points for the
  3923  	// model being evaluated.
  3924  	RegressionMetricsEntries []*XPSRegressionMetricsEntry `json:"regressionMetricsEntries,omitempty"`
  3925  	// RootMeanSquaredError: Root Mean Squared Error (RMSE).
  3926  	RootMeanSquaredError float64 `json:"rootMeanSquaredError,omitempty"`
  3927  	// RootMeanSquaredLogError: Root mean squared log error.
  3928  	RootMeanSquaredLogError float64 `json:"rootMeanSquaredLogError,omitempty"`
  3929  	// ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") to
  3930  	// unconditionally include in API requests. By default, fields with empty or
  3931  	// default values are omitted from API requests. See
  3932  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3933  	// details.
  3934  	ForceSendFields []string `json:"-"`
  3935  	// NullFields is a list of field names (e.g. "MeanAbsoluteError") to include in
  3936  	// API requests with the JSON null value. By default, fields with empty values
  3937  	// are omitted from API requests. See
  3938  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3939  	NullFields []string `json:"-"`
  3940  }
  3941  
  3942  func (s *XPSRegressionEvaluationMetrics) MarshalJSON() ([]byte, error) {
  3943  	type NoMethod XPSRegressionEvaluationMetrics
  3944  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3945  }
  3946  
  3947  func (s *XPSRegressionEvaluationMetrics) UnmarshalJSON(data []byte) error {
  3948  	type NoMethod XPSRegressionEvaluationMetrics
  3949  	var s1 struct {
  3950  		MeanAbsoluteError           gensupport.JSONFloat64 `json:"meanAbsoluteError"`
  3951  		MeanAbsolutePercentageError gensupport.JSONFloat64 `json:"meanAbsolutePercentageError"`
  3952  		RSquared                    gensupport.JSONFloat64 `json:"rSquared"`
  3953  		RootMeanSquaredError        gensupport.JSONFloat64 `json:"rootMeanSquaredError"`
  3954  		RootMeanSquaredLogError     gensupport.JSONFloat64 `json:"rootMeanSquaredLogError"`
  3955  		*NoMethod
  3956  	}
  3957  	s1.NoMethod = (*NoMethod)(s)
  3958  	if err := json.Unmarshal(data, &s1); err != nil {
  3959  		return err
  3960  	}
  3961  	s.MeanAbsoluteError = float64(s1.MeanAbsoluteError)
  3962  	s.MeanAbsolutePercentageError = float64(s1.MeanAbsolutePercentageError)
  3963  	s.RSquared = float64(s1.RSquared)
  3964  	s.RootMeanSquaredError = float64(s1.RootMeanSquaredError)
  3965  	s.RootMeanSquaredLogError = float64(s1.RootMeanSquaredLogError)
  3966  	return nil
  3967  }
  3968  
  3969  // XPSRegressionMetricsEntry: A pair of actual & observed values for the model
  3970  // being evaluated.
  3971  type XPSRegressionMetricsEntry struct {
  3972  	// PredictedValue: The observed value for a row in the dataset.
  3973  	PredictedValue float64 `json:"predictedValue,omitempty"`
  3974  	// TrueValue: The actual target value for a row in the dataset.
  3975  	TrueValue float64 `json:"trueValue,omitempty"`
  3976  	// ForceSendFields is a list of field names (e.g. "PredictedValue") to
  3977  	// unconditionally include in API requests. By default, fields with empty or
  3978  	// default values are omitted from API requests. See
  3979  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3980  	// details.
  3981  	ForceSendFields []string `json:"-"`
  3982  	// NullFields is a list of field names (e.g. "PredictedValue") to include in
  3983  	// API requests with the JSON null value. By default, fields with empty values
  3984  	// are omitted from API requests. See
  3985  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3986  	NullFields []string `json:"-"`
  3987  }
  3988  
  3989  func (s *XPSRegressionMetricsEntry) MarshalJSON() ([]byte, error) {
  3990  	type NoMethod XPSRegressionMetricsEntry
  3991  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3992  }
  3993  
  3994  func (s *XPSRegressionMetricsEntry) UnmarshalJSON(data []byte) error {
  3995  	type NoMethod XPSRegressionMetricsEntry
  3996  	var s1 struct {
  3997  		PredictedValue gensupport.JSONFloat64 `json:"predictedValue"`
  3998  		TrueValue      gensupport.JSONFloat64 `json:"trueValue"`
  3999  		*NoMethod
  4000  	}
  4001  	s1.NoMethod = (*NoMethod)(s)
  4002  	if err := json.Unmarshal(data, &s1); err != nil {
  4003  		return err
  4004  	}
  4005  	s.PredictedValue = float64(s1.PredictedValue)
  4006  	s.TrueValue = float64(s1.TrueValue)
  4007  	return nil
  4008  }
  4009  
  4010  type XPSReportingMetrics struct {
  4011  	// EffectiveTrainingDuration: The effective time training used. If set, this is
  4012  	// used for quota management and billing. Deprecated. AutoML BE doesn't use
  4013  	// this. Don't set.
  4014  	EffectiveTrainingDuration string `json:"effectiveTrainingDuration,omitempty"`
  4015  	// MetricEntries: One entry per metric name. The values must be aggregated per
  4016  	// metric name.
  4017  	MetricEntries []*XPSMetricEntry `json:"metricEntries,omitempty"`
  4018  	// ForceSendFields is a list of field names (e.g. "EffectiveTrainingDuration")
  4019  	// to unconditionally include in API requests. By default, fields with empty or
  4020  	// default values are omitted from API requests. See
  4021  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4022  	// details.
  4023  	ForceSendFields []string `json:"-"`
  4024  	// NullFields is a list of field names (e.g. "EffectiveTrainingDuration") to
  4025  	// include in API requests with the JSON null value. By default, fields with
  4026  	// empty values are omitted from API requests. See
  4027  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4028  	NullFields []string `json:"-"`
  4029  }
  4030  
  4031  func (s *XPSReportingMetrics) MarshalJSON() ([]byte, error) {
  4032  	type NoMethod XPSReportingMetrics
  4033  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4034  }
  4035  
  4036  type XPSResponseExplanationMetadata struct {
  4037  	// Inputs: Metadata of the input.
  4038  	Inputs map[string]XPSResponseExplanationMetadataInputMetadata `json:"inputs,omitempty"`
  4039  	// Outputs: Metadata of the output.
  4040  	Outputs map[string]XPSResponseExplanationMetadataOutputMetadata `json:"outputs,omitempty"`
  4041  	// ForceSendFields is a list of field names (e.g. "Inputs") to unconditionally
  4042  	// include in API requests. By default, fields with empty or default values are
  4043  	// omitted from API requests. See
  4044  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4045  	// details.
  4046  	ForceSendFields []string `json:"-"`
  4047  	// NullFields is a list of field names (e.g. "Inputs") to include in API
  4048  	// requests with the JSON null value. By default, fields with empty values are
  4049  	// omitted from API requests. See
  4050  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4051  	NullFields []string `json:"-"`
  4052  }
  4053  
  4054  func (s *XPSResponseExplanationMetadata) MarshalJSON() ([]byte, error) {
  4055  	type NoMethod XPSResponseExplanationMetadata
  4056  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4057  }
  4058  
  4059  // XPSResponseExplanationMetadataInputMetadata: Metadata of the input of a
  4060  // feature.
  4061  type XPSResponseExplanationMetadataInputMetadata struct {
  4062  	// InputTensorName: Name of the input tensor for this model. Only needed in
  4063  	// train response.
  4064  	InputTensorName string `json:"inputTensorName,omitempty"`
  4065  	// Modality: Modality of the feature. Valid values are: numeric, image.
  4066  	// Defaults to numeric.
  4067  	//
  4068  	// Possible values:
  4069  	//   "MODALITY_UNSPECIFIED"
  4070  	//   "NUMERIC"
  4071  	//   "IMAGE"
  4072  	//   "CATEGORICAL"
  4073  	Modality string `json:"modality,omitempty"`
  4074  	// VisualizationConfig: Visualization configurations for image explanation.
  4075  	VisualizationConfig *XPSVisualization `json:"visualizationConfig,omitempty"`
  4076  	// ForceSendFields is a list of field names (e.g. "InputTensorName") to
  4077  	// unconditionally include in API requests. By default, fields with empty or
  4078  	// default values are omitted from API requests. See
  4079  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4080  	// details.
  4081  	ForceSendFields []string `json:"-"`
  4082  	// NullFields is a list of field names (e.g. "InputTensorName") to include in
  4083  	// API requests with the JSON null value. By default, fields with empty values
  4084  	// are omitted from API requests. See
  4085  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4086  	NullFields []string `json:"-"`
  4087  }
  4088  
  4089  func (s *XPSResponseExplanationMetadataInputMetadata) MarshalJSON() ([]byte, error) {
  4090  	type NoMethod XPSResponseExplanationMetadataInputMetadata
  4091  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4092  }
  4093  
  4094  // XPSResponseExplanationMetadataOutputMetadata: Metadata of the prediction
  4095  // output to be explained.
  4096  type XPSResponseExplanationMetadataOutputMetadata struct {
  4097  	// OutputTensorName: Name of the output tensor. Only needed in train response.
  4098  	OutputTensorName string `json:"outputTensorName,omitempty"`
  4099  	// ForceSendFields is a list of field names (e.g. "OutputTensorName") to
  4100  	// unconditionally include in API requests. By default, fields with empty or
  4101  	// default values are omitted from API requests. See
  4102  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4103  	// details.
  4104  	ForceSendFields []string `json:"-"`
  4105  	// NullFields is a list of field names (e.g. "OutputTensorName") to include in
  4106  	// API requests with the JSON null value. By default, fields with empty values
  4107  	// are omitted from API requests. See
  4108  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4109  	NullFields []string `json:"-"`
  4110  }
  4111  
  4112  func (s *XPSResponseExplanationMetadataOutputMetadata) MarshalJSON() ([]byte, error) {
  4113  	type NoMethod XPSResponseExplanationMetadataOutputMetadata
  4114  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4115  }
  4116  
  4117  type XPSResponseExplanationParameters struct {
  4118  	// IntegratedGradientsAttribution: An attribution method that computes
  4119  	// Aumann-Shapley values taking advantage of the model's fully differentiable
  4120  	// structure. Refer to this paper for more details:
  4121  	// https://arxiv.org/abs/1703.01365
  4122  	IntegratedGradientsAttribution *XPSIntegratedGradientsAttribution `json:"integratedGradientsAttribution,omitempty"`
  4123  	// XraiAttribution: An attribution method that redistributes Integrated
  4124  	// Gradients attribution to segmented regions, taking advantage of the model's
  4125  	// fully differentiable structure. Refer to this paper for more details:
  4126  	// https://arxiv.org/abs/1906.02825 XRAI currently performs better on natural
  4127  	// images, like a picture of a house or an animal. If the images are taken in
  4128  	// artificial environments, like a lab or manufacturing line, or from
  4129  	// diagnostic equipment, like x-rays or quality-control cameras, use Integrated
  4130  	// Gradients instead.
  4131  	XraiAttribution *XPSXraiAttribution `json:"xraiAttribution,omitempty"`
  4132  	// ForceSendFields is a list of field names (e.g.
  4133  	// "IntegratedGradientsAttribution") to unconditionally include in API
  4134  	// requests. By default, fields with empty or default values are omitted from
  4135  	// API requests. See
  4136  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4137  	// details.
  4138  	ForceSendFields []string `json:"-"`
  4139  	// NullFields is a list of field names (e.g. "IntegratedGradientsAttribution")
  4140  	// to include in API requests with the JSON null value. By default, fields with
  4141  	// empty values are omitted from API requests. See
  4142  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4143  	NullFields []string `json:"-"`
  4144  }
  4145  
  4146  func (s *XPSResponseExplanationParameters) MarshalJSON() ([]byte, error) {
  4147  	type NoMethod XPSResponseExplanationParameters
  4148  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4149  }
  4150  
  4151  // XPSResponseExplanationSpec: Specification of Model explanation.
  4152  // Feature-based XAI in AutoML Vision ICN is deprecated, see b/288407203 for
  4153  // context.
  4154  type XPSResponseExplanationSpec struct {
  4155  	// ExplanationType: Explanation type. For AutoML Image Classification models,
  4156  	// possible values are: * `image-integrated-gradients` * `image-xrai`
  4157  	ExplanationType string `json:"explanationType,omitempty"`
  4158  	// Metadata: Metadata describing the Model's input and output for explanation.
  4159  	Metadata *XPSResponseExplanationMetadata `json:"metadata,omitempty"`
  4160  	// Parameters: Parameters that configure explaining of the Model's predictions.
  4161  	Parameters *XPSResponseExplanationParameters `json:"parameters,omitempty"`
  4162  	// ForceSendFields is a list of field names (e.g. "ExplanationType") to
  4163  	// unconditionally include in API requests. By default, fields with empty or
  4164  	// default values are omitted from API requests. See
  4165  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4166  	// details.
  4167  	ForceSendFields []string `json:"-"`
  4168  	// NullFields is a list of field names (e.g. "ExplanationType") to include in
  4169  	// API requests with the JSON null value. By default, fields with empty values
  4170  	// are omitted from API requests. See
  4171  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4172  	NullFields []string `json:"-"`
  4173  }
  4174  
  4175  func (s *XPSResponseExplanationSpec) MarshalJSON() ([]byte, error) {
  4176  	type NoMethod XPSResponseExplanationSpec
  4177  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4178  }
  4179  
  4180  type XPSRow struct {
  4181  	// ColumnIds: The ids of the columns. Note: The below `values` field must match
  4182  	// order of this field, if this field is set.
  4183  	ColumnIds []int64 `json:"columnIds,omitempty"`
  4184  	// Values: The values of the row cells, given in the same order as the
  4185  	// column_ids. If column_ids is not set, then in the same order as the
  4186  	// input_feature_column_ids in TablesModelMetadata.
  4187  	Values []interface{} `json:"values,omitempty"`
  4188  	// ForceSendFields is a list of field names (e.g. "ColumnIds") to
  4189  	// unconditionally include in API requests. By default, fields with empty or
  4190  	// default values are omitted from API requests. See
  4191  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4192  	// details.
  4193  	ForceSendFields []string `json:"-"`
  4194  	// NullFields is a list of field names (e.g. "ColumnIds") to include in API
  4195  	// requests with the JSON null value. By default, fields with empty values are
  4196  	// omitted from API requests. See
  4197  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4198  	NullFields []string `json:"-"`
  4199  }
  4200  
  4201  func (s *XPSRow) MarshalJSON() ([]byte, error) {
  4202  	type NoMethod XPSRow
  4203  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4204  }
  4205  
  4206  type XPSSpeechEvaluationMetrics struct {
  4207  	// SubModelEvaluationMetrics: Evaluation metrics for all submodels contained in
  4208  	// this model.
  4209  	SubModelEvaluationMetrics []*XPSSpeechEvaluationMetricsSubModelEvaluationMetric `json:"subModelEvaluationMetrics,omitempty"`
  4210  	// ForceSendFields is a list of field names (e.g. "SubModelEvaluationMetrics")
  4211  	// to unconditionally include in API requests. By default, fields with empty or
  4212  	// default values are omitted from API requests. See
  4213  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4214  	// details.
  4215  	ForceSendFields []string `json:"-"`
  4216  	// NullFields is a list of field names (e.g. "SubModelEvaluationMetrics") to
  4217  	// include in API requests with the JSON null value. By default, fields with
  4218  	// empty values are omitted from API requests. See
  4219  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4220  	NullFields []string `json:"-"`
  4221  }
  4222  
  4223  func (s *XPSSpeechEvaluationMetrics) MarshalJSON() ([]byte, error) {
  4224  	type NoMethod XPSSpeechEvaluationMetrics
  4225  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4226  }
  4227  
  4228  type XPSSpeechEvaluationMetricsSubModelEvaluationMetric struct {
  4229  	// BiasingModelType: Type of the biasing model.
  4230  	//
  4231  	// Possible values:
  4232  	//   "BIASING_MODEL_TYPE_UNSPECIFIED"
  4233  	//   "COMMAND_AND_SEARCH" - Build biasing model on top of COMMAND_AND_SEARCH
  4234  	// model
  4235  	//   "PHONE_CALL" - Build biasing model on top of PHONE_CALL model
  4236  	//   "VIDEO" - Build biasing model on top of VIDEO model
  4237  	//   "DEFAULT" - Build biasing model on top of DEFAULT model
  4238  	BiasingModelType string `json:"biasingModelType,omitempty"`
  4239  	// IsEnhancedModel: If true then it means we have an enhanced version of the
  4240  	// biasing models.
  4241  	IsEnhancedModel  bool  `json:"isEnhancedModel,omitempty"`
  4242  	NumDeletions     int64 `json:"numDeletions,omitempty"`
  4243  	NumInsertions    int64 `json:"numInsertions,omitempty"`
  4244  	NumSubstitutions int64 `json:"numSubstitutions,omitempty"`
  4245  	// NumUtterances: Number of utterances used in the wer computation.
  4246  	NumUtterances int64 `json:"numUtterances,omitempty"`
  4247  	// NumWords: Number of words over which the word error rate was computed.
  4248  	NumWords int64 `json:"numWords,omitempty"`
  4249  	// SentenceAccuracy: Below fields are used for debugging purposes
  4250  	SentenceAccuracy float64 `json:"sentenceAccuracy,omitempty"`
  4251  	// Wer: Word error rate (standard error metric used for speech recognition).
  4252  	Wer float64 `json:"wer,omitempty"`
  4253  	// ForceSendFields is a list of field names (e.g. "BiasingModelType") to
  4254  	// unconditionally include in API requests. By default, fields with empty or
  4255  	// default values are omitted from API requests. See
  4256  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4257  	// details.
  4258  	ForceSendFields []string `json:"-"`
  4259  	// NullFields is a list of field names (e.g. "BiasingModelType") to include in
  4260  	// API requests with the JSON null value. By default, fields with empty values
  4261  	// are omitted from API requests. See
  4262  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4263  	NullFields []string `json:"-"`
  4264  }
  4265  
  4266  func (s *XPSSpeechEvaluationMetricsSubModelEvaluationMetric) MarshalJSON() ([]byte, error) {
  4267  	type NoMethod XPSSpeechEvaluationMetricsSubModelEvaluationMetric
  4268  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4269  }
  4270  
  4271  func (s *XPSSpeechEvaluationMetricsSubModelEvaluationMetric) UnmarshalJSON(data []byte) error {
  4272  	type NoMethod XPSSpeechEvaluationMetricsSubModelEvaluationMetric
  4273  	var s1 struct {
  4274  		SentenceAccuracy gensupport.JSONFloat64 `json:"sentenceAccuracy"`
  4275  		Wer              gensupport.JSONFloat64 `json:"wer"`
  4276  		*NoMethod
  4277  	}
  4278  	s1.NoMethod = (*NoMethod)(s)
  4279  	if err := json.Unmarshal(data, &s1); err != nil {
  4280  		return err
  4281  	}
  4282  	s.SentenceAccuracy = float64(s1.SentenceAccuracy)
  4283  	s.Wer = float64(s1.Wer)
  4284  	return nil
  4285  }
  4286  
  4287  type XPSSpeechModelSpec struct {
  4288  	// DatasetId: Required for speech xps backend. Speech xps has to use dataset_id
  4289  	// and model_id as the primary key in db so that speech API can query the db
  4290  	// directly.
  4291  	DatasetId int64  `json:"datasetId,omitempty,string"`
  4292  	Language  string `json:"language,omitempty"`
  4293  	// SubModelSpecs: Model specs for all submodels contained in this model.
  4294  	SubModelSpecs []*XPSSpeechModelSpecSubModelSpec `json:"subModelSpecs,omitempty"`
  4295  	// ForceSendFields is a list of field names (e.g. "DatasetId") to
  4296  	// unconditionally include in API requests. By default, fields with empty or
  4297  	// default values are omitted from API requests. See
  4298  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4299  	// details.
  4300  	ForceSendFields []string `json:"-"`
  4301  	// NullFields is a list of field names (e.g. "DatasetId") to include in API
  4302  	// requests with the JSON null value. By default, fields with empty values are
  4303  	// omitted from API requests. See
  4304  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4305  	NullFields []string `json:"-"`
  4306  }
  4307  
  4308  func (s *XPSSpeechModelSpec) MarshalJSON() ([]byte, error) {
  4309  	type NoMethod XPSSpeechModelSpec
  4310  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4311  }
  4312  
  4313  type XPSSpeechModelSpecSubModelSpec struct {
  4314  	// BiasingModelType: Type of the biasing model.
  4315  	//
  4316  	// Possible values:
  4317  	//   "BIASING_MODEL_TYPE_UNSPECIFIED"
  4318  	//   "COMMAND_AND_SEARCH" - Build biasing model on top of COMMAND_AND_SEARCH
  4319  	// model
  4320  	//   "PHONE_CALL" - Build biasing model on top of PHONE_CALL model
  4321  	//   "VIDEO" - Build biasing model on top of VIDEO model
  4322  	//   "DEFAULT" - Build biasing model on top of DEFAULT model
  4323  	BiasingModelType string `json:"biasingModelType,omitempty"`
  4324  	// ClientId: In S3, Recognition ClientContextId.client_id
  4325  	ClientId string `json:"clientId,omitempty"`
  4326  	// ContextId: In S3, Recognition ClientContextId.context_id
  4327  	ContextId string `json:"contextId,omitempty"`
  4328  	// IsEnhancedModel: If true then it means we have an enhanced version of the
  4329  	// biasing models.
  4330  	IsEnhancedModel bool `json:"isEnhancedModel,omitempty"`
  4331  	// ForceSendFields is a list of field names (e.g. "BiasingModelType") to
  4332  	// unconditionally include in API requests. By default, fields with empty or
  4333  	// default values are omitted from API requests. See
  4334  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4335  	// details.
  4336  	ForceSendFields []string `json:"-"`
  4337  	// NullFields is a list of field names (e.g. "BiasingModelType") to include in
  4338  	// API requests with the JSON null value. By default, fields with empty values
  4339  	// are omitted from API requests. See
  4340  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4341  	NullFields []string `json:"-"`
  4342  }
  4343  
  4344  func (s *XPSSpeechModelSpecSubModelSpec) MarshalJSON() ([]byte, error) {
  4345  	type NoMethod XPSSpeechModelSpecSubModelSpec
  4346  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4347  }
  4348  
  4349  type XPSSpeechPreprocessResponse struct {
  4350  	// CnsTestDataPath: Location od shards of sstables (test data) of DataUtterance
  4351  	// protos.
  4352  	CnsTestDataPath string `json:"cnsTestDataPath,omitempty"`
  4353  	// CnsTrainDataPath: Location of shards of sstables (training data) of
  4354  	// DataUtterance protos.
  4355  	CnsTrainDataPath string `json:"cnsTrainDataPath,omitempty"`
  4356  	// PrebuiltModelEvaluationMetrics: The metrics for prebuilt speech models. They
  4357  	// are included here because there is no prebuilt speech models stored in the
  4358  	// AutoML.
  4359  	PrebuiltModelEvaluationMetrics *XPSSpeechEvaluationMetrics `json:"prebuiltModelEvaluationMetrics,omitempty"`
  4360  	// SpeechPreprocessStats: Stats associated with the data.
  4361  	SpeechPreprocessStats *XPSSpeechPreprocessStats `json:"speechPreprocessStats,omitempty"`
  4362  	// ForceSendFields is a list of field names (e.g. "CnsTestDataPath") to
  4363  	// unconditionally include in API requests. By default, fields with empty or
  4364  	// default values are omitted from API requests. See
  4365  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4366  	// details.
  4367  	ForceSendFields []string `json:"-"`
  4368  	// NullFields is a list of field names (e.g. "CnsTestDataPath") to include in
  4369  	// API requests with the JSON null value. By default, fields with empty values
  4370  	// are omitted from API requests. See
  4371  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4372  	NullFields []string `json:"-"`
  4373  }
  4374  
  4375  func (s *XPSSpeechPreprocessResponse) MarshalJSON() ([]byte, error) {
  4376  	type NoMethod XPSSpeechPreprocessResponse
  4377  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4378  }
  4379  
  4380  type XPSSpeechPreprocessStats struct {
  4381  	// DataErrors: Different types of data errors and the counts associated with
  4382  	// them.
  4383  	DataErrors []*XPSDataErrors `json:"dataErrors,omitempty"`
  4384  	// NumHumanLabeledExamples: The number of rows marked HUMAN_LABELLED
  4385  	NumHumanLabeledExamples int64 `json:"numHumanLabeledExamples,omitempty"`
  4386  	// NumLogsExamples: The number of samples found in the previously recorded logs
  4387  	// data.
  4388  	NumLogsExamples int64 `json:"numLogsExamples,omitempty"`
  4389  	// NumMachineTranscribedExamples: The number of rows marked as
  4390  	// MACHINE_TRANSCRIBED
  4391  	NumMachineTranscribedExamples int64 `json:"numMachineTranscribedExamples,omitempty"`
  4392  	// TestExamplesCount: The number of examples labelled as TEST by Speech xps
  4393  	// server.
  4394  	TestExamplesCount int64 `json:"testExamplesCount,omitempty"`
  4395  	// TestSentencesCount: The number of sentences in the test data set.
  4396  	TestSentencesCount int64 `json:"testSentencesCount,omitempty"`
  4397  	// TestWordsCount: The number of words in the test data set.
  4398  	TestWordsCount int64 `json:"testWordsCount,omitempty"`
  4399  	// TrainExamplesCount: The number of examples labeled as TRAIN by Speech xps
  4400  	// server.
  4401  	TrainExamplesCount int64 `json:"trainExamplesCount,omitempty"`
  4402  	// TrainSentencesCount: The number of sentences in the training data set.
  4403  	TrainSentencesCount int64 `json:"trainSentencesCount,omitempty"`
  4404  	// TrainWordsCount: The number of words in the training data set.
  4405  	TrainWordsCount int64 `json:"trainWordsCount,omitempty"`
  4406  	// ForceSendFields is a list of field names (e.g. "DataErrors") to
  4407  	// unconditionally include in API requests. By default, fields with empty or
  4408  	// default values are omitted from API requests. See
  4409  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4410  	// details.
  4411  	ForceSendFields []string `json:"-"`
  4412  	// NullFields is a list of field names (e.g. "DataErrors") to include in API
  4413  	// requests with the JSON null value. By default, fields with empty values are
  4414  	// omitted from API requests. See
  4415  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4416  	NullFields []string `json:"-"`
  4417  }
  4418  
  4419  func (s *XPSSpeechPreprocessStats) MarshalJSON() ([]byte, error) {
  4420  	type NoMethod XPSSpeechPreprocessStats
  4421  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4422  }
  4423  
  4424  // XPSStringStats: The data statistics of a series of STRING values.
  4425  type XPSStringStats struct {
  4426  	CommonStats *XPSCommonStats `json:"commonStats,omitempty"`
  4427  	// TopUnigramStats: The statistics of the top 20 unigrams, ordered by
  4428  	// StringStats.UnigramStats.count.
  4429  	TopUnigramStats []*XPSStringStatsUnigramStats `json:"topUnigramStats,omitempty"`
  4430  	// ForceSendFields is a list of field names (e.g. "CommonStats") to
  4431  	// unconditionally include in API requests. By default, fields with empty or
  4432  	// default values are omitted from API requests. See
  4433  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4434  	// details.
  4435  	ForceSendFields []string `json:"-"`
  4436  	// NullFields is a list of field names (e.g. "CommonStats") to include in API
  4437  	// requests with the JSON null value. By default, fields with empty values are
  4438  	// omitted from API requests. See
  4439  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4440  	NullFields []string `json:"-"`
  4441  }
  4442  
  4443  func (s *XPSStringStats) MarshalJSON() ([]byte, error) {
  4444  	type NoMethod XPSStringStats
  4445  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4446  }
  4447  
  4448  // XPSStringStatsUnigramStats: The statistics of a unigram.
  4449  type XPSStringStatsUnigramStats struct {
  4450  	// Count: The number of occurrences of this unigram in the series.
  4451  	Count int64 `json:"count,omitempty,string"`
  4452  	// Value: The unigram.
  4453  	Value string `json:"value,omitempty"`
  4454  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
  4455  	// include in API requests. By default, fields with empty or default values are
  4456  	// omitted from API requests. See
  4457  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4458  	// details.
  4459  	ForceSendFields []string `json:"-"`
  4460  	// NullFields is a list of field names (e.g. "Count") to include in API
  4461  	// requests with the JSON null value. By default, fields with empty values are
  4462  	// omitted from API requests. See
  4463  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4464  	NullFields []string `json:"-"`
  4465  }
  4466  
  4467  func (s *XPSStringStatsUnigramStats) MarshalJSON() ([]byte, error) {
  4468  	type NoMethod XPSStringStatsUnigramStats
  4469  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4470  }
  4471  
  4472  // XPSStructStats: The data statistics of a series of STRUCT values.
  4473  type XPSStructStats struct {
  4474  	CommonStats *XPSCommonStats `json:"commonStats,omitempty"`
  4475  	// FieldStats: Map from a field name of the struct to data stats aggregated
  4476  	// over series of all data in that field across all the structs.
  4477  	FieldStats map[string]XPSDataStats `json:"fieldStats,omitempty"`
  4478  	// ForceSendFields is a list of field names (e.g. "CommonStats") to
  4479  	// unconditionally include in API requests. By default, fields with empty or
  4480  	// default values are omitted from API requests. See
  4481  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4482  	// details.
  4483  	ForceSendFields []string `json:"-"`
  4484  	// NullFields is a list of field names (e.g. "CommonStats") to include in API
  4485  	// requests with the JSON null value. By default, fields with empty values are
  4486  	// omitted from API requests. See
  4487  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4488  	NullFields []string `json:"-"`
  4489  }
  4490  
  4491  func (s *XPSStructStats) MarshalJSON() ([]byte, error) {
  4492  	type NoMethod XPSStructStats
  4493  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4494  }
  4495  
  4496  // XPSStructType: `StructType` defines the DataType-s of a STRUCT type.
  4497  type XPSStructType struct {
  4498  	// Fields: Unordered map of struct field names to their data types.
  4499  	Fields map[string]XPSDataType `json:"fields,omitempty"`
  4500  	// ForceSendFields is a list of field names (e.g. "Fields") to unconditionally
  4501  	// include in API requests. By default, fields with empty or default values are
  4502  	// omitted from API requests. See
  4503  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4504  	// details.
  4505  	ForceSendFields []string `json:"-"`
  4506  	// NullFields is a list of field names (e.g. "Fields") to include in API
  4507  	// requests with the JSON null value. By default, fields with empty values are
  4508  	// omitted from API requests. See
  4509  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4510  	NullFields []string `json:"-"`
  4511  }
  4512  
  4513  func (s *XPSStructType) MarshalJSON() ([]byte, error) {
  4514  	type NoMethod XPSStructType
  4515  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4516  }
  4517  
  4518  type XPSTableSpec struct {
  4519  	// ColumnSpecs: Mapping from column id to column spec.
  4520  	ColumnSpecs map[string]XPSColumnSpec `json:"columnSpecs,omitempty"`
  4521  	// ImportedDataSizeInBytes: The total size of imported data of the table.
  4522  	ImportedDataSizeInBytes int64 `json:"importedDataSizeInBytes,omitempty,string"`
  4523  	// RowCount: The number of rows in the table.
  4524  	RowCount int64 `json:"rowCount,omitempty,string"`
  4525  	// TimeColumnId: The id of the time column.
  4526  	TimeColumnId int64 `json:"timeColumnId,omitempty"`
  4527  	// ValidRowCount: The number of valid rows.
  4528  	ValidRowCount int64 `json:"validRowCount,omitempty,string"`
  4529  	// ForceSendFields is a list of field names (e.g. "ColumnSpecs") to
  4530  	// unconditionally include in API requests. By default, fields with empty or
  4531  	// default values are omitted from API requests. See
  4532  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4533  	// details.
  4534  	ForceSendFields []string `json:"-"`
  4535  	// NullFields is a list of field names (e.g. "ColumnSpecs") to include in API
  4536  	// requests with the JSON null value. By default, fields with empty values are
  4537  	// omitted from API requests. See
  4538  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4539  	NullFields []string `json:"-"`
  4540  }
  4541  
  4542  func (s *XPSTableSpec) MarshalJSON() ([]byte, error) {
  4543  	type NoMethod XPSTableSpec
  4544  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4545  }
  4546  
  4547  // XPSTablesClassificationMetrics: Metrics for Tables classification problems.
  4548  type XPSTablesClassificationMetrics struct {
  4549  	// CurveMetrics: Metrics building a curve.
  4550  	CurveMetrics []*XPSTablesClassificationMetricsCurveMetrics `json:"curveMetrics,omitempty"`
  4551  	// ForceSendFields is a list of field names (e.g. "CurveMetrics") to
  4552  	// unconditionally include in API requests. By default, fields with empty or
  4553  	// default values are omitted from API requests. See
  4554  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4555  	// details.
  4556  	ForceSendFields []string `json:"-"`
  4557  	// NullFields is a list of field names (e.g. "CurveMetrics") to include in API
  4558  	// requests with the JSON null value. By default, fields with empty values are
  4559  	// omitted from API requests. See
  4560  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4561  	NullFields []string `json:"-"`
  4562  }
  4563  
  4564  func (s *XPSTablesClassificationMetrics) MarshalJSON() ([]byte, error) {
  4565  	type NoMethod XPSTablesClassificationMetrics
  4566  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4567  }
  4568  
  4569  // XPSTablesClassificationMetricsCurveMetrics: Metrics curve data point for a
  4570  // single value.
  4571  type XPSTablesClassificationMetricsCurveMetrics struct {
  4572  	// AucPr: The area under the precision-recall curve.
  4573  	AucPr float64 `json:"aucPr,omitempty"`
  4574  	// AucRoc: The area under receiver operating characteristic curve.
  4575  	AucRoc float64 `json:"aucRoc,omitempty"`
  4576  	// ConfidenceMetricsEntries: Metrics that have confidence thresholds.
  4577  	// Precision-recall curve and ROC curve can be derived from them.
  4578  	ConfidenceMetricsEntries []*XPSTablesConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"`
  4579  	// LogLoss: The Log loss metric.
  4580  	LogLoss float64 `json:"logLoss,omitempty"`
  4581  	// PositionThreshold: The position threshold value used to compute the metrics.
  4582  	PositionThreshold int64 `json:"positionThreshold,omitempty"`
  4583  	// Value: The CATEGORY row value (for ARRAY unnested) the curve metrics are
  4584  	// for.
  4585  	Value string `json:"value,omitempty"`
  4586  	// ForceSendFields is a list of field names (e.g. "AucPr") to unconditionally
  4587  	// include in API requests. By default, fields with empty or default values are
  4588  	// omitted from API requests. See
  4589  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4590  	// details.
  4591  	ForceSendFields []string `json:"-"`
  4592  	// NullFields is a list of field names (e.g. "AucPr") to include in API
  4593  	// requests with the JSON null value. By default, fields with empty values are
  4594  	// omitted from API requests. See
  4595  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4596  	NullFields []string `json:"-"`
  4597  }
  4598  
  4599  func (s *XPSTablesClassificationMetricsCurveMetrics) MarshalJSON() ([]byte, error) {
  4600  	type NoMethod XPSTablesClassificationMetricsCurveMetrics
  4601  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4602  }
  4603  
  4604  func (s *XPSTablesClassificationMetricsCurveMetrics) UnmarshalJSON(data []byte) error {
  4605  	type NoMethod XPSTablesClassificationMetricsCurveMetrics
  4606  	var s1 struct {
  4607  		AucPr   gensupport.JSONFloat64 `json:"aucPr"`
  4608  		AucRoc  gensupport.JSONFloat64 `json:"aucRoc"`
  4609  		LogLoss gensupport.JSONFloat64 `json:"logLoss"`
  4610  		*NoMethod
  4611  	}
  4612  	s1.NoMethod = (*NoMethod)(s)
  4613  	if err := json.Unmarshal(data, &s1); err != nil {
  4614  		return err
  4615  	}
  4616  	s.AucPr = float64(s1.AucPr)
  4617  	s.AucRoc = float64(s1.AucRoc)
  4618  	s.LogLoss = float64(s1.LogLoss)
  4619  	return nil
  4620  }
  4621  
  4622  // XPSTablesConfidenceMetricsEntry: Metrics for a single confidence threshold.
  4623  type XPSTablesConfidenceMetricsEntry struct {
  4624  	// ConfidenceThreshold: The confidence threshold value used to compute the
  4625  	// metrics.
  4626  	ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"`
  4627  	// F1Score: The harmonic mean of recall and precision. (2 * precision * recall)
  4628  	// / (precision + recall)
  4629  	F1Score float64 `json:"f1Score,omitempty"`
  4630  	// FalseNegativeCount: False negative count.
  4631  	FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"`
  4632  	// FalsePositiveCount: False positive count.
  4633  	FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"`
  4634  	// FalsePositiveRate: FPR = #false positives / (#false positives + #true
  4635  	// negatives)
  4636  	FalsePositiveRate float64 `json:"falsePositiveRate,omitempty"`
  4637  	// Precision: Precision = #true positives / (#true positives + #false
  4638  	// positives).
  4639  	Precision float64 `json:"precision,omitempty"`
  4640  	// Recall: Recall = #true positives / (#true positives + #false negatives).
  4641  	Recall float64 `json:"recall,omitempty"`
  4642  	// TrueNegativeCount: True negative count.
  4643  	TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"`
  4644  	// TruePositiveCount: True positive count.
  4645  	TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"`
  4646  	// TruePositiveRate: TPR = #true positives / (#true positives + #false
  4647  	// negatvies)
  4648  	TruePositiveRate float64 `json:"truePositiveRate,omitempty"`
  4649  	// ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") to
  4650  	// unconditionally include in API requests. By default, fields with empty or
  4651  	// default values are omitted from API requests. See
  4652  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4653  	// details.
  4654  	ForceSendFields []string `json:"-"`
  4655  	// NullFields is a list of field names (e.g. "ConfidenceThreshold") to include
  4656  	// in API requests with the JSON null value. By default, fields with empty
  4657  	// values are omitted from API requests. See
  4658  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4659  	NullFields []string `json:"-"`
  4660  }
  4661  
  4662  func (s *XPSTablesConfidenceMetricsEntry) MarshalJSON() ([]byte, error) {
  4663  	type NoMethod XPSTablesConfidenceMetricsEntry
  4664  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4665  }
  4666  
  4667  func (s *XPSTablesConfidenceMetricsEntry) UnmarshalJSON(data []byte) error {
  4668  	type NoMethod XPSTablesConfidenceMetricsEntry
  4669  	var s1 struct {
  4670  		ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"`
  4671  		F1Score             gensupport.JSONFloat64 `json:"f1Score"`
  4672  		FalsePositiveRate   gensupport.JSONFloat64 `json:"falsePositiveRate"`
  4673  		Precision           gensupport.JSONFloat64 `json:"precision"`
  4674  		Recall              gensupport.JSONFloat64 `json:"recall"`
  4675  		TruePositiveRate    gensupport.JSONFloat64 `json:"truePositiveRate"`
  4676  		*NoMethod
  4677  	}
  4678  	s1.NoMethod = (*NoMethod)(s)
  4679  	if err := json.Unmarshal(data, &s1); err != nil {
  4680  		return err
  4681  	}
  4682  	s.ConfidenceThreshold = float64(s1.ConfidenceThreshold)
  4683  	s.F1Score = float64(s1.F1Score)
  4684  	s.FalsePositiveRate = float64(s1.FalsePositiveRate)
  4685  	s.Precision = float64(s1.Precision)
  4686  	s.Recall = float64(s1.Recall)
  4687  	s.TruePositiveRate = float64(s1.TruePositiveRate)
  4688  	return nil
  4689  }
  4690  
  4691  // XPSTablesDatasetMetadata: Metadata for a dataset used for AutoML Tables.
  4692  // Next ID: 6
  4693  type XPSTablesDatasetMetadata struct {
  4694  	// MlUseColumnId: Id the column to split the table.
  4695  	MlUseColumnId int64 `json:"mlUseColumnId,omitempty"`
  4696  	// PrimaryTableSpec: Primary table.
  4697  	PrimaryTableSpec *XPSTableSpec `json:"primaryTableSpec,omitempty"`
  4698  	// TargetColumnCorrelations: (the column id : its CorrelationStats with target
  4699  	// column).
  4700  	TargetColumnCorrelations map[string]XPSCorrelationStats `json:"targetColumnCorrelations,omitempty"`
  4701  	// TargetColumnId: Id of the primary table column that should be used as the
  4702  	// training label.
  4703  	TargetColumnId int64 `json:"targetColumnId,omitempty"`
  4704  	// WeightColumnId: Id of the primary table column that should be used as the
  4705  	// weight column.
  4706  	WeightColumnId int64 `json:"weightColumnId,omitempty"`
  4707  	// ForceSendFields is a list of field names (e.g. "MlUseColumnId") to
  4708  	// unconditionally include in API requests. By default, fields with empty or
  4709  	// default values are omitted from API requests. See
  4710  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4711  	// details.
  4712  	ForceSendFields []string `json:"-"`
  4713  	// NullFields is a list of field names (e.g. "MlUseColumnId") to include in API
  4714  	// requests with the JSON null value. By default, fields with empty values are
  4715  	// omitted from API requests. See
  4716  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4717  	NullFields []string `json:"-"`
  4718  }
  4719  
  4720  func (s *XPSTablesDatasetMetadata) MarshalJSON() ([]byte, error) {
  4721  	type NoMethod XPSTablesDatasetMetadata
  4722  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4723  }
  4724  
  4725  type XPSTablesEvaluationMetrics struct {
  4726  	// ClassificationMetrics: Classification metrics.
  4727  	ClassificationMetrics *XPSTablesClassificationMetrics `json:"classificationMetrics,omitempty"`
  4728  	// RegressionMetrics: Regression metrics.
  4729  	RegressionMetrics *XPSTablesRegressionMetrics `json:"regressionMetrics,omitempty"`
  4730  	// ForceSendFields is a list of field names (e.g. "ClassificationMetrics") to
  4731  	// unconditionally include in API requests. By default, fields with empty or
  4732  	// default values are omitted from API requests. See
  4733  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4734  	// details.
  4735  	ForceSendFields []string `json:"-"`
  4736  	// NullFields is a list of field names (e.g. "ClassificationMetrics") to
  4737  	// include in API requests with the JSON null value. By default, fields with
  4738  	// empty values are omitted from API requests. See
  4739  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4740  	NullFields []string `json:"-"`
  4741  }
  4742  
  4743  func (s *XPSTablesEvaluationMetrics) MarshalJSON() ([]byte, error) {
  4744  	type NoMethod XPSTablesEvaluationMetrics
  4745  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4746  }
  4747  
  4748  // XPSTablesModelColumnInfo: An information specific to given column and Tables
  4749  // Model, in context of the Model and the predictions created by it.
  4750  type XPSTablesModelColumnInfo struct {
  4751  	// ColumnId: The ID of the column.
  4752  	ColumnId int64 `json:"columnId,omitempty"`
  4753  	// FeatureImportance: When given as part of a Model: Measurement of how much
  4754  	// model predictions correctness on the TEST data depend on values in this
  4755  	// column. A value between 0 and 1, higher means higher influence. These values
  4756  	// are normalized - for all input feature columns of a given model they add to
  4757  	// 1. When given back by Predict or Batch Predict: Measurement of how impactful
  4758  	// for the prediction returned for the given row the value in this column was.
  4759  	// Specifically, the feature importance specifies the marginal contribution
  4760  	// that the feature made to the prediction score compared to the baseline
  4761  	// score. These values are computed using the Sampled Shapley method.
  4762  	FeatureImportance float64 `json:"featureImportance,omitempty"`
  4763  	// ForceSendFields is a list of field names (e.g. "ColumnId") to
  4764  	// unconditionally include in API requests. By default, fields with empty or
  4765  	// default values are omitted from API requests. See
  4766  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4767  	// details.
  4768  	ForceSendFields []string `json:"-"`
  4769  	// NullFields is a list of field names (e.g. "ColumnId") to include in API
  4770  	// requests with the JSON null value. By default, fields with empty values are
  4771  	// omitted from API requests. See
  4772  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4773  	NullFields []string `json:"-"`
  4774  }
  4775  
  4776  func (s *XPSTablesModelColumnInfo) MarshalJSON() ([]byte, error) {
  4777  	type NoMethod XPSTablesModelColumnInfo
  4778  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4779  }
  4780  
  4781  func (s *XPSTablesModelColumnInfo) UnmarshalJSON(data []byte) error {
  4782  	type NoMethod XPSTablesModelColumnInfo
  4783  	var s1 struct {
  4784  		FeatureImportance gensupport.JSONFloat64 `json:"featureImportance"`
  4785  		*NoMethod
  4786  	}
  4787  	s1.NoMethod = (*NoMethod)(s)
  4788  	if err := json.Unmarshal(data, &s1); err != nil {
  4789  		return err
  4790  	}
  4791  	s.FeatureImportance = float64(s1.FeatureImportance)
  4792  	return nil
  4793  }
  4794  
  4795  // XPSTablesModelStructure: A description of Tables model structure.
  4796  type XPSTablesModelStructure struct {
  4797  	// ModelParameters: A list of models.
  4798  	ModelParameters []*XPSTablesModelStructureModelParameters `json:"modelParameters,omitempty"`
  4799  	// ForceSendFields is a list of field names (e.g. "ModelParameters") to
  4800  	// unconditionally include in API requests. By default, fields with empty or
  4801  	// default values are omitted from API requests. See
  4802  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4803  	// details.
  4804  	ForceSendFields []string `json:"-"`
  4805  	// NullFields is a list of field names (e.g. "ModelParameters") to include in
  4806  	// API requests with the JSON null value. By default, fields with empty values
  4807  	// are omitted from API requests. See
  4808  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4809  	NullFields []string `json:"-"`
  4810  }
  4811  
  4812  func (s *XPSTablesModelStructure) MarshalJSON() ([]byte, error) {
  4813  	type NoMethod XPSTablesModelStructure
  4814  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4815  }
  4816  
  4817  // XPSTablesModelStructureModelParameters: Model hyper-parameters for a model.
  4818  type XPSTablesModelStructureModelParameters struct {
  4819  	Hyperparameters []*XPSTablesModelStructureModelParametersParameter `json:"hyperparameters,omitempty"`
  4820  	// ForceSendFields is a list of field names (e.g. "Hyperparameters") to
  4821  	// unconditionally include in API requests. By default, fields with empty or
  4822  	// default values are omitted from API requests. See
  4823  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4824  	// details.
  4825  	ForceSendFields []string `json:"-"`
  4826  	// NullFields is a list of field names (e.g. "Hyperparameters") to include in
  4827  	// API requests with the JSON null value. By default, fields with empty values
  4828  	// are omitted from API requests. See
  4829  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4830  	NullFields []string `json:"-"`
  4831  }
  4832  
  4833  func (s *XPSTablesModelStructureModelParameters) MarshalJSON() ([]byte, error) {
  4834  	type NoMethod XPSTablesModelStructureModelParameters
  4835  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4836  }
  4837  
  4838  type XPSTablesModelStructureModelParametersParameter struct {
  4839  	// FloatValue: Float type parameter value.
  4840  	FloatValue float64 `json:"floatValue,omitempty"`
  4841  	// IntValue: Integer type parameter value.
  4842  	IntValue int64 `json:"intValue,omitempty,string"`
  4843  	// Name: Parameter name.
  4844  	Name string `json:"name,omitempty"`
  4845  	// StringValue: String type parameter value.
  4846  	StringValue string `json:"stringValue,omitempty"`
  4847  	// ForceSendFields is a list of field names (e.g. "FloatValue") to
  4848  	// unconditionally include in API requests. By default, fields with empty or
  4849  	// default values are omitted from API requests. See
  4850  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4851  	// details.
  4852  	ForceSendFields []string `json:"-"`
  4853  	// NullFields is a list of field names (e.g. "FloatValue") to include in API
  4854  	// requests with the JSON null value. By default, fields with empty values are
  4855  	// omitted from API requests. See
  4856  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4857  	NullFields []string `json:"-"`
  4858  }
  4859  
  4860  func (s *XPSTablesModelStructureModelParametersParameter) MarshalJSON() ([]byte, error) {
  4861  	type NoMethod XPSTablesModelStructureModelParametersParameter
  4862  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4863  }
  4864  
  4865  func (s *XPSTablesModelStructureModelParametersParameter) UnmarshalJSON(data []byte) error {
  4866  	type NoMethod XPSTablesModelStructureModelParametersParameter
  4867  	var s1 struct {
  4868  		FloatValue gensupport.JSONFloat64 `json:"floatValue"`
  4869  		*NoMethod
  4870  	}
  4871  	s1.NoMethod = (*NoMethod)(s)
  4872  	if err := json.Unmarshal(data, &s1); err != nil {
  4873  		return err
  4874  	}
  4875  	s.FloatValue = float64(s1.FloatValue)
  4876  	return nil
  4877  }
  4878  
  4879  type XPSTablesPreprocessResponse struct {
  4880  	// TablesDatasetMetadata: The table/column id, column_name and the DataTypes of
  4881  	// the columns will be populated.
  4882  	TablesDatasetMetadata *XPSTablesDatasetMetadata `json:"tablesDatasetMetadata,omitempty"`
  4883  	// ForceSendFields is a list of field names (e.g. "TablesDatasetMetadata") to
  4884  	// unconditionally include in API requests. By default, fields with empty or
  4885  	// default values are omitted from API requests. See
  4886  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4887  	// details.
  4888  	ForceSendFields []string `json:"-"`
  4889  	// NullFields is a list of field names (e.g. "TablesDatasetMetadata") to
  4890  	// include in API requests with the JSON null value. By default, fields with
  4891  	// empty values are omitted from API requests. See
  4892  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4893  	NullFields []string `json:"-"`
  4894  }
  4895  
  4896  func (s *XPSTablesPreprocessResponse) MarshalJSON() ([]byte, error) {
  4897  	type NoMethod XPSTablesPreprocessResponse
  4898  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4899  }
  4900  
  4901  // XPSTablesRegressionMetrics: Metrics for Tables regression problems.
  4902  type XPSTablesRegressionMetrics struct {
  4903  	// MeanAbsoluteError: Mean absolute error.
  4904  	MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"`
  4905  	// MeanAbsolutePercentageError: Mean absolute percentage error, only set if all
  4906  	// of the target column's values are positive.
  4907  	MeanAbsolutePercentageError float64 `json:"meanAbsolutePercentageError,omitempty"`
  4908  	// RSquared: R squared.
  4909  	RSquared float64 `json:"rSquared,omitempty"`
  4910  	// RegressionMetricsEntries: A list of actual versus predicted points for the
  4911  	// model being evaluated.
  4912  	RegressionMetricsEntries []*XPSRegressionMetricsEntry `json:"regressionMetricsEntries,omitempty"`
  4913  	// RootMeanSquaredError: Root mean squared error.
  4914  	RootMeanSquaredError float64 `json:"rootMeanSquaredError,omitempty"`
  4915  	// RootMeanSquaredLogError: Root mean squared log error.
  4916  	RootMeanSquaredLogError float64 `json:"rootMeanSquaredLogError,omitempty"`
  4917  	// ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") to
  4918  	// unconditionally include in API requests. By default, fields with empty or
  4919  	// default values are omitted from API requests. See
  4920  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4921  	// details.
  4922  	ForceSendFields []string `json:"-"`
  4923  	// NullFields is a list of field names (e.g. "MeanAbsoluteError") to include in
  4924  	// API requests with the JSON null value. By default, fields with empty values
  4925  	// are omitted from API requests. See
  4926  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4927  	NullFields []string `json:"-"`
  4928  }
  4929  
  4930  func (s *XPSTablesRegressionMetrics) MarshalJSON() ([]byte, error) {
  4931  	type NoMethod XPSTablesRegressionMetrics
  4932  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4933  }
  4934  
  4935  func (s *XPSTablesRegressionMetrics) UnmarshalJSON(data []byte) error {
  4936  	type NoMethod XPSTablesRegressionMetrics
  4937  	var s1 struct {
  4938  		MeanAbsoluteError           gensupport.JSONFloat64 `json:"meanAbsoluteError"`
  4939  		MeanAbsolutePercentageError gensupport.JSONFloat64 `json:"meanAbsolutePercentageError"`
  4940  		RSquared                    gensupport.JSONFloat64 `json:"rSquared"`
  4941  		RootMeanSquaredError        gensupport.JSONFloat64 `json:"rootMeanSquaredError"`
  4942  		RootMeanSquaredLogError     gensupport.JSONFloat64 `json:"rootMeanSquaredLogError"`
  4943  		*NoMethod
  4944  	}
  4945  	s1.NoMethod = (*NoMethod)(s)
  4946  	if err := json.Unmarshal(data, &s1); err != nil {
  4947  		return err
  4948  	}
  4949  	s.MeanAbsoluteError = float64(s1.MeanAbsoluteError)
  4950  	s.MeanAbsolutePercentageError = float64(s1.MeanAbsolutePercentageError)
  4951  	s.RSquared = float64(s1.RSquared)
  4952  	s.RootMeanSquaredError = float64(s1.RootMeanSquaredError)
  4953  	s.RootMeanSquaredLogError = float64(s1.RootMeanSquaredLogError)
  4954  	return nil
  4955  }
  4956  
  4957  type XPSTablesTrainResponse struct {
  4958  	ModelStructure *XPSTablesModelStructure `json:"modelStructure,omitempty"`
  4959  	// PredictionSampleRows: Sample rows from the dataset this model was trained.
  4960  	PredictionSampleRows []*XPSRow `json:"predictionSampleRows,omitempty"`
  4961  	// TablesModelColumnInfo: Output only. Auxiliary information for each of the
  4962  	// input_feature_column_specs, with respect to this particular model.
  4963  	TablesModelColumnInfo []*XPSTablesModelColumnInfo `json:"tablesModelColumnInfo,omitempty"`
  4964  	// TrainCostMilliNodeHours: The actual training cost of the model, expressed in
  4965  	// milli node hours, i.e. 1,000 value in this field means 1 node hour.
  4966  	// Guaranteed to not exceed the train budget.
  4967  	TrainCostMilliNodeHours int64 `json:"trainCostMilliNodeHours,omitempty,string"`
  4968  	// ForceSendFields is a list of field names (e.g. "ModelStructure") to
  4969  	// unconditionally include in API requests. By default, fields with empty or
  4970  	// default values are omitted from API requests. See
  4971  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4972  	// details.
  4973  	ForceSendFields []string `json:"-"`
  4974  	// NullFields is a list of field names (e.g. "ModelStructure") to include in
  4975  	// API requests with the JSON null value. By default, fields with empty values
  4976  	// are omitted from API requests. See
  4977  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4978  	NullFields []string `json:"-"`
  4979  }
  4980  
  4981  func (s *XPSTablesTrainResponse) MarshalJSON() ([]byte, error) {
  4982  	type NoMethod XPSTablesTrainResponse
  4983  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4984  }
  4985  
  4986  type XPSTablesTrainingOperationMetadata struct {
  4987  	// CreateModelStage: Current stage of creating model.
  4988  	//
  4989  	// Possible values:
  4990  	//   "CREATE_MODEL_STAGE_UNSPECIFIED" - Unspecified stage.
  4991  	//   "DATA_PREPROCESSING" - Prepare the model training pipeline and run data
  4992  	// processing.
  4993  	//   "TRAINING" - Training model.
  4994  	//   "EVALUATING" - Run evaluation.
  4995  	//   "MODEL_POST_PROCESSING" - Finalizing model training pipeline.
  4996  	CreateModelStage string `json:"createModelStage,omitempty"`
  4997  	// OptimizationObjective: The optimization objective for model.
  4998  	OptimizationObjective string `json:"optimizationObjective,omitempty"`
  4999  	// TopTrials: This field is for training. When the operation is terminated
  5000  	// successfully, AutoML Backend post this field to operation metadata in
  5001  	// spanner. If the metadata has no trials returned, the training operation is
  5002  	// supposed to be a failure.
  5003  	TopTrials []*XPSTuningTrial `json:"topTrials,omitempty"`
  5004  	// TrainBudgetMilliNodeHours: Creating model budget.
  5005  	TrainBudgetMilliNodeHours int64 `json:"trainBudgetMilliNodeHours,omitempty,string"`
  5006  	// TrainingObjectivePoints: This field records the training objective value
  5007  	// with respect to time, giving insight into how the model architecture search
  5008  	// is performing as training time elapses.
  5009  	TrainingObjectivePoints []*XPSTrainingObjectivePoint `json:"trainingObjectivePoints,omitempty"`
  5010  	// TrainingStartTime: Timestamp when training process starts.
  5011  	TrainingStartTime string `json:"trainingStartTime,omitempty"`
  5012  	// ForceSendFields is a list of field names (e.g. "CreateModelStage") to
  5013  	// unconditionally include in API requests. By default, fields with empty or
  5014  	// default values are omitted from API requests. See
  5015  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5016  	// details.
  5017  	ForceSendFields []string `json:"-"`
  5018  	// NullFields is a list of field names (e.g. "CreateModelStage") to include in
  5019  	// API requests with the JSON null value. By default, fields with empty values
  5020  	// are omitted from API requests. See
  5021  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5022  	NullFields []string `json:"-"`
  5023  }
  5024  
  5025  func (s *XPSTablesTrainingOperationMetadata) MarshalJSON() ([]byte, error) {
  5026  	type NoMethod XPSTablesTrainingOperationMetadata
  5027  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5028  }
  5029  
  5030  // XPSTextComponentModel: Component model. Next ID: 10
  5031  type XPSTextComponentModel struct {
  5032  	// BatchPredictionModelGcsUri: The Cloud Storage resource path to hold batch
  5033  	// prediction model.
  5034  	BatchPredictionModelGcsUri string `json:"batchPredictionModelGcsUri,omitempty"`
  5035  	// OnlinePredictionModelGcsUri: The Cloud Storage resource path to hold online
  5036  	// prediction model.
  5037  	OnlinePredictionModelGcsUri string `json:"onlinePredictionModelGcsUri,omitempty"`
  5038  	// Partition: The partition where the model is deployed. Populated by uCAIP BE
  5039  	// as part of online PredictRequest.
  5040  	//
  5041  	// Possible values:
  5042  	//   "PARTITION_TYPE_UNSPECIFIED"
  5043  	//   "PARTITION_ZERO" - The default partition.
  5044  	//   "PARTITION_REDUCED_HOMING" - It has significantly lower replication than
  5045  	// partition-0 and is located in the US only. It also has a larger model size
  5046  	// limit and higher default RAM quota than partition-0. Customers with batch
  5047  	// traffic, US-based traffic, or very large models should use this partition.
  5048  	// Capacity in this partition is significantly cheaper than partition-0.
  5049  	//   "PARTITION_JELLYFISH" - To be used by customers with Jellyfish-accelerated
  5050  	// ops. See go/servomatic-jellyfish for details.
  5051  	//   "PARTITION_CPU" - The partition used by regionalized servomatic cloud
  5052  	// regions.
  5053  	//   "PARTITION_CUSTOM_STORAGE_CPU" - The partition used for loading models
  5054  	// from custom storage.
  5055  	Partition string `json:"partition,omitempty"`
  5056  	// ServingArtifact: The default model binary file used for serving (e.g. online
  5057  	// predict, batch predict) via public Cloud Ai Platform API.
  5058  	ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"`
  5059  	// ServoModelName: The name of servo model. Populated by uCAIP BE as part of
  5060  	// online PredictRequest.
  5061  	ServoModelName string `json:"servoModelName,omitempty"`
  5062  	// SubmodelName: The name of the trained NL submodel.
  5063  	SubmodelName string `json:"submodelName,omitempty"`
  5064  	// SubmodelType: The type of trained NL submodel
  5065  	//
  5066  	// Possible values:
  5067  	//   "TEXT_MODEL_TYPE_UNSPECIFIED"
  5068  	//   "TEXT_MODEL_TYPE_DEFAULT"
  5069  	//   "TEXT_MODEL_TYPE_META_ARCHITECT"
  5070  	//   "TEXT_MODEL_TYPE_ATC"
  5071  	//   "TEXT_MODEL_TYPE_CLARA2"
  5072  	//   "TEXT_MODEL_TYPE_CHATBASE"
  5073  	//   "TEXT_MODEL_TYPE_SAFT_SPAN_LABELING"
  5074  	//   "TEXT_MODEL_TYPE_TEXT_EXTRACTION" - Model type for entity extraction.
  5075  	//   "TEXT_MODEL_TYPE_RELATIONSHIP_EXTRACTION" - Model type for relationship
  5076  	// extraction.
  5077  	//   "TEXT_MODEL_TYPE_COMPOSITE" - A composite model represents a set of
  5078  	// component models that have to be used together for prediction. A composite
  5079  	// model appears to be a single model to the model user. It may contain only
  5080  	// one component model. Please refer to go/cnl-composite-models for more
  5081  	// information.
  5082  	//   "TEXT_MODEL_TYPE_ALL_MODELS" - Model type used to train default, MA, and
  5083  	// ATC models in a single batch worker pipeline.
  5084  	//   "TEXT_MODEL_TYPE_BERT" - BERT pipeline needs a specific model type, since
  5085  	// it uses a different TFX configuration compared with DEFAULT (despite sharing
  5086  	// most of the code).
  5087  	//   "TEXT_MODEL_TYPE_ENC_PALM" - Model type for EncPaLM.
  5088  	SubmodelType string `json:"submodelType,omitempty"`
  5089  	// TfRuntimeVersion: ## The fields below are only populated under uCAIP request
  5090  	// scope. https://cloud.google.com/ml-engine/docs/runtime-version-list
  5091  	TfRuntimeVersion string `json:"tfRuntimeVersion,omitempty"`
  5092  	// VersionNumber: The servomatic model version number. Populated by uCAIP BE as
  5093  	// part of online PredictRequest.
  5094  	VersionNumber int64 `json:"versionNumber,omitempty,string"`
  5095  	// ForceSendFields is a list of field names (e.g. "BatchPredictionModelGcsUri")
  5096  	// to unconditionally include in API requests. By default, fields with empty or
  5097  	// default values are omitted from API requests. See
  5098  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5099  	// details.
  5100  	ForceSendFields []string `json:"-"`
  5101  	// NullFields is a list of field names (e.g. "BatchPredictionModelGcsUri") to
  5102  	// include in API requests with the JSON null value. By default, fields with
  5103  	// empty values are omitted from API requests. See
  5104  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5105  	NullFields []string `json:"-"`
  5106  }
  5107  
  5108  func (s *XPSTextComponentModel) MarshalJSON() ([]byte, error) {
  5109  	type NoMethod XPSTextComponentModel
  5110  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5111  }
  5112  
  5113  type XPSTextExtractionEvaluationMetrics struct {
  5114  	// BestF1ConfidenceMetrics: Values are at the highest F1 score on the
  5115  	// precision-recall curve. Only confidence_threshold, recall, precision, and
  5116  	// f1_score will be set.
  5117  	BestF1ConfidenceMetrics *XPSConfidenceMetricsEntry `json:"bestF1ConfidenceMetrics,omitempty"`
  5118  	// ConfidenceMetricsEntries: If the enclosing EvaluationMetrics.label is empty,
  5119  	// confidence_metrics_entries is an evaluation of the entire model across all
  5120  	// labels. If the enclosing EvaluationMetrics.label is set,
  5121  	// confidence_metrics_entries applies to that label.
  5122  	ConfidenceMetricsEntries []*XPSConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"`
  5123  	// ConfusionMatrix: Confusion matrix of the model, at the default confidence
  5124  	// threshold (0.0). Only set for whole-model evaluation, not for evaluation per
  5125  	// label.
  5126  	ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"`
  5127  	// PerLabelConfidenceMetrics: Only recall, precision, and f1_score will be set.
  5128  	PerLabelConfidenceMetrics map[string]XPSConfidenceMetricsEntry `json:"perLabelConfidenceMetrics,omitempty"`
  5129  	// ForceSendFields is a list of field names (e.g. "BestF1ConfidenceMetrics") to
  5130  	// unconditionally include in API requests. By default, fields with empty or
  5131  	// default values are omitted from API requests. See
  5132  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5133  	// details.
  5134  	ForceSendFields []string `json:"-"`
  5135  	// NullFields is a list of field names (e.g. "BestF1ConfidenceMetrics") to
  5136  	// include in API requests with the JSON null value. By default, fields with
  5137  	// empty values are omitted from API requests. See
  5138  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5139  	NullFields []string `json:"-"`
  5140  }
  5141  
  5142  func (s *XPSTextExtractionEvaluationMetrics) MarshalJSON() ([]byte, error) {
  5143  	type NoMethod XPSTextExtractionEvaluationMetrics
  5144  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5145  }
  5146  
  5147  // XPSTextSentimentEvaluationMetrics: Model evaluation metrics for text
  5148  // sentiment problems.
  5149  type XPSTextSentimentEvaluationMetrics struct {
  5150  	// ConfusionMatrix: Output only. Confusion matrix of the evaluation. Only set
  5151  	// for the overall model evaluation, not for evaluation of a single annotation
  5152  	// spec.
  5153  	ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"`
  5154  	// F1Score: Output only. The harmonic mean of recall and precision.
  5155  	F1Score float64 `json:"f1Score,omitempty"`
  5156  	// LinearKappa: Output only. Linear weighted kappa. Only set for the overall
  5157  	// model evaluation, not for evaluation of a single annotation spec.
  5158  	LinearKappa float64 `json:"linearKappa,omitempty"`
  5159  	// MeanAbsoluteError: Output only. Mean absolute error. Only set for the
  5160  	// overall model evaluation, not for evaluation of a single annotation spec.
  5161  	MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"`
  5162  	// MeanSquaredError: Output only. Mean squared error. Only set for the overall
  5163  	// model evaluation, not for evaluation of a single annotation spec.
  5164  	MeanSquaredError float64 `json:"meanSquaredError,omitempty"`
  5165  	// Precision: Output only. Precision.
  5166  	Precision float64 `json:"precision,omitempty"`
  5167  	// QuadraticKappa: Output only. Quadratic weighted kappa. Only set for the
  5168  	// overall model evaluation, not for evaluation of a single annotation spec.
  5169  	QuadraticKappa float64 `json:"quadraticKappa,omitempty"`
  5170  	// Recall: Output only. Recall.
  5171  	Recall float64 `json:"recall,omitempty"`
  5172  	// ForceSendFields is a list of field names (e.g. "ConfusionMatrix") to
  5173  	// unconditionally include in API requests. By default, fields with empty or
  5174  	// default values are omitted from API requests. See
  5175  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5176  	// details.
  5177  	ForceSendFields []string `json:"-"`
  5178  	// NullFields is a list of field names (e.g. "ConfusionMatrix") to include in
  5179  	// API requests with the JSON null value. By default, fields with empty values
  5180  	// are omitted from API requests. See
  5181  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5182  	NullFields []string `json:"-"`
  5183  }
  5184  
  5185  func (s *XPSTextSentimentEvaluationMetrics) MarshalJSON() ([]byte, error) {
  5186  	type NoMethod XPSTextSentimentEvaluationMetrics
  5187  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5188  }
  5189  
  5190  func (s *XPSTextSentimentEvaluationMetrics) UnmarshalJSON(data []byte) error {
  5191  	type NoMethod XPSTextSentimentEvaluationMetrics
  5192  	var s1 struct {
  5193  		F1Score           gensupport.JSONFloat64 `json:"f1Score"`
  5194  		LinearKappa       gensupport.JSONFloat64 `json:"linearKappa"`
  5195  		MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"`
  5196  		MeanSquaredError  gensupport.JSONFloat64 `json:"meanSquaredError"`
  5197  		Precision         gensupport.JSONFloat64 `json:"precision"`
  5198  		QuadraticKappa    gensupport.JSONFloat64 `json:"quadraticKappa"`
  5199  		Recall            gensupport.JSONFloat64 `json:"recall"`
  5200  		*NoMethod
  5201  	}
  5202  	s1.NoMethod = (*NoMethod)(s)
  5203  	if err := json.Unmarshal(data, &s1); err != nil {
  5204  		return err
  5205  	}
  5206  	s.F1Score = float64(s1.F1Score)
  5207  	s.LinearKappa = float64(s1.LinearKappa)
  5208  	s.MeanAbsoluteError = float64(s1.MeanAbsoluteError)
  5209  	s.MeanSquaredError = float64(s1.MeanSquaredError)
  5210  	s.Precision = float64(s1.Precision)
  5211  	s.QuadraticKappa = float64(s1.QuadraticKappa)
  5212  	s.Recall = float64(s1.Recall)
  5213  	return nil
  5214  }
  5215  
  5216  // XPSTextToSpeechTrainResponse: TextToSpeech train response
  5217  type XPSTextToSpeechTrainResponse struct {
  5218  }
  5219  
  5220  type XPSTextTrainResponse struct {
  5221  	// ComponentModel: Component submodels.
  5222  	ComponentModel []*XPSTextComponentModel `json:"componentModel,omitempty"`
  5223  	// ForceSendFields is a list of field names (e.g. "ComponentModel") to
  5224  	// unconditionally include in API requests. By default, fields with empty or
  5225  	// default values are omitted from API requests. See
  5226  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5227  	// details.
  5228  	ForceSendFields []string `json:"-"`
  5229  	// NullFields is a list of field names (e.g. "ComponentModel") to include in
  5230  	// API requests with the JSON null value. By default, fields with empty values
  5231  	// are omitted from API requests. See
  5232  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5233  	NullFields []string `json:"-"`
  5234  }
  5235  
  5236  func (s *XPSTextTrainResponse) MarshalJSON() ([]byte, error) {
  5237  	type NoMethod XPSTextTrainResponse
  5238  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5239  }
  5240  
  5241  // XPSTfJsFormat: A TensorFlow.js (https://www.tensorflow.org/js) model that
  5242  // can be used in the browser and in Node.js using JavaScript.
  5243  type XPSTfJsFormat struct {
  5244  }
  5245  
  5246  // XPSTfLiteFormat: LINT.IfChange A model format used for mobile and IoT
  5247  // devices. See https://www.tensorflow.org/lite.
  5248  type XPSTfLiteFormat struct {
  5249  }
  5250  
  5251  // XPSTfSavedModelFormat: A tensorflow model format in SavedModel format.
  5252  type XPSTfSavedModelFormat struct {
  5253  }
  5254  
  5255  // XPSTimestampStats: The data statistics of a series of TIMESTAMP values.
  5256  type XPSTimestampStats struct {
  5257  	CommonStats *XPSCommonStats `json:"commonStats,omitempty"`
  5258  	// GranularStats: The string key is the pre-defined granularity. Currently
  5259  	// supported: hour_of_day, day_of_week, month_of_year. Granularities finer that
  5260  	// the granularity of timestamp data are not populated (e.g. if timestamps are
  5261  	// at day granularity, then hour_of_day is not populated).
  5262  	GranularStats        map[string]XPSTimestampStatsGranularStats `json:"granularStats,omitempty"`
  5263  	MedianTimestampNanos int64                                     `json:"medianTimestampNanos,omitempty,string"`
  5264  	// ForceSendFields is a list of field names (e.g. "CommonStats") to
  5265  	// unconditionally include in API requests. By default, fields with empty or
  5266  	// default values are omitted from API requests. See
  5267  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5268  	// details.
  5269  	ForceSendFields []string `json:"-"`
  5270  	// NullFields is a list of field names (e.g. "CommonStats") to include in API
  5271  	// requests with the JSON null value. By default, fields with empty values are
  5272  	// omitted from API requests. See
  5273  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5274  	NullFields []string `json:"-"`
  5275  }
  5276  
  5277  func (s *XPSTimestampStats) MarshalJSON() ([]byte, error) {
  5278  	type NoMethod XPSTimestampStats
  5279  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5280  }
  5281  
  5282  // XPSTimestampStatsGranularStats: Stats split by a defined in context
  5283  // granularity.
  5284  type XPSTimestampStatsGranularStats struct {
  5285  	// Buckets: A map from granularity key to example count for that key. E.g. for
  5286  	// hour_of_day `13` means 1pm, or for month_of_year `5` means May).
  5287  	Buckets map[string]string `json:"buckets,omitempty"`
  5288  	// ForceSendFields is a list of field names (e.g. "Buckets") to unconditionally
  5289  	// include in API requests. By default, fields with empty or default values are
  5290  	// omitted from API requests. See
  5291  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5292  	// details.
  5293  	ForceSendFields []string `json:"-"`
  5294  	// NullFields is a list of field names (e.g. "Buckets") to include in API
  5295  	// requests with the JSON null value. By default, fields with empty values are
  5296  	// omitted from API requests. See
  5297  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5298  	NullFields []string `json:"-"`
  5299  }
  5300  
  5301  func (s *XPSTimestampStatsGranularStats) MarshalJSON() ([]byte, error) {
  5302  	type NoMethod XPSTimestampStatsGranularStats
  5303  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5304  }
  5305  
  5306  // XPSTrackMetricsEntry: Track matching model metrics for a single track match
  5307  // threshold and multiple label match confidence thresholds. Next tag: 6.
  5308  type XPSTrackMetricsEntry struct {
  5309  	// ConfidenceMetricsEntries: Output only. Metrics for each label-match
  5310  	// confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.
  5311  	// Precision-recall curve is derived from them.
  5312  	ConfidenceMetricsEntries []*XPSTrackMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"`
  5313  	// IouThreshold: Output only. The intersection-over-union threshold value
  5314  	// between bounding boxes across frames used to compute this metric entry.
  5315  	IouThreshold float64 `json:"iouThreshold,omitempty"`
  5316  	// MeanBoundingBoxIou: Output only. The mean bounding box iou over all
  5317  	// confidence thresholds.
  5318  	MeanBoundingBoxIou float64 `json:"meanBoundingBoxIou,omitempty"`
  5319  	// MeanMismatchRate: Output only. The mean mismatch rate over all confidence
  5320  	// thresholds.
  5321  	MeanMismatchRate float64 `json:"meanMismatchRate,omitempty"`
  5322  	// MeanTrackingAveragePrecision: Output only. The mean average precision over
  5323  	// all confidence thresholds.
  5324  	MeanTrackingAveragePrecision float64 `json:"meanTrackingAveragePrecision,omitempty"`
  5325  	// ForceSendFields is a list of field names (e.g. "ConfidenceMetricsEntries")
  5326  	// to unconditionally include in API requests. By default, fields with empty or
  5327  	// default values are omitted from API requests. See
  5328  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5329  	// details.
  5330  	ForceSendFields []string `json:"-"`
  5331  	// NullFields is a list of field names (e.g. "ConfidenceMetricsEntries") to
  5332  	// include in API requests with the JSON null value. By default, fields with
  5333  	// empty values are omitted from API requests. See
  5334  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5335  	NullFields []string `json:"-"`
  5336  }
  5337  
  5338  func (s *XPSTrackMetricsEntry) MarshalJSON() ([]byte, error) {
  5339  	type NoMethod XPSTrackMetricsEntry
  5340  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5341  }
  5342  
  5343  func (s *XPSTrackMetricsEntry) UnmarshalJSON(data []byte) error {
  5344  	type NoMethod XPSTrackMetricsEntry
  5345  	var s1 struct {
  5346  		IouThreshold                 gensupport.JSONFloat64 `json:"iouThreshold"`
  5347  		MeanBoundingBoxIou           gensupport.JSONFloat64 `json:"meanBoundingBoxIou"`
  5348  		MeanMismatchRate             gensupport.JSONFloat64 `json:"meanMismatchRate"`
  5349  		MeanTrackingAveragePrecision gensupport.JSONFloat64 `json:"meanTrackingAveragePrecision"`
  5350  		*NoMethod
  5351  	}
  5352  	s1.NoMethod = (*NoMethod)(s)
  5353  	if err := json.Unmarshal(data, &s1); err != nil {
  5354  		return err
  5355  	}
  5356  	s.IouThreshold = float64(s1.IouThreshold)
  5357  	s.MeanBoundingBoxIou = float64(s1.MeanBoundingBoxIou)
  5358  	s.MeanMismatchRate = float64(s1.MeanMismatchRate)
  5359  	s.MeanTrackingAveragePrecision = float64(s1.MeanTrackingAveragePrecision)
  5360  	return nil
  5361  }
  5362  
  5363  // XPSTrackMetricsEntryConfidenceMetricsEntry: Metrics for a single confidence
  5364  // threshold. Next tag: 6.
  5365  type XPSTrackMetricsEntryConfidenceMetricsEntry struct {
  5366  	// BoundingBoxIou: Output only. Bounding box intersection-over-union precision.
  5367  	// Measures how well the bounding boxes overlap between each other (e.g.
  5368  	// complete overlap or just barely above iou_threshold).
  5369  	BoundingBoxIou float64 `json:"boundingBoxIou,omitempty"`
  5370  	// ConfidenceThreshold: Output only. The confidence threshold value used to
  5371  	// compute the metrics.
  5372  	ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"`
  5373  	// MismatchRate: Output only. Mismatch rate, which measures the tracking
  5374  	// consistency, i.e. correctness of instance ID continuity.
  5375  	MismatchRate float64 `json:"mismatchRate,omitempty"`
  5376  	// TrackingPrecision: Output only. Tracking precision.
  5377  	TrackingPrecision float64 `json:"trackingPrecision,omitempty"`
  5378  	// TrackingRecall: Output only. Tracking recall.
  5379  	TrackingRecall float64 `json:"trackingRecall,omitempty"`
  5380  	// ForceSendFields is a list of field names (e.g. "BoundingBoxIou") to
  5381  	// unconditionally include in API requests. By default, fields with empty or
  5382  	// default values are omitted from API requests. See
  5383  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5384  	// details.
  5385  	ForceSendFields []string `json:"-"`
  5386  	// NullFields is a list of field names (e.g. "BoundingBoxIou") to include in
  5387  	// API requests with the JSON null value. By default, fields with empty values
  5388  	// are omitted from API requests. See
  5389  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5390  	NullFields []string `json:"-"`
  5391  }
  5392  
  5393  func (s *XPSTrackMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) {
  5394  	type NoMethod XPSTrackMetricsEntryConfidenceMetricsEntry
  5395  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5396  }
  5397  
  5398  func (s *XPSTrackMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error {
  5399  	type NoMethod XPSTrackMetricsEntryConfidenceMetricsEntry
  5400  	var s1 struct {
  5401  		BoundingBoxIou      gensupport.JSONFloat64 `json:"boundingBoxIou"`
  5402  		ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"`
  5403  		MismatchRate        gensupport.JSONFloat64 `json:"mismatchRate"`
  5404  		TrackingPrecision   gensupport.JSONFloat64 `json:"trackingPrecision"`
  5405  		TrackingRecall      gensupport.JSONFloat64 `json:"trackingRecall"`
  5406  		*NoMethod
  5407  	}
  5408  	s1.NoMethod = (*NoMethod)(s)
  5409  	if err := json.Unmarshal(data, &s1); err != nil {
  5410  		return err
  5411  	}
  5412  	s.BoundingBoxIou = float64(s1.BoundingBoxIou)
  5413  	s.ConfidenceThreshold = float64(s1.ConfidenceThreshold)
  5414  	s.MismatchRate = float64(s1.MismatchRate)
  5415  	s.TrackingPrecision = float64(s1.TrackingPrecision)
  5416  	s.TrackingRecall = float64(s1.TrackingRecall)
  5417  	return nil
  5418  }
  5419  
  5420  // XPSTrainResponse: Next ID: 18
  5421  type XPSTrainResponse struct {
  5422  	// DeployedModelSizeBytes: Estimated model size in bytes once deployed.
  5423  	DeployedModelSizeBytes int64 `json:"deployedModelSizeBytes,omitempty,string"`
  5424  	// ErrorAnalysisConfigs: Optional vision model error analysis configuration.
  5425  	// The field is set when model error analysis is enabled in the training
  5426  	// request. The results of error analysis will be binded together with
  5427  	// evaluation results (in the format of AnnotatedExample).
  5428  	ErrorAnalysisConfigs []*XPSVisionErrorAnalysisConfig `json:"errorAnalysisConfigs,omitempty"`
  5429  	// EvaluatedExampleSet: Examples used to evaluate the model (usually the test
  5430  	// set), with the predicted annotations. The file_spec should point to recordio
  5431  	// file(s) of AnnotatedExample. For each returned example, the example_id_token
  5432  	// and annotations predicted by the model must be set. The example payload can
  5433  	// and is recommended to be omitted.
  5434  	EvaluatedExampleSet *XPSExampleSet `json:"evaluatedExampleSet,omitempty"`
  5435  	// EvaluationMetricsSet: The trained model evaluation metrics. This can be
  5436  	// optionally returned.
  5437  	EvaluationMetricsSet *XPSEvaluationMetricsSet `json:"evaluationMetricsSet,omitempty"`
  5438  	// ExplanationConfigs: VisionExplanationConfig for XAI on test set. Optional
  5439  	// for when XAI is enable in training request.
  5440  	ExplanationConfigs            []*XPSResponseExplanationSpec        `json:"explanationConfigs,omitempty"`
  5441  	ImageClassificationTrainResp  *XPSImageClassificationTrainResponse `json:"imageClassificationTrainResp,omitempty"`
  5442  	ImageObjectDetectionTrainResp *XPSImageObjectDetectionModelSpec    `json:"imageObjectDetectionTrainResp,omitempty"`
  5443  	ImageSegmentationTrainResp    *XPSImageSegmentationTrainResponse   `json:"imageSegmentationTrainResp,omitempty"`
  5444  	// ModelToken: Token that represents the trained model. This is considered
  5445  	// immutable and is persisted in AutoML. xPS can put their own proto in the
  5446  	// byte string, to e.g. point to the model checkpoints. The token is passed to
  5447  	// other xPS APIs to refer to the model.
  5448  	ModelToken            string                        `json:"modelToken,omitempty"`
  5449  	SpeechTrainResp       *XPSSpeechModelSpec           `json:"speechTrainResp,omitempty"`
  5450  	TablesTrainResp       *XPSTablesTrainResponse       `json:"tablesTrainResp,omitempty"`
  5451  	TextToSpeechTrainResp *XPSTextToSpeechTrainResponse `json:"textToSpeechTrainResp,omitempty"`
  5452  	// TextTrainResp: Will only be needed for uCAIP from Beta.
  5453  	TextTrainResp                   *XPSTextTrainResponse                   `json:"textTrainResp,omitempty"`
  5454  	TranslationTrainResp            *XPSTranslationTrainResponse            `json:"translationTrainResp,omitempty"`
  5455  	VideoActionRecognitionTrainResp *XPSVideoActionRecognitionTrainResponse `json:"videoActionRecognitionTrainResp,omitempty"`
  5456  	VideoClassificationTrainResp    *XPSVideoClassificationTrainResponse    `json:"videoClassificationTrainResp,omitempty"`
  5457  	VideoObjectTrackingTrainResp    *XPSVideoObjectTrackingTrainResponse    `json:"videoObjectTrackingTrainResp,omitempty"`
  5458  	// ForceSendFields is a list of field names (e.g. "DeployedModelSizeBytes") to
  5459  	// unconditionally include in API requests. By default, fields with empty or
  5460  	// default values are omitted from API requests. See
  5461  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5462  	// details.
  5463  	ForceSendFields []string `json:"-"`
  5464  	// NullFields is a list of field names (e.g. "DeployedModelSizeBytes") to
  5465  	// include in API requests with the JSON null value. By default, fields with
  5466  	// empty values are omitted from API requests. See
  5467  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5468  	NullFields []string `json:"-"`
  5469  }
  5470  
  5471  func (s *XPSTrainResponse) MarshalJSON() ([]byte, error) {
  5472  	type NoMethod XPSTrainResponse
  5473  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5474  }
  5475  
  5476  type XPSTrainingObjectivePoint struct {
  5477  	// CreateTime: The time at which this point was recorded.
  5478  	CreateTime string `json:"createTime,omitempty"`
  5479  	// Value: The objective value when this point was recorded.
  5480  	Value float64 `json:"value,omitempty"`
  5481  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  5482  	// unconditionally include in API requests. By default, fields with empty or
  5483  	// default values are omitted from API requests. See
  5484  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5485  	// details.
  5486  	ForceSendFields []string `json:"-"`
  5487  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  5488  	// requests with the JSON null value. By default, fields with empty values are
  5489  	// omitted from API requests. See
  5490  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5491  	NullFields []string `json:"-"`
  5492  }
  5493  
  5494  func (s *XPSTrainingObjectivePoint) MarshalJSON() ([]byte, error) {
  5495  	type NoMethod XPSTrainingObjectivePoint
  5496  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5497  }
  5498  
  5499  func (s *XPSTrainingObjectivePoint) UnmarshalJSON(data []byte) error {
  5500  	type NoMethod XPSTrainingObjectivePoint
  5501  	var s1 struct {
  5502  		Value gensupport.JSONFloat64 `json:"value"`
  5503  		*NoMethod
  5504  	}
  5505  	s1.NoMethod = (*NoMethod)(s)
  5506  	if err := json.Unmarshal(data, &s1); err != nil {
  5507  		return err
  5508  	}
  5509  	s.Value = float64(s1.Value)
  5510  	return nil
  5511  }
  5512  
  5513  // XPSTranslationEvaluationMetrics: Evaluation metrics for the dataset.
  5514  type XPSTranslationEvaluationMetrics struct {
  5515  	// BaseBleuScore: BLEU score for base model.
  5516  	BaseBleuScore float64 `json:"baseBleuScore,omitempty"`
  5517  	// BleuScore: BLEU score.
  5518  	BleuScore float64 `json:"bleuScore,omitempty"`
  5519  	// ForceSendFields is a list of field names (e.g. "BaseBleuScore") to
  5520  	// unconditionally include in API requests. By default, fields with empty or
  5521  	// default values are omitted from API requests. See
  5522  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5523  	// details.
  5524  	ForceSendFields []string `json:"-"`
  5525  	// NullFields is a list of field names (e.g. "BaseBleuScore") to include in API
  5526  	// requests with the JSON null value. By default, fields with empty values are
  5527  	// omitted from API requests. See
  5528  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5529  	NullFields []string `json:"-"`
  5530  }
  5531  
  5532  func (s *XPSTranslationEvaluationMetrics) MarshalJSON() ([]byte, error) {
  5533  	type NoMethod XPSTranslationEvaluationMetrics
  5534  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5535  }
  5536  
  5537  func (s *XPSTranslationEvaluationMetrics) UnmarshalJSON(data []byte) error {
  5538  	type NoMethod XPSTranslationEvaluationMetrics
  5539  	var s1 struct {
  5540  		BaseBleuScore gensupport.JSONFloat64 `json:"baseBleuScore"`
  5541  		BleuScore     gensupport.JSONFloat64 `json:"bleuScore"`
  5542  		*NoMethod
  5543  	}
  5544  	s1.NoMethod = (*NoMethod)(s)
  5545  	if err := json.Unmarshal(data, &s1); err != nil {
  5546  		return err
  5547  	}
  5548  	s.BaseBleuScore = float64(s1.BaseBleuScore)
  5549  	s.BleuScore = float64(s1.BleuScore)
  5550  	return nil
  5551  }
  5552  
  5553  // XPSTranslationPreprocessResponse: Translation preprocess response.
  5554  type XPSTranslationPreprocessResponse struct {
  5555  	// ParsedExampleCount: Total example count parsed.
  5556  	ParsedExampleCount int64 `json:"parsedExampleCount,omitempty,string"`
  5557  	// ValidExampleCount: Total valid example count.
  5558  	ValidExampleCount int64 `json:"validExampleCount,omitempty,string"`
  5559  	// ForceSendFields is a list of field names (e.g. "ParsedExampleCount") to
  5560  	// unconditionally include in API requests. By default, fields with empty or
  5561  	// default values are omitted from API requests. See
  5562  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5563  	// details.
  5564  	ForceSendFields []string `json:"-"`
  5565  	// NullFields is a list of field names (e.g. "ParsedExampleCount") to include
  5566  	// in API requests with the JSON null value. By default, fields with empty
  5567  	// values are omitted from API requests. See
  5568  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5569  	NullFields []string `json:"-"`
  5570  }
  5571  
  5572  func (s *XPSTranslationPreprocessResponse) MarshalJSON() ([]byte, error) {
  5573  	type NoMethod XPSTranslationPreprocessResponse
  5574  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5575  }
  5576  
  5577  // XPSTranslationTrainResponse: Train response for translation.
  5578  type XPSTranslationTrainResponse struct {
  5579  	// ModelType: Type of the model.
  5580  	//
  5581  	// Possible values:
  5582  	//   "MODEL_TYPE_UNSPECIFIED" - Default
  5583  	//   "LEGACY" - Legacy model. Will be deprecated.
  5584  	//   "CURRENT" - Current model.
  5585  	ModelType string `json:"modelType,omitempty"`
  5586  	// ForceSendFields is a list of field names (e.g. "ModelType") to
  5587  	// unconditionally include in API requests. By default, fields with empty or
  5588  	// default values are omitted from API requests. See
  5589  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5590  	// details.
  5591  	ForceSendFields []string `json:"-"`
  5592  	// NullFields is a list of field names (e.g. "ModelType") to include in API
  5593  	// requests with the JSON null value. By default, fields with empty values are
  5594  	// omitted from API requests. See
  5595  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5596  	NullFields []string `json:"-"`
  5597  }
  5598  
  5599  func (s *XPSTranslationTrainResponse) MarshalJSON() ([]byte, error) {
  5600  	type NoMethod XPSTranslationTrainResponse
  5601  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5602  }
  5603  
  5604  // XPSTuningTrial: Metrics for a tuning job generated, will get forwarded to
  5605  // Stackdriver as model tuning logs. Setting this as a standalone message out
  5606  // of CreateModelMetadata to avoid confusion as we expose this message only to
  5607  // users.
  5608  type XPSTuningTrial struct {
  5609  	// ModelStructure: Model parameters for the trial.
  5610  	ModelStructure *XPSTablesModelStructure `json:"modelStructure,omitempty"`
  5611  	// TrainingObjectivePoint: The optimization objective evaluation of the eval
  5612  	// split data.
  5613  	TrainingObjectivePoint *XPSTrainingObjectivePoint `json:"trainingObjectivePoint,omitempty"`
  5614  	// ForceSendFields is a list of field names (e.g. "ModelStructure") to
  5615  	// unconditionally include in API requests. By default, fields with empty or
  5616  	// default values are omitted from API requests. See
  5617  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5618  	// details.
  5619  	ForceSendFields []string `json:"-"`
  5620  	// NullFields is a list of field names (e.g. "ModelStructure") to include in
  5621  	// API requests with the JSON null value. By default, fields with empty values
  5622  	// are omitted from API requests. See
  5623  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5624  	NullFields []string `json:"-"`
  5625  }
  5626  
  5627  func (s *XPSTuningTrial) MarshalJSON() ([]byte, error) {
  5628  	type NoMethod XPSTuningTrial
  5629  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5630  }
  5631  
  5632  // XPSVideoActionMetricsEntry: The Evaluation metrics entry given a specific
  5633  // precision_window_length.
  5634  type XPSVideoActionMetricsEntry struct {
  5635  	// ConfidenceMetricsEntries: Metrics for each label-match confidence_threshold
  5636  	// from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.
  5637  	ConfidenceMetricsEntries []*XPSVideoActionMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"`
  5638  	// MeanAveragePrecision: The mean average precision.
  5639  	MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"`
  5640  	// PrecisionWindowLength: This VideoActionMetricsEntry is calculated based on
  5641  	// this prediction window length. If the predicted action's timestamp is inside
  5642  	// the time window whose center is the ground truth action's timestamp with
  5643  	// this specific length, the prediction result is treated as a true positive.
  5644  	PrecisionWindowLength string `json:"precisionWindowLength,omitempty"`
  5645  	// ForceSendFields is a list of field names (e.g. "ConfidenceMetricsEntries")
  5646  	// to unconditionally include in API requests. By default, fields with empty or
  5647  	// default values are omitted from API requests. See
  5648  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5649  	// details.
  5650  	ForceSendFields []string `json:"-"`
  5651  	// NullFields is a list of field names (e.g. "ConfidenceMetricsEntries") to
  5652  	// include in API requests with the JSON null value. By default, fields with
  5653  	// empty values are omitted from API requests. See
  5654  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5655  	NullFields []string `json:"-"`
  5656  }
  5657  
  5658  func (s *XPSVideoActionMetricsEntry) MarshalJSON() ([]byte, error) {
  5659  	type NoMethod XPSVideoActionMetricsEntry
  5660  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5661  }
  5662  
  5663  func (s *XPSVideoActionMetricsEntry) UnmarshalJSON(data []byte) error {
  5664  	type NoMethod XPSVideoActionMetricsEntry
  5665  	var s1 struct {
  5666  		MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"`
  5667  		*NoMethod
  5668  	}
  5669  	s1.NoMethod = (*NoMethod)(s)
  5670  	if err := json.Unmarshal(data, &s1); err != nil {
  5671  		return err
  5672  	}
  5673  	s.MeanAveragePrecision = float64(s1.MeanAveragePrecision)
  5674  	return nil
  5675  }
  5676  
  5677  // XPSVideoActionMetricsEntryConfidenceMetricsEntry: Metrics for a single
  5678  // confidence threshold.
  5679  type XPSVideoActionMetricsEntryConfidenceMetricsEntry struct {
  5680  	// ConfidenceThreshold: Output only. The confidence threshold value used to
  5681  	// compute the metrics.
  5682  	ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"`
  5683  	// F1Score: Output only. The harmonic mean of recall and precision.
  5684  	F1Score float64 `json:"f1Score,omitempty"`
  5685  	// Precision: Output only. Precision for the given confidence threshold.
  5686  	Precision float64 `json:"precision,omitempty"`
  5687  	// Recall: Output only. Recall for the given confidence threshold.
  5688  	Recall float64 `json:"recall,omitempty"`
  5689  	// ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") to
  5690  	// unconditionally include in API requests. By default, fields with empty or
  5691  	// default values are omitted from API requests. See
  5692  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5693  	// details.
  5694  	ForceSendFields []string `json:"-"`
  5695  	// NullFields is a list of field names (e.g. "ConfidenceThreshold") to include
  5696  	// in API requests with the JSON null value. By default, fields with empty
  5697  	// values are omitted from API requests. See
  5698  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5699  	NullFields []string `json:"-"`
  5700  }
  5701  
  5702  func (s *XPSVideoActionMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) {
  5703  	type NoMethod XPSVideoActionMetricsEntryConfidenceMetricsEntry
  5704  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5705  }
  5706  
  5707  func (s *XPSVideoActionMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error {
  5708  	type NoMethod XPSVideoActionMetricsEntryConfidenceMetricsEntry
  5709  	var s1 struct {
  5710  		ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"`
  5711  		F1Score             gensupport.JSONFloat64 `json:"f1Score"`
  5712  		Precision           gensupport.JSONFloat64 `json:"precision"`
  5713  		Recall              gensupport.JSONFloat64 `json:"recall"`
  5714  		*NoMethod
  5715  	}
  5716  	s1.NoMethod = (*NoMethod)(s)
  5717  	if err := json.Unmarshal(data, &s1); err != nil {
  5718  		return err
  5719  	}
  5720  	s.ConfidenceThreshold = float64(s1.ConfidenceThreshold)
  5721  	s.F1Score = float64(s1.F1Score)
  5722  	s.Precision = float64(s1.Precision)
  5723  	s.Recall = float64(s1.Recall)
  5724  	return nil
  5725  }
  5726  
  5727  // XPSVideoActionRecognitionEvaluationMetrics: Model evaluation metrics for
  5728  // video action recognition.
  5729  type XPSVideoActionRecognitionEvaluationMetrics struct {
  5730  	// EvaluatedActionCount: Output only. The number of ground truth actions used
  5731  	// to create this evaluation.
  5732  	EvaluatedActionCount int64 `json:"evaluatedActionCount,omitempty"`
  5733  	// VideoActionMetricsEntries: Output only. The metric entries for precision
  5734  	// window lengths: 1s,2s,3s,4s, 5s.
  5735  	VideoActionMetricsEntries []*XPSVideoActionMetricsEntry `json:"videoActionMetricsEntries,omitempty"`
  5736  	// ForceSendFields is a list of field names (e.g. "EvaluatedActionCount") to
  5737  	// unconditionally include in API requests. By default, fields with empty or
  5738  	// default values are omitted from API requests. See
  5739  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5740  	// details.
  5741  	ForceSendFields []string `json:"-"`
  5742  	// NullFields is a list of field names (e.g. "EvaluatedActionCount") to include
  5743  	// in API requests with the JSON null value. By default, fields with empty
  5744  	// values are omitted from API requests. See
  5745  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5746  	NullFields []string `json:"-"`
  5747  }
  5748  
  5749  func (s *XPSVideoActionRecognitionEvaluationMetrics) MarshalJSON() ([]byte, error) {
  5750  	type NoMethod XPSVideoActionRecognitionEvaluationMetrics
  5751  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5752  }
  5753  
  5754  type XPSVideoActionRecognitionTrainResponse struct {
  5755  	// ModelArtifactSpec: ## The fields below are only populated under uCAIP
  5756  	// request scope.
  5757  	ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"`
  5758  	// TrainCostNodeSeconds: The actual train cost of creating this model,
  5759  	// expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.
  5760  	TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"`
  5761  	// ForceSendFields is a list of field names (e.g. "ModelArtifactSpec") to
  5762  	// unconditionally include in API requests. By default, fields with empty or
  5763  	// default values are omitted from API requests. See
  5764  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5765  	// details.
  5766  	ForceSendFields []string `json:"-"`
  5767  	// NullFields is a list of field names (e.g. "ModelArtifactSpec") to include in
  5768  	// API requests with the JSON null value. By default, fields with empty values
  5769  	// are omitted from API requests. See
  5770  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5771  	NullFields []string `json:"-"`
  5772  }
  5773  
  5774  func (s *XPSVideoActionRecognitionTrainResponse) MarshalJSON() ([]byte, error) {
  5775  	type NoMethod XPSVideoActionRecognitionTrainResponse
  5776  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5777  }
  5778  
  5779  type XPSVideoBatchPredictOperationMetadata struct {
  5780  	// OutputExamples: All the partial batch prediction results that are completed
  5781  	// at the moment. Output examples are sorted by completion time. The order will
  5782  	// not be changed. Each output example should be the path of a single RecordIO
  5783  	// file of AnnotatedExamples.
  5784  	OutputExamples []string `json:"outputExamples,omitempty"`
  5785  	// ForceSendFields is a list of field names (e.g. "OutputExamples") to
  5786  	// unconditionally include in API requests. By default, fields with empty or
  5787  	// default values are omitted from API requests. See
  5788  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5789  	// details.
  5790  	ForceSendFields []string `json:"-"`
  5791  	// NullFields is a list of field names (e.g. "OutputExamples") to include in
  5792  	// API requests with the JSON null value. By default, fields with empty values
  5793  	// are omitted from API requests. See
  5794  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5795  	NullFields []string `json:"-"`
  5796  }
  5797  
  5798  func (s *XPSVideoBatchPredictOperationMetadata) MarshalJSON() ([]byte, error) {
  5799  	type NoMethod XPSVideoBatchPredictOperationMetadata
  5800  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5801  }
  5802  
  5803  type XPSVideoClassificationTrainResponse struct {
  5804  	// ModelArtifactSpec: ## The fields below are only populated under uCAIP
  5805  	// request scope.
  5806  	ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"`
  5807  	// TrainCostNodeSeconds: The actual train cost of creating this model,
  5808  	// expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.
  5809  	TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"`
  5810  	// ForceSendFields is a list of field names (e.g. "ModelArtifactSpec") to
  5811  	// unconditionally include in API requests. By default, fields with empty or
  5812  	// default values are omitted from API requests. See
  5813  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5814  	// details.
  5815  	ForceSendFields []string `json:"-"`
  5816  	// NullFields is a list of field names (e.g. "ModelArtifactSpec") to include in
  5817  	// API requests with the JSON null value. By default, fields with empty values
  5818  	// are omitted from API requests. See
  5819  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5820  	NullFields []string `json:"-"`
  5821  }
  5822  
  5823  func (s *XPSVideoClassificationTrainResponse) MarshalJSON() ([]byte, error) {
  5824  	type NoMethod XPSVideoClassificationTrainResponse
  5825  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5826  }
  5827  
  5828  // XPSVideoExportModelSpec: Information of downloadable models that are
  5829  // pre-generated as part of training flow and will be persisted in AutoMl
  5830  // backend. Upon receiving ExportModel request from user, AutoMl backend can
  5831  // serve the pre-generated models to user if exists (by copying the files from
  5832  // internal path to user provided location), otherwise, AutoMl backend will
  5833  // call xPS ExportModel API to generate the model on the fly with the
  5834  // requesting format.
  5835  type XPSVideoExportModelSpec struct {
  5836  	// ExportModelOutputConfig: Contains the model format and internal location of
  5837  	// the model files to be exported/downloaded. Use the GCS bucket name which is
  5838  	// provided via TrainRequest.gcs_bucket_name to store the model files.
  5839  	ExportModelOutputConfig []*XPSExportModelOutputConfig `json:"exportModelOutputConfig,omitempty"`
  5840  	// ForceSendFields is a list of field names (e.g. "ExportModelOutputConfig") to
  5841  	// unconditionally include in API requests. By default, fields with empty or
  5842  	// default values are omitted from API requests. See
  5843  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5844  	// details.
  5845  	ForceSendFields []string `json:"-"`
  5846  	// NullFields is a list of field names (e.g. "ExportModelOutputConfig") to
  5847  	// include in API requests with the JSON null value. By default, fields with
  5848  	// empty values are omitted from API requests. See
  5849  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5850  	NullFields []string `json:"-"`
  5851  }
  5852  
  5853  func (s *XPSVideoExportModelSpec) MarshalJSON() ([]byte, error) {
  5854  	type NoMethod XPSVideoExportModelSpec
  5855  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5856  }
  5857  
  5858  type XPSVideoModelArtifactSpec struct {
  5859  	// ExportArtifact: The model binary files in different formats for model
  5860  	// export.
  5861  	ExportArtifact []*XPSModelArtifactItem `json:"exportArtifact,omitempty"`
  5862  	// ServingArtifact: The default model binary file used for serving (e.g. batch
  5863  	// predict) via public Cloud AI Platform API.
  5864  	ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"`
  5865  	// ForceSendFields is a list of field names (e.g. "ExportArtifact") to
  5866  	// unconditionally include in API requests. By default, fields with empty or
  5867  	// default values are omitted from API requests. See
  5868  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5869  	// details.
  5870  	ForceSendFields []string `json:"-"`
  5871  	// NullFields is a list of field names (e.g. "ExportArtifact") to include in
  5872  	// API requests with the JSON null value. By default, fields with empty values
  5873  	// are omitted from API requests. See
  5874  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5875  	NullFields []string `json:"-"`
  5876  }
  5877  
  5878  func (s *XPSVideoModelArtifactSpec) MarshalJSON() ([]byte, error) {
  5879  	type NoMethod XPSVideoModelArtifactSpec
  5880  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5881  }
  5882  
  5883  // XPSVideoObjectTrackingEvaluationMetrics: Model evaluation metrics for
  5884  // ObjectTracking problems. Next tag: 10.
  5885  type XPSVideoObjectTrackingEvaluationMetrics struct {
  5886  	// BoundingBoxMeanAveragePrecision: Output only. The single metric for bounding
  5887  	// boxes evaluation: the mean_average_precision averaged over all
  5888  	// bounding_box_metrics_entries.
  5889  	BoundingBoxMeanAveragePrecision float64 `json:"boundingBoxMeanAveragePrecision,omitempty"`
  5890  	// BoundingBoxMetricsEntries: Output only. The bounding boxes match metrics for
  5891  	// each Intersection-over-union threshold
  5892  	// 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.
  5893  	BoundingBoxMetricsEntries []*XPSBoundingBoxMetricsEntry `json:"boundingBoxMetricsEntries,omitempty"`
  5894  	// EvaluatedBoundingboxCount: The number of bounding boxes used for model
  5895  	// evaluation.
  5896  	EvaluatedBoundingboxCount int64 `json:"evaluatedBoundingboxCount,omitempty"`
  5897  	// EvaluatedFrameCount: The number of video frames used for model evaluation.
  5898  	EvaluatedFrameCount int64 `json:"evaluatedFrameCount,omitempty"`
  5899  	// EvaluatedTrackCount: The number of tracks used for model evaluation.
  5900  	EvaluatedTrackCount int64 `json:"evaluatedTrackCount,omitempty"`
  5901  	// TrackMeanAveragePrecision: Output only. The single metric for tracks
  5902  	// accuracy evaluation: the mean_average_precision averaged over all
  5903  	// track_metrics_entries.
  5904  	TrackMeanAveragePrecision float64 `json:"trackMeanAveragePrecision,omitempty"`
  5905  	// TrackMeanBoundingBoxIou: Output only. The single metric for tracks bounding
  5906  	// box iou evaluation: the mean_bounding_box_iou averaged over all
  5907  	// track_metrics_entries.
  5908  	TrackMeanBoundingBoxIou float64 `json:"trackMeanBoundingBoxIou,omitempty"`
  5909  	// TrackMeanMismatchRate: Output only. The single metric for tracking
  5910  	// consistency evaluation: the mean_mismatch_rate averaged over all
  5911  	// track_metrics_entries.
  5912  	TrackMeanMismatchRate float64 `json:"trackMeanMismatchRate,omitempty"`
  5913  	// TrackMetricsEntries: Output only. The tracks match metrics for each
  5914  	// Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.
  5915  	TrackMetricsEntries []*XPSTrackMetricsEntry `json:"trackMetricsEntries,omitempty"`
  5916  	// ForceSendFields is a list of field names (e.g.
  5917  	// "BoundingBoxMeanAveragePrecision") to unconditionally include in API
  5918  	// requests. By default, fields with empty or default values are omitted from
  5919  	// API requests. See
  5920  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5921  	// details.
  5922  	ForceSendFields []string `json:"-"`
  5923  	// NullFields is a list of field names (e.g. "BoundingBoxMeanAveragePrecision")
  5924  	// to include in API requests with the JSON null value. By default, fields with
  5925  	// empty values are omitted from API requests. See
  5926  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5927  	NullFields []string `json:"-"`
  5928  }
  5929  
  5930  func (s *XPSVideoObjectTrackingEvaluationMetrics) MarshalJSON() ([]byte, error) {
  5931  	type NoMethod XPSVideoObjectTrackingEvaluationMetrics
  5932  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5933  }
  5934  
  5935  func (s *XPSVideoObjectTrackingEvaluationMetrics) UnmarshalJSON(data []byte) error {
  5936  	type NoMethod XPSVideoObjectTrackingEvaluationMetrics
  5937  	var s1 struct {
  5938  		BoundingBoxMeanAveragePrecision gensupport.JSONFloat64 `json:"boundingBoxMeanAveragePrecision"`
  5939  		TrackMeanAveragePrecision       gensupport.JSONFloat64 `json:"trackMeanAveragePrecision"`
  5940  		TrackMeanBoundingBoxIou         gensupport.JSONFloat64 `json:"trackMeanBoundingBoxIou"`
  5941  		TrackMeanMismatchRate           gensupport.JSONFloat64 `json:"trackMeanMismatchRate"`
  5942  		*NoMethod
  5943  	}
  5944  	s1.NoMethod = (*NoMethod)(s)
  5945  	if err := json.Unmarshal(data, &s1); err != nil {
  5946  		return err
  5947  	}
  5948  	s.BoundingBoxMeanAveragePrecision = float64(s1.BoundingBoxMeanAveragePrecision)
  5949  	s.TrackMeanAveragePrecision = float64(s1.TrackMeanAveragePrecision)
  5950  	s.TrackMeanBoundingBoxIou = float64(s1.TrackMeanBoundingBoxIou)
  5951  	s.TrackMeanMismatchRate = float64(s1.TrackMeanMismatchRate)
  5952  	return nil
  5953  }
  5954  
  5955  type XPSVideoObjectTrackingTrainResponse struct {
  5956  	// ExportModelSpec: Populated for AutoML request only.
  5957  	ExportModelSpec *XPSVideoExportModelSpec `json:"exportModelSpec,omitempty"`
  5958  	// ModelArtifactSpec: ## The fields below are only populated under uCAIP
  5959  	// request scope.
  5960  	ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"`
  5961  	// TrainCostNodeSeconds: The actual train cost of creating this model,
  5962  	// expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.
  5963  	TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"`
  5964  	// ForceSendFields is a list of field names (e.g. "ExportModelSpec") to
  5965  	// unconditionally include in API requests. By default, fields with empty or
  5966  	// default values are omitted from API requests. See
  5967  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5968  	// details.
  5969  	ForceSendFields []string `json:"-"`
  5970  	// NullFields is a list of field names (e.g. "ExportModelSpec") to include in
  5971  	// API requests with the JSON null value. By default, fields with empty values
  5972  	// are omitted from API requests. See
  5973  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5974  	NullFields []string `json:"-"`
  5975  }
  5976  
  5977  func (s *XPSVideoObjectTrackingTrainResponse) MarshalJSON() ([]byte, error) {
  5978  	type NoMethod XPSVideoObjectTrackingTrainResponse
  5979  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5980  }
  5981  
  5982  type XPSVideoTrainingOperationMetadata struct {
  5983  	// TrainCostMilliNodeHour: This is an estimation of the node hours necessary
  5984  	// for training a model, expressed in milli node hours (i.e. 1,000 value in
  5985  	// this field means 1 node hour). A node hour represents the time a virtual
  5986  	// machine spends running your training job. The cost of one node running for
  5987  	// one hour is a node hour.
  5988  	TrainCostMilliNodeHour int64 `json:"trainCostMilliNodeHour,omitempty,string"`
  5989  	// ForceSendFields is a list of field names (e.g. "TrainCostMilliNodeHour") to
  5990  	// unconditionally include in API requests. By default, fields with empty or
  5991  	// default values are omitted from API requests. See
  5992  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5993  	// details.
  5994  	ForceSendFields []string `json:"-"`
  5995  	// NullFields is a list of field names (e.g. "TrainCostMilliNodeHour") to
  5996  	// include in API requests with the JSON null value. By default, fields with
  5997  	// empty values are omitted from API requests. See
  5998  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5999  	NullFields []string `json:"-"`
  6000  }
  6001  
  6002  func (s *XPSVideoTrainingOperationMetadata) MarshalJSON() ([]byte, error) {
  6003  	type NoMethod XPSVideoTrainingOperationMetadata
  6004  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6005  }
  6006  
  6007  // XPSVisionErrorAnalysisConfig: The vision model error analysis configuration.
  6008  // Next tag: 3
  6009  type XPSVisionErrorAnalysisConfig struct {
  6010  	// ExampleCount: The number of query examples in error analysis.
  6011  	ExampleCount int64 `json:"exampleCount,omitempty"`
  6012  	// QueryType: The query type used in retrieval. The enum values are frozen in
  6013  	// the foreseeable future.
  6014  	//
  6015  	// Possible values:
  6016  	//   "QUERY_TYPE_UNSPECIFIED" - Unspecified query type for model error
  6017  	// analysis.
  6018  	//   "QUERY_TYPE_ALL_SIMILAR" - Query similar samples across all classes in the
  6019  	// dataset.
  6020  	//   "QUERY_TYPE_SAME_CLASS_SIMILAR" - Query similar samples from the same
  6021  	// class of the input sample.
  6022  	//   "QUERY_TYPE_SAME_CLASS_DISSIMILAR" - Query dissimilar samples from the
  6023  	// same class of the input sample.
  6024  	QueryType string `json:"queryType,omitempty"`
  6025  	// ForceSendFields is a list of field names (e.g. "ExampleCount") to
  6026  	// unconditionally include in API requests. By default, fields with empty or
  6027  	// default values are omitted from API requests. See
  6028  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6029  	// details.
  6030  	ForceSendFields []string `json:"-"`
  6031  	// NullFields is a list of field names (e.g. "ExampleCount") to include in API
  6032  	// requests with the JSON null value. By default, fields with empty values are
  6033  	// omitted from API requests. See
  6034  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6035  	NullFields []string `json:"-"`
  6036  }
  6037  
  6038  func (s *XPSVisionErrorAnalysisConfig) MarshalJSON() ([]byte, error) {
  6039  	type NoMethod XPSVisionErrorAnalysisConfig
  6040  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6041  }
  6042  
  6043  type XPSVisionTrainingOperationMetadata struct {
  6044  	// ExplanationUsage: Aggregated infra usage within certain time period, for
  6045  	// billing report purpose if XAI is enable in training request.
  6046  	ExplanationUsage *InfraUsage `json:"explanationUsage,omitempty"`
  6047  	// ForceSendFields is a list of field names (e.g. "ExplanationUsage") to
  6048  	// unconditionally include in API requests. By default, fields with empty or
  6049  	// default values are omitted from API requests. See
  6050  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6051  	// details.
  6052  	ForceSendFields []string `json:"-"`
  6053  	// NullFields is a list of field names (e.g. "ExplanationUsage") to include in
  6054  	// API requests with the JSON null value. By default, fields with empty values
  6055  	// are omitted from API requests. See
  6056  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6057  	NullFields []string `json:"-"`
  6058  }
  6059  
  6060  func (s *XPSVisionTrainingOperationMetadata) MarshalJSON() ([]byte, error) {
  6061  	type NoMethod XPSVisionTrainingOperationMetadata
  6062  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6063  }
  6064  
  6065  // XPSVisualization: Visualization configurations for image explanation.
  6066  type XPSVisualization struct {
  6067  	// ClipPercentLowerbound: Excludes attributions below the specified percentile,
  6068  	// from the highlighted areas. Defaults to 62.
  6069  	ClipPercentLowerbound float64 `json:"clipPercentLowerbound,omitempty"`
  6070  	// ClipPercentUpperbound: Excludes attributions above the specified percentile
  6071  	// from the highlighted areas. Using the clip_percent_upperbound and
  6072  	// clip_percent_lowerbound together can be useful for filtering out noise and
  6073  	// making it easier to see areas of strong attribution. Defaults to 99.9.
  6074  	ClipPercentUpperbound float64 `json:"clipPercentUpperbound,omitempty"`
  6075  	// ColorMap: The color scheme used for the highlighted areas. Defaults to
  6076  	// PINK_GREEN for Integrated Gradients attribution, which shows positive
  6077  	// attributions in green and negative in pink. Defaults to VIRIDIS for XRAI
  6078  	// attribution, which highlights the most influential regions in yellow and the
  6079  	// least influential in blue.
  6080  	//
  6081  	// Possible values:
  6082  	//   "COLOR_MAP_UNSPECIFIED" - Should not be used.
  6083  	//   "PINK_GREEN" - Positive: green. Negative: pink.
  6084  	//   "VIRIDIS" - Viridis color map: A perceptually uniform color mapping which
  6085  	// is easier to see by those with colorblindness and progresses from yellow to
  6086  	// green to blue. Positive: yellow. Negative: blue.
  6087  	//   "RED" - Positive: red. Negative: red.
  6088  	//   "GREEN" - Positive: green. Negative: green.
  6089  	//   "RED_GREEN" - Positive: green. Negative: red.
  6090  	//   "PINK_WHITE_GREEN" - PiYG palette.
  6091  	ColorMap string `json:"colorMap,omitempty"`
  6092  	// OverlayType: How the original image is displayed in the visualization.
  6093  	// Adjusting the overlay can help increase visual clarity if the original image
  6094  	// makes it difficult to view the visualization. Defaults to NONE.
  6095  	//
  6096  	// Possible values:
  6097  	//   "OVERLAY_TYPE_UNSPECIFIED" - Default value. This is the same as NONE.
  6098  	//   "NONE" - No overlay.
  6099  	//   "ORIGINAL" - The attributions are shown on top of the original image.
  6100  	//   "GRAYSCALE" - The attributions are shown on top of grayscaled version of
  6101  	// the original image.
  6102  	//   "MASK_BLACK" - The attributions are used as a mask to reveal predictive
  6103  	// parts of the image and hide the un-predictive parts.
  6104  	OverlayType string `json:"overlayType,omitempty"`
  6105  	// Polarity: Whether to only highlight pixels with positive contributions,
  6106  	// negative or both. Defaults to POSITIVE.
  6107  	//
  6108  	// Possible values:
  6109  	//   "POLARITY_UNSPECIFIED" - Default value. This is the same as POSITIVE.
  6110  	//   "POSITIVE" - Highlights the pixels/outlines that were most influential to
  6111  	// the model's prediction.
  6112  	//   "NEGATIVE" - Setting polarity to negative highlights areas that does not
  6113  	// lead to the models's current prediction.
  6114  	//   "BOTH" - Shows both positive and negative attributions.
  6115  	Polarity string `json:"polarity,omitempty"`
  6116  	// Type: Type of the image visualization. Only applicable to Integrated
  6117  	// Gradients attribution. OUTLINES shows regions of attribution, while PIXELS
  6118  	// shows per-pixel attribution. Defaults to OUTLINES.
  6119  	//
  6120  	// Possible values:
  6121  	//   "TYPE_UNSPECIFIED" - Should not be used.
  6122  	//   "PIXELS" - Shows which pixel contributed to the image prediction.
  6123  	//   "OUTLINES" - Shows which region contributed to the image prediction by
  6124  	// outlining the region.
  6125  	Type string `json:"type,omitempty"`
  6126  	// ForceSendFields is a list of field names (e.g. "ClipPercentLowerbound") to
  6127  	// unconditionally include in API requests. By default, fields with empty or
  6128  	// default values are omitted from API requests. See
  6129  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6130  	// details.
  6131  	ForceSendFields []string `json:"-"`
  6132  	// NullFields is a list of field names (e.g. "ClipPercentLowerbound") to
  6133  	// include in API requests with the JSON null value. By default, fields with
  6134  	// empty values are omitted from API requests. See
  6135  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6136  	NullFields []string `json:"-"`
  6137  }
  6138  
  6139  func (s *XPSVisualization) MarshalJSON() ([]byte, error) {
  6140  	type NoMethod XPSVisualization
  6141  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6142  }
  6143  
  6144  func (s *XPSVisualization) UnmarshalJSON(data []byte) error {
  6145  	type NoMethod XPSVisualization
  6146  	var s1 struct {
  6147  		ClipPercentLowerbound gensupport.JSONFloat64 `json:"clipPercentLowerbound"`
  6148  		ClipPercentUpperbound gensupport.JSONFloat64 `json:"clipPercentUpperbound"`
  6149  		*NoMethod
  6150  	}
  6151  	s1.NoMethod = (*NoMethod)(s)
  6152  	if err := json.Unmarshal(data, &s1); err != nil {
  6153  		return err
  6154  	}
  6155  	s.ClipPercentLowerbound = float64(s1.ClipPercentLowerbound)
  6156  	s.ClipPercentUpperbound = float64(s1.ClipPercentUpperbound)
  6157  	return nil
  6158  }
  6159  
  6160  type XPSXpsOperationMetadata struct {
  6161  	// ExampleCount: Optional. XPS server can opt to provide example count of the
  6162  	// long running operation (e.g. training, data importing, batch prediction).
  6163  	ExampleCount int64 `json:"exampleCount,omitempty,string"`
  6164  	// ReportingMetrics: Metrics for the operation. By the time the operation is
  6165  	// terminated (whether succeeded or failed) as returned from XPS, AutoML BE
  6166  	// assumes the metrics are finalized. AutoML BE transparently posts the metrics
  6167  	// to Chemist if it's not empty, regardless of the response content or error
  6168  	// type. If user is supposed to be charged in case of cancellation/error, this
  6169  	// field should be set. In the case where the type of LRO doesn't require any
  6170  	// billing, this field should be left unset.
  6171  	ReportingMetrics                   *XPSReportingMetrics                   `json:"reportingMetrics,omitempty"`
  6172  	TablesTrainingOperationMetadata    *XPSTablesTrainingOperationMetadata    `json:"tablesTrainingOperationMetadata,omitempty"`
  6173  	VideoBatchPredictOperationMetadata *XPSVideoBatchPredictOperationMetadata `json:"videoBatchPredictOperationMetadata,omitempty"`
  6174  	VideoTrainingOperationMetadata     *XPSVideoTrainingOperationMetadata     `json:"videoTrainingOperationMetadata,omitempty"`
  6175  	VisionTrainingOperationMetadata    *XPSVisionTrainingOperationMetadata    `json:"visionTrainingOperationMetadata,omitempty"`
  6176  	// ForceSendFields is a list of field names (e.g. "ExampleCount") to
  6177  	// unconditionally include in API requests. By default, fields with empty or
  6178  	// default values are omitted from API requests. See
  6179  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6180  	// details.
  6181  	ForceSendFields []string `json:"-"`
  6182  	// NullFields is a list of field names (e.g. "ExampleCount") to include in API
  6183  	// requests with the JSON null value. By default, fields with empty values are
  6184  	// omitted from API requests. See
  6185  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6186  	NullFields []string `json:"-"`
  6187  }
  6188  
  6189  func (s *XPSXpsOperationMetadata) MarshalJSON() ([]byte, error) {
  6190  	type NoMethod XPSXpsOperationMetadata
  6191  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6192  }
  6193  
  6194  // XPSXraiAttribution: An explanation method that redistributes Integrated
  6195  // Gradients attributions to segmented regions, taking advantage of the model's
  6196  // fully differentiable structure. Refer to this paper for more details:
  6197  // https://arxiv.org/abs/1906.02825 Only supports image Models (modality is
  6198  // IMAGE).
  6199  type XPSXraiAttribution struct {
  6200  	// StepCount: The number of steps for approximating the path integral. A good
  6201  	// value to start is 50 and gradually increase until the sum to diff property
  6202  	// is met within the desired error range. Valid range of its value is [1, 100],
  6203  	// inclusively.
  6204  	StepCount int64 `json:"stepCount,omitempty"`
  6205  	// ForceSendFields is a list of field names (e.g. "StepCount") to
  6206  	// unconditionally include in API requests. By default, fields with empty or
  6207  	// default values are omitted from API requests. See
  6208  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6209  	// details.
  6210  	ForceSendFields []string `json:"-"`
  6211  	// NullFields is a list of field names (e.g. "StepCount") to include in API
  6212  	// requests with the JSON null value. By default, fields with empty values are
  6213  	// omitted from API requests. See
  6214  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6215  	NullFields []string `json:"-"`
  6216  }
  6217  
  6218  func (s *XPSXraiAttribution) MarshalJSON() ([]byte, error) {
  6219  	type NoMethod XPSXraiAttribution
  6220  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6221  }
  6222  
  6223  type DocumentsAnalyzeEntitiesCall struct {
  6224  	s                      *Service
  6225  	analyzeentitiesrequest *AnalyzeEntitiesRequest
  6226  	urlParams_             gensupport.URLParams
  6227  	ctx_                   context.Context
  6228  	header_                http.Header
  6229  }
  6230  
  6231  // AnalyzeEntities: Finds named entities (currently proper names and common
  6232  // nouns) in the text along with entity types, salience, mentions for each
  6233  // entity, and other properties.
  6234  func (r *DocumentsService) AnalyzeEntities(analyzeentitiesrequest *AnalyzeEntitiesRequest) *DocumentsAnalyzeEntitiesCall {
  6235  	c := &DocumentsAnalyzeEntitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6236  	c.analyzeentitiesrequest = analyzeentitiesrequest
  6237  	return c
  6238  }
  6239  
  6240  // Fields allows partial responses to be retrieved. See
  6241  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6242  // details.
  6243  func (c *DocumentsAnalyzeEntitiesCall) Fields(s ...googleapi.Field) *DocumentsAnalyzeEntitiesCall {
  6244  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6245  	return c
  6246  }
  6247  
  6248  // Context sets the context to be used in this call's Do method.
  6249  func (c *DocumentsAnalyzeEntitiesCall) Context(ctx context.Context) *DocumentsAnalyzeEntitiesCall {
  6250  	c.ctx_ = ctx
  6251  	return c
  6252  }
  6253  
  6254  // Header returns a http.Header that can be modified by the caller to add
  6255  // headers to the request.
  6256  func (c *DocumentsAnalyzeEntitiesCall) Header() http.Header {
  6257  	if c.header_ == nil {
  6258  		c.header_ = make(http.Header)
  6259  	}
  6260  	return c.header_
  6261  }
  6262  
  6263  func (c *DocumentsAnalyzeEntitiesCall) doRequest(alt string) (*http.Response, error) {
  6264  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6265  	var body io.Reader = nil
  6266  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyzeentitiesrequest)
  6267  	if err != nil {
  6268  		return nil, err
  6269  	}
  6270  	c.urlParams_.Set("alt", alt)
  6271  	c.urlParams_.Set("prettyPrint", "false")
  6272  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents:analyzeEntities")
  6273  	urls += "?" + c.urlParams_.Encode()
  6274  	req, err := http.NewRequest("POST", urls, body)
  6275  	if err != nil {
  6276  		return nil, err
  6277  	}
  6278  	req.Header = reqHeaders
  6279  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6280  }
  6281  
  6282  // Do executes the "language.documents.analyzeEntities" call.
  6283  // Any non-2xx status code is an error. Response headers are in either
  6284  // *AnalyzeEntitiesResponse.ServerResponse.Header or (if a response was
  6285  // returned at all) in error.(*googleapi.Error).Header. Use
  6286  // googleapi.IsNotModified to check whether the returned error was because
  6287  // http.StatusNotModified was returned.
  6288  func (c *DocumentsAnalyzeEntitiesCall) Do(opts ...googleapi.CallOption) (*AnalyzeEntitiesResponse, error) {
  6289  	gensupport.SetOptions(c.urlParams_, opts...)
  6290  	res, err := c.doRequest("json")
  6291  	if res != nil && res.StatusCode == http.StatusNotModified {
  6292  		if res.Body != nil {
  6293  			res.Body.Close()
  6294  		}
  6295  		return nil, gensupport.WrapError(&googleapi.Error{
  6296  			Code:   res.StatusCode,
  6297  			Header: res.Header,
  6298  		})
  6299  	}
  6300  	if err != nil {
  6301  		return nil, err
  6302  	}
  6303  	defer googleapi.CloseBody(res)
  6304  	if err := googleapi.CheckResponse(res); err != nil {
  6305  		return nil, gensupport.WrapError(err)
  6306  	}
  6307  	ret := &AnalyzeEntitiesResponse{
  6308  		ServerResponse: googleapi.ServerResponse{
  6309  			Header:         res.Header,
  6310  			HTTPStatusCode: res.StatusCode,
  6311  		},
  6312  	}
  6313  	target := &ret
  6314  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6315  		return nil, err
  6316  	}
  6317  	return ret, nil
  6318  }
  6319  
  6320  type DocumentsAnalyzeEntitySentimentCall struct {
  6321  	s                             *Service
  6322  	analyzeentitysentimentrequest *AnalyzeEntitySentimentRequest
  6323  	urlParams_                    gensupport.URLParams
  6324  	ctx_                          context.Context
  6325  	header_                       http.Header
  6326  }
  6327  
  6328  // AnalyzeEntitySentiment: Finds entities, similar to AnalyzeEntities in the
  6329  // text and analyzes sentiment associated with each entity and its mentions.
  6330  func (r *DocumentsService) AnalyzeEntitySentiment(analyzeentitysentimentrequest *AnalyzeEntitySentimentRequest) *DocumentsAnalyzeEntitySentimentCall {
  6331  	c := &DocumentsAnalyzeEntitySentimentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6332  	c.analyzeentitysentimentrequest = analyzeentitysentimentrequest
  6333  	return c
  6334  }
  6335  
  6336  // Fields allows partial responses to be retrieved. See
  6337  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6338  // details.
  6339  func (c *DocumentsAnalyzeEntitySentimentCall) Fields(s ...googleapi.Field) *DocumentsAnalyzeEntitySentimentCall {
  6340  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6341  	return c
  6342  }
  6343  
  6344  // Context sets the context to be used in this call's Do method.
  6345  func (c *DocumentsAnalyzeEntitySentimentCall) Context(ctx context.Context) *DocumentsAnalyzeEntitySentimentCall {
  6346  	c.ctx_ = ctx
  6347  	return c
  6348  }
  6349  
  6350  // Header returns a http.Header that can be modified by the caller to add
  6351  // headers to the request.
  6352  func (c *DocumentsAnalyzeEntitySentimentCall) Header() http.Header {
  6353  	if c.header_ == nil {
  6354  		c.header_ = make(http.Header)
  6355  	}
  6356  	return c.header_
  6357  }
  6358  
  6359  func (c *DocumentsAnalyzeEntitySentimentCall) doRequest(alt string) (*http.Response, error) {
  6360  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6361  	var body io.Reader = nil
  6362  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyzeentitysentimentrequest)
  6363  	if err != nil {
  6364  		return nil, err
  6365  	}
  6366  	c.urlParams_.Set("alt", alt)
  6367  	c.urlParams_.Set("prettyPrint", "false")
  6368  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents:analyzeEntitySentiment")
  6369  	urls += "?" + c.urlParams_.Encode()
  6370  	req, err := http.NewRequest("POST", urls, body)
  6371  	if err != nil {
  6372  		return nil, err
  6373  	}
  6374  	req.Header = reqHeaders
  6375  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6376  }
  6377  
  6378  // Do executes the "language.documents.analyzeEntitySentiment" call.
  6379  // Any non-2xx status code is an error. Response headers are in either
  6380  // *AnalyzeEntitySentimentResponse.ServerResponse.Header or (if a response was
  6381  // returned at all) in error.(*googleapi.Error).Header. Use
  6382  // googleapi.IsNotModified to check whether the returned error was because
  6383  // http.StatusNotModified was returned.
  6384  func (c *DocumentsAnalyzeEntitySentimentCall) Do(opts ...googleapi.CallOption) (*AnalyzeEntitySentimentResponse, error) {
  6385  	gensupport.SetOptions(c.urlParams_, opts...)
  6386  	res, err := c.doRequest("json")
  6387  	if res != nil && res.StatusCode == http.StatusNotModified {
  6388  		if res.Body != nil {
  6389  			res.Body.Close()
  6390  		}
  6391  		return nil, gensupport.WrapError(&googleapi.Error{
  6392  			Code:   res.StatusCode,
  6393  			Header: res.Header,
  6394  		})
  6395  	}
  6396  	if err != nil {
  6397  		return nil, err
  6398  	}
  6399  	defer googleapi.CloseBody(res)
  6400  	if err := googleapi.CheckResponse(res); err != nil {
  6401  		return nil, gensupport.WrapError(err)
  6402  	}
  6403  	ret := &AnalyzeEntitySentimentResponse{
  6404  		ServerResponse: googleapi.ServerResponse{
  6405  			Header:         res.Header,
  6406  			HTTPStatusCode: res.StatusCode,
  6407  		},
  6408  	}
  6409  	target := &ret
  6410  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6411  		return nil, err
  6412  	}
  6413  	return ret, nil
  6414  }
  6415  
  6416  type DocumentsAnalyzeSentimentCall struct {
  6417  	s                       *Service
  6418  	analyzesentimentrequest *AnalyzeSentimentRequest
  6419  	urlParams_              gensupport.URLParams
  6420  	ctx_                    context.Context
  6421  	header_                 http.Header
  6422  }
  6423  
  6424  // AnalyzeSentiment: Analyzes the sentiment of the provided text.
  6425  func (r *DocumentsService) AnalyzeSentiment(analyzesentimentrequest *AnalyzeSentimentRequest) *DocumentsAnalyzeSentimentCall {
  6426  	c := &DocumentsAnalyzeSentimentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6427  	c.analyzesentimentrequest = analyzesentimentrequest
  6428  	return c
  6429  }
  6430  
  6431  // Fields allows partial responses to be retrieved. See
  6432  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6433  // details.
  6434  func (c *DocumentsAnalyzeSentimentCall) Fields(s ...googleapi.Field) *DocumentsAnalyzeSentimentCall {
  6435  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6436  	return c
  6437  }
  6438  
  6439  // Context sets the context to be used in this call's Do method.
  6440  func (c *DocumentsAnalyzeSentimentCall) Context(ctx context.Context) *DocumentsAnalyzeSentimentCall {
  6441  	c.ctx_ = ctx
  6442  	return c
  6443  }
  6444  
  6445  // Header returns a http.Header that can be modified by the caller to add
  6446  // headers to the request.
  6447  func (c *DocumentsAnalyzeSentimentCall) Header() http.Header {
  6448  	if c.header_ == nil {
  6449  		c.header_ = make(http.Header)
  6450  	}
  6451  	return c.header_
  6452  }
  6453  
  6454  func (c *DocumentsAnalyzeSentimentCall) doRequest(alt string) (*http.Response, error) {
  6455  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6456  	var body io.Reader = nil
  6457  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyzesentimentrequest)
  6458  	if err != nil {
  6459  		return nil, err
  6460  	}
  6461  	c.urlParams_.Set("alt", alt)
  6462  	c.urlParams_.Set("prettyPrint", "false")
  6463  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents:analyzeSentiment")
  6464  	urls += "?" + c.urlParams_.Encode()
  6465  	req, err := http.NewRequest("POST", urls, body)
  6466  	if err != nil {
  6467  		return nil, err
  6468  	}
  6469  	req.Header = reqHeaders
  6470  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6471  }
  6472  
  6473  // Do executes the "language.documents.analyzeSentiment" call.
  6474  // Any non-2xx status code is an error. Response headers are in either
  6475  // *AnalyzeSentimentResponse.ServerResponse.Header or (if a response was
  6476  // returned at all) in error.(*googleapi.Error).Header. Use
  6477  // googleapi.IsNotModified to check whether the returned error was because
  6478  // http.StatusNotModified was returned.
  6479  func (c *DocumentsAnalyzeSentimentCall) Do(opts ...googleapi.CallOption) (*AnalyzeSentimentResponse, error) {
  6480  	gensupport.SetOptions(c.urlParams_, opts...)
  6481  	res, err := c.doRequest("json")
  6482  	if res != nil && res.StatusCode == http.StatusNotModified {
  6483  		if res.Body != nil {
  6484  			res.Body.Close()
  6485  		}
  6486  		return nil, gensupport.WrapError(&googleapi.Error{
  6487  			Code:   res.StatusCode,
  6488  			Header: res.Header,
  6489  		})
  6490  	}
  6491  	if err != nil {
  6492  		return nil, err
  6493  	}
  6494  	defer googleapi.CloseBody(res)
  6495  	if err := googleapi.CheckResponse(res); err != nil {
  6496  		return nil, gensupport.WrapError(err)
  6497  	}
  6498  	ret := &AnalyzeSentimentResponse{
  6499  		ServerResponse: googleapi.ServerResponse{
  6500  			Header:         res.Header,
  6501  			HTTPStatusCode: res.StatusCode,
  6502  		},
  6503  	}
  6504  	target := &ret
  6505  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6506  		return nil, err
  6507  	}
  6508  	return ret, nil
  6509  }
  6510  
  6511  type DocumentsAnalyzeSyntaxCall struct {
  6512  	s                    *Service
  6513  	analyzesyntaxrequest *AnalyzeSyntaxRequest
  6514  	urlParams_           gensupport.URLParams
  6515  	ctx_                 context.Context
  6516  	header_              http.Header
  6517  }
  6518  
  6519  // AnalyzeSyntax: Analyzes the syntax of the text and provides sentence
  6520  // boundaries and tokenization along with part of speech tags, dependency
  6521  // trees, and other properties.
  6522  func (r *DocumentsService) AnalyzeSyntax(analyzesyntaxrequest *AnalyzeSyntaxRequest) *DocumentsAnalyzeSyntaxCall {
  6523  	c := &DocumentsAnalyzeSyntaxCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6524  	c.analyzesyntaxrequest = analyzesyntaxrequest
  6525  	return c
  6526  }
  6527  
  6528  // Fields allows partial responses to be retrieved. See
  6529  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6530  // details.
  6531  func (c *DocumentsAnalyzeSyntaxCall) Fields(s ...googleapi.Field) *DocumentsAnalyzeSyntaxCall {
  6532  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6533  	return c
  6534  }
  6535  
  6536  // Context sets the context to be used in this call's Do method.
  6537  func (c *DocumentsAnalyzeSyntaxCall) Context(ctx context.Context) *DocumentsAnalyzeSyntaxCall {
  6538  	c.ctx_ = ctx
  6539  	return c
  6540  }
  6541  
  6542  // Header returns a http.Header that can be modified by the caller to add
  6543  // headers to the request.
  6544  func (c *DocumentsAnalyzeSyntaxCall) Header() http.Header {
  6545  	if c.header_ == nil {
  6546  		c.header_ = make(http.Header)
  6547  	}
  6548  	return c.header_
  6549  }
  6550  
  6551  func (c *DocumentsAnalyzeSyntaxCall) doRequest(alt string) (*http.Response, error) {
  6552  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6553  	var body io.Reader = nil
  6554  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyzesyntaxrequest)
  6555  	if err != nil {
  6556  		return nil, err
  6557  	}
  6558  	c.urlParams_.Set("alt", alt)
  6559  	c.urlParams_.Set("prettyPrint", "false")
  6560  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents:analyzeSyntax")
  6561  	urls += "?" + c.urlParams_.Encode()
  6562  	req, err := http.NewRequest("POST", urls, body)
  6563  	if err != nil {
  6564  		return nil, err
  6565  	}
  6566  	req.Header = reqHeaders
  6567  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6568  }
  6569  
  6570  // Do executes the "language.documents.analyzeSyntax" call.
  6571  // Any non-2xx status code is an error. Response headers are in either
  6572  // *AnalyzeSyntaxResponse.ServerResponse.Header or (if a response was returned
  6573  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6574  // check whether the returned error was because http.StatusNotModified was
  6575  // returned.
  6576  func (c *DocumentsAnalyzeSyntaxCall) Do(opts ...googleapi.CallOption) (*AnalyzeSyntaxResponse, error) {
  6577  	gensupport.SetOptions(c.urlParams_, opts...)
  6578  	res, err := c.doRequest("json")
  6579  	if res != nil && res.StatusCode == http.StatusNotModified {
  6580  		if res.Body != nil {
  6581  			res.Body.Close()
  6582  		}
  6583  		return nil, gensupport.WrapError(&googleapi.Error{
  6584  			Code:   res.StatusCode,
  6585  			Header: res.Header,
  6586  		})
  6587  	}
  6588  	if err != nil {
  6589  		return nil, err
  6590  	}
  6591  	defer googleapi.CloseBody(res)
  6592  	if err := googleapi.CheckResponse(res); err != nil {
  6593  		return nil, gensupport.WrapError(err)
  6594  	}
  6595  	ret := &AnalyzeSyntaxResponse{
  6596  		ServerResponse: googleapi.ServerResponse{
  6597  			Header:         res.Header,
  6598  			HTTPStatusCode: res.StatusCode,
  6599  		},
  6600  	}
  6601  	target := &ret
  6602  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6603  		return nil, err
  6604  	}
  6605  	return ret, nil
  6606  }
  6607  
  6608  type DocumentsAnnotateTextCall struct {
  6609  	s                   *Service
  6610  	annotatetextrequest *AnnotateTextRequest
  6611  	urlParams_          gensupport.URLParams
  6612  	ctx_                context.Context
  6613  	header_             http.Header
  6614  }
  6615  
  6616  // AnnotateText: A convenience method that provides all the features that
  6617  // analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.
  6618  func (r *DocumentsService) AnnotateText(annotatetextrequest *AnnotateTextRequest) *DocumentsAnnotateTextCall {
  6619  	c := &DocumentsAnnotateTextCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6620  	c.annotatetextrequest = annotatetextrequest
  6621  	return c
  6622  }
  6623  
  6624  // Fields allows partial responses to be retrieved. See
  6625  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6626  // details.
  6627  func (c *DocumentsAnnotateTextCall) Fields(s ...googleapi.Field) *DocumentsAnnotateTextCall {
  6628  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6629  	return c
  6630  }
  6631  
  6632  // Context sets the context to be used in this call's Do method.
  6633  func (c *DocumentsAnnotateTextCall) Context(ctx context.Context) *DocumentsAnnotateTextCall {
  6634  	c.ctx_ = ctx
  6635  	return c
  6636  }
  6637  
  6638  // Header returns a http.Header that can be modified by the caller to add
  6639  // headers to the request.
  6640  func (c *DocumentsAnnotateTextCall) Header() http.Header {
  6641  	if c.header_ == nil {
  6642  		c.header_ = make(http.Header)
  6643  	}
  6644  	return c.header_
  6645  }
  6646  
  6647  func (c *DocumentsAnnotateTextCall) doRequest(alt string) (*http.Response, error) {
  6648  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6649  	var body io.Reader = nil
  6650  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotatetextrequest)
  6651  	if err != nil {
  6652  		return nil, err
  6653  	}
  6654  	c.urlParams_.Set("alt", alt)
  6655  	c.urlParams_.Set("prettyPrint", "false")
  6656  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents:annotateText")
  6657  	urls += "?" + c.urlParams_.Encode()
  6658  	req, err := http.NewRequest("POST", urls, body)
  6659  	if err != nil {
  6660  		return nil, err
  6661  	}
  6662  	req.Header = reqHeaders
  6663  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6664  }
  6665  
  6666  // Do executes the "language.documents.annotateText" call.
  6667  // Any non-2xx status code is an error. Response headers are in either
  6668  // *AnnotateTextResponse.ServerResponse.Header or (if a response was returned
  6669  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6670  // check whether the returned error was because http.StatusNotModified was
  6671  // returned.
  6672  func (c *DocumentsAnnotateTextCall) Do(opts ...googleapi.CallOption) (*AnnotateTextResponse, error) {
  6673  	gensupport.SetOptions(c.urlParams_, opts...)
  6674  	res, err := c.doRequest("json")
  6675  	if res != nil && res.StatusCode == http.StatusNotModified {
  6676  		if res.Body != nil {
  6677  			res.Body.Close()
  6678  		}
  6679  		return nil, gensupport.WrapError(&googleapi.Error{
  6680  			Code:   res.StatusCode,
  6681  			Header: res.Header,
  6682  		})
  6683  	}
  6684  	if err != nil {
  6685  		return nil, err
  6686  	}
  6687  	defer googleapi.CloseBody(res)
  6688  	if err := googleapi.CheckResponse(res); err != nil {
  6689  		return nil, gensupport.WrapError(err)
  6690  	}
  6691  	ret := &AnnotateTextResponse{
  6692  		ServerResponse: googleapi.ServerResponse{
  6693  			Header:         res.Header,
  6694  			HTTPStatusCode: res.StatusCode,
  6695  		},
  6696  	}
  6697  	target := &ret
  6698  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6699  		return nil, err
  6700  	}
  6701  	return ret, nil
  6702  }
  6703  
  6704  type DocumentsClassifyTextCall struct {
  6705  	s                   *Service
  6706  	classifytextrequest *ClassifyTextRequest
  6707  	urlParams_          gensupport.URLParams
  6708  	ctx_                context.Context
  6709  	header_             http.Header
  6710  }
  6711  
  6712  // ClassifyText: Classifies a document into categories.
  6713  func (r *DocumentsService) ClassifyText(classifytextrequest *ClassifyTextRequest) *DocumentsClassifyTextCall {
  6714  	c := &DocumentsClassifyTextCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6715  	c.classifytextrequest = classifytextrequest
  6716  	return c
  6717  }
  6718  
  6719  // Fields allows partial responses to be retrieved. See
  6720  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6721  // details.
  6722  func (c *DocumentsClassifyTextCall) Fields(s ...googleapi.Field) *DocumentsClassifyTextCall {
  6723  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6724  	return c
  6725  }
  6726  
  6727  // Context sets the context to be used in this call's Do method.
  6728  func (c *DocumentsClassifyTextCall) Context(ctx context.Context) *DocumentsClassifyTextCall {
  6729  	c.ctx_ = ctx
  6730  	return c
  6731  }
  6732  
  6733  // Header returns a http.Header that can be modified by the caller to add
  6734  // headers to the request.
  6735  func (c *DocumentsClassifyTextCall) Header() http.Header {
  6736  	if c.header_ == nil {
  6737  		c.header_ = make(http.Header)
  6738  	}
  6739  	return c.header_
  6740  }
  6741  
  6742  func (c *DocumentsClassifyTextCall) doRequest(alt string) (*http.Response, error) {
  6743  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6744  	var body io.Reader = nil
  6745  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.classifytextrequest)
  6746  	if err != nil {
  6747  		return nil, err
  6748  	}
  6749  	c.urlParams_.Set("alt", alt)
  6750  	c.urlParams_.Set("prettyPrint", "false")
  6751  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents:classifyText")
  6752  	urls += "?" + c.urlParams_.Encode()
  6753  	req, err := http.NewRequest("POST", urls, body)
  6754  	if err != nil {
  6755  		return nil, err
  6756  	}
  6757  	req.Header = reqHeaders
  6758  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6759  }
  6760  
  6761  // Do executes the "language.documents.classifyText" call.
  6762  // Any non-2xx status code is an error. Response headers are in either
  6763  // *ClassifyTextResponse.ServerResponse.Header or (if a response was returned
  6764  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6765  // check whether the returned error was because http.StatusNotModified was
  6766  // returned.
  6767  func (c *DocumentsClassifyTextCall) Do(opts ...googleapi.CallOption) (*ClassifyTextResponse, error) {
  6768  	gensupport.SetOptions(c.urlParams_, opts...)
  6769  	res, err := c.doRequest("json")
  6770  	if res != nil && res.StatusCode == http.StatusNotModified {
  6771  		if res.Body != nil {
  6772  			res.Body.Close()
  6773  		}
  6774  		return nil, gensupport.WrapError(&googleapi.Error{
  6775  			Code:   res.StatusCode,
  6776  			Header: res.Header,
  6777  		})
  6778  	}
  6779  	if err != nil {
  6780  		return nil, err
  6781  	}
  6782  	defer googleapi.CloseBody(res)
  6783  	if err := googleapi.CheckResponse(res); err != nil {
  6784  		return nil, gensupport.WrapError(err)
  6785  	}
  6786  	ret := &ClassifyTextResponse{
  6787  		ServerResponse: googleapi.ServerResponse{
  6788  			Header:         res.Header,
  6789  			HTTPStatusCode: res.StatusCode,
  6790  		},
  6791  	}
  6792  	target := &ret
  6793  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6794  		return nil, err
  6795  	}
  6796  	return ret, nil
  6797  }
  6798  
  6799  type DocumentsModerateTextCall struct {
  6800  	s                   *Service
  6801  	moderatetextrequest *ModerateTextRequest
  6802  	urlParams_          gensupport.URLParams
  6803  	ctx_                context.Context
  6804  	header_             http.Header
  6805  }
  6806  
  6807  // ModerateText: Moderates a document for harmful and sensitive categories.
  6808  func (r *DocumentsService) ModerateText(moderatetextrequest *ModerateTextRequest) *DocumentsModerateTextCall {
  6809  	c := &DocumentsModerateTextCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6810  	c.moderatetextrequest = moderatetextrequest
  6811  	return c
  6812  }
  6813  
  6814  // Fields allows partial responses to be retrieved. See
  6815  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6816  // details.
  6817  func (c *DocumentsModerateTextCall) Fields(s ...googleapi.Field) *DocumentsModerateTextCall {
  6818  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6819  	return c
  6820  }
  6821  
  6822  // Context sets the context to be used in this call's Do method.
  6823  func (c *DocumentsModerateTextCall) Context(ctx context.Context) *DocumentsModerateTextCall {
  6824  	c.ctx_ = ctx
  6825  	return c
  6826  }
  6827  
  6828  // Header returns a http.Header that can be modified by the caller to add
  6829  // headers to the request.
  6830  func (c *DocumentsModerateTextCall) Header() http.Header {
  6831  	if c.header_ == nil {
  6832  		c.header_ = make(http.Header)
  6833  	}
  6834  	return c.header_
  6835  }
  6836  
  6837  func (c *DocumentsModerateTextCall) doRequest(alt string) (*http.Response, error) {
  6838  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6839  	var body io.Reader = nil
  6840  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.moderatetextrequest)
  6841  	if err != nil {
  6842  		return nil, err
  6843  	}
  6844  	c.urlParams_.Set("alt", alt)
  6845  	c.urlParams_.Set("prettyPrint", "false")
  6846  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents:moderateText")
  6847  	urls += "?" + c.urlParams_.Encode()
  6848  	req, err := http.NewRequest("POST", urls, body)
  6849  	if err != nil {
  6850  		return nil, err
  6851  	}
  6852  	req.Header = reqHeaders
  6853  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6854  }
  6855  
  6856  // Do executes the "language.documents.moderateText" call.
  6857  // Any non-2xx status code is an error. Response headers are in either
  6858  // *ModerateTextResponse.ServerResponse.Header or (if a response was returned
  6859  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6860  // check whether the returned error was because http.StatusNotModified was
  6861  // returned.
  6862  func (c *DocumentsModerateTextCall) Do(opts ...googleapi.CallOption) (*ModerateTextResponse, error) {
  6863  	gensupport.SetOptions(c.urlParams_, opts...)
  6864  	res, err := c.doRequest("json")
  6865  	if res != nil && res.StatusCode == http.StatusNotModified {
  6866  		if res.Body != nil {
  6867  			res.Body.Close()
  6868  		}
  6869  		return nil, gensupport.WrapError(&googleapi.Error{
  6870  			Code:   res.StatusCode,
  6871  			Header: res.Header,
  6872  		})
  6873  	}
  6874  	if err != nil {
  6875  		return nil, err
  6876  	}
  6877  	defer googleapi.CloseBody(res)
  6878  	if err := googleapi.CheckResponse(res); err != nil {
  6879  		return nil, gensupport.WrapError(err)
  6880  	}
  6881  	ret := &ModerateTextResponse{
  6882  		ServerResponse: googleapi.ServerResponse{
  6883  			Header:         res.Header,
  6884  			HTTPStatusCode: res.StatusCode,
  6885  		},
  6886  	}
  6887  	target := &ret
  6888  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6889  		return nil, err
  6890  	}
  6891  	return ret, nil
  6892  }
  6893  

View as plain text