...

Source file src/google.golang.org/api/transcoder/v1beta1/transcoder-gen.go

Documentation: google.golang.org/api/transcoder/v1beta1

     1  // Copyright 2022 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 transcoder provides access to the Transcoder API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/transcoder/docs/
    10  //
    11  // # Creating a client
    12  //
    13  // Usage example:
    14  //
    15  //	import "google.golang.org/api/transcoder/v1beta1"
    16  //	...
    17  //	ctx := context.Background()
    18  //	transcoderService, err := transcoder.NewService(ctx)
    19  //
    20  // In this example, Google Application Default Credentials are used for authentication.
    21  //
    22  // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    23  //
    24  // # Other authentication options
    25  //
    26  // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
    27  //
    28  //	transcoderService, err := transcoder.NewService(ctx, option.WithAPIKey("AIza..."))
    29  //
    30  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
    31  //
    32  //	config := &oauth2.Config{...}
    33  //	// ...
    34  //	token, err := config.Exchange(ctx, ...)
    35  //	transcoderService, err := transcoder.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    36  //
    37  // See https://godoc.org/google.golang.org/api/option/ for details on options.
    38  package transcoder // import "google.golang.org/api/transcoder/v1beta1"
    39  
    40  import (
    41  	"bytes"
    42  	"context"
    43  	"encoding/json"
    44  	"errors"
    45  	"fmt"
    46  	"io"
    47  	"net/http"
    48  	"net/url"
    49  	"strconv"
    50  	"strings"
    51  
    52  	googleapi "google.golang.org/api/googleapi"
    53  	gensupport "google.golang.org/api/internal/gensupport"
    54  	option "google.golang.org/api/option"
    55  	internaloption "google.golang.org/api/option/internaloption"
    56  	htransport "google.golang.org/api/transport/http"
    57  )
    58  
    59  // Always reference these packages, just in case the auto-generated code
    60  // below doesn't.
    61  var _ = bytes.NewBuffer
    62  var _ = strconv.Itoa
    63  var _ = fmt.Sprintf
    64  var _ = json.NewDecoder
    65  var _ = io.Copy
    66  var _ = url.Parse
    67  var _ = gensupport.MarshalJSON
    68  var _ = googleapi.Version
    69  var _ = errors.New
    70  var _ = strings.Replace
    71  var _ = context.Canceled
    72  var _ = internaloption.WithDefaultEndpoint
    73  
    74  const apiId = "transcoder:v1beta1"
    75  const apiName = "transcoder"
    76  const apiVersion = "v1beta1"
    77  const basePath = "https://transcoder.googleapis.com/"
    78  const mtlsBasePath = "https://transcoder.mtls.googleapis.com/"
    79  
    80  // OAuth2 scopes used by this API.
    81  const (
    82  	// See, edit, configure, and delete your Google Cloud data and see the
    83  	// email address for your Google Account.
    84  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
    85  )
    86  
    87  // NewService creates a new Service.
    88  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
    89  	scopesOption := option.WithScopes(
    90  		"https://www.googleapis.com/auth/cloud-platform",
    91  	)
    92  	// NOTE: prepend, so we don't override user-specified scopes.
    93  	opts = append([]option.ClientOption{scopesOption}, opts...)
    94  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
    95  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
    96  	client, endpoint, err := htransport.NewClient(ctx, opts...)
    97  	if err != nil {
    98  		return nil, err
    99  	}
   100  	s, err := New(client)
   101  	if err != nil {
   102  		return nil, err
   103  	}
   104  	if endpoint != "" {
   105  		s.BasePath = endpoint
   106  	}
   107  	return s, nil
   108  }
   109  
   110  // New creates a new Service. It uses the provided http.Client for requests.
   111  //
   112  // Deprecated: please use NewService instead.
   113  // To provide a custom HTTP client, use option.WithHTTPClient.
   114  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   115  func New(client *http.Client) (*Service, error) {
   116  	if client == nil {
   117  		return nil, errors.New("client is nil")
   118  	}
   119  	s := &Service{client: client, BasePath: basePath}
   120  	s.Projects = NewProjectsService(s)
   121  	return s, nil
   122  }
   123  
   124  type Service struct {
   125  	client    *http.Client
   126  	BasePath  string // API endpoint base URL
   127  	UserAgent string // optional additional User-Agent fragment
   128  
   129  	Projects *ProjectsService
   130  }
   131  
   132  func (s *Service) userAgent() string {
   133  	if s.UserAgent == "" {
   134  		return googleapi.UserAgent
   135  	}
   136  	return googleapi.UserAgent + " " + s.UserAgent
   137  }
   138  
   139  func NewProjectsService(s *Service) *ProjectsService {
   140  	rs := &ProjectsService{s: s}
   141  	rs.Locations = NewProjectsLocationsService(s)
   142  	return rs
   143  }
   144  
   145  type ProjectsService struct {
   146  	s *Service
   147  
   148  	Locations *ProjectsLocationsService
   149  }
   150  
   151  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   152  	rs := &ProjectsLocationsService{s: s}
   153  	rs.JobTemplates = NewProjectsLocationsJobTemplatesService(s)
   154  	rs.Jobs = NewProjectsLocationsJobsService(s)
   155  	return rs
   156  }
   157  
   158  type ProjectsLocationsService struct {
   159  	s *Service
   160  
   161  	JobTemplates *ProjectsLocationsJobTemplatesService
   162  
   163  	Jobs *ProjectsLocationsJobsService
   164  }
   165  
   166  func NewProjectsLocationsJobTemplatesService(s *Service) *ProjectsLocationsJobTemplatesService {
   167  	rs := &ProjectsLocationsJobTemplatesService{s: s}
   168  	return rs
   169  }
   170  
   171  type ProjectsLocationsJobTemplatesService struct {
   172  	s *Service
   173  }
   174  
   175  func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService {
   176  	rs := &ProjectsLocationsJobsService{s: s}
   177  	return rs
   178  }
   179  
   180  type ProjectsLocationsJobsService struct {
   181  	s *Service
   182  }
   183  
   184  // AdBreak: Ad break.
   185  type AdBreak struct {
   186  	// StartTimeOffset: Start time in seconds for the ad break, relative to
   187  	// the output file timeline. The default is `0s`.
   188  	StartTimeOffset string `json:"startTimeOffset,omitempty"`
   189  
   190  	// ForceSendFields is a list of field names (e.g. "StartTimeOffset") to
   191  	// unconditionally include in API requests. By default, fields with
   192  	// empty or default values are omitted from API requests. However, any
   193  	// non-pointer, non-interface field appearing in ForceSendFields will be
   194  	// sent to the server regardless of whether the field is empty or not.
   195  	// This may be used to include empty fields in Patch requests.
   196  	ForceSendFields []string `json:"-"`
   197  
   198  	// NullFields is a list of field names (e.g. "StartTimeOffset") to
   199  	// include in API requests with the JSON null value. By default, fields
   200  	// with empty values are omitted from API requests. However, any field
   201  	// with an empty value appearing in NullFields will be sent to the
   202  	// server as null. It is an error if a field in this list has a
   203  	// non-empty value. This may be used to include null fields in Patch
   204  	// requests.
   205  	NullFields []string `json:"-"`
   206  }
   207  
   208  func (s *AdBreak) MarshalJSON() ([]byte, error) {
   209  	type NoMethod AdBreak
   210  	raw := NoMethod(*s)
   211  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   212  }
   213  
   214  // Aes128Encryption: Configuration for AES-128 encryption.
   215  type Aes128Encryption struct {
   216  	// KeyUri: Required. URI of the key delivery service. This URI is
   217  	// inserted into the M3U8 header.
   218  	KeyUri string `json:"keyUri,omitempty"`
   219  
   220  	// ForceSendFields is a list of field names (e.g. "KeyUri") to
   221  	// unconditionally include in API requests. By default, fields with
   222  	// empty or default values are omitted from API requests. However, any
   223  	// non-pointer, non-interface field appearing in ForceSendFields will be
   224  	// sent to the server regardless of whether the field is empty or not.
   225  	// This may be used to include empty fields in Patch requests.
   226  	ForceSendFields []string `json:"-"`
   227  
   228  	// NullFields is a list of field names (e.g. "KeyUri") to include in API
   229  	// requests with the JSON null value. By default, fields with empty
   230  	// values are omitted from API requests. However, any field with an
   231  	// empty value appearing in NullFields will be sent to the server as
   232  	// null. It is an error if a field in this list has a non-empty value.
   233  	// This may be used to include null fields in Patch requests.
   234  	NullFields []string `json:"-"`
   235  }
   236  
   237  func (s *Aes128Encryption) MarshalJSON() ([]byte, error) {
   238  	type NoMethod Aes128Encryption
   239  	raw := NoMethod(*s)
   240  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   241  }
   242  
   243  // Animation: Animation types.
   244  type Animation struct {
   245  	// AnimationEnd: End previous animation.
   246  	AnimationEnd *AnimationEnd `json:"animationEnd,omitempty"`
   247  
   248  	// AnimationFade: Display overlay object with fade animation.
   249  	AnimationFade *AnimationFade `json:"animationFade,omitempty"`
   250  
   251  	// AnimationStatic: Display static overlay object.
   252  	AnimationStatic *AnimationStatic `json:"animationStatic,omitempty"`
   253  
   254  	// ForceSendFields is a list of field names (e.g. "AnimationEnd") to
   255  	// unconditionally include in API requests. By default, fields with
   256  	// empty or default values are omitted from API requests. However, any
   257  	// non-pointer, non-interface field appearing in ForceSendFields will be
   258  	// sent to the server regardless of whether the field is empty or not.
   259  	// This may be used to include empty fields in Patch requests.
   260  	ForceSendFields []string `json:"-"`
   261  
   262  	// NullFields is a list of field names (e.g. "AnimationEnd") to include
   263  	// in API requests with the JSON null value. By default, fields with
   264  	// empty values are omitted from API requests. However, any field with
   265  	// an empty value appearing in NullFields will be sent to the server as
   266  	// null. It is an error if a field in this list has a non-empty value.
   267  	// This may be used to include null fields in Patch requests.
   268  	NullFields []string `json:"-"`
   269  }
   270  
   271  func (s *Animation) MarshalJSON() ([]byte, error) {
   272  	type NoMethod Animation
   273  	raw := NoMethod(*s)
   274  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   275  }
   276  
   277  // AnimationEnd: End previous overlay animation from the video. Without
   278  // AnimationEnd, the overlay object will keep the state of previous
   279  // animation until the end of the video.
   280  type AnimationEnd struct {
   281  	// StartTimeOffset: The time to end overlay object, in seconds. Default:
   282  	// 0
   283  	StartTimeOffset string `json:"startTimeOffset,omitempty"`
   284  
   285  	// ForceSendFields is a list of field names (e.g. "StartTimeOffset") to
   286  	// unconditionally include in API requests. By default, fields with
   287  	// empty or default values are omitted from API requests. However, any
   288  	// non-pointer, non-interface field appearing in ForceSendFields will be
   289  	// sent to the server regardless of whether the field is empty or not.
   290  	// This may be used to include empty fields in Patch requests.
   291  	ForceSendFields []string `json:"-"`
   292  
   293  	// NullFields is a list of field names (e.g. "StartTimeOffset") to
   294  	// include in API requests with the JSON null value. By default, fields
   295  	// with empty values are omitted from API requests. However, any field
   296  	// with an empty value appearing in NullFields will be sent to the
   297  	// server as null. It is an error if a field in this list has a
   298  	// non-empty value. This may be used to include null fields in Patch
   299  	// requests.
   300  	NullFields []string `json:"-"`
   301  }
   302  
   303  func (s *AnimationEnd) MarshalJSON() ([]byte, error) {
   304  	type NoMethod AnimationEnd
   305  	raw := NoMethod(*s)
   306  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   307  }
   308  
   309  // AnimationFade: Display overlay object with fade animation.
   310  type AnimationFade struct {
   311  	// EndTimeOffset: The time to end the fade animation, in seconds.
   312  	// Default: `start_time_offset` + 1s
   313  	EndTimeOffset string `json:"endTimeOffset,omitempty"`
   314  
   315  	// FadeType: Required. Type of fade animation: `FADE_IN` or `FADE_OUT`.
   316  	//
   317  	// Possible values:
   318  	//   "FADE_TYPE_UNSPECIFIED" - The fade type is not specified.
   319  	//   "FADE_IN" - Fade the overlay object into view.
   320  	//   "FADE_OUT" - Fade the overlay object out of view.
   321  	FadeType string `json:"fadeType,omitempty"`
   322  
   323  	// StartTimeOffset: The time to start the fade animation, in seconds.
   324  	// Default: 0
   325  	StartTimeOffset string `json:"startTimeOffset,omitempty"`
   326  
   327  	// Xy: Normalized coordinates based on output video resolution. Valid
   328  	// values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the
   329  	// overlay object. For example, use the x and y coordinates {0,0} to
   330  	// position the top-left corner of the overlay animation in the top-left
   331  	// corner of the output video.
   332  	Xy *NormalizedCoordinate `json:"xy,omitempty"`
   333  
   334  	// ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
   335  	// unconditionally include in API requests. By default, fields with
   336  	// empty or default values are omitted from API requests. However, any
   337  	// non-pointer, non-interface field appearing in ForceSendFields will be
   338  	// sent to the server regardless of whether the field is empty or not.
   339  	// This may be used to include empty fields in Patch requests.
   340  	ForceSendFields []string `json:"-"`
   341  
   342  	// NullFields is a list of field names (e.g. "EndTimeOffset") to include
   343  	// in API requests with the JSON null value. By default, fields with
   344  	// empty values are omitted from API requests. However, any field with
   345  	// an empty value appearing in NullFields will be sent to the server as
   346  	// null. It is an error if a field in this list has a non-empty value.
   347  	// This may be used to include null fields in Patch requests.
   348  	NullFields []string `json:"-"`
   349  }
   350  
   351  func (s *AnimationFade) MarshalJSON() ([]byte, error) {
   352  	type NoMethod AnimationFade
   353  	raw := NoMethod(*s)
   354  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   355  }
   356  
   357  // AnimationStatic: Display static overlay object.
   358  type AnimationStatic struct {
   359  	// StartTimeOffset: The time to start displaying the overlay object, in
   360  	// seconds. Default: 0
   361  	StartTimeOffset string `json:"startTimeOffset,omitempty"`
   362  
   363  	// Xy: Normalized coordinates based on output video resolution. Valid
   364  	// values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the
   365  	// overlay object. For example, use the x and y coordinates {0,0} to
   366  	// position the top-left corner of the overlay animation in the top-left
   367  	// corner of the output video.
   368  	Xy *NormalizedCoordinate `json:"xy,omitempty"`
   369  
   370  	// ForceSendFields is a list of field names (e.g. "StartTimeOffset") to
   371  	// unconditionally include in API requests. By default, fields with
   372  	// empty or default values are omitted from API requests. However, any
   373  	// non-pointer, non-interface field appearing in ForceSendFields will be
   374  	// sent to the server regardless of whether the field is empty or not.
   375  	// This may be used to include empty fields in Patch requests.
   376  	ForceSendFields []string `json:"-"`
   377  
   378  	// NullFields is a list of field names (e.g. "StartTimeOffset") to
   379  	// include in API requests with the JSON null value. By default, fields
   380  	// with empty values are omitted from API requests. However, any field
   381  	// with an empty value appearing in NullFields will be sent to the
   382  	// server as null. It is an error if a field in this list has a
   383  	// non-empty value. This may be used to include null fields in Patch
   384  	// requests.
   385  	NullFields []string `json:"-"`
   386  }
   387  
   388  func (s *AnimationStatic) MarshalJSON() ([]byte, error) {
   389  	type NoMethod AnimationStatic
   390  	raw := NoMethod(*s)
   391  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   392  }
   393  
   394  // Audio: Audio preprocessing configuration.
   395  type Audio struct {
   396  	// HighBoost: Enable boosting high frequency components. The default is
   397  	// `false`.
   398  	HighBoost bool `json:"highBoost,omitempty"`
   399  
   400  	// LowBoost: Enable boosting low frequency components. The default is
   401  	// `false`.
   402  	LowBoost bool `json:"lowBoost,omitempty"`
   403  
   404  	// Lufs: Specify audio loudness normalization in loudness units relative
   405  	// to full scale (LUFS). Enter a value between -24 and 0 (the default),
   406  	// where: * -24 is the Advanced Television Systems Committee (ATSC A/85)
   407  	// standard * -23 is the EU R128 broadcast standard * -19 is the prior
   408  	// standard for online mono audio * -18 is the ReplayGain standard * -16
   409  	// is the prior standard for stereo audio * -14 is the new online audio
   410  	// standard recommended by Spotify, as well as Amazon Echo * 0 disables
   411  	// normalization
   412  	Lufs float64 `json:"lufs,omitempty"`
   413  
   414  	// ForceSendFields is a list of field names (e.g. "HighBoost") to
   415  	// unconditionally include in API requests. By default, fields with
   416  	// empty or default values are omitted from API requests. However, any
   417  	// non-pointer, non-interface field appearing in ForceSendFields will be
   418  	// sent to the server regardless of whether the field is empty or not.
   419  	// This may be used to include empty fields in Patch requests.
   420  	ForceSendFields []string `json:"-"`
   421  
   422  	// NullFields is a list of field names (e.g. "HighBoost") to include in
   423  	// API requests with the JSON null value. By default, fields with empty
   424  	// values are omitted from API requests. However, any field with an
   425  	// empty value appearing in NullFields will be sent to the server as
   426  	// null. It is an error if a field in this list has a non-empty value.
   427  	// This may be used to include null fields in Patch requests.
   428  	NullFields []string `json:"-"`
   429  }
   430  
   431  func (s *Audio) MarshalJSON() ([]byte, error) {
   432  	type NoMethod Audio
   433  	raw := NoMethod(*s)
   434  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   435  }
   436  
   437  func (s *Audio) UnmarshalJSON(data []byte) error {
   438  	type NoMethod Audio
   439  	var s1 struct {
   440  		Lufs gensupport.JSONFloat64 `json:"lufs"`
   441  		*NoMethod
   442  	}
   443  	s1.NoMethod = (*NoMethod)(s)
   444  	if err := json.Unmarshal(data, &s1); err != nil {
   445  		return err
   446  	}
   447  	s.Lufs = float64(s1.Lufs)
   448  	return nil
   449  }
   450  
   451  // AudioAtom: The mapping for the `Job.edit_list` atoms with audio
   452  // `EditAtom.inputs`.
   453  type AudioAtom struct {
   454  	// Channels: List of `Channel`s for this audio stream. for in-depth
   455  	// explanation.
   456  	Channels []*AudioChannel `json:"channels,omitempty"`
   457  
   458  	// Key: Required. The `EditAtom.key` that references the atom with audio
   459  	// inputs in the `Job.edit_list`.
   460  	Key string `json:"key,omitempty"`
   461  
   462  	// ForceSendFields is a list of field names (e.g. "Channels") to
   463  	// unconditionally include in API requests. By default, fields with
   464  	// empty or default values are omitted from API requests. However, any
   465  	// non-pointer, non-interface field appearing in ForceSendFields will be
   466  	// sent to the server regardless of whether the field is empty or not.
   467  	// This may be used to include empty fields in Patch requests.
   468  	ForceSendFields []string `json:"-"`
   469  
   470  	// NullFields is a list of field names (e.g. "Channels") to include in
   471  	// API requests with the JSON null value. By default, fields with empty
   472  	// values are omitted from API requests. However, any field with an
   473  	// empty value appearing in NullFields will be sent to the server as
   474  	// null. It is an error if a field in this list has a non-empty value.
   475  	// This may be used to include null fields in Patch requests.
   476  	NullFields []string `json:"-"`
   477  }
   478  
   479  func (s *AudioAtom) MarshalJSON() ([]byte, error) {
   480  	type NoMethod AudioAtom
   481  	raw := NoMethod(*s)
   482  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   483  }
   484  
   485  // AudioChannel: The audio channel.
   486  type AudioChannel struct {
   487  	// Inputs: List of `Job.inputs` for this audio channel.
   488  	Inputs []*AudioChannelInput `json:"inputs,omitempty"`
   489  
   490  	// ForceSendFields is a list of field names (e.g. "Inputs") to
   491  	// unconditionally include in API requests. By default, fields with
   492  	// empty or default values are omitted from API requests. However, any
   493  	// non-pointer, non-interface field appearing in ForceSendFields will be
   494  	// sent to the server regardless of whether the field is empty or not.
   495  	// This may be used to include empty fields in Patch requests.
   496  	ForceSendFields []string `json:"-"`
   497  
   498  	// NullFields is a list of field names (e.g. "Inputs") to include in API
   499  	// requests with the JSON null value. By default, fields with empty
   500  	// values are omitted from API requests. However, any field with an
   501  	// empty value appearing in NullFields will be sent to the server as
   502  	// null. It is an error if a field in this list has a non-empty value.
   503  	// This may be used to include null fields in Patch requests.
   504  	NullFields []string `json:"-"`
   505  }
   506  
   507  func (s *AudioChannel) MarshalJSON() ([]byte, error) {
   508  	type NoMethod AudioChannel
   509  	raw := NoMethod(*s)
   510  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   511  }
   512  
   513  // AudioChannelInput: Identifies which input file, track, and channel
   514  // should be used.
   515  type AudioChannelInput struct {
   516  	// Channel: Required. The zero-based index of the channel in the input
   517  	// file.
   518  	Channel int64 `json:"channel,omitempty"`
   519  
   520  	// GainDb: Audio volume control in dB. Negative values decrease volume,
   521  	// positive values increase. The default is 0.
   522  	GainDb float64 `json:"gainDb,omitempty"`
   523  
   524  	// Key: Required. The `Input.key` that identifies the input file.
   525  	Key string `json:"key,omitempty"`
   526  
   527  	// Track: Required. The zero-based index of the track in the input file.
   528  	Track int64 `json:"track,omitempty"`
   529  
   530  	// ForceSendFields is a list of field names (e.g. "Channel") to
   531  	// unconditionally include in API requests. By default, fields with
   532  	// empty or default values are omitted from API requests. However, any
   533  	// non-pointer, non-interface field appearing in ForceSendFields will be
   534  	// sent to the server regardless of whether the field is empty or not.
   535  	// This may be used to include empty fields in Patch requests.
   536  	ForceSendFields []string `json:"-"`
   537  
   538  	// NullFields is a list of field names (e.g. "Channel") to include in
   539  	// API requests with the JSON null value. By default, fields with empty
   540  	// values are omitted from API requests. However, any field with an
   541  	// empty value appearing in NullFields will be sent to the server as
   542  	// null. It is an error if a field in this list has a non-empty value.
   543  	// This may be used to include null fields in Patch requests.
   544  	NullFields []string `json:"-"`
   545  }
   546  
   547  func (s *AudioChannelInput) MarshalJSON() ([]byte, error) {
   548  	type NoMethod AudioChannelInput
   549  	raw := NoMethod(*s)
   550  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   551  }
   552  
   553  func (s *AudioChannelInput) UnmarshalJSON(data []byte) error {
   554  	type NoMethod AudioChannelInput
   555  	var s1 struct {
   556  		GainDb gensupport.JSONFloat64 `json:"gainDb"`
   557  		*NoMethod
   558  	}
   559  	s1.NoMethod = (*NoMethod)(s)
   560  	if err := json.Unmarshal(data, &s1); err != nil {
   561  		return err
   562  	}
   563  	s.GainDb = float64(s1.GainDb)
   564  	return nil
   565  }
   566  
   567  // AudioStream: Audio stream resource.
   568  type AudioStream struct {
   569  	// BitrateBps: Required. Audio bitrate in bits per second. Must be
   570  	// between 1 and 10,000,000.
   571  	BitrateBps int64 `json:"bitrateBps,omitempty"`
   572  
   573  	// ChannelCount: Number of audio channels. Must be between 1 and 6. The
   574  	// default is 2.
   575  	ChannelCount int64 `json:"channelCount,omitempty"`
   576  
   577  	// ChannelLayout: A list of channel names specifying layout of the audio
   578  	// channels. This only affects the metadata embedded in the container
   579  	// headers, if supported by the specified format. The default is `["fl",
   580  	// "fr"]`. Supported channel names: - 'fl' - Front left channel - 'fr' -
   581  	// Front right channel - 'sl' - Side left channel - 'sr' - Side right
   582  	// channel - 'fc' - Front center channel - 'lfe' - Low frequency
   583  	ChannelLayout []string `json:"channelLayout,omitempty"`
   584  
   585  	// Codec: The codec for this audio stream. The default is "aac".
   586  	// Supported audio codecs: - 'aac' - 'aac-he' - 'aac-he-v2' - 'mp3' -
   587  	// 'ac3' - 'eac3'
   588  	Codec string `json:"codec,omitempty"`
   589  
   590  	// Mapping: The mapping for the `Job.edit_list` atoms with audio
   591  	// `EditAtom.inputs`.
   592  	Mapping []*AudioAtom `json:"mapping,omitempty"`
   593  
   594  	// SampleRateHertz: The audio sample rate in Hertz. The default is 48000
   595  	// Hertz.
   596  	SampleRateHertz int64 `json:"sampleRateHertz,omitempty"`
   597  
   598  	// ForceSendFields is a list of field names (e.g. "BitrateBps") to
   599  	// unconditionally include in API requests. By default, fields with
   600  	// empty or default values are omitted from API requests. However, any
   601  	// non-pointer, non-interface field appearing in ForceSendFields will be
   602  	// sent to the server regardless of whether the field is empty or not.
   603  	// This may be used to include empty fields in Patch requests.
   604  	ForceSendFields []string `json:"-"`
   605  
   606  	// NullFields is a list of field names (e.g. "BitrateBps") to include in
   607  	// API requests with the JSON null value. By default, fields with empty
   608  	// values are omitted from API requests. However, any field with an
   609  	// empty value appearing in NullFields will be sent to the server as
   610  	// null. It is an error if a field in this list has a non-empty value.
   611  	// This may be used to include null fields in Patch requests.
   612  	NullFields []string `json:"-"`
   613  }
   614  
   615  func (s *AudioStream) MarshalJSON() ([]byte, error) {
   616  	type NoMethod AudioStream
   617  	raw := NoMethod(*s)
   618  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   619  }
   620  
   621  // Color: Color preprocessing configuration.
   622  type Color struct {
   623  	// Brightness: Control brightness of the video. Enter a value between -1
   624  	// and 1, where -1 is minimum brightness and 1 is maximum brightness. 0
   625  	// is no change. The default is 0.
   626  	Brightness float64 `json:"brightness,omitempty"`
   627  
   628  	// Contrast: Control black and white contrast of the video. Enter a
   629  	// value between -1 and 1, where -1 is minimum contrast and 1 is maximum
   630  	// contrast. 0 is no change. The default is 0.
   631  	Contrast float64 `json:"contrast,omitempty"`
   632  
   633  	// Saturation: Control color saturation of the video. Enter a value
   634  	// between -1 and 1, where -1 is fully desaturated and 1 is maximum
   635  	// saturation. 0 is no change. The default is 0.
   636  	Saturation float64 `json:"saturation,omitempty"`
   637  
   638  	// ForceSendFields is a list of field names (e.g. "Brightness") to
   639  	// unconditionally include in API requests. By default, fields with
   640  	// empty or default values are omitted from API requests. However, any
   641  	// non-pointer, non-interface field appearing in ForceSendFields will be
   642  	// sent to the server regardless of whether the field is empty or not.
   643  	// This may be used to include empty fields in Patch requests.
   644  	ForceSendFields []string `json:"-"`
   645  
   646  	// NullFields is a list of field names (e.g. "Brightness") to include in
   647  	// API requests with the JSON null value. By default, fields with empty
   648  	// values are omitted from API requests. However, any field with an
   649  	// empty value appearing in NullFields will be sent to the server as
   650  	// null. It is an error if a field in this list has a non-empty value.
   651  	// This may be used to include null fields in Patch requests.
   652  	NullFields []string `json:"-"`
   653  }
   654  
   655  func (s *Color) MarshalJSON() ([]byte, error) {
   656  	type NoMethod Color
   657  	raw := NoMethod(*s)
   658  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   659  }
   660  
   661  func (s *Color) UnmarshalJSON(data []byte) error {
   662  	type NoMethod Color
   663  	var s1 struct {
   664  		Brightness gensupport.JSONFloat64 `json:"brightness"`
   665  		Contrast   gensupport.JSONFloat64 `json:"contrast"`
   666  		Saturation gensupport.JSONFloat64 `json:"saturation"`
   667  		*NoMethod
   668  	}
   669  	s1.NoMethod = (*NoMethod)(s)
   670  	if err := json.Unmarshal(data, &s1); err != nil {
   671  		return err
   672  	}
   673  	s.Brightness = float64(s1.Brightness)
   674  	s.Contrast = float64(s1.Contrast)
   675  	s.Saturation = float64(s1.Saturation)
   676  	return nil
   677  }
   678  
   679  // Crop: Video cropping configuration for the input video. The cropped
   680  // input video is scaled to match the output resolution.
   681  type Crop struct {
   682  	// BottomPixels: The number of pixels to crop from the bottom. The
   683  	// default is 0.
   684  	BottomPixels int64 `json:"bottomPixels,omitempty"`
   685  
   686  	// LeftPixels: The number of pixels to crop from the left. The default
   687  	// is 0.
   688  	LeftPixels int64 `json:"leftPixels,omitempty"`
   689  
   690  	// RightPixels: The number of pixels to crop from the right. The default
   691  	// is 0.
   692  	RightPixels int64 `json:"rightPixels,omitempty"`
   693  
   694  	// TopPixels: The number of pixels to crop from the top. The default is
   695  	// 0.
   696  	TopPixels int64 `json:"topPixels,omitempty"`
   697  
   698  	// ForceSendFields is a list of field names (e.g. "BottomPixels") to
   699  	// unconditionally include in API requests. By default, fields with
   700  	// empty or default values are omitted from API requests. However, any
   701  	// non-pointer, non-interface field appearing in ForceSendFields will be
   702  	// sent to the server regardless of whether the field is empty or not.
   703  	// This may be used to include empty fields in Patch requests.
   704  	ForceSendFields []string `json:"-"`
   705  
   706  	// NullFields is a list of field names (e.g. "BottomPixels") to include
   707  	// in API requests with the JSON null value. By default, fields with
   708  	// empty values are omitted from API requests. However, any field with
   709  	// an empty value appearing in NullFields will be sent to the server as
   710  	// null. It is an error if a field in this list has a non-empty value.
   711  	// This may be used to include null fields in Patch requests.
   712  	NullFields []string `json:"-"`
   713  }
   714  
   715  func (s *Crop) MarshalJSON() ([]byte, error) {
   716  	type NoMethod Crop
   717  	raw := NoMethod(*s)
   718  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   719  }
   720  
   721  // Deblock: Deblock preprocessing configuration.
   722  type Deblock struct {
   723  	// Enabled: Enable deblocker. The default is `false`.
   724  	Enabled bool `json:"enabled,omitempty"`
   725  
   726  	// Strength: Set strength of the deblocker. Enter a value between 0 and
   727  	// 1. The higher the value, the stronger the block removal. 0 is no
   728  	// deblocking. The default is 0.
   729  	Strength float64 `json:"strength,omitempty"`
   730  
   731  	// ForceSendFields is a list of field names (e.g. "Enabled") to
   732  	// unconditionally include in API requests. By default, fields with
   733  	// empty or default values are omitted from API requests. However, any
   734  	// non-pointer, non-interface field appearing in ForceSendFields will be
   735  	// sent to the server regardless of whether the field is empty or not.
   736  	// This may be used to include empty fields in Patch requests.
   737  	ForceSendFields []string `json:"-"`
   738  
   739  	// NullFields is a list of field names (e.g. "Enabled") to include in
   740  	// API requests with the JSON null value. By default, fields with empty
   741  	// values are omitted from API requests. However, any field with an
   742  	// empty value appearing in NullFields will be sent to the server as
   743  	// null. It is an error if a field in this list has a non-empty value.
   744  	// This may be used to include null fields in Patch requests.
   745  	NullFields []string `json:"-"`
   746  }
   747  
   748  func (s *Deblock) MarshalJSON() ([]byte, error) {
   749  	type NoMethod Deblock
   750  	raw := NoMethod(*s)
   751  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   752  }
   753  
   754  func (s *Deblock) UnmarshalJSON(data []byte) error {
   755  	type NoMethod Deblock
   756  	var s1 struct {
   757  		Strength gensupport.JSONFloat64 `json:"strength"`
   758  		*NoMethod
   759  	}
   760  	s1.NoMethod = (*NoMethod)(s)
   761  	if err := json.Unmarshal(data, &s1); err != nil {
   762  		return err
   763  	}
   764  	s.Strength = float64(s1.Strength)
   765  	return nil
   766  }
   767  
   768  // Denoise: Denoise preprocessing configuration.
   769  type Denoise struct {
   770  	// Strength: Set strength of the denoise. Enter a value between 0 and 1.
   771  	// The higher the value, the smoother the image. 0 is no denoising. The
   772  	// default is 0.
   773  	Strength float64 `json:"strength,omitempty"`
   774  
   775  	// Tune: Set the denoiser mode. The default is "standard". Supported
   776  	// denoiser modes: - 'standard' - 'grain'
   777  	Tune string `json:"tune,omitempty"`
   778  
   779  	// ForceSendFields is a list of field names (e.g. "Strength") to
   780  	// unconditionally include in API requests. By default, fields with
   781  	// empty or default values are omitted from API requests. However, any
   782  	// non-pointer, non-interface field appearing in ForceSendFields will be
   783  	// sent to the server regardless of whether the field is empty or not.
   784  	// This may be used to include empty fields in Patch requests.
   785  	ForceSendFields []string `json:"-"`
   786  
   787  	// NullFields is a list of field names (e.g. "Strength") to include in
   788  	// API requests with the JSON null value. By default, fields with empty
   789  	// values are omitted from API requests. However, any field with an
   790  	// empty value appearing in NullFields will be sent to the server as
   791  	// null. It is an error if a field in this list has a non-empty value.
   792  	// This may be used to include null fields in Patch requests.
   793  	NullFields []string `json:"-"`
   794  }
   795  
   796  func (s *Denoise) MarshalJSON() ([]byte, error) {
   797  	type NoMethod Denoise
   798  	raw := NoMethod(*s)
   799  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   800  }
   801  
   802  func (s *Denoise) UnmarshalJSON(data []byte) error {
   803  	type NoMethod Denoise
   804  	var s1 struct {
   805  		Strength gensupport.JSONFloat64 `json:"strength"`
   806  		*NoMethod
   807  	}
   808  	s1.NoMethod = (*NoMethod)(s)
   809  	if err := json.Unmarshal(data, &s1); err != nil {
   810  		return err
   811  	}
   812  	s.Strength = float64(s1.Strength)
   813  	return nil
   814  }
   815  
   816  // EditAtom: Edit atom.
   817  type EditAtom struct {
   818  	// EndTimeOffset: End time in seconds for the atom, relative to the
   819  	// input file timeline. When `end_time_offset` is not specified, the
   820  	// `inputs` are used until the end of the atom.
   821  	EndTimeOffset string `json:"endTimeOffset,omitempty"`
   822  
   823  	// Inputs: List of `Input.key`s identifying files that should be used in
   824  	// this atom. The listed `inputs` must have the same timeline.
   825  	Inputs []string `json:"inputs,omitempty"`
   826  
   827  	// Key: A unique key for this atom. Must be specified when using
   828  	// advanced mapping.
   829  	Key string `json:"key,omitempty"`
   830  
   831  	// StartTimeOffset: Start time in seconds for the atom, relative to the
   832  	// input file timeline. The default is `0s`.
   833  	StartTimeOffset string `json:"startTimeOffset,omitempty"`
   834  
   835  	// ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
   836  	// unconditionally include in API requests. By default, fields with
   837  	// empty or default values are omitted from API requests. However, any
   838  	// non-pointer, non-interface field appearing in ForceSendFields will be
   839  	// sent to the server regardless of whether the field is empty or not.
   840  	// This may be used to include empty fields in Patch requests.
   841  	ForceSendFields []string `json:"-"`
   842  
   843  	// NullFields is a list of field names (e.g. "EndTimeOffset") to include
   844  	// in API requests with the JSON null value. By default, fields with
   845  	// empty values are omitted from API requests. However, any field with
   846  	// an empty value appearing in NullFields will be sent to the server as
   847  	// null. It is an error if a field in this list has a non-empty value.
   848  	// This may be used to include null fields in Patch requests.
   849  	NullFields []string `json:"-"`
   850  }
   851  
   852  func (s *EditAtom) MarshalJSON() ([]byte, error) {
   853  	type NoMethod EditAtom
   854  	raw := NoMethod(*s)
   855  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   856  }
   857  
   858  // ElementaryStream: Encoding of an input file such as an audio, video,
   859  // or text track. Elementary streams must be packaged before mapping and
   860  // sharing between different output formats.
   861  type ElementaryStream struct {
   862  	// AudioStream: Encoding of an audio stream.
   863  	AudioStream *AudioStream `json:"audioStream,omitempty"`
   864  
   865  	// Key: A unique key for this elementary stream.
   866  	Key string `json:"key,omitempty"`
   867  
   868  	// TextStream: Encoding of a text stream. For example, closed captions
   869  	// or subtitles.
   870  	TextStream *TextStream `json:"textStream,omitempty"`
   871  
   872  	// VideoStream: Encoding of a video stream.
   873  	VideoStream *VideoStream `json:"videoStream,omitempty"`
   874  
   875  	// ForceSendFields is a list of field names (e.g. "AudioStream") to
   876  	// unconditionally include in API requests. By default, fields with
   877  	// empty or default values are omitted from API requests. However, any
   878  	// non-pointer, non-interface field appearing in ForceSendFields will be
   879  	// sent to the server regardless of whether the field is empty or not.
   880  	// This may be used to include empty fields in Patch requests.
   881  	ForceSendFields []string `json:"-"`
   882  
   883  	// NullFields is a list of field names (e.g. "AudioStream") to include
   884  	// in API requests with the JSON null value. By default, fields with
   885  	// empty values are omitted from API requests. However, any field with
   886  	// an empty value appearing in NullFields will be sent to the server as
   887  	// null. It is an error if a field in this list has a non-empty value.
   888  	// This may be used to include null fields in Patch requests.
   889  	NullFields []string `json:"-"`
   890  }
   891  
   892  func (s *ElementaryStream) MarshalJSON() ([]byte, error) {
   893  	type NoMethod ElementaryStream
   894  	raw := NoMethod(*s)
   895  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   896  }
   897  
   898  // Empty: A generic empty message that you can re-use to avoid defining
   899  // duplicated empty messages in your APIs. A typical example is to use
   900  // it as the request or the response type of an API method. For
   901  // instance: service Foo { rpc Bar(google.protobuf.Empty) returns
   902  // (google.protobuf.Empty); } The JSON representation for `Empty` is
   903  // empty JSON object `{}`.
   904  type Empty struct {
   905  	// ServerResponse contains the HTTP response code and headers from the
   906  	// server.
   907  	googleapi.ServerResponse `json:"-"`
   908  }
   909  
   910  // Encryption: Encryption settings.
   911  type Encryption struct {
   912  	// Aes128: Configuration for AES-128 encryption.
   913  	Aes128 *Aes128Encryption `json:"aes128,omitempty"`
   914  
   915  	// Iv: Required. 128 bit Initialization Vector (IV) represented as
   916  	// lowercase hexadecimal digits.
   917  	Iv string `json:"iv,omitempty"`
   918  
   919  	// Key: Required. 128 bit encryption key represented as lowercase
   920  	// hexadecimal digits.
   921  	Key string `json:"key,omitempty"`
   922  
   923  	// MpegCenc: Configuration for MPEG Common Encryption (MPEG-CENC).
   924  	MpegCenc *MpegCommonEncryption `json:"mpegCenc,omitempty"`
   925  
   926  	// SampleAes: Configuration for SAMPLE-AES encryption.
   927  	SampleAes *SampleAesEncryption `json:"sampleAes,omitempty"`
   928  
   929  	// ForceSendFields is a list of field names (e.g. "Aes128") to
   930  	// unconditionally include in API requests. By default, fields with
   931  	// empty or default values are omitted from API requests. However, any
   932  	// non-pointer, non-interface field appearing in ForceSendFields will be
   933  	// sent to the server regardless of whether the field is empty or not.
   934  	// This may be used to include empty fields in Patch requests.
   935  	ForceSendFields []string `json:"-"`
   936  
   937  	// NullFields is a list of field names (e.g. "Aes128") to include in API
   938  	// requests with the JSON null value. By default, fields with empty
   939  	// values are omitted from API requests. However, any field with an
   940  	// empty value appearing in NullFields will be sent to the server as
   941  	// null. It is an error if a field in this list has a non-empty value.
   942  	// This may be used to include null fields in Patch requests.
   943  	NullFields []string `json:"-"`
   944  }
   945  
   946  func (s *Encryption) MarshalJSON() ([]byte, error) {
   947  	type NoMethod Encryption
   948  	raw := NoMethod(*s)
   949  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   950  }
   951  
   952  // FailureDetail: Additional information about the reasons for the
   953  // failure.
   954  type FailureDetail struct {
   955  	// Description: A description of the failure.
   956  	Description string `json:"description,omitempty"`
   957  
   958  	// ForceSendFields is a list of field names (e.g. "Description") to
   959  	// unconditionally include in API requests. By default, fields with
   960  	// empty or default values are omitted from API requests. However, any
   961  	// non-pointer, non-interface field appearing in ForceSendFields will be
   962  	// sent to the server regardless of whether the field is empty or not.
   963  	// This may be used to include empty fields in Patch requests.
   964  	ForceSendFields []string `json:"-"`
   965  
   966  	// NullFields is a list of field names (e.g. "Description") to include
   967  	// in API requests with the JSON null value. By default, fields with
   968  	// empty values are omitted from API requests. However, any field with
   969  	// an empty value appearing in NullFields will be sent to the server as
   970  	// null. It is an error if a field in this list has a non-empty value.
   971  	// This may be used to include null fields in Patch requests.
   972  	NullFields []string `json:"-"`
   973  }
   974  
   975  func (s *FailureDetail) MarshalJSON() ([]byte, error) {
   976  	type NoMethod FailureDetail
   977  	raw := NoMethod(*s)
   978  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   979  }
   980  
   981  // Image: Overlaid jpeg image.
   982  type Image struct {
   983  	// Alpha: Target image opacity. Valid values are from `1.0` (solid,
   984  	// default) to `0.0` (transparent), exclusive. Set this to a value
   985  	// greater than `0.0`.
   986  	Alpha float64 `json:"alpha,omitempty"`
   987  
   988  	// Resolution: Normalized image resolution, based on output video
   989  	// resolution. Valid values: `0.0`–`1.0`. To respect the original
   990  	// image aspect ratio, set either `x` or `y` to `0.0`. To use the
   991  	// original image resolution, set both `x` and `y` to `0.0`.
   992  	Resolution *NormalizedCoordinate `json:"resolution,omitempty"`
   993  
   994  	// Uri: Required. URI of the JPEG image in Cloud Storage. For example,
   995  	// `gs://bucket/inputs/image.jpeg`. JPEG is the only supported image
   996  	// type.
   997  	Uri string `json:"uri,omitempty"`
   998  
   999  	// ForceSendFields is a list of field names (e.g. "Alpha") to
  1000  	// unconditionally include in API requests. By default, fields with
  1001  	// empty or default values are omitted from API requests. However, any
  1002  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1003  	// sent to the server regardless of whether the field is empty or not.
  1004  	// This may be used to include empty fields in Patch requests.
  1005  	ForceSendFields []string `json:"-"`
  1006  
  1007  	// NullFields is a list of field names (e.g. "Alpha") to include in API
  1008  	// requests with the JSON null value. By default, fields with empty
  1009  	// values are omitted from API requests. However, any field with an
  1010  	// empty value appearing in NullFields will be sent to the server as
  1011  	// null. It is an error if a field in this list has a non-empty value.
  1012  	// This may be used to include null fields in Patch requests.
  1013  	NullFields []string `json:"-"`
  1014  }
  1015  
  1016  func (s *Image) MarshalJSON() ([]byte, error) {
  1017  	type NoMethod Image
  1018  	raw := NoMethod(*s)
  1019  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1020  }
  1021  
  1022  func (s *Image) UnmarshalJSON(data []byte) error {
  1023  	type NoMethod Image
  1024  	var s1 struct {
  1025  		Alpha gensupport.JSONFloat64 `json:"alpha"`
  1026  		*NoMethod
  1027  	}
  1028  	s1.NoMethod = (*NoMethod)(s)
  1029  	if err := json.Unmarshal(data, &s1); err != nil {
  1030  		return err
  1031  	}
  1032  	s.Alpha = float64(s1.Alpha)
  1033  	return nil
  1034  }
  1035  
  1036  // Input: Input asset.
  1037  type Input struct {
  1038  	// Key: A unique key for this input. Must be specified when using
  1039  	// advanced mapping and edit lists.
  1040  	Key string `json:"key,omitempty"`
  1041  
  1042  	// PreprocessingConfig: Preprocessing configurations.
  1043  	PreprocessingConfig *PreprocessingConfig `json:"preprocessingConfig,omitempty"`
  1044  
  1045  	// Uri: URI of the media. Input files must be at least 5 seconds in
  1046  	// duration and stored in Cloud Storage (for example,
  1047  	// `gs://bucket/inputs/file.mp4`). If empty, the value will be populated
  1048  	// from `Job.input_uri`.
  1049  	Uri string `json:"uri,omitempty"`
  1050  
  1051  	// ForceSendFields is a list of field names (e.g. "Key") to
  1052  	// unconditionally include in API requests. By default, fields with
  1053  	// empty or default values are omitted from API requests. However, any
  1054  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1055  	// sent to the server regardless of whether the field is empty or not.
  1056  	// This may be used to include empty fields in Patch requests.
  1057  	ForceSendFields []string `json:"-"`
  1058  
  1059  	// NullFields is a list of field names (e.g. "Key") to include in API
  1060  	// requests with the JSON null value. By default, fields with empty
  1061  	// values are omitted from API requests. However, any field with an
  1062  	// empty value appearing in NullFields will be sent to the server as
  1063  	// null. It is an error if a field in this list has a non-empty value.
  1064  	// This may be used to include null fields in Patch requests.
  1065  	NullFields []string `json:"-"`
  1066  }
  1067  
  1068  func (s *Input) MarshalJSON() ([]byte, error) {
  1069  	type NoMethod Input
  1070  	raw := NoMethod(*s)
  1071  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1072  }
  1073  
  1074  // Job: Transcoding job resource.
  1075  type Job struct {
  1076  	// Config: The configuration for this job.
  1077  	Config *JobConfig `json:"config,omitempty"`
  1078  
  1079  	// CreateTime: Output only. The time the job was created.
  1080  	CreateTime string `json:"createTime,omitempty"`
  1081  
  1082  	// EndTime: Output only. The time the transcoding finished.
  1083  	EndTime string `json:"endTime,omitempty"`
  1084  
  1085  	// FailureDetails: Output only. List of failure details. This property
  1086  	// may contain additional information about the failure when
  1087  	// `failure_reason` is present. *Note*: This feature is not yet
  1088  	// available.
  1089  	FailureDetails []*FailureDetail `json:"failureDetails,omitempty"`
  1090  
  1091  	// FailureReason: Output only. A description of the reason for the
  1092  	// failure. This property is always present when `state` is `FAILED`.
  1093  	FailureReason string `json:"failureReason,omitempty"`
  1094  
  1095  	// InputUri: Input only. Specify the `input_uri` to populate empty `uri`
  1096  	// fields in each element of `Job.config.inputs` or
  1097  	// `JobTemplate.config.inputs` when using template. URI of the media.
  1098  	// Input files must be at least 5 seconds in duration and stored in
  1099  	// Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
  1100  	InputUri string `json:"inputUri,omitempty"`
  1101  
  1102  	// Name: The resource name of the job. Format:
  1103  	// `projects/{project}/locations/{location}/jobs/{job}`
  1104  	Name string `json:"name,omitempty"`
  1105  
  1106  	// OriginUri: Output only. The origin URI. *Note*: This feature is not
  1107  	// yet available.
  1108  	OriginUri *OriginUri `json:"originUri,omitempty"`
  1109  
  1110  	// OutputUri: Input only. Specify the `output_uri` to populate an empty
  1111  	// `Job.config.output.uri` or `JobTemplate.config.output.uri` when using
  1112  	// template. URI for the output file(s). For example,
  1113  	// `gs://my-bucket/outputs/`.
  1114  	OutputUri string `json:"outputUri,omitempty"`
  1115  
  1116  	// Priority: Specify the priority of the job. Enter a value between 0
  1117  	// and 100, where 0 is the lowest priority and 100 is the highest
  1118  	// priority. The default is 0.
  1119  	Priority int64 `json:"priority,omitempty"`
  1120  
  1121  	// Progress: Output only. Estimated fractional progress, from `0` to `1`
  1122  	// for each step. *Note*: This feature is not yet available.
  1123  	Progress *Progress `json:"progress,omitempty"`
  1124  
  1125  	// StartTime: Output only. The time the transcoding started.
  1126  	StartTime string `json:"startTime,omitempty"`
  1127  
  1128  	// State: Output only. The current state of the job.
  1129  	//
  1130  	// Possible values:
  1131  	//   "PROCESSING_STATE_UNSPECIFIED" - The processing state is not
  1132  	// specified.
  1133  	//   "PENDING" - The job is enqueued and will be picked up for
  1134  	// processing soon.
  1135  	//   "RUNNING" - The job is being processed.
  1136  	//   "SUCCEEDED" - The job has been completed successfully.
  1137  	//   "FAILED" - The job has failed. For additional information, see
  1138  	// `failure_reason` and `failure_details`
  1139  	State string `json:"state,omitempty"`
  1140  
  1141  	// TemplateId: Input only. Specify the `template_id` to use for
  1142  	// populating `Job.config`. The default is `preset/web-hd`. Preset
  1143  	// Transcoder templates: - `preset/{preset_id}` - User defined
  1144  	// JobTemplate: `{job_template_id}`
  1145  	TemplateId string `json:"templateId,omitempty"`
  1146  
  1147  	// TtlAfterCompletionDays: Job time to live value in days, which will be
  1148  	// effective after job completion. Job should be deleted automatically
  1149  	// after the given TTL. Enter a value between 1 and 90. The default is
  1150  	// 30.
  1151  	TtlAfterCompletionDays int64 `json:"ttlAfterCompletionDays,omitempty"`
  1152  
  1153  	// ServerResponse contains the HTTP response code and headers from the
  1154  	// server.
  1155  	googleapi.ServerResponse `json:"-"`
  1156  
  1157  	// ForceSendFields is a list of field names (e.g. "Config") to
  1158  	// unconditionally include in API requests. By default, fields with
  1159  	// empty or default values are omitted from API requests. However, any
  1160  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1161  	// sent to the server regardless of whether the field is empty or not.
  1162  	// This may be used to include empty fields in Patch requests.
  1163  	ForceSendFields []string `json:"-"`
  1164  
  1165  	// NullFields is a list of field names (e.g. "Config") to include in API
  1166  	// requests with the JSON null value. By default, fields with empty
  1167  	// values are omitted from API requests. However, any field with an
  1168  	// empty value appearing in NullFields will be sent to the server as
  1169  	// null. It is an error if a field in this list has a non-empty value.
  1170  	// This may be used to include null fields in Patch requests.
  1171  	NullFields []string `json:"-"`
  1172  }
  1173  
  1174  func (s *Job) MarshalJSON() ([]byte, error) {
  1175  	type NoMethod Job
  1176  	raw := NoMethod(*s)
  1177  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1178  }
  1179  
  1180  // JobConfig: Job configuration
  1181  type JobConfig struct {
  1182  	// AdBreaks: List of ad breaks. Specifies where to insert ad break tags
  1183  	// in the output manifests.
  1184  	AdBreaks []*AdBreak `json:"adBreaks,omitempty"`
  1185  
  1186  	// EditList: List of `Edit atom`s. Defines the ultimate timeline of the
  1187  	// resulting file or manifest.
  1188  	EditList []*EditAtom `json:"editList,omitempty"`
  1189  
  1190  	// ElementaryStreams: List of elementary streams.
  1191  	ElementaryStreams []*ElementaryStream `json:"elementaryStreams,omitempty"`
  1192  
  1193  	// Inputs: List of input assets stored in Cloud Storage.
  1194  	Inputs []*Input `json:"inputs,omitempty"`
  1195  
  1196  	// Manifests: List of output manifests.
  1197  	Manifests []*Manifest `json:"manifests,omitempty"`
  1198  
  1199  	// MuxStreams: List of multiplexing settings for output streams.
  1200  	MuxStreams []*MuxStream `json:"muxStreams,omitempty"`
  1201  
  1202  	// Output: Output configuration.
  1203  	Output *Output `json:"output,omitempty"`
  1204  
  1205  	// Overlays: List of overlays on the output video, in descending
  1206  	// Z-order.
  1207  	Overlays []*Overlay `json:"overlays,omitempty"`
  1208  
  1209  	// PubsubDestination: Destination on Pub/Sub.
  1210  	PubsubDestination *PubsubDestination `json:"pubsubDestination,omitempty"`
  1211  
  1212  	// SpriteSheets: List of output sprite sheets.
  1213  	SpriteSheets []*SpriteSheet `json:"spriteSheets,omitempty"`
  1214  
  1215  	// ForceSendFields is a list of field names (e.g. "AdBreaks") to
  1216  	// unconditionally include in API requests. By default, fields with
  1217  	// empty or default values are omitted from API requests. However, any
  1218  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1219  	// sent to the server regardless of whether the field is empty or not.
  1220  	// This may be used to include empty fields in Patch requests.
  1221  	ForceSendFields []string `json:"-"`
  1222  
  1223  	// NullFields is a list of field names (e.g. "AdBreaks") to include in
  1224  	// API requests with the JSON null value. By default, fields with empty
  1225  	// values are omitted from API requests. However, any field with an
  1226  	// empty value appearing in NullFields will be sent to the server as
  1227  	// null. It is an error if a field in this list has a non-empty value.
  1228  	// This may be used to include null fields in Patch requests.
  1229  	NullFields []string `json:"-"`
  1230  }
  1231  
  1232  func (s *JobConfig) MarshalJSON() ([]byte, error) {
  1233  	type NoMethod JobConfig
  1234  	raw := NoMethod(*s)
  1235  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1236  }
  1237  
  1238  // JobTemplate: Transcoding job template resource.
  1239  type JobTemplate struct {
  1240  	// Config: The configuration for this template.
  1241  	Config *JobConfig `json:"config,omitempty"`
  1242  
  1243  	// Name: The resource name of the job template. Format:
  1244  	// `projects/{project}/locations/{location}/jobTemplates/{job_template}`
  1245  	Name string `json:"name,omitempty"`
  1246  
  1247  	// ServerResponse contains the HTTP response code and headers from the
  1248  	// server.
  1249  	googleapi.ServerResponse `json:"-"`
  1250  
  1251  	// ForceSendFields is a list of field names (e.g. "Config") to
  1252  	// unconditionally include in API requests. By default, fields with
  1253  	// empty or default values are omitted from API requests. However, any
  1254  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1255  	// sent to the server regardless of whether the field is empty or not.
  1256  	// This may be used to include empty fields in Patch requests.
  1257  	ForceSendFields []string `json:"-"`
  1258  
  1259  	// NullFields is a list of field names (e.g. "Config") to include in API
  1260  	// requests with the JSON null value. By default, fields with empty
  1261  	// values are omitted from API requests. However, any field with an
  1262  	// empty value appearing in NullFields will be sent to the server as
  1263  	// null. It is an error if a field in this list has a non-empty value.
  1264  	// This may be used to include null fields in Patch requests.
  1265  	NullFields []string `json:"-"`
  1266  }
  1267  
  1268  func (s *JobTemplate) MarshalJSON() ([]byte, error) {
  1269  	type NoMethod JobTemplate
  1270  	raw := NoMethod(*s)
  1271  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1272  }
  1273  
  1274  // ListJobTemplatesResponse: Response message for
  1275  // `TranscoderService.ListJobTemplates`.
  1276  type ListJobTemplatesResponse struct {
  1277  	// JobTemplates: List of job templates in the specified region.
  1278  	JobTemplates []*JobTemplate `json:"jobTemplates,omitempty"`
  1279  
  1280  	// NextPageToken: The pagination token.
  1281  	NextPageToken string `json:"nextPageToken,omitempty"`
  1282  
  1283  	// ServerResponse contains the HTTP response code and headers from the
  1284  	// server.
  1285  	googleapi.ServerResponse `json:"-"`
  1286  
  1287  	// ForceSendFields is a list of field names (e.g. "JobTemplates") to
  1288  	// unconditionally include in API requests. By default, fields with
  1289  	// empty or default values are omitted from API requests. However, any
  1290  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1291  	// sent to the server regardless of whether the field is empty or not.
  1292  	// This may be used to include empty fields in Patch requests.
  1293  	ForceSendFields []string `json:"-"`
  1294  
  1295  	// NullFields is a list of field names (e.g. "JobTemplates") to include
  1296  	// in API requests with the JSON null value. By default, fields with
  1297  	// empty values are omitted from API requests. However, any field with
  1298  	// an empty value appearing in NullFields will be sent to the server as
  1299  	// null. It is an error if a field in this list has a non-empty value.
  1300  	// This may be used to include null fields in Patch requests.
  1301  	NullFields []string `json:"-"`
  1302  }
  1303  
  1304  func (s *ListJobTemplatesResponse) MarshalJSON() ([]byte, error) {
  1305  	type NoMethod ListJobTemplatesResponse
  1306  	raw := NoMethod(*s)
  1307  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1308  }
  1309  
  1310  // ListJobsResponse: Response message for `TranscoderService.ListJobs`.
  1311  type ListJobsResponse struct {
  1312  	// Jobs: List of jobs in the specified region.
  1313  	Jobs []*Job `json:"jobs,omitempty"`
  1314  
  1315  	// NextPageToken: The pagination token.
  1316  	NextPageToken string `json:"nextPageToken,omitempty"`
  1317  
  1318  	// ServerResponse contains the HTTP response code and headers from the
  1319  	// server.
  1320  	googleapi.ServerResponse `json:"-"`
  1321  
  1322  	// ForceSendFields is a list of field names (e.g. "Jobs") to
  1323  	// unconditionally include in API requests. By default, fields with
  1324  	// empty or default values are omitted from API requests. However, any
  1325  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1326  	// sent to the server regardless of whether the field is empty or not.
  1327  	// This may be used to include empty fields in Patch requests.
  1328  	ForceSendFields []string `json:"-"`
  1329  
  1330  	// NullFields is a list of field names (e.g. "Jobs") to include in API
  1331  	// requests with the JSON null value. By default, fields with empty
  1332  	// values are omitted from API requests. However, any field with an
  1333  	// empty value appearing in NullFields will be sent to the server as
  1334  	// null. It is an error if a field in this list has a non-empty value.
  1335  	// This may be used to include null fields in Patch requests.
  1336  	NullFields []string `json:"-"`
  1337  }
  1338  
  1339  func (s *ListJobsResponse) MarshalJSON() ([]byte, error) {
  1340  	type NoMethod ListJobsResponse
  1341  	raw := NoMethod(*s)
  1342  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1343  }
  1344  
  1345  // Manifest: Manifest configuration.
  1346  type Manifest struct {
  1347  	// FileName: The name of the generated file. The default is "manifest"
  1348  	// with the extension suffix corresponding to the `Manifest.type`.
  1349  	FileName string `json:"fileName,omitempty"`
  1350  
  1351  	// MuxStreams: Required. List of user given `MuxStream.key`s that should
  1352  	// appear in this manifest. When `Manifest.type` is `HLS`, a media
  1353  	// manifest with name `MuxStream.key` and `.m3u8` extension is generated
  1354  	// for each element of the `Manifest.mux_streams`.
  1355  	MuxStreams []string `json:"muxStreams,omitempty"`
  1356  
  1357  	// Type: Required. Type of the manifest, can be "HLS" or "DASH".
  1358  	//
  1359  	// Possible values:
  1360  	//   "MANIFEST_TYPE_UNSPECIFIED" - The manifest type is not specified.
  1361  	//   "HLS" - Create "HLS" manifest. The corresponding file extension
  1362  	// is ".m3u8".
  1363  	//   "DASH" - Create "DASH" manifest. The corresponding file extension
  1364  	// is ".mpd".
  1365  	Type string `json:"type,omitempty"`
  1366  
  1367  	// ForceSendFields is a list of field names (e.g. "FileName") to
  1368  	// unconditionally include in API requests. By default, fields with
  1369  	// empty or default values are omitted from API requests. However, any
  1370  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1371  	// sent to the server regardless of whether the field is empty or not.
  1372  	// This may be used to include empty fields in Patch requests.
  1373  	ForceSendFields []string `json:"-"`
  1374  
  1375  	// NullFields is a list of field names (e.g. "FileName") to include in
  1376  	// API requests with the JSON null value. By default, fields with empty
  1377  	// values are omitted from API requests. However, any field with an
  1378  	// empty value appearing in NullFields will be sent to the server as
  1379  	// null. It is an error if a field in this list has a non-empty value.
  1380  	// This may be used to include null fields in Patch requests.
  1381  	NullFields []string `json:"-"`
  1382  }
  1383  
  1384  func (s *Manifest) MarshalJSON() ([]byte, error) {
  1385  	type NoMethod Manifest
  1386  	raw := NoMethod(*s)
  1387  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1388  }
  1389  
  1390  // MpegCommonEncryption: Configuration for MPEG Common Encryption
  1391  // (MPEG-CENC).
  1392  type MpegCommonEncryption struct {
  1393  	// KeyId: Required. 128 bit Key ID represented as lowercase hexadecimal
  1394  	// digits for use with common encryption.
  1395  	KeyId string `json:"keyId,omitempty"`
  1396  
  1397  	// Scheme: Required. Specify the encryption scheme. Supported encryption
  1398  	// schemes: - 'cenc' - 'cbcs'
  1399  	Scheme string `json:"scheme,omitempty"`
  1400  
  1401  	// ForceSendFields is a list of field names (e.g. "KeyId") to
  1402  	// unconditionally include in API requests. By default, fields with
  1403  	// empty or default values are omitted from API requests. However, any
  1404  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1405  	// sent to the server regardless of whether the field is empty or not.
  1406  	// This may be used to include empty fields in Patch requests.
  1407  	ForceSendFields []string `json:"-"`
  1408  
  1409  	// NullFields is a list of field names (e.g. "KeyId") to include in API
  1410  	// requests with the JSON null value. By default, fields with empty
  1411  	// values are omitted from API requests. However, any field with an
  1412  	// empty value appearing in NullFields will be sent to the server as
  1413  	// null. It is an error if a field in this list has a non-empty value.
  1414  	// This may be used to include null fields in Patch requests.
  1415  	NullFields []string `json:"-"`
  1416  }
  1417  
  1418  func (s *MpegCommonEncryption) MarshalJSON() ([]byte, error) {
  1419  	type NoMethod MpegCommonEncryption
  1420  	raw := NoMethod(*s)
  1421  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1422  }
  1423  
  1424  // MuxStream: Multiplexing settings for output stream.
  1425  type MuxStream struct {
  1426  	// Container: The container format. The default is "mp4" Supported
  1427  	// container formats: - 'ts' - 'fmp4'- the corresponding file extension
  1428  	// is ".m4s" - 'mp4' - 'vtt'
  1429  	Container string `json:"container,omitempty"`
  1430  
  1431  	// ElementaryStreams: List of `ElementaryStream.key`s multiplexed in
  1432  	// this stream.
  1433  	ElementaryStreams []string `json:"elementaryStreams,omitempty"`
  1434  
  1435  	// Encryption: Encryption settings.
  1436  	Encryption *Encryption `json:"encryption,omitempty"`
  1437  
  1438  	// FileName: The name of the generated file. The default is
  1439  	// `MuxStream.key` with the extension suffix corresponding to the
  1440  	// `MuxStream.container`. Individual segments also have an incremental
  1441  	// 10-digit zero-padded suffix starting from 0 before the extension,
  1442  	// such as "mux_stream0000000123.ts".
  1443  	FileName string `json:"fileName,omitempty"`
  1444  
  1445  	// Key: A unique key for this multiplexed stream. HLS media manifests
  1446  	// will be named `MuxStream.key` with the ".m3u8" extension suffix.
  1447  	Key string `json:"key,omitempty"`
  1448  
  1449  	// SegmentSettings: Segment settings for "ts", "fmp4" and "vtt".
  1450  	SegmentSettings *SegmentSettings `json:"segmentSettings,omitempty"`
  1451  
  1452  	// ForceSendFields is a list of field names (e.g. "Container") to
  1453  	// unconditionally include in API requests. By default, fields with
  1454  	// empty or default values are omitted from API requests. However, any
  1455  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1456  	// sent to the server regardless of whether the field is empty or not.
  1457  	// This may be used to include empty fields in Patch requests.
  1458  	ForceSendFields []string `json:"-"`
  1459  
  1460  	// NullFields is a list of field names (e.g. "Container") to include in
  1461  	// API requests with the JSON null value. By default, fields with empty
  1462  	// values are omitted from API requests. However, any field with an
  1463  	// empty value appearing in NullFields will be sent to the server as
  1464  	// null. It is an error if a field in this list has a non-empty value.
  1465  	// This may be used to include null fields in Patch requests.
  1466  	NullFields []string `json:"-"`
  1467  }
  1468  
  1469  func (s *MuxStream) MarshalJSON() ([]byte, error) {
  1470  	type NoMethod MuxStream
  1471  	raw := NoMethod(*s)
  1472  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1473  }
  1474  
  1475  // NormalizedCoordinate: 2D normalized coordinates. Default: `{0.0,
  1476  // 0.0}`
  1477  type NormalizedCoordinate struct {
  1478  	// X: Normalized x coordinate.
  1479  	X float64 `json:"x,omitempty"`
  1480  
  1481  	// Y: Normalized y coordinate.
  1482  	Y float64 `json:"y,omitempty"`
  1483  
  1484  	// ForceSendFields is a list of field names (e.g. "X") to
  1485  	// unconditionally include in API requests. By default, fields with
  1486  	// empty or default values are omitted from API requests. However, any
  1487  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1488  	// sent to the server regardless of whether the field is empty or not.
  1489  	// This may be used to include empty fields in Patch requests.
  1490  	ForceSendFields []string `json:"-"`
  1491  
  1492  	// NullFields is a list of field names (e.g. "X") to include in API
  1493  	// requests with the JSON null value. By default, fields with empty
  1494  	// values are omitted from API requests. However, any field with an
  1495  	// empty value appearing in NullFields will be sent to the server as
  1496  	// null. It is an error if a field in this list has a non-empty value.
  1497  	// This may be used to include null fields in Patch requests.
  1498  	NullFields []string `json:"-"`
  1499  }
  1500  
  1501  func (s *NormalizedCoordinate) MarshalJSON() ([]byte, error) {
  1502  	type NoMethod NormalizedCoordinate
  1503  	raw := NoMethod(*s)
  1504  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1505  }
  1506  
  1507  func (s *NormalizedCoordinate) UnmarshalJSON(data []byte) error {
  1508  	type NoMethod NormalizedCoordinate
  1509  	var s1 struct {
  1510  		X gensupport.JSONFloat64 `json:"x"`
  1511  		Y gensupport.JSONFloat64 `json:"y"`
  1512  		*NoMethod
  1513  	}
  1514  	s1.NoMethod = (*NoMethod)(s)
  1515  	if err := json.Unmarshal(data, &s1); err != nil {
  1516  		return err
  1517  	}
  1518  	s.X = float64(s1.X)
  1519  	s.Y = float64(s1.Y)
  1520  	return nil
  1521  }
  1522  
  1523  // OriginUri: The origin URI.
  1524  type OriginUri struct {
  1525  	// Dash: Dash manifest URI. If multiple Dash manifests are created, only
  1526  	// the first one is listed.
  1527  	Dash string `json:"dash,omitempty"`
  1528  
  1529  	// Hls: HLS manifest URI per
  1530  	// https://tools.ietf.org/html/rfc8216#section-4.3.4. If multiple HLS
  1531  	// manifests are created, only the first one is listed.
  1532  	Hls string `json:"hls,omitempty"`
  1533  
  1534  	// ForceSendFields is a list of field names (e.g. "Dash") to
  1535  	// unconditionally include in API requests. By default, fields with
  1536  	// empty or default values are omitted from API requests. However, any
  1537  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1538  	// sent to the server regardless of whether the field is empty or not.
  1539  	// This may be used to include empty fields in Patch requests.
  1540  	ForceSendFields []string `json:"-"`
  1541  
  1542  	// NullFields is a list of field names (e.g. "Dash") to include in API
  1543  	// requests with the JSON null value. By default, fields with empty
  1544  	// values are omitted from API requests. However, any field with an
  1545  	// empty value appearing in NullFields will be sent to the server as
  1546  	// null. It is an error if a field in this list has a non-empty value.
  1547  	// This may be used to include null fields in Patch requests.
  1548  	NullFields []string `json:"-"`
  1549  }
  1550  
  1551  func (s *OriginUri) MarshalJSON() ([]byte, error) {
  1552  	type NoMethod OriginUri
  1553  	raw := NoMethod(*s)
  1554  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1555  }
  1556  
  1557  // Output: Location of output file(s) in a Cloud Storage bucket.
  1558  type Output struct {
  1559  	// Uri: URI for the output file(s). For example,
  1560  	// `gs://my-bucket/outputs/`. If empty the value is populated from
  1561  	// `Job.output_uri`.
  1562  	Uri string `json:"uri,omitempty"`
  1563  
  1564  	// ForceSendFields is a list of field names (e.g. "Uri") to
  1565  	// unconditionally include in API requests. By default, fields with
  1566  	// empty or default values are omitted from API requests. However, any
  1567  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1568  	// sent to the server regardless of whether the field is empty or not.
  1569  	// This may be used to include empty fields in Patch requests.
  1570  	ForceSendFields []string `json:"-"`
  1571  
  1572  	// NullFields is a list of field names (e.g. "Uri") to include in API
  1573  	// requests with the JSON null value. By default, fields with empty
  1574  	// values are omitted from API requests. However, any field with an
  1575  	// empty value appearing in NullFields will be sent to the server as
  1576  	// null. It is an error if a field in this list has a non-empty value.
  1577  	// This may be used to include null fields in Patch requests.
  1578  	NullFields []string `json:"-"`
  1579  }
  1580  
  1581  func (s *Output) MarshalJSON() ([]byte, error) {
  1582  	type NoMethod Output
  1583  	raw := NoMethod(*s)
  1584  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1585  }
  1586  
  1587  // Overlay: Overlay configuration.
  1588  type Overlay struct {
  1589  	// Animations: List of Animations. The list should be chronological,
  1590  	// without any time overlap.
  1591  	Animations []*Animation `json:"animations,omitempty"`
  1592  
  1593  	// Image: Image overlay.
  1594  	Image *Image `json:"image,omitempty"`
  1595  
  1596  	// ForceSendFields is a list of field names (e.g. "Animations") to
  1597  	// unconditionally include in API requests. By default, fields with
  1598  	// empty or default values are omitted from API requests. However, any
  1599  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1600  	// sent to the server regardless of whether the field is empty or not.
  1601  	// This may be used to include empty fields in Patch requests.
  1602  	ForceSendFields []string `json:"-"`
  1603  
  1604  	// NullFields is a list of field names (e.g. "Animations") to include in
  1605  	// API requests with the JSON null value. By default, fields with empty
  1606  	// values are omitted from API requests. However, any field with an
  1607  	// empty value appearing in NullFields will be sent to the server as
  1608  	// null. It is an error if a field in this list has a non-empty value.
  1609  	// This may be used to include null fields in Patch requests.
  1610  	NullFields []string `json:"-"`
  1611  }
  1612  
  1613  func (s *Overlay) MarshalJSON() ([]byte, error) {
  1614  	type NoMethod Overlay
  1615  	raw := NoMethod(*s)
  1616  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1617  }
  1618  
  1619  // Pad: Pad filter configuration for the input video. The padded input
  1620  // video is scaled after padding with black to match the output
  1621  // resolution.
  1622  type Pad struct {
  1623  	// BottomPixels: The number of pixels to add to the bottom. The default
  1624  	// is 0.
  1625  	BottomPixels int64 `json:"bottomPixels,omitempty"`
  1626  
  1627  	// LeftPixels: The number of pixels to add to the left. The default is
  1628  	// 0.
  1629  	LeftPixels int64 `json:"leftPixels,omitempty"`
  1630  
  1631  	// RightPixels: The number of pixels to add to the right. The default is
  1632  	// 0.
  1633  	RightPixels int64 `json:"rightPixels,omitempty"`
  1634  
  1635  	// TopPixels: The number of pixels to add to the top. The default is 0.
  1636  	TopPixels int64 `json:"topPixels,omitempty"`
  1637  
  1638  	// ForceSendFields is a list of field names (e.g. "BottomPixels") to
  1639  	// unconditionally include in API requests. By default, fields with
  1640  	// empty or default values are omitted from API requests. However, any
  1641  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1642  	// sent to the server regardless of whether the field is empty or not.
  1643  	// This may be used to include empty fields in Patch requests.
  1644  	ForceSendFields []string `json:"-"`
  1645  
  1646  	// NullFields is a list of field names (e.g. "BottomPixels") to include
  1647  	// in API requests with the JSON null value. By default, fields with
  1648  	// empty values are omitted from API requests. However, any field with
  1649  	// an empty value appearing in NullFields will be sent to the server as
  1650  	// null. It is an error if a field in this list has a non-empty value.
  1651  	// This may be used to include null fields in Patch requests.
  1652  	NullFields []string `json:"-"`
  1653  }
  1654  
  1655  func (s *Pad) MarshalJSON() ([]byte, error) {
  1656  	type NoMethod Pad
  1657  	raw := NoMethod(*s)
  1658  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1659  }
  1660  
  1661  // PreprocessingConfig: Preprocessing configurations.
  1662  type PreprocessingConfig struct {
  1663  	// Audio: Audio preprocessing configuration.
  1664  	Audio *Audio `json:"audio,omitempty"`
  1665  
  1666  	// Color: Color preprocessing configuration.
  1667  	Color *Color `json:"color,omitempty"`
  1668  
  1669  	// Crop: Specify the video cropping configuration.
  1670  	Crop *Crop `json:"crop,omitempty"`
  1671  
  1672  	// Deblock: Deblock preprocessing configuration.
  1673  	Deblock *Deblock `json:"deblock,omitempty"`
  1674  
  1675  	// Denoise: Denoise preprocessing configuration.
  1676  	Denoise *Denoise `json:"denoise,omitempty"`
  1677  
  1678  	// Pad: Specify the video pad filter configuration.
  1679  	Pad *Pad `json:"pad,omitempty"`
  1680  
  1681  	// ForceSendFields is a list of field names (e.g. "Audio") to
  1682  	// unconditionally include in API requests. By default, fields with
  1683  	// empty or default values are omitted from API requests. However, any
  1684  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1685  	// sent to the server regardless of whether the field is empty or not.
  1686  	// This may be used to include empty fields in Patch requests.
  1687  	ForceSendFields []string `json:"-"`
  1688  
  1689  	// NullFields is a list of field names (e.g. "Audio") to include in API
  1690  	// requests with the JSON null value. By default, fields with empty
  1691  	// values are omitted from API requests. However, any field with an
  1692  	// empty value appearing in NullFields will be sent to the server as
  1693  	// null. It is an error if a field in this list has a non-empty value.
  1694  	// This may be used to include null fields in Patch requests.
  1695  	NullFields []string `json:"-"`
  1696  }
  1697  
  1698  func (s *PreprocessingConfig) MarshalJSON() ([]byte, error) {
  1699  	type NoMethod PreprocessingConfig
  1700  	raw := NoMethod(*s)
  1701  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1702  }
  1703  
  1704  // Progress: Estimated fractional progress for each step, from `0` to
  1705  // `1`.
  1706  type Progress struct {
  1707  	// Analyzed: Estimated fractional progress for `analyzing` step.
  1708  	Analyzed float64 `json:"analyzed,omitempty"`
  1709  
  1710  	// Encoded: Estimated fractional progress for `encoding` step.
  1711  	Encoded float64 `json:"encoded,omitempty"`
  1712  
  1713  	// Notified: Estimated fractional progress for `notifying` step.
  1714  	Notified float64 `json:"notified,omitempty"`
  1715  
  1716  	// Uploaded: Estimated fractional progress for `uploading` step.
  1717  	Uploaded float64 `json:"uploaded,omitempty"`
  1718  
  1719  	// ForceSendFields is a list of field names (e.g. "Analyzed") to
  1720  	// unconditionally include in API requests. By default, fields with
  1721  	// empty or default values are omitted from API requests. However, any
  1722  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1723  	// sent to the server regardless of whether the field is empty or not.
  1724  	// This may be used to include empty fields in Patch requests.
  1725  	ForceSendFields []string `json:"-"`
  1726  
  1727  	// NullFields is a list of field names (e.g. "Analyzed") to include in
  1728  	// API requests with the JSON null value. By default, fields with empty
  1729  	// values are omitted from API requests. However, any field with an
  1730  	// empty value appearing in NullFields will be sent to the server as
  1731  	// null. It is an error if a field in this list has a non-empty value.
  1732  	// This may be used to include null fields in Patch requests.
  1733  	NullFields []string `json:"-"`
  1734  }
  1735  
  1736  func (s *Progress) MarshalJSON() ([]byte, error) {
  1737  	type NoMethod Progress
  1738  	raw := NoMethod(*s)
  1739  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1740  }
  1741  
  1742  func (s *Progress) UnmarshalJSON(data []byte) error {
  1743  	type NoMethod Progress
  1744  	var s1 struct {
  1745  		Analyzed gensupport.JSONFloat64 `json:"analyzed"`
  1746  		Encoded  gensupport.JSONFloat64 `json:"encoded"`
  1747  		Notified gensupport.JSONFloat64 `json:"notified"`
  1748  		Uploaded gensupport.JSONFloat64 `json:"uploaded"`
  1749  		*NoMethod
  1750  	}
  1751  	s1.NoMethod = (*NoMethod)(s)
  1752  	if err := json.Unmarshal(data, &s1); err != nil {
  1753  		return err
  1754  	}
  1755  	s.Analyzed = float64(s1.Analyzed)
  1756  	s.Encoded = float64(s1.Encoded)
  1757  	s.Notified = float64(s1.Notified)
  1758  	s.Uploaded = float64(s1.Uploaded)
  1759  	return nil
  1760  }
  1761  
  1762  // PubsubDestination: A Pub/Sub destination.
  1763  type PubsubDestination struct {
  1764  	// Topic: The name of the Pub/Sub topic to publish job completion
  1765  	// notification to. For example: `projects/{project}/topics/{topic}`.
  1766  	Topic string `json:"topic,omitempty"`
  1767  
  1768  	// ForceSendFields is a list of field names (e.g. "Topic") to
  1769  	// unconditionally include in API requests. By default, fields with
  1770  	// empty or default values are omitted from API requests. However, any
  1771  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1772  	// sent to the server regardless of whether the field is empty or not.
  1773  	// This may be used to include empty fields in Patch requests.
  1774  	ForceSendFields []string `json:"-"`
  1775  
  1776  	// NullFields is a list of field names (e.g. "Topic") to include in API
  1777  	// requests with the JSON null value. By default, fields with empty
  1778  	// values are omitted from API requests. However, any field with an
  1779  	// empty value appearing in NullFields will be sent to the server as
  1780  	// null. It is an error if a field in this list has a non-empty value.
  1781  	// This may be used to include null fields in Patch requests.
  1782  	NullFields []string `json:"-"`
  1783  }
  1784  
  1785  func (s *PubsubDestination) MarshalJSON() ([]byte, error) {
  1786  	type NoMethod PubsubDestination
  1787  	raw := NoMethod(*s)
  1788  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1789  }
  1790  
  1791  // SampleAesEncryption: Configuration for SAMPLE-AES encryption.
  1792  type SampleAesEncryption struct {
  1793  	// KeyUri: Required. URI of the key delivery service. This URI is
  1794  	// inserted into the M3U8 header.
  1795  	KeyUri string `json:"keyUri,omitempty"`
  1796  
  1797  	// ForceSendFields is a list of field names (e.g. "KeyUri") to
  1798  	// unconditionally include in API requests. By default, fields with
  1799  	// empty or default values are omitted from API requests. However, any
  1800  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1801  	// sent to the server regardless of whether the field is empty or not.
  1802  	// This may be used to include empty fields in Patch requests.
  1803  	ForceSendFields []string `json:"-"`
  1804  
  1805  	// NullFields is a list of field names (e.g. "KeyUri") to include in API
  1806  	// requests with the JSON null value. By default, fields with empty
  1807  	// values are omitted from API requests. However, any field with an
  1808  	// empty value appearing in NullFields will be sent to the server as
  1809  	// null. It is an error if a field in this list has a non-empty value.
  1810  	// This may be used to include null fields in Patch requests.
  1811  	NullFields []string `json:"-"`
  1812  }
  1813  
  1814  func (s *SampleAesEncryption) MarshalJSON() ([]byte, error) {
  1815  	type NoMethod SampleAesEncryption
  1816  	raw := NoMethod(*s)
  1817  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1818  }
  1819  
  1820  // SegmentSettings: Segment settings for "ts", "fmp4" and "vtt".
  1821  type SegmentSettings struct {
  1822  	// IndividualSegments: Required. Create an individual segment file. The
  1823  	// default is `false`.
  1824  	IndividualSegments bool `json:"individualSegments,omitempty"`
  1825  
  1826  	// SegmentDuration: Duration of the segments in seconds. The default is
  1827  	// "6.0s". Note that `segmentDuration` must be greater than or equal
  1828  	// to `gopDuration` (#videostream), and `segmentDuration` must be
  1829  	// divisible by `gopDuration` (#videostream).
  1830  	SegmentDuration string `json:"segmentDuration,omitempty"`
  1831  
  1832  	// ForceSendFields is a list of field names (e.g. "IndividualSegments")
  1833  	// to unconditionally include in API requests. By default, fields with
  1834  	// empty or default values are omitted from API requests. However, any
  1835  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1836  	// sent to the server regardless of whether the field is empty or not.
  1837  	// This may be used to include empty fields in Patch requests.
  1838  	ForceSendFields []string `json:"-"`
  1839  
  1840  	// NullFields is a list of field names (e.g. "IndividualSegments") to
  1841  	// include in API requests with the JSON null value. By default, fields
  1842  	// with empty values are omitted from API requests. However, any field
  1843  	// with an empty value appearing in NullFields will be sent to the
  1844  	// server as null. It is an error if a field in this list has a
  1845  	// non-empty value. This may be used to include null fields in Patch
  1846  	// requests.
  1847  	NullFields []string `json:"-"`
  1848  }
  1849  
  1850  func (s *SegmentSettings) MarshalJSON() ([]byte, error) {
  1851  	type NoMethod SegmentSettings
  1852  	raw := NoMethod(*s)
  1853  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1854  }
  1855  
  1856  // SpriteSheet: Sprite sheet configuration.
  1857  type SpriteSheet struct {
  1858  	// ColumnCount: The maximum number of sprites per row in a sprite sheet.
  1859  	// The default is 0, which indicates no maximum limit.
  1860  	ColumnCount int64 `json:"columnCount,omitempty"`
  1861  
  1862  	// EndTimeOffset: End time in seconds, relative to the output file
  1863  	// timeline. When `end_time_offset` is not specified, the sprites are
  1864  	// generated until the end of the output file.
  1865  	EndTimeOffset string `json:"endTimeOffset,omitempty"`
  1866  
  1867  	// FilePrefix: Required. File name prefix for the generated sprite
  1868  	// sheets. Each sprite sheet has an incremental 10-digit zero-padded
  1869  	// suffix starting from 0 before the extension, such as
  1870  	// "sprite_sheet0000000123.jpeg".
  1871  	FilePrefix string `json:"filePrefix,omitempty"`
  1872  
  1873  	// Format: Format type. The default is "jpeg". Supported formats: -
  1874  	// 'jpeg'
  1875  	Format string `json:"format,omitempty"`
  1876  
  1877  	// Interval: Starting from `0s`, create sprites at regular intervals.
  1878  	// Specify the interval value in seconds.
  1879  	Interval string `json:"interval,omitempty"`
  1880  
  1881  	// Quality: The quality of the generated sprite sheet. Enter a value
  1882  	// between 1 and 100, where 1 is the lowest quality and 100 is the
  1883  	// highest quality. The default is 100. A high quality value corresponds
  1884  	// to a low image data compression ratio.
  1885  	Quality int64 `json:"quality,omitempty"`
  1886  
  1887  	// RowCount: The maximum number of rows per sprite sheet. When the
  1888  	// sprite sheet is full, a new sprite sheet is created. The default is
  1889  	// 0, which indicates no maximum limit.
  1890  	RowCount int64 `json:"rowCount,omitempty"`
  1891  
  1892  	// SpriteHeightPixels: Required. The height of sprite in pixels. Must be
  1893  	// an even integer. To preserve the source aspect ratio, set the
  1894  	// SpriteSheet.sprite_height_pixels field or the
  1895  	// SpriteSheet.sprite_width_pixels field, but not both (the API will
  1896  	// automatically calculate the missing field).
  1897  	SpriteHeightPixels int64 `json:"spriteHeightPixels,omitempty"`
  1898  
  1899  	// SpriteWidthPixels: Required. The width of sprite in pixels. Must be
  1900  	// an even integer. To preserve the source aspect ratio, set the
  1901  	// SpriteSheet.sprite_width_pixels field or the
  1902  	// SpriteSheet.sprite_height_pixels field, but not both (the API will
  1903  	// automatically calculate the missing field).
  1904  	SpriteWidthPixels int64 `json:"spriteWidthPixels,omitempty"`
  1905  
  1906  	// StartTimeOffset: Start time in seconds, relative to the output file
  1907  	// timeline. Determines the first sprite to pick. The default is `0s`.
  1908  	StartTimeOffset string `json:"startTimeOffset,omitempty"`
  1909  
  1910  	// TotalCount: Total number of sprites. Create the specified number of
  1911  	// sprites distributed evenly across the timeline of the output media.
  1912  	// The default is 100.
  1913  	TotalCount int64 `json:"totalCount,omitempty"`
  1914  
  1915  	// ForceSendFields is a list of field names (e.g. "ColumnCount") to
  1916  	// unconditionally include in API requests. By default, fields with
  1917  	// empty or default values are omitted from API requests. However, any
  1918  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1919  	// sent to the server regardless of whether the field is empty or not.
  1920  	// This may be used to include empty fields in Patch requests.
  1921  	ForceSendFields []string `json:"-"`
  1922  
  1923  	// NullFields is a list of field names (e.g. "ColumnCount") to include
  1924  	// in API requests with the JSON null value. By default, fields with
  1925  	// empty values are omitted from API requests. However, any field with
  1926  	// an empty value appearing in NullFields will be sent to the server as
  1927  	// null. It is an error if a field in this list has a non-empty value.
  1928  	// This may be used to include null fields in Patch requests.
  1929  	NullFields []string `json:"-"`
  1930  }
  1931  
  1932  func (s *SpriteSheet) MarshalJSON() ([]byte, error) {
  1933  	type NoMethod SpriteSheet
  1934  	raw := NoMethod(*s)
  1935  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1936  }
  1937  
  1938  // TextAtom: The mapping for the `Job.edit_list` atoms with text
  1939  // `EditAtom.inputs`.
  1940  type TextAtom struct {
  1941  	// Inputs: List of `Job.inputs` that should be embedded in this atom.
  1942  	// Only one input is supported.
  1943  	Inputs []*TextInput `json:"inputs,omitempty"`
  1944  
  1945  	// Key: Required. The `EditAtom.key` that references atom with text
  1946  	// inputs in the `Job.edit_list`.
  1947  	Key string `json:"key,omitempty"`
  1948  
  1949  	// ForceSendFields is a list of field names (e.g. "Inputs") to
  1950  	// unconditionally include in API requests. By default, fields with
  1951  	// empty or default values are omitted from API requests. However, any
  1952  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1953  	// sent to the server regardless of whether the field is empty or not.
  1954  	// This may be used to include empty fields in Patch requests.
  1955  	ForceSendFields []string `json:"-"`
  1956  
  1957  	// NullFields is a list of field names (e.g. "Inputs") to include in API
  1958  	// requests with the JSON null value. By default, fields with empty
  1959  	// values are omitted from API requests. However, any field with an
  1960  	// empty value appearing in NullFields will be sent to the server as
  1961  	// null. It is an error if a field in this list has a non-empty value.
  1962  	// This may be used to include null fields in Patch requests.
  1963  	NullFields []string `json:"-"`
  1964  }
  1965  
  1966  func (s *TextAtom) MarshalJSON() ([]byte, error) {
  1967  	type NoMethod TextAtom
  1968  	raw := NoMethod(*s)
  1969  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1970  }
  1971  
  1972  // TextInput: Identifies which input file and track should be used.
  1973  type TextInput struct {
  1974  	// Key: Required. The `Input.key` that identifies the input file.
  1975  	Key string `json:"key,omitempty"`
  1976  
  1977  	// Track: Required. The zero-based index of the track in the input file.
  1978  	Track int64 `json:"track,omitempty"`
  1979  
  1980  	// ForceSendFields is a list of field names (e.g. "Key") to
  1981  	// unconditionally include in API requests. By default, fields with
  1982  	// empty or default values are omitted from API requests. However, any
  1983  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1984  	// sent to the server regardless of whether the field is empty or not.
  1985  	// This may be used to include empty fields in Patch requests.
  1986  	ForceSendFields []string `json:"-"`
  1987  
  1988  	// NullFields is a list of field names (e.g. "Key") to include in API
  1989  	// requests with the JSON null value. By default, fields with empty
  1990  	// values are omitted from API requests. However, any field with an
  1991  	// empty value appearing in NullFields will be sent to the server as
  1992  	// null. It is an error if a field in this list has a non-empty value.
  1993  	// This may be used to include null fields in Patch requests.
  1994  	NullFields []string `json:"-"`
  1995  }
  1996  
  1997  func (s *TextInput) MarshalJSON() ([]byte, error) {
  1998  	type NoMethod TextInput
  1999  	raw := NoMethod(*s)
  2000  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2001  }
  2002  
  2003  // TextStream: Encoding of a text stream. For example, closed captions
  2004  // or subtitles.
  2005  type TextStream struct {
  2006  	// Codec: The codec for this text stream. The default is "webvtt".
  2007  	// Supported text codecs: - 'srt' - 'ttml' - 'cea608' - 'cea708' -
  2008  	// 'webvtt'
  2009  	Codec string `json:"codec,omitempty"`
  2010  
  2011  	// LanguageCode: Required. The BCP-47 language code, such as "en-US"
  2012  	// or "sr-Latn". For more information, see
  2013  	// https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
  2014  	LanguageCode string `json:"languageCode,omitempty"`
  2015  
  2016  	// Mapping: The mapping for the `Job.edit_list` atoms with text
  2017  	// `EditAtom.inputs`.
  2018  	Mapping []*TextAtom `json:"mapping,omitempty"`
  2019  
  2020  	// ForceSendFields is a list of field names (e.g. "Codec") to
  2021  	// unconditionally include in API requests. By default, fields with
  2022  	// empty or default values are omitted from API requests. However, any
  2023  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2024  	// sent to the server regardless of whether the field is empty or not.
  2025  	// This may be used to include empty fields in Patch requests.
  2026  	ForceSendFields []string `json:"-"`
  2027  
  2028  	// NullFields is a list of field names (e.g. "Codec") to include in API
  2029  	// requests with the JSON null value. By default, fields with empty
  2030  	// values are omitted from API requests. However, any field with an
  2031  	// empty value appearing in NullFields will be sent to the server as
  2032  	// null. It is an error if a field in this list has a non-empty value.
  2033  	// This may be used to include null fields in Patch requests.
  2034  	NullFields []string `json:"-"`
  2035  }
  2036  
  2037  func (s *TextStream) MarshalJSON() ([]byte, error) {
  2038  	type NoMethod TextStream
  2039  	raw := NoMethod(*s)
  2040  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2041  }
  2042  
  2043  // VideoStream: Video stream resource.
  2044  type VideoStream struct {
  2045  	// AllowOpenGop: Specifies whether an open Group of Pictures (GOP)
  2046  	// structure should be allowed or not. The default is `false`.
  2047  	AllowOpenGop bool `json:"allowOpenGop,omitempty"`
  2048  
  2049  	// AqStrength: Specify the intensity of the adaptive quantizer (AQ).
  2050  	// Must be between 0 and 1, where 0 disables the quantizer and 1
  2051  	// maximizes the quantizer. A higher value equals a lower bitrate but
  2052  	// smoother image. The default is 0.
  2053  	AqStrength float64 `json:"aqStrength,omitempty"`
  2054  
  2055  	// BFrameCount: The number of consecutive B-frames. Must be greater than
  2056  	// or equal to zero. Must be less than `VideoStream.gop_frame_count` if
  2057  	// set. The default is 0.
  2058  	BFrameCount int64 `json:"bFrameCount,omitempty"`
  2059  
  2060  	// BPyramid: Allow B-pyramid for reference frame selection. This may not
  2061  	// be supported on all decoders. The default is `false`.
  2062  	BPyramid bool `json:"bPyramid,omitempty"`
  2063  
  2064  	// BitrateBps: Required. The video bitrate in bits per second. The
  2065  	// minimum value is 1,000. The maximum value for H264/H265 is
  2066  	// 800,000,000. The maximum value for VP9 is 480,000,000.
  2067  	BitrateBps int64 `json:"bitrateBps,omitempty"`
  2068  
  2069  	// Codec: Codec type. The following codecs are supported: * `h264`
  2070  	// (default) * `h265` * `vp9`
  2071  	Codec string `json:"codec,omitempty"`
  2072  
  2073  	// CrfLevel: Target CRF level. Must be between 10 and 36, where 10 is
  2074  	// the highest quality and 36 is the most efficient compression. The
  2075  	// default is 21.
  2076  	CrfLevel int64 `json:"crfLevel,omitempty"`
  2077  
  2078  	// EnableTwoPass: Use two-pass encoding strategy to achieve better video
  2079  	// quality. `VideoStream.rate_control_mode` must be "vbr". The default
  2080  	// is `false`.
  2081  	EnableTwoPass bool `json:"enableTwoPass,omitempty"`
  2082  
  2083  	// EntropyCoder: The entropy coder to use. The default is "cabac".
  2084  	// Supported entropy coders: - 'cavlc' - 'cabac'
  2085  	EntropyCoder string `json:"entropyCoder,omitempty"`
  2086  
  2087  	// FrameRate: Required. The target video frame rate in frames per second
  2088  	// (FPS). Must be less than or equal to 120. Will default to the input
  2089  	// frame rate if larger than the input frame rate. The API will generate
  2090  	// an output FPS that is divisible by the input FPS, and smaller or
  2091  	// equal to the target FPS. See Calculate frame rate
  2092  	// (https://cloud.google.com/transcoder/docs/concepts/frame-rate) for
  2093  	// more information.
  2094  	FrameRate float64 `json:"frameRate,omitempty"`
  2095  
  2096  	// GopDuration: Select the GOP size based on the specified duration. The
  2097  	// default is "3s". Note that `gopDuration` must be less than or equal
  2098  	// to `segmentDuration` (#SegmentSettings), and `segmentDuration`
  2099  	// (#SegmentSettings) must be divisible by `gopDuration`.
  2100  	GopDuration string `json:"gopDuration,omitempty"`
  2101  
  2102  	// GopFrameCount: Select the GOP size based on the specified frame
  2103  	// count. Must be greater than zero.
  2104  	GopFrameCount int64 `json:"gopFrameCount,omitempty"`
  2105  
  2106  	// HeightPixels: The height of the video in pixels. Must be an even
  2107  	// integer. When not specified, the height is adjusted to match the
  2108  	// specified width and input aspect ratio. If both are omitted, the
  2109  	// input height is used.
  2110  	HeightPixels int64 `json:"heightPixels,omitempty"`
  2111  
  2112  	// PixelFormat: Pixel format to use. The default is "yuv420p".
  2113  	// Supported pixel formats: - 'yuv420p' pixel format. - 'yuv422p' pixel
  2114  	// format. - 'yuv444p' pixel format. - 'yuv420p10' 10-bit HDR pixel
  2115  	// format. - 'yuv422p10' 10-bit HDR pixel format. - 'yuv444p10' 10-bit
  2116  	// HDR pixel format. - 'yuv420p12' 12-bit HDR pixel format. -
  2117  	// 'yuv422p12' 12-bit HDR pixel format. - 'yuv444p12' 12-bit HDR pixel
  2118  	// format.
  2119  	PixelFormat string `json:"pixelFormat,omitempty"`
  2120  
  2121  	// Preset: Enforces the specified codec preset. The default is
  2122  	// `veryfast`. The available options are FFmpeg-compatible. Note that
  2123  	// certain values for this field may cause the transcoder to override
  2124  	// other fields you set in the `VideoStream` message.
  2125  	Preset string `json:"preset,omitempty"`
  2126  
  2127  	// Profile: Enforces the specified codec profile. The following profiles
  2128  	// are supported: * `baseline` * `main` * `high` (default) The available
  2129  	// options are FFmpeg-compatible. Note that certain values for this
  2130  	// field may cause the transcoder to override other fields you set in
  2131  	// the `VideoStream` message.
  2132  	Profile string `json:"profile,omitempty"`
  2133  
  2134  	// RateControlMode: Specify the `rate_control_mode`. The default is
  2135  	// "vbr". Supported rate control modes: - 'vbr' - variable bitrate -
  2136  	// 'crf' - constant rate factor
  2137  	RateControlMode string `json:"rateControlMode,omitempty"`
  2138  
  2139  	// Tune: Enforces the specified codec tune. The available options are
  2140  	// FFmpeg-compatible. Note that certain values for this field may cause
  2141  	// the transcoder to override other fields you set in the `VideoStream`
  2142  	// message.
  2143  	Tune string `json:"tune,omitempty"`
  2144  
  2145  	// VbvFullnessBits: Initial fullness of the Video Buffering Verifier
  2146  	// (VBV) buffer in bits. Must be greater than zero. The default is equal
  2147  	// to 90% of `VideoStream.vbv_size_bits`.
  2148  	VbvFullnessBits int64 `json:"vbvFullnessBits,omitempty"`
  2149  
  2150  	// VbvSizeBits: Size of the Video Buffering Verifier (VBV) buffer in
  2151  	// bits. Must be greater than zero. The default is equal to
  2152  	// `VideoStream.bitrate_bps`.
  2153  	VbvSizeBits int64 `json:"vbvSizeBits,omitempty"`
  2154  
  2155  	// WidthPixels: The width of the video in pixels. Must be an even
  2156  	// integer. When not specified, the width is adjusted to match the
  2157  	// specified height and input aspect ratio. If both are omitted, the
  2158  	// input width is used.
  2159  	WidthPixels int64 `json:"widthPixels,omitempty"`
  2160  
  2161  	// ForceSendFields is a list of field names (e.g. "AllowOpenGop") to
  2162  	// unconditionally include in API requests. By default, fields with
  2163  	// empty or default values are omitted from API requests. However, any
  2164  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2165  	// sent to the server regardless of whether the field is empty or not.
  2166  	// This may be used to include empty fields in Patch requests.
  2167  	ForceSendFields []string `json:"-"`
  2168  
  2169  	// NullFields is a list of field names (e.g. "AllowOpenGop") to include
  2170  	// in API requests with the JSON null value. By default, fields with
  2171  	// empty values are omitted from API requests. However, any field with
  2172  	// an empty value appearing in NullFields will be sent to the server as
  2173  	// null. It is an error if a field in this list has a non-empty value.
  2174  	// This may be used to include null fields in Patch requests.
  2175  	NullFields []string `json:"-"`
  2176  }
  2177  
  2178  func (s *VideoStream) MarshalJSON() ([]byte, error) {
  2179  	type NoMethod VideoStream
  2180  	raw := NoMethod(*s)
  2181  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2182  }
  2183  
  2184  func (s *VideoStream) UnmarshalJSON(data []byte) error {
  2185  	type NoMethod VideoStream
  2186  	var s1 struct {
  2187  		AqStrength gensupport.JSONFloat64 `json:"aqStrength"`
  2188  		FrameRate  gensupport.JSONFloat64 `json:"frameRate"`
  2189  		*NoMethod
  2190  	}
  2191  	s1.NoMethod = (*NoMethod)(s)
  2192  	if err := json.Unmarshal(data, &s1); err != nil {
  2193  		return err
  2194  	}
  2195  	s.AqStrength = float64(s1.AqStrength)
  2196  	s.FrameRate = float64(s1.FrameRate)
  2197  	return nil
  2198  }
  2199  
  2200  // method id "transcoder.projects.locations.jobTemplates.create":
  2201  
  2202  type ProjectsLocationsJobTemplatesCreateCall struct {
  2203  	s           *Service
  2204  	parent      string
  2205  	jobtemplate *JobTemplate
  2206  	urlParams_  gensupport.URLParams
  2207  	ctx_        context.Context
  2208  	header_     http.Header
  2209  }
  2210  
  2211  // Create: Creates a job template in the specified region.
  2212  //
  2213  //   - parent: The parent location to create this job template. Format:
  2214  //     `projects/{project}/locations/{location}`.
  2215  func (r *ProjectsLocationsJobTemplatesService) Create(parent string, jobtemplate *JobTemplate) *ProjectsLocationsJobTemplatesCreateCall {
  2216  	c := &ProjectsLocationsJobTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2217  	c.parent = parent
  2218  	c.jobtemplate = jobtemplate
  2219  	return c
  2220  }
  2221  
  2222  // JobTemplateId sets the optional parameter "jobTemplateId": Required.
  2223  // The ID to use for the job template, which will become the final
  2224  // component of the job template's resource name. This value should be
  2225  // 4-63 characters, and valid characters must match the regular
  2226  // expression `a-zA-Z*`.
  2227  func (c *ProjectsLocationsJobTemplatesCreateCall) JobTemplateId(jobTemplateId string) *ProjectsLocationsJobTemplatesCreateCall {
  2228  	c.urlParams_.Set("jobTemplateId", jobTemplateId)
  2229  	return c
  2230  }
  2231  
  2232  // Fields allows partial responses to be retrieved. See
  2233  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2234  // for more information.
  2235  func (c *ProjectsLocationsJobTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTemplatesCreateCall {
  2236  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2237  	return c
  2238  }
  2239  
  2240  // Context sets the context to be used in this call's Do method. Any
  2241  // pending HTTP request will be aborted if the provided context is
  2242  // canceled.
  2243  func (c *ProjectsLocationsJobTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsJobTemplatesCreateCall {
  2244  	c.ctx_ = ctx
  2245  	return c
  2246  }
  2247  
  2248  // Header returns an http.Header that can be modified by the caller to
  2249  // add HTTP headers to the request.
  2250  func (c *ProjectsLocationsJobTemplatesCreateCall) Header() http.Header {
  2251  	if c.header_ == nil {
  2252  		c.header_ = make(http.Header)
  2253  	}
  2254  	return c.header_
  2255  }
  2256  
  2257  func (c *ProjectsLocationsJobTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  2258  	reqHeaders := make(http.Header)
  2259  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220125")
  2260  	for k, v := range c.header_ {
  2261  		reqHeaders[k] = v
  2262  	}
  2263  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2264  	var body io.Reader = nil
  2265  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.jobtemplate)
  2266  	if err != nil {
  2267  		return nil, err
  2268  	}
  2269  	reqHeaders.Set("Content-Type", "application/json")
  2270  	c.urlParams_.Set("alt", alt)
  2271  	c.urlParams_.Set("prettyPrint", "false")
  2272  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/jobTemplates")
  2273  	urls += "?" + c.urlParams_.Encode()
  2274  	req, err := http.NewRequest("POST", urls, body)
  2275  	if err != nil {
  2276  		return nil, err
  2277  	}
  2278  	req.Header = reqHeaders
  2279  	googleapi.Expand(req.URL, map[string]string{
  2280  		"parent": c.parent,
  2281  	})
  2282  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2283  }
  2284  
  2285  // Do executes the "transcoder.projects.locations.jobTemplates.create" call.
  2286  // Exactly one of *JobTemplate or error will be non-nil. Any non-2xx
  2287  // status code is an error. Response headers are in either
  2288  // *JobTemplate.ServerResponse.Header or (if a response was returned at
  2289  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2290  // to check whether the returned error was because
  2291  // http.StatusNotModified was returned.
  2292  func (c *ProjectsLocationsJobTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*JobTemplate, error) {
  2293  	gensupport.SetOptions(c.urlParams_, opts...)
  2294  	res, err := c.doRequest("json")
  2295  	if res != nil && res.StatusCode == http.StatusNotModified {
  2296  		if res.Body != nil {
  2297  			res.Body.Close()
  2298  		}
  2299  		return nil, &googleapi.Error{
  2300  			Code:   res.StatusCode,
  2301  			Header: res.Header,
  2302  		}
  2303  	}
  2304  	if err != nil {
  2305  		return nil, err
  2306  	}
  2307  	defer googleapi.CloseBody(res)
  2308  	if err := googleapi.CheckResponse(res); err != nil {
  2309  		return nil, err
  2310  	}
  2311  	ret := &JobTemplate{
  2312  		ServerResponse: googleapi.ServerResponse{
  2313  			Header:         res.Header,
  2314  			HTTPStatusCode: res.StatusCode,
  2315  		},
  2316  	}
  2317  	target := &ret
  2318  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2319  		return nil, err
  2320  	}
  2321  	return ret, nil
  2322  	// {
  2323  	//   "description": "Creates a job template in the specified region.",
  2324  	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobTemplates",
  2325  	//   "httpMethod": "POST",
  2326  	//   "id": "transcoder.projects.locations.jobTemplates.create",
  2327  	//   "parameterOrder": [
  2328  	//     "parent"
  2329  	//   ],
  2330  	//   "parameters": {
  2331  	//     "jobTemplateId": {
  2332  	//       "description": "Required. The ID to use for the job template, which will become the final component of the job template's resource name. This value should be 4-63 characters, and valid characters must match the regular expression `a-zA-Z*`.",
  2333  	//       "location": "query",
  2334  	//       "type": "string"
  2335  	//     },
  2336  	//     "parent": {
  2337  	//       "description": "Required. The parent location to create this job template. Format: `projects/{project}/locations/{location}`",
  2338  	//       "location": "path",
  2339  	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
  2340  	//       "required": true,
  2341  	//       "type": "string"
  2342  	//     }
  2343  	//   },
  2344  	//   "path": "v1beta1/{+parent}/jobTemplates",
  2345  	//   "request": {
  2346  	//     "$ref": "JobTemplate"
  2347  	//   },
  2348  	//   "response": {
  2349  	//     "$ref": "JobTemplate"
  2350  	//   },
  2351  	//   "scopes": [
  2352  	//     "https://www.googleapis.com/auth/cloud-platform"
  2353  	//   ]
  2354  	// }
  2355  
  2356  }
  2357  
  2358  // method id "transcoder.projects.locations.jobTemplates.delete":
  2359  
  2360  type ProjectsLocationsJobTemplatesDeleteCall struct {
  2361  	s          *Service
  2362  	name       string
  2363  	urlParams_ gensupport.URLParams
  2364  	ctx_       context.Context
  2365  	header_    http.Header
  2366  }
  2367  
  2368  // Delete: Deletes a job template.
  2369  //
  2370  //   - name: The name of the job template to delete.
  2371  //     `projects/{project}/locations/{location}/jobTemplates/{job_template}
  2372  //     `.
  2373  func (r *ProjectsLocationsJobTemplatesService) Delete(name string) *ProjectsLocationsJobTemplatesDeleteCall {
  2374  	c := &ProjectsLocationsJobTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2375  	c.name = name
  2376  	return c
  2377  }
  2378  
  2379  // Fields allows partial responses to be retrieved. See
  2380  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2381  // for more information.
  2382  func (c *ProjectsLocationsJobTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTemplatesDeleteCall {
  2383  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2384  	return c
  2385  }
  2386  
  2387  // Context sets the context to be used in this call's Do method. Any
  2388  // pending HTTP request will be aborted if the provided context is
  2389  // canceled.
  2390  func (c *ProjectsLocationsJobTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsJobTemplatesDeleteCall {
  2391  	c.ctx_ = ctx
  2392  	return c
  2393  }
  2394  
  2395  // Header returns an http.Header that can be modified by the caller to
  2396  // add HTTP headers to the request.
  2397  func (c *ProjectsLocationsJobTemplatesDeleteCall) Header() http.Header {
  2398  	if c.header_ == nil {
  2399  		c.header_ = make(http.Header)
  2400  	}
  2401  	return c.header_
  2402  }
  2403  
  2404  func (c *ProjectsLocationsJobTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2405  	reqHeaders := make(http.Header)
  2406  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220125")
  2407  	for k, v := range c.header_ {
  2408  		reqHeaders[k] = v
  2409  	}
  2410  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2411  	var body io.Reader = nil
  2412  	c.urlParams_.Set("alt", alt)
  2413  	c.urlParams_.Set("prettyPrint", "false")
  2414  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2415  	urls += "?" + c.urlParams_.Encode()
  2416  	req, err := http.NewRequest("DELETE", urls, body)
  2417  	if err != nil {
  2418  		return nil, err
  2419  	}
  2420  	req.Header = reqHeaders
  2421  	googleapi.Expand(req.URL, map[string]string{
  2422  		"name": c.name,
  2423  	})
  2424  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2425  }
  2426  
  2427  // Do executes the "transcoder.projects.locations.jobTemplates.delete" call.
  2428  // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  2429  // code is an error. Response headers are in either
  2430  // *Empty.ServerResponse.Header or (if a response was returned at all)
  2431  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2432  // check whether the returned error was because http.StatusNotModified
  2433  // was returned.
  2434  func (c *ProjectsLocationsJobTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2435  	gensupport.SetOptions(c.urlParams_, opts...)
  2436  	res, err := c.doRequest("json")
  2437  	if res != nil && res.StatusCode == http.StatusNotModified {
  2438  		if res.Body != nil {
  2439  			res.Body.Close()
  2440  		}
  2441  		return nil, &googleapi.Error{
  2442  			Code:   res.StatusCode,
  2443  			Header: res.Header,
  2444  		}
  2445  	}
  2446  	if err != nil {
  2447  		return nil, err
  2448  	}
  2449  	defer googleapi.CloseBody(res)
  2450  	if err := googleapi.CheckResponse(res); err != nil {
  2451  		return nil, err
  2452  	}
  2453  	ret := &Empty{
  2454  		ServerResponse: googleapi.ServerResponse{
  2455  			Header:         res.Header,
  2456  			HTTPStatusCode: res.StatusCode,
  2457  		},
  2458  	}
  2459  	target := &ret
  2460  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2461  		return nil, err
  2462  	}
  2463  	return ret, nil
  2464  	// {
  2465  	//   "description": "Deletes a job template.",
  2466  	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobTemplates/{jobTemplatesId}",
  2467  	//   "httpMethod": "DELETE",
  2468  	//   "id": "transcoder.projects.locations.jobTemplates.delete",
  2469  	//   "parameterOrder": [
  2470  	//     "name"
  2471  	//   ],
  2472  	//   "parameters": {
  2473  	//     "name": {
  2474  	//       "description": "Required. The name of the job template to delete. `projects/{project}/locations/{location}/jobTemplates/{job_template}`",
  2475  	//       "location": "path",
  2476  	//       "pattern": "^projects/[^/]+/locations/[^/]+/jobTemplates/[^/]+$",
  2477  	//       "required": true,
  2478  	//       "type": "string"
  2479  	//     }
  2480  	//   },
  2481  	//   "path": "v1beta1/{+name}",
  2482  	//   "response": {
  2483  	//     "$ref": "Empty"
  2484  	//   },
  2485  	//   "scopes": [
  2486  	//     "https://www.googleapis.com/auth/cloud-platform"
  2487  	//   ]
  2488  	// }
  2489  
  2490  }
  2491  
  2492  // method id "transcoder.projects.locations.jobTemplates.get":
  2493  
  2494  type ProjectsLocationsJobTemplatesGetCall struct {
  2495  	s            *Service
  2496  	name         string
  2497  	urlParams_   gensupport.URLParams
  2498  	ifNoneMatch_ string
  2499  	ctx_         context.Context
  2500  	header_      http.Header
  2501  }
  2502  
  2503  // Get: Returns the job template data.
  2504  //
  2505  //   - name: The name of the job template to retrieve. Format:
  2506  //     `projects/{project}/locations/{location}/jobTemplates/{job_template}
  2507  //     `.
  2508  func (r *ProjectsLocationsJobTemplatesService) Get(name string) *ProjectsLocationsJobTemplatesGetCall {
  2509  	c := &ProjectsLocationsJobTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2510  	c.name = name
  2511  	return c
  2512  }
  2513  
  2514  // Fields allows partial responses to be retrieved. See
  2515  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2516  // for more information.
  2517  func (c *ProjectsLocationsJobTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTemplatesGetCall {
  2518  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2519  	return c
  2520  }
  2521  
  2522  // IfNoneMatch sets the optional parameter which makes the operation
  2523  // fail if the object's ETag matches the given value. This is useful for
  2524  // getting updates only after the object has changed since the last
  2525  // request. Use googleapi.IsNotModified to check whether the response
  2526  // error from Do is the result of In-None-Match.
  2527  func (c *ProjectsLocationsJobTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTemplatesGetCall {
  2528  	c.ifNoneMatch_ = entityTag
  2529  	return c
  2530  }
  2531  
  2532  // Context sets the context to be used in this call's Do method. Any
  2533  // pending HTTP request will be aborted if the provided context is
  2534  // canceled.
  2535  func (c *ProjectsLocationsJobTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsJobTemplatesGetCall {
  2536  	c.ctx_ = ctx
  2537  	return c
  2538  }
  2539  
  2540  // Header returns an http.Header that can be modified by the caller to
  2541  // add HTTP headers to the request.
  2542  func (c *ProjectsLocationsJobTemplatesGetCall) Header() http.Header {
  2543  	if c.header_ == nil {
  2544  		c.header_ = make(http.Header)
  2545  	}
  2546  	return c.header_
  2547  }
  2548  
  2549  func (c *ProjectsLocationsJobTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  2550  	reqHeaders := make(http.Header)
  2551  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220125")
  2552  	for k, v := range c.header_ {
  2553  		reqHeaders[k] = v
  2554  	}
  2555  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2556  	if c.ifNoneMatch_ != "" {
  2557  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2558  	}
  2559  	var body io.Reader = nil
  2560  	c.urlParams_.Set("alt", alt)
  2561  	c.urlParams_.Set("prettyPrint", "false")
  2562  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2563  	urls += "?" + c.urlParams_.Encode()
  2564  	req, err := http.NewRequest("GET", urls, body)
  2565  	if err != nil {
  2566  		return nil, err
  2567  	}
  2568  	req.Header = reqHeaders
  2569  	googleapi.Expand(req.URL, map[string]string{
  2570  		"name": c.name,
  2571  	})
  2572  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2573  }
  2574  
  2575  // Do executes the "transcoder.projects.locations.jobTemplates.get" call.
  2576  // Exactly one of *JobTemplate or error will be non-nil. Any non-2xx
  2577  // status code is an error. Response headers are in either
  2578  // *JobTemplate.ServerResponse.Header or (if a response was returned at
  2579  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2580  // to check whether the returned error was because
  2581  // http.StatusNotModified was returned.
  2582  func (c *ProjectsLocationsJobTemplatesGetCall) Do(opts ...googleapi.CallOption) (*JobTemplate, error) {
  2583  	gensupport.SetOptions(c.urlParams_, opts...)
  2584  	res, err := c.doRequest("json")
  2585  	if res != nil && res.StatusCode == http.StatusNotModified {
  2586  		if res.Body != nil {
  2587  			res.Body.Close()
  2588  		}
  2589  		return nil, &googleapi.Error{
  2590  			Code:   res.StatusCode,
  2591  			Header: res.Header,
  2592  		}
  2593  	}
  2594  	if err != nil {
  2595  		return nil, err
  2596  	}
  2597  	defer googleapi.CloseBody(res)
  2598  	if err := googleapi.CheckResponse(res); err != nil {
  2599  		return nil, err
  2600  	}
  2601  	ret := &JobTemplate{
  2602  		ServerResponse: googleapi.ServerResponse{
  2603  			Header:         res.Header,
  2604  			HTTPStatusCode: res.StatusCode,
  2605  		},
  2606  	}
  2607  	target := &ret
  2608  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2609  		return nil, err
  2610  	}
  2611  	return ret, nil
  2612  	// {
  2613  	//   "description": "Returns the job template data.",
  2614  	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobTemplates/{jobTemplatesId}",
  2615  	//   "httpMethod": "GET",
  2616  	//   "id": "transcoder.projects.locations.jobTemplates.get",
  2617  	//   "parameterOrder": [
  2618  	//     "name"
  2619  	//   ],
  2620  	//   "parameters": {
  2621  	//     "name": {
  2622  	//       "description": "Required. The name of the job template to retrieve. Format: `projects/{project}/locations/{location}/jobTemplates/{job_template}`",
  2623  	//       "location": "path",
  2624  	//       "pattern": "^projects/[^/]+/locations/[^/]+/jobTemplates/[^/]+$",
  2625  	//       "required": true,
  2626  	//       "type": "string"
  2627  	//     }
  2628  	//   },
  2629  	//   "path": "v1beta1/{+name}",
  2630  	//   "response": {
  2631  	//     "$ref": "JobTemplate"
  2632  	//   },
  2633  	//   "scopes": [
  2634  	//     "https://www.googleapis.com/auth/cloud-platform"
  2635  	//   ]
  2636  	// }
  2637  
  2638  }
  2639  
  2640  // method id "transcoder.projects.locations.jobTemplates.list":
  2641  
  2642  type ProjectsLocationsJobTemplatesListCall struct {
  2643  	s            *Service
  2644  	parent       string
  2645  	urlParams_   gensupport.URLParams
  2646  	ifNoneMatch_ string
  2647  	ctx_         context.Context
  2648  	header_      http.Header
  2649  }
  2650  
  2651  // List: Lists job templates in the specified region.
  2652  //
  2653  //   - parent: The parent location from which to retrieve the collection
  2654  //     of job templates. Format: `projects/{project}/locations/{location}`.
  2655  func (r *ProjectsLocationsJobTemplatesService) List(parent string) *ProjectsLocationsJobTemplatesListCall {
  2656  	c := &ProjectsLocationsJobTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2657  	c.parent = parent
  2658  	return c
  2659  }
  2660  
  2661  // PageSize sets the optional parameter "pageSize": The maximum number
  2662  // of items to return.
  2663  func (c *ProjectsLocationsJobTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsJobTemplatesListCall {
  2664  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2665  	return c
  2666  }
  2667  
  2668  // PageToken sets the optional parameter "pageToken": The
  2669  // `next_page_token` value returned from a previous List request, if
  2670  // any.
  2671  func (c *ProjectsLocationsJobTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsJobTemplatesListCall {
  2672  	c.urlParams_.Set("pageToken", pageToken)
  2673  	return c
  2674  }
  2675  
  2676  // Fields allows partial responses to be retrieved. See
  2677  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2678  // for more information.
  2679  func (c *ProjectsLocationsJobTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTemplatesListCall {
  2680  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2681  	return c
  2682  }
  2683  
  2684  // IfNoneMatch sets the optional parameter which makes the operation
  2685  // fail if the object's ETag matches the given value. This is useful for
  2686  // getting updates only after the object has changed since the last
  2687  // request. Use googleapi.IsNotModified to check whether the response
  2688  // error from Do is the result of In-None-Match.
  2689  func (c *ProjectsLocationsJobTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTemplatesListCall {
  2690  	c.ifNoneMatch_ = entityTag
  2691  	return c
  2692  }
  2693  
  2694  // Context sets the context to be used in this call's Do method. Any
  2695  // pending HTTP request will be aborted if the provided context is
  2696  // canceled.
  2697  func (c *ProjectsLocationsJobTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsJobTemplatesListCall {
  2698  	c.ctx_ = ctx
  2699  	return c
  2700  }
  2701  
  2702  // Header returns an http.Header that can be modified by the caller to
  2703  // add HTTP headers to the request.
  2704  func (c *ProjectsLocationsJobTemplatesListCall) Header() http.Header {
  2705  	if c.header_ == nil {
  2706  		c.header_ = make(http.Header)
  2707  	}
  2708  	return c.header_
  2709  }
  2710  
  2711  func (c *ProjectsLocationsJobTemplatesListCall) doRequest(alt string) (*http.Response, error) {
  2712  	reqHeaders := make(http.Header)
  2713  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220125")
  2714  	for k, v := range c.header_ {
  2715  		reqHeaders[k] = v
  2716  	}
  2717  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2718  	if c.ifNoneMatch_ != "" {
  2719  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2720  	}
  2721  	var body io.Reader = nil
  2722  	c.urlParams_.Set("alt", alt)
  2723  	c.urlParams_.Set("prettyPrint", "false")
  2724  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/jobTemplates")
  2725  	urls += "?" + c.urlParams_.Encode()
  2726  	req, err := http.NewRequest("GET", urls, body)
  2727  	if err != nil {
  2728  		return nil, err
  2729  	}
  2730  	req.Header = reqHeaders
  2731  	googleapi.Expand(req.URL, map[string]string{
  2732  		"parent": c.parent,
  2733  	})
  2734  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2735  }
  2736  
  2737  // Do executes the "transcoder.projects.locations.jobTemplates.list" call.
  2738  // Exactly one of *ListJobTemplatesResponse or error will be non-nil.
  2739  // Any non-2xx status code is an error. Response headers are in either
  2740  // *ListJobTemplatesResponse.ServerResponse.Header or (if a response was
  2741  // returned at all) in error.(*googleapi.Error).Header. Use
  2742  // googleapi.IsNotModified to check whether the returned error was
  2743  // because http.StatusNotModified was returned.
  2744  func (c *ProjectsLocationsJobTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListJobTemplatesResponse, error) {
  2745  	gensupport.SetOptions(c.urlParams_, opts...)
  2746  	res, err := c.doRequest("json")
  2747  	if res != nil && res.StatusCode == http.StatusNotModified {
  2748  		if res.Body != nil {
  2749  			res.Body.Close()
  2750  		}
  2751  		return nil, &googleapi.Error{
  2752  			Code:   res.StatusCode,
  2753  			Header: res.Header,
  2754  		}
  2755  	}
  2756  	if err != nil {
  2757  		return nil, err
  2758  	}
  2759  	defer googleapi.CloseBody(res)
  2760  	if err := googleapi.CheckResponse(res); err != nil {
  2761  		return nil, err
  2762  	}
  2763  	ret := &ListJobTemplatesResponse{
  2764  		ServerResponse: googleapi.ServerResponse{
  2765  			Header:         res.Header,
  2766  			HTTPStatusCode: res.StatusCode,
  2767  		},
  2768  	}
  2769  	target := &ret
  2770  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2771  		return nil, err
  2772  	}
  2773  	return ret, nil
  2774  	// {
  2775  	//   "description": "Lists job templates in the specified region.",
  2776  	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobTemplates",
  2777  	//   "httpMethod": "GET",
  2778  	//   "id": "transcoder.projects.locations.jobTemplates.list",
  2779  	//   "parameterOrder": [
  2780  	//     "parent"
  2781  	//   ],
  2782  	//   "parameters": {
  2783  	//     "pageSize": {
  2784  	//       "description": "The maximum number of items to return.",
  2785  	//       "format": "int32",
  2786  	//       "location": "query",
  2787  	//       "type": "integer"
  2788  	//     },
  2789  	//     "pageToken": {
  2790  	//       "description": "The `next_page_token` value returned from a previous List request, if any.",
  2791  	//       "location": "query",
  2792  	//       "type": "string"
  2793  	//     },
  2794  	//     "parent": {
  2795  	//       "description": "Required. The parent location from which to retrieve the collection of job templates. Format: `projects/{project}/locations/{location}`",
  2796  	//       "location": "path",
  2797  	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
  2798  	//       "required": true,
  2799  	//       "type": "string"
  2800  	//     }
  2801  	//   },
  2802  	//   "path": "v1beta1/{+parent}/jobTemplates",
  2803  	//   "response": {
  2804  	//     "$ref": "ListJobTemplatesResponse"
  2805  	//   },
  2806  	//   "scopes": [
  2807  	//     "https://www.googleapis.com/auth/cloud-platform"
  2808  	//   ]
  2809  	// }
  2810  
  2811  }
  2812  
  2813  // Pages invokes f for each page of results.
  2814  // A non-nil error returned from f will halt the iteration.
  2815  // The provided context supersedes any context provided to the Context method.
  2816  func (c *ProjectsLocationsJobTemplatesListCall) Pages(ctx context.Context, f func(*ListJobTemplatesResponse) error) error {
  2817  	c.ctx_ = ctx
  2818  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2819  	for {
  2820  		x, err := c.Do()
  2821  		if err != nil {
  2822  			return err
  2823  		}
  2824  		if err := f(x); err != nil {
  2825  			return err
  2826  		}
  2827  		if x.NextPageToken == "" {
  2828  			return nil
  2829  		}
  2830  		c.PageToken(x.NextPageToken)
  2831  	}
  2832  }
  2833  
  2834  // method id "transcoder.projects.locations.jobs.create":
  2835  
  2836  type ProjectsLocationsJobsCreateCall struct {
  2837  	s          *Service
  2838  	parent     string
  2839  	job        *Job
  2840  	urlParams_ gensupport.URLParams
  2841  	ctx_       context.Context
  2842  	header_    http.Header
  2843  }
  2844  
  2845  // Create: Creates a job in the specified region.
  2846  //
  2847  //   - parent: The parent location to create and process this job. Format:
  2848  //     `projects/{project}/locations/{location}`.
  2849  func (r *ProjectsLocationsJobsService) Create(parent string, job *Job) *ProjectsLocationsJobsCreateCall {
  2850  	c := &ProjectsLocationsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2851  	c.parent = parent
  2852  	c.job = job
  2853  	return c
  2854  }
  2855  
  2856  // Fields allows partial responses to be retrieved. See
  2857  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2858  // for more information.
  2859  func (c *ProjectsLocationsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsCreateCall {
  2860  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2861  	return c
  2862  }
  2863  
  2864  // Context sets the context to be used in this call's Do method. Any
  2865  // pending HTTP request will be aborted if the provided context is
  2866  // canceled.
  2867  func (c *ProjectsLocationsJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsJobsCreateCall {
  2868  	c.ctx_ = ctx
  2869  	return c
  2870  }
  2871  
  2872  // Header returns an http.Header that can be modified by the caller to
  2873  // add HTTP headers to the request.
  2874  func (c *ProjectsLocationsJobsCreateCall) Header() http.Header {
  2875  	if c.header_ == nil {
  2876  		c.header_ = make(http.Header)
  2877  	}
  2878  	return c.header_
  2879  }
  2880  
  2881  func (c *ProjectsLocationsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  2882  	reqHeaders := make(http.Header)
  2883  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220125")
  2884  	for k, v := range c.header_ {
  2885  		reqHeaders[k] = v
  2886  	}
  2887  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2888  	var body io.Reader = nil
  2889  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
  2890  	if err != nil {
  2891  		return nil, err
  2892  	}
  2893  	reqHeaders.Set("Content-Type", "application/json")
  2894  	c.urlParams_.Set("alt", alt)
  2895  	c.urlParams_.Set("prettyPrint", "false")
  2896  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/jobs")
  2897  	urls += "?" + c.urlParams_.Encode()
  2898  	req, err := http.NewRequest("POST", urls, body)
  2899  	if err != nil {
  2900  		return nil, err
  2901  	}
  2902  	req.Header = reqHeaders
  2903  	googleapi.Expand(req.URL, map[string]string{
  2904  		"parent": c.parent,
  2905  	})
  2906  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2907  }
  2908  
  2909  // Do executes the "transcoder.projects.locations.jobs.create" call.
  2910  // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  2911  // is an error. Response headers are in either
  2912  // *Job.ServerResponse.Header or (if a response was returned at all) in
  2913  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2914  // whether the returned error was because http.StatusNotModified was
  2915  // returned.
  2916  func (c *ProjectsLocationsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  2917  	gensupport.SetOptions(c.urlParams_, opts...)
  2918  	res, err := c.doRequest("json")
  2919  	if res != nil && res.StatusCode == http.StatusNotModified {
  2920  		if res.Body != nil {
  2921  			res.Body.Close()
  2922  		}
  2923  		return nil, &googleapi.Error{
  2924  			Code:   res.StatusCode,
  2925  			Header: res.Header,
  2926  		}
  2927  	}
  2928  	if err != nil {
  2929  		return nil, err
  2930  	}
  2931  	defer googleapi.CloseBody(res)
  2932  	if err := googleapi.CheckResponse(res); err != nil {
  2933  		return nil, err
  2934  	}
  2935  	ret := &Job{
  2936  		ServerResponse: googleapi.ServerResponse{
  2937  			Header:         res.Header,
  2938  			HTTPStatusCode: res.StatusCode,
  2939  		},
  2940  	}
  2941  	target := &ret
  2942  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2943  		return nil, err
  2944  	}
  2945  	return ret, nil
  2946  	// {
  2947  	//   "description": "Creates a job in the specified region.",
  2948  	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobs",
  2949  	//   "httpMethod": "POST",
  2950  	//   "id": "transcoder.projects.locations.jobs.create",
  2951  	//   "parameterOrder": [
  2952  	//     "parent"
  2953  	//   ],
  2954  	//   "parameters": {
  2955  	//     "parent": {
  2956  	//       "description": "Required. The parent location to create and process this job. Format: `projects/{project}/locations/{location}`",
  2957  	//       "location": "path",
  2958  	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
  2959  	//       "required": true,
  2960  	//       "type": "string"
  2961  	//     }
  2962  	//   },
  2963  	//   "path": "v1beta1/{+parent}/jobs",
  2964  	//   "request": {
  2965  	//     "$ref": "Job"
  2966  	//   },
  2967  	//   "response": {
  2968  	//     "$ref": "Job"
  2969  	//   },
  2970  	//   "scopes": [
  2971  	//     "https://www.googleapis.com/auth/cloud-platform"
  2972  	//   ]
  2973  	// }
  2974  
  2975  }
  2976  
  2977  // method id "transcoder.projects.locations.jobs.delete":
  2978  
  2979  type ProjectsLocationsJobsDeleteCall struct {
  2980  	s          *Service
  2981  	name       string
  2982  	urlParams_ gensupport.URLParams
  2983  	ctx_       context.Context
  2984  	header_    http.Header
  2985  }
  2986  
  2987  // Delete: Deletes a job.
  2988  //
  2989  //   - name: The name of the job to delete. Format:
  2990  //     `projects/{project}/locations/{location}/jobs/{job}`.
  2991  func (r *ProjectsLocationsJobsService) Delete(name string) *ProjectsLocationsJobsDeleteCall {
  2992  	c := &ProjectsLocationsJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2993  	c.name = name
  2994  	return c
  2995  }
  2996  
  2997  // Fields allows partial responses to be retrieved. See
  2998  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2999  // for more information.
  3000  func (c *ProjectsLocationsJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDeleteCall {
  3001  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3002  	return c
  3003  }
  3004  
  3005  // Context sets the context to be used in this call's Do method. Any
  3006  // pending HTTP request will be aborted if the provided context is
  3007  // canceled.
  3008  func (c *ProjectsLocationsJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsJobsDeleteCall {
  3009  	c.ctx_ = ctx
  3010  	return c
  3011  }
  3012  
  3013  // Header returns an http.Header that can be modified by the caller to
  3014  // add HTTP headers to the request.
  3015  func (c *ProjectsLocationsJobsDeleteCall) Header() http.Header {
  3016  	if c.header_ == nil {
  3017  		c.header_ = make(http.Header)
  3018  	}
  3019  	return c.header_
  3020  }
  3021  
  3022  func (c *ProjectsLocationsJobsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3023  	reqHeaders := make(http.Header)
  3024  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220125")
  3025  	for k, v := range c.header_ {
  3026  		reqHeaders[k] = v
  3027  	}
  3028  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3029  	var body io.Reader = nil
  3030  	c.urlParams_.Set("alt", alt)
  3031  	c.urlParams_.Set("prettyPrint", "false")
  3032  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3033  	urls += "?" + c.urlParams_.Encode()
  3034  	req, err := http.NewRequest("DELETE", urls, body)
  3035  	if err != nil {
  3036  		return nil, err
  3037  	}
  3038  	req.Header = reqHeaders
  3039  	googleapi.Expand(req.URL, map[string]string{
  3040  		"name": c.name,
  3041  	})
  3042  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3043  }
  3044  
  3045  // Do executes the "transcoder.projects.locations.jobs.delete" call.
  3046  // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  3047  // code is an error. Response headers are in either
  3048  // *Empty.ServerResponse.Header or (if a response was returned at all)
  3049  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3050  // check whether the returned error was because http.StatusNotModified
  3051  // was returned.
  3052  func (c *ProjectsLocationsJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3053  	gensupport.SetOptions(c.urlParams_, opts...)
  3054  	res, err := c.doRequest("json")
  3055  	if res != nil && res.StatusCode == http.StatusNotModified {
  3056  		if res.Body != nil {
  3057  			res.Body.Close()
  3058  		}
  3059  		return nil, &googleapi.Error{
  3060  			Code:   res.StatusCode,
  3061  			Header: res.Header,
  3062  		}
  3063  	}
  3064  	if err != nil {
  3065  		return nil, err
  3066  	}
  3067  	defer googleapi.CloseBody(res)
  3068  	if err := googleapi.CheckResponse(res); err != nil {
  3069  		return nil, err
  3070  	}
  3071  	ret := &Empty{
  3072  		ServerResponse: googleapi.ServerResponse{
  3073  			Header:         res.Header,
  3074  			HTTPStatusCode: res.StatusCode,
  3075  		},
  3076  	}
  3077  	target := &ret
  3078  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3079  		return nil, err
  3080  	}
  3081  	return ret, nil
  3082  	// {
  3083  	//   "description": "Deletes a job.",
  3084  	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}",
  3085  	//   "httpMethod": "DELETE",
  3086  	//   "id": "transcoder.projects.locations.jobs.delete",
  3087  	//   "parameterOrder": [
  3088  	//     "name"
  3089  	//   ],
  3090  	//   "parameters": {
  3091  	//     "name": {
  3092  	//       "description": "Required. The name of the job to delete. Format: `projects/{project}/locations/{location}/jobs/{job}`",
  3093  	//       "location": "path",
  3094  	//       "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$",
  3095  	//       "required": true,
  3096  	//       "type": "string"
  3097  	//     }
  3098  	//   },
  3099  	//   "path": "v1beta1/{+name}",
  3100  	//   "response": {
  3101  	//     "$ref": "Empty"
  3102  	//   },
  3103  	//   "scopes": [
  3104  	//     "https://www.googleapis.com/auth/cloud-platform"
  3105  	//   ]
  3106  	// }
  3107  
  3108  }
  3109  
  3110  // method id "transcoder.projects.locations.jobs.get":
  3111  
  3112  type ProjectsLocationsJobsGetCall struct {
  3113  	s            *Service
  3114  	name         string
  3115  	urlParams_   gensupport.URLParams
  3116  	ifNoneMatch_ string
  3117  	ctx_         context.Context
  3118  	header_      http.Header
  3119  }
  3120  
  3121  // Get: Returns the job data.
  3122  //
  3123  //   - name: The name of the job to retrieve. Format:
  3124  //     `projects/{project}/locations/{location}/jobs/{job}`.
  3125  func (r *ProjectsLocationsJobsService) Get(name string) *ProjectsLocationsJobsGetCall {
  3126  	c := &ProjectsLocationsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3127  	c.name = name
  3128  	return c
  3129  }
  3130  
  3131  // Fields allows partial responses to be retrieved. See
  3132  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3133  // for more information.
  3134  func (c *ProjectsLocationsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetCall {
  3135  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3136  	return c
  3137  }
  3138  
  3139  // IfNoneMatch sets the optional parameter which makes the operation
  3140  // fail if the object's ETag matches the given value. This is useful for
  3141  // getting updates only after the object has changed since the last
  3142  // request. Use googleapi.IsNotModified to check whether the response
  3143  // error from Do is the result of In-None-Match.
  3144  func (c *ProjectsLocationsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetCall {
  3145  	c.ifNoneMatch_ = entityTag
  3146  	return c
  3147  }
  3148  
  3149  // Context sets the context to be used in this call's Do method. Any
  3150  // pending HTTP request will be aborted if the provided context is
  3151  // canceled.
  3152  func (c *ProjectsLocationsJobsGetCall) Context(ctx context.Context) *ProjectsLocationsJobsGetCall {
  3153  	c.ctx_ = ctx
  3154  	return c
  3155  }
  3156  
  3157  // Header returns an http.Header that can be modified by the caller to
  3158  // add HTTP headers to the request.
  3159  func (c *ProjectsLocationsJobsGetCall) Header() http.Header {
  3160  	if c.header_ == nil {
  3161  		c.header_ = make(http.Header)
  3162  	}
  3163  	return c.header_
  3164  }
  3165  
  3166  func (c *ProjectsLocationsJobsGetCall) doRequest(alt string) (*http.Response, error) {
  3167  	reqHeaders := make(http.Header)
  3168  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220125")
  3169  	for k, v := range c.header_ {
  3170  		reqHeaders[k] = v
  3171  	}
  3172  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3173  	if c.ifNoneMatch_ != "" {
  3174  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3175  	}
  3176  	var body io.Reader = nil
  3177  	c.urlParams_.Set("alt", alt)
  3178  	c.urlParams_.Set("prettyPrint", "false")
  3179  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3180  	urls += "?" + c.urlParams_.Encode()
  3181  	req, err := http.NewRequest("GET", urls, body)
  3182  	if err != nil {
  3183  		return nil, err
  3184  	}
  3185  	req.Header = reqHeaders
  3186  	googleapi.Expand(req.URL, map[string]string{
  3187  		"name": c.name,
  3188  	})
  3189  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3190  }
  3191  
  3192  // Do executes the "transcoder.projects.locations.jobs.get" call.
  3193  // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  3194  // is an error. Response headers are in either
  3195  // *Job.ServerResponse.Header or (if a response was returned at all) in
  3196  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3197  // whether the returned error was because http.StatusNotModified was
  3198  // returned.
  3199  func (c *ProjectsLocationsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  3200  	gensupport.SetOptions(c.urlParams_, opts...)
  3201  	res, err := c.doRequest("json")
  3202  	if res != nil && res.StatusCode == http.StatusNotModified {
  3203  		if res.Body != nil {
  3204  			res.Body.Close()
  3205  		}
  3206  		return nil, &googleapi.Error{
  3207  			Code:   res.StatusCode,
  3208  			Header: res.Header,
  3209  		}
  3210  	}
  3211  	if err != nil {
  3212  		return nil, err
  3213  	}
  3214  	defer googleapi.CloseBody(res)
  3215  	if err := googleapi.CheckResponse(res); err != nil {
  3216  		return nil, err
  3217  	}
  3218  	ret := &Job{
  3219  		ServerResponse: googleapi.ServerResponse{
  3220  			Header:         res.Header,
  3221  			HTTPStatusCode: res.StatusCode,
  3222  		},
  3223  	}
  3224  	target := &ret
  3225  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3226  		return nil, err
  3227  	}
  3228  	return ret, nil
  3229  	// {
  3230  	//   "description": "Returns the job data.",
  3231  	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}",
  3232  	//   "httpMethod": "GET",
  3233  	//   "id": "transcoder.projects.locations.jobs.get",
  3234  	//   "parameterOrder": [
  3235  	//     "name"
  3236  	//   ],
  3237  	//   "parameters": {
  3238  	//     "name": {
  3239  	//       "description": "Required. The name of the job to retrieve. Format: `projects/{project}/locations/{location}/jobs/{job}`",
  3240  	//       "location": "path",
  3241  	//       "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$",
  3242  	//       "required": true,
  3243  	//       "type": "string"
  3244  	//     }
  3245  	//   },
  3246  	//   "path": "v1beta1/{+name}",
  3247  	//   "response": {
  3248  	//     "$ref": "Job"
  3249  	//   },
  3250  	//   "scopes": [
  3251  	//     "https://www.googleapis.com/auth/cloud-platform"
  3252  	//   ]
  3253  	// }
  3254  
  3255  }
  3256  
  3257  // method id "transcoder.projects.locations.jobs.list":
  3258  
  3259  type ProjectsLocationsJobsListCall struct {
  3260  	s            *Service
  3261  	parent       string
  3262  	urlParams_   gensupport.URLParams
  3263  	ifNoneMatch_ string
  3264  	ctx_         context.Context
  3265  	header_      http.Header
  3266  }
  3267  
  3268  // List: Lists jobs in the specified region.
  3269  //
  3270  // - parent: Format: `projects/{project}/locations/{location}`.
  3271  func (r *ProjectsLocationsJobsService) List(parent string) *ProjectsLocationsJobsListCall {
  3272  	c := &ProjectsLocationsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3273  	c.parent = parent
  3274  	return c
  3275  }
  3276  
  3277  // PageSize sets the optional parameter "pageSize": The maximum number
  3278  // of items to return.
  3279  func (c *ProjectsLocationsJobsListCall) PageSize(pageSize int64) *ProjectsLocationsJobsListCall {
  3280  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3281  	return c
  3282  }
  3283  
  3284  // PageToken sets the optional parameter "pageToken": The
  3285  // `next_page_token` value returned from a previous List request, if
  3286  // any.
  3287  func (c *ProjectsLocationsJobsListCall) PageToken(pageToken string) *ProjectsLocationsJobsListCall {
  3288  	c.urlParams_.Set("pageToken", pageToken)
  3289  	return c
  3290  }
  3291  
  3292  // Fields allows partial responses to be retrieved. See
  3293  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3294  // for more information.
  3295  func (c *ProjectsLocationsJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsListCall {
  3296  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3297  	return c
  3298  }
  3299  
  3300  // IfNoneMatch sets the optional parameter which makes the operation
  3301  // fail if the object's ETag matches the given value. This is useful for
  3302  // getting updates only after the object has changed since the last
  3303  // request. Use googleapi.IsNotModified to check whether the response
  3304  // error from Do is the result of In-None-Match.
  3305  func (c *ProjectsLocationsJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsListCall {
  3306  	c.ifNoneMatch_ = entityTag
  3307  	return c
  3308  }
  3309  
  3310  // Context sets the context to be used in this call's Do method. Any
  3311  // pending HTTP request will be aborted if the provided context is
  3312  // canceled.
  3313  func (c *ProjectsLocationsJobsListCall) Context(ctx context.Context) *ProjectsLocationsJobsListCall {
  3314  	c.ctx_ = ctx
  3315  	return c
  3316  }
  3317  
  3318  // Header returns an http.Header that can be modified by the caller to
  3319  // add HTTP headers to the request.
  3320  func (c *ProjectsLocationsJobsListCall) Header() http.Header {
  3321  	if c.header_ == nil {
  3322  		c.header_ = make(http.Header)
  3323  	}
  3324  	return c.header_
  3325  }
  3326  
  3327  func (c *ProjectsLocationsJobsListCall) doRequest(alt string) (*http.Response, error) {
  3328  	reqHeaders := make(http.Header)
  3329  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220125")
  3330  	for k, v := range c.header_ {
  3331  		reqHeaders[k] = v
  3332  	}
  3333  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3334  	if c.ifNoneMatch_ != "" {
  3335  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3336  	}
  3337  	var body io.Reader = nil
  3338  	c.urlParams_.Set("alt", alt)
  3339  	c.urlParams_.Set("prettyPrint", "false")
  3340  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/jobs")
  3341  	urls += "?" + c.urlParams_.Encode()
  3342  	req, err := http.NewRequest("GET", urls, body)
  3343  	if err != nil {
  3344  		return nil, err
  3345  	}
  3346  	req.Header = reqHeaders
  3347  	googleapi.Expand(req.URL, map[string]string{
  3348  		"parent": c.parent,
  3349  	})
  3350  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3351  }
  3352  
  3353  // Do executes the "transcoder.projects.locations.jobs.list" call.
  3354  // Exactly one of *ListJobsResponse or error will be non-nil. Any
  3355  // non-2xx status code is an error. Response headers are in either
  3356  // *ListJobsResponse.ServerResponse.Header or (if a response was
  3357  // returned at all) in error.(*googleapi.Error).Header. Use
  3358  // googleapi.IsNotModified to check whether the returned error was
  3359  // because http.StatusNotModified was returned.
  3360  func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
  3361  	gensupport.SetOptions(c.urlParams_, opts...)
  3362  	res, err := c.doRequest("json")
  3363  	if res != nil && res.StatusCode == http.StatusNotModified {
  3364  		if res.Body != nil {
  3365  			res.Body.Close()
  3366  		}
  3367  		return nil, &googleapi.Error{
  3368  			Code:   res.StatusCode,
  3369  			Header: res.Header,
  3370  		}
  3371  	}
  3372  	if err != nil {
  3373  		return nil, err
  3374  	}
  3375  	defer googleapi.CloseBody(res)
  3376  	if err := googleapi.CheckResponse(res); err != nil {
  3377  		return nil, err
  3378  	}
  3379  	ret := &ListJobsResponse{
  3380  		ServerResponse: googleapi.ServerResponse{
  3381  			Header:         res.Header,
  3382  			HTTPStatusCode: res.StatusCode,
  3383  		},
  3384  	}
  3385  	target := &ret
  3386  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3387  		return nil, err
  3388  	}
  3389  	return ret, nil
  3390  	// {
  3391  	//   "description": "Lists jobs in the specified region.",
  3392  	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobs",
  3393  	//   "httpMethod": "GET",
  3394  	//   "id": "transcoder.projects.locations.jobs.list",
  3395  	//   "parameterOrder": [
  3396  	//     "parent"
  3397  	//   ],
  3398  	//   "parameters": {
  3399  	//     "pageSize": {
  3400  	//       "description": "The maximum number of items to return.",
  3401  	//       "format": "int32",
  3402  	//       "location": "query",
  3403  	//       "type": "integer"
  3404  	//     },
  3405  	//     "pageToken": {
  3406  	//       "description": "The `next_page_token` value returned from a previous List request, if any.",
  3407  	//       "location": "query",
  3408  	//       "type": "string"
  3409  	//     },
  3410  	//     "parent": {
  3411  	//       "description": "Required. Format: `projects/{project}/locations/{location}`",
  3412  	//       "location": "path",
  3413  	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
  3414  	//       "required": true,
  3415  	//       "type": "string"
  3416  	//     }
  3417  	//   },
  3418  	//   "path": "v1beta1/{+parent}/jobs",
  3419  	//   "response": {
  3420  	//     "$ref": "ListJobsResponse"
  3421  	//   },
  3422  	//   "scopes": [
  3423  	//     "https://www.googleapis.com/auth/cloud-platform"
  3424  	//   ]
  3425  	// }
  3426  
  3427  }
  3428  
  3429  // Pages invokes f for each page of results.
  3430  // A non-nil error returned from f will halt the iteration.
  3431  // The provided context supersedes any context provided to the Context method.
  3432  func (c *ProjectsLocationsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
  3433  	c.ctx_ = ctx
  3434  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3435  	for {
  3436  		x, err := c.Do()
  3437  		if err != nil {
  3438  			return err
  3439  		}
  3440  		if err := f(x); err != nil {
  3441  			return err
  3442  		}
  3443  		if x.NextPageToken == "" {
  3444  			return nil
  3445  		}
  3446  		c.PageToken(x.NextPageToken)
  3447  	}
  3448  }
  3449  

View as plain text