...

Source file src/google.golang.org/api/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go

Documentation: google.golang.org/api/firebaseappdistribution/v1alpha

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package firebaseappdistribution provides access to the Firebase App Distribution API.
     8  //
     9  // For product documentation, see: https://firebase.google.com/products/app-distribution
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/firebaseappdistribution/v1alpha"
    27  //	...
    28  //	ctx := context.Background()
    29  //	firebaseappdistributionService, err := firebaseappdistribution.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	firebaseappdistributionService, err := firebaseappdistribution.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	firebaseappdistributionService, err := firebaseappdistribution.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package firebaseappdistribution // import "google.golang.org/api/firebaseappdistribution/v1alpha"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "firebaseappdistribution:v1alpha"
    90  const apiName = "firebaseappdistribution"
    91  const apiVersion = "v1alpha"
    92  const basePath = "https://firebaseappdistribution.googleapis.com/"
    93  const basePathTemplate = "https://firebaseappdistribution.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://firebaseappdistribution.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Apps = NewAppsService(s)
   139  	s.Projects = NewProjectsService(s)
   140  	return s, nil
   141  }
   142  
   143  type Service struct {
   144  	client    *http.Client
   145  	BasePath  string // API endpoint base URL
   146  	UserAgent string // optional additional User-Agent fragment
   147  
   148  	Apps *AppsService
   149  
   150  	Projects *ProjectsService
   151  }
   152  
   153  func (s *Service) userAgent() string {
   154  	if s.UserAgent == "" {
   155  		return googleapi.UserAgent
   156  	}
   157  	return googleapi.UserAgent + " " + s.UserAgent
   158  }
   159  
   160  func NewAppsService(s *Service) *AppsService {
   161  	rs := &AppsService{s: s}
   162  	rs.ReleaseByHash = NewAppsReleaseByHashService(s)
   163  	rs.Releases = NewAppsReleasesService(s)
   164  	rs.Testers = NewAppsTestersService(s)
   165  	rs.UploadStatus = NewAppsUploadStatusService(s)
   166  	return rs
   167  }
   168  
   169  type AppsService struct {
   170  	s *Service
   171  
   172  	ReleaseByHash *AppsReleaseByHashService
   173  
   174  	Releases *AppsReleasesService
   175  
   176  	Testers *AppsTestersService
   177  
   178  	UploadStatus *AppsUploadStatusService
   179  }
   180  
   181  func NewAppsReleaseByHashService(s *Service) *AppsReleaseByHashService {
   182  	rs := &AppsReleaseByHashService{s: s}
   183  	return rs
   184  }
   185  
   186  type AppsReleaseByHashService struct {
   187  	s *Service
   188  }
   189  
   190  func NewAppsReleasesService(s *Service) *AppsReleasesService {
   191  	rs := &AppsReleasesService{s: s}
   192  	rs.Notes = NewAppsReleasesNotesService(s)
   193  	return rs
   194  }
   195  
   196  type AppsReleasesService struct {
   197  	s *Service
   198  
   199  	Notes *AppsReleasesNotesService
   200  }
   201  
   202  func NewAppsReleasesNotesService(s *Service) *AppsReleasesNotesService {
   203  	rs := &AppsReleasesNotesService{s: s}
   204  	return rs
   205  }
   206  
   207  type AppsReleasesNotesService struct {
   208  	s *Service
   209  }
   210  
   211  func NewAppsTestersService(s *Service) *AppsTestersService {
   212  	rs := &AppsTestersService{s: s}
   213  	return rs
   214  }
   215  
   216  type AppsTestersService struct {
   217  	s *Service
   218  }
   219  
   220  func NewAppsUploadStatusService(s *Service) *AppsUploadStatusService {
   221  	rs := &AppsUploadStatusService{s: s}
   222  	return rs
   223  }
   224  
   225  type AppsUploadStatusService struct {
   226  	s *Service
   227  }
   228  
   229  func NewProjectsService(s *Service) *ProjectsService {
   230  	rs := &ProjectsService{s: s}
   231  	rs.Apps = NewProjectsAppsService(s)
   232  	rs.Testers = NewProjectsTestersService(s)
   233  	return rs
   234  }
   235  
   236  type ProjectsService struct {
   237  	s *Service
   238  
   239  	Apps *ProjectsAppsService
   240  
   241  	Testers *ProjectsTestersService
   242  }
   243  
   244  func NewProjectsAppsService(s *Service) *ProjectsAppsService {
   245  	rs := &ProjectsAppsService{s: s}
   246  	rs.Releases = NewProjectsAppsReleasesService(s)
   247  	return rs
   248  }
   249  
   250  type ProjectsAppsService struct {
   251  	s *Service
   252  
   253  	Releases *ProjectsAppsReleasesService
   254  }
   255  
   256  func NewProjectsAppsReleasesService(s *Service) *ProjectsAppsReleasesService {
   257  	rs := &ProjectsAppsReleasesService{s: s}
   258  	rs.Tests = NewProjectsAppsReleasesTestsService(s)
   259  	return rs
   260  }
   261  
   262  type ProjectsAppsReleasesService struct {
   263  	s *Service
   264  
   265  	Tests *ProjectsAppsReleasesTestsService
   266  }
   267  
   268  func NewProjectsAppsReleasesTestsService(s *Service) *ProjectsAppsReleasesTestsService {
   269  	rs := &ProjectsAppsReleasesTestsService{s: s}
   270  	return rs
   271  }
   272  
   273  type ProjectsAppsReleasesTestsService struct {
   274  	s *Service
   275  }
   276  
   277  func NewProjectsTestersService(s *Service) *ProjectsTestersService {
   278  	rs := &ProjectsTestersService{s: s}
   279  	return rs
   280  }
   281  
   282  type ProjectsTestersService struct {
   283  	s *Service
   284  }
   285  
   286  // GoogleFirebaseAppdistroV1Release: A release of a Firebase app.
   287  type GoogleFirebaseAppdistroV1Release struct {
   288  	// BinaryDownloadUri: Output only. A signed link (which expires in one hour) to
   289  	// directly download the app binary (IPA/APK/AAB) file.
   290  	BinaryDownloadUri string `json:"binaryDownloadUri,omitempty"`
   291  	// BuildVersion: Output only. Build version of the release. For an Android
   292  	// release, the build version is the `versionCode`. For an iOS release, the
   293  	// build version is the `CFBundleVersion`.
   294  	BuildVersion string `json:"buildVersion,omitempty"`
   295  	// CreateTime: Output only. The time the release was created.
   296  	CreateTime string `json:"createTime,omitempty"`
   297  	// DisplayVersion: Output only. Display version of the release. For an Android
   298  	// release, the display version is the `versionName`. For an iOS release, the
   299  	// display version is the `CFBundleShortVersionString`.
   300  	DisplayVersion string `json:"displayVersion,omitempty"`
   301  	// FirebaseConsoleUri: Output only. A link to the Firebase console displaying a
   302  	// single release.
   303  	FirebaseConsoleUri string `json:"firebaseConsoleUri,omitempty"`
   304  	// Name: The name of the release resource. Format:
   305  	// `projects/{project_number}/apps/{app_id}/releases/{release_id}`
   306  	Name string `json:"name,omitempty"`
   307  	// ReleaseNotes: Notes of the release.
   308  	ReleaseNotes *GoogleFirebaseAppdistroV1ReleaseNotes `json:"releaseNotes,omitempty"`
   309  	// TestingUri: Output only. A link to the release in the tester web clip or
   310  	// Android app that lets testers (which were granted access to the app) view
   311  	// release notes and install the app onto their devices.
   312  	TestingUri string `json:"testingUri,omitempty"`
   313  	// ForceSendFields is a list of field names (e.g. "BinaryDownloadUri") to
   314  	// unconditionally include in API requests. By default, fields with empty or
   315  	// default values are omitted from API requests. See
   316  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   317  	// details.
   318  	ForceSendFields []string `json:"-"`
   319  	// NullFields is a list of field names (e.g. "BinaryDownloadUri") to include in
   320  	// API requests with the JSON null value. By default, fields with empty values
   321  	// are omitted from API requests. See
   322  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   323  	NullFields []string `json:"-"`
   324  }
   325  
   326  func (s *GoogleFirebaseAppdistroV1Release) MarshalJSON() ([]byte, error) {
   327  	type NoMethod GoogleFirebaseAppdistroV1Release
   328  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   329  }
   330  
   331  // GoogleFirebaseAppdistroV1ReleaseNotes: Notes that belong to a release.
   332  type GoogleFirebaseAppdistroV1ReleaseNotes struct {
   333  	// Text: The text of the release notes.
   334  	Text string `json:"text,omitempty"`
   335  	// ForceSendFields is a list of field names (e.g. "Text") to unconditionally
   336  	// include in API requests. By default, fields with empty or default values are
   337  	// omitted from API requests. See
   338  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   339  	// details.
   340  	ForceSendFields []string `json:"-"`
   341  	// NullFields is a list of field names (e.g. "Text") to include in API requests
   342  	// with the JSON null value. By default, fields with empty values are omitted
   343  	// from API requests. See
   344  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   345  	NullFields []string `json:"-"`
   346  }
   347  
   348  func (s *GoogleFirebaseAppdistroV1ReleaseNotes) MarshalJSON() ([]byte, error) {
   349  	type NoMethod GoogleFirebaseAppdistroV1ReleaseNotes
   350  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   351  }
   352  
   353  // GoogleFirebaseAppdistroV1UploadReleaseMetadata: Operation metadata for
   354  // `UploadRelease`.
   355  type GoogleFirebaseAppdistroV1UploadReleaseMetadata struct {
   356  }
   357  
   358  // GoogleFirebaseAppdistroV1UploadReleaseResponse: Response message for
   359  // `UploadRelease`.
   360  type GoogleFirebaseAppdistroV1UploadReleaseResponse struct {
   361  	// Release: Release associated with the uploaded binary.
   362  	Release *GoogleFirebaseAppdistroV1Release `json:"release,omitempty"`
   363  	// Result: Result of upload release.
   364  	//
   365  	// Possible values:
   366  	//   "UPLOAD_RELEASE_RESULT_UNSPECIFIED" - Upload binary result unspecified
   367  	//   "RELEASE_CREATED" - Upload binary resulted in a new release
   368  	//   "RELEASE_UPDATED" - Upload binary updated an existing release
   369  	//   "RELEASE_UNMODIFIED" - Upload binary resulted in a no-op. A release with
   370  	// the exact same binary already exists.
   371  	Result string `json:"result,omitempty"`
   372  	// ForceSendFields is a list of field names (e.g. "Release") to unconditionally
   373  	// include in API requests. By default, fields with empty or default values are
   374  	// omitted from API requests. See
   375  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   376  	// details.
   377  	ForceSendFields []string `json:"-"`
   378  	// NullFields is a list of field names (e.g. "Release") to include in API
   379  	// requests with the JSON null value. By default, fields with empty values are
   380  	// omitted from API requests. See
   381  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   382  	NullFields []string `json:"-"`
   383  }
   384  
   385  func (s *GoogleFirebaseAppdistroV1UploadReleaseResponse) MarshalJSON() ([]byte, error) {
   386  	type NoMethod GoogleFirebaseAppdistroV1UploadReleaseResponse
   387  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   388  }
   389  
   390  // GoogleFirebaseAppdistroV1alphaAabCertificate: App bundle test certificate
   391  type GoogleFirebaseAppdistroV1alphaAabCertificate struct {
   392  	// CertificateHashMd5: MD5 hash of the certificate used to resign the AAB
   393  	CertificateHashMd5 string `json:"certificateHashMd5,omitempty"`
   394  	// CertificateHashSha1: SHA1 hash of the certificate used to resign the AAB
   395  	CertificateHashSha1 string `json:"certificateHashSha1,omitempty"`
   396  	// CertificateHashSha256: SHA256 hash of the certificate used to resign the AAB
   397  	CertificateHashSha256 string `json:"certificateHashSha256,omitempty"`
   398  	// ForceSendFields is a list of field names (e.g. "CertificateHashMd5") to
   399  	// unconditionally include in API requests. By default, fields with empty or
   400  	// default values are omitted from API requests. See
   401  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   402  	// details.
   403  	ForceSendFields []string `json:"-"`
   404  	// NullFields is a list of field names (e.g. "CertificateHashMd5") to include
   405  	// in API requests with the JSON null value. By default, fields with empty
   406  	// values are omitted from API requests. See
   407  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   408  	NullFields []string `json:"-"`
   409  }
   410  
   411  func (s *GoogleFirebaseAppdistroV1alphaAabCertificate) MarshalJSON() ([]byte, error) {
   412  	type NoMethod GoogleFirebaseAppdistroV1alphaAabCertificate
   413  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   414  }
   415  
   416  type GoogleFirebaseAppdistroV1alphaApp struct {
   417  	// AabCertificate: App bundle test certificate generated for the app.
   418  	AabCertificate *GoogleFirebaseAppdistroV1alphaAabCertificate `json:"aabCertificate,omitempty"`
   419  	// AabState: App bundle state. Only valid for android apps. The app_view field
   420  	// in the request must be set to FULL in order for this to be populated.
   421  	//
   422  	// Possible values:
   423  	//   "AAB_STATE_UNSPECIFIED" - Aab state unspecified
   424  	//   "ACTIVE" - App can receive app bundle uploads
   425  	//   "PLAY_ACCOUNT_NOT_LINKED" - Firebase project is not linked to a Play
   426  	// developer account
   427  	//   "NO_APP_WITH_GIVEN_BUNDLE_ID_IN_PLAY_ACCOUNT" - There is no app in linked
   428  	// Play developer account with the same bundle id
   429  	//   "APP_NOT_PUBLISHED" - The app in Play developer account is not in a
   430  	// published state
   431  	//   "AAB_STATE_UNAVAILABLE" - Play App status is unavailable
   432  	//   "PLAY_IAS_TERMS_NOT_ACCEPTED" - Play IAS terms not accepted
   433  	AabState string `json:"aabState,omitempty"`
   434  	// AppId: Firebase gmp app id
   435  	AppId string `json:"appId,omitempty"`
   436  	// BundleId: Bundle identifier
   437  	BundleId string `json:"bundleId,omitempty"`
   438  	// ContactEmail: Developer contact email for testers to reach out to about
   439  	// privacy or support issues.
   440  	ContactEmail string `json:"contactEmail,omitempty"`
   441  	// Platform: iOS or Android
   442  	Platform string `json:"platform,omitempty"`
   443  	// ProjectNumber: Project number of the Firebase project, for example
   444  	// 300830567303.
   445  	ProjectNumber string `json:"projectNumber,omitempty"`
   446  
   447  	// ServerResponse contains the HTTP response code and headers from the server.
   448  	googleapi.ServerResponse `json:"-"`
   449  	// ForceSendFields is a list of field names (e.g. "AabCertificate") to
   450  	// unconditionally include in API requests. By default, fields with empty or
   451  	// default values are omitted from API requests. See
   452  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   453  	// details.
   454  	ForceSendFields []string `json:"-"`
   455  	// NullFields is a list of field names (e.g. "AabCertificate") to include in
   456  	// API requests with the JSON null value. By default, fields with empty values
   457  	// are omitted from API requests. See
   458  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   459  	NullFields []string `json:"-"`
   460  }
   461  
   462  func (s *GoogleFirebaseAppdistroV1alphaApp) MarshalJSON() ([]byte, error) {
   463  	type NoMethod GoogleFirebaseAppdistroV1alphaApp
   464  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   465  }
   466  
   467  // GoogleFirebaseAppdistroV1alphaAppCrash: An app crash that occurred during an
   468  // automated test.
   469  type GoogleFirebaseAppdistroV1alphaAppCrash struct {
   470  	// Message: Output only. The message associated with the crash.
   471  	Message string `json:"message,omitempty"`
   472  	// StackTrace: Output only. The raw stack trace.
   473  	StackTrace string `json:"stackTrace,omitempty"`
   474  	// ForceSendFields is a list of field names (e.g. "Message") to unconditionally
   475  	// include in API requests. By default, fields with empty or default values are
   476  	// omitted from API requests. See
   477  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   478  	// details.
   479  	ForceSendFields []string `json:"-"`
   480  	// NullFields is a list of field names (e.g. "Message") to include in API
   481  	// requests with the JSON null value. By default, fields with empty values are
   482  	// omitted from API requests. See
   483  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   484  	NullFields []string `json:"-"`
   485  }
   486  
   487  func (s *GoogleFirebaseAppdistroV1alphaAppCrash) MarshalJSON() ([]byte, error) {
   488  	type NoMethod GoogleFirebaseAppdistroV1alphaAppCrash
   489  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   490  }
   491  
   492  type GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest struct {
   493  	// ReleaseNotes: The actual release notes body from the user
   494  	ReleaseNotes *GoogleFirebaseAppdistroV1alphaReleaseNotes `json:"releaseNotes,omitempty"`
   495  	// ForceSendFields is a list of field names (e.g. "ReleaseNotes") to
   496  	// unconditionally include in API requests. By default, fields with empty or
   497  	// default values are omitted from API requests. See
   498  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   499  	// details.
   500  	ForceSendFields []string `json:"-"`
   501  	// NullFields is a list of field names (e.g. "ReleaseNotes") to include in API
   502  	// requests with the JSON null value. By default, fields with empty values are
   503  	// omitted from API requests. See
   504  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   505  	NullFields []string `json:"-"`
   506  }
   507  
   508  func (s *GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest) MarshalJSON() ([]byte, error) {
   509  	type NoMethod GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest
   510  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   511  }
   512  
   513  type GoogleFirebaseAppdistroV1alphaCreateReleaseNotesResponse struct {
   514  	// ServerResponse contains the HTTP response code and headers from the server.
   515  	googleapi.ServerResponse `json:"-"`
   516  }
   517  
   518  // GoogleFirebaseAppdistroV1alphaDeviceExecution: The results of running an
   519  // automated test on a particular device.
   520  type GoogleFirebaseAppdistroV1alphaDeviceExecution struct {
   521  	// AppCrash: Output only. An app crash, if any occurred during the test.
   522  	AppCrash *GoogleFirebaseAppdistroV1alphaAppCrash `json:"appCrash,omitempty"`
   523  	// CrawlGraphUri: Output only. A URI to an image of the Robo crawl graph.
   524  	CrawlGraphUri string `json:"crawlGraphUri,omitempty"`
   525  	// Device: Required. The device that the test was run on.
   526  	Device *GoogleFirebaseAppdistroV1alphaTestDevice `json:"device,omitempty"`
   527  	// FailedReason: Output only. The reason why the test failed.
   528  	//
   529  	// Possible values:
   530  	//   "FAILED_REASON_UNSPECIFIED" - Reason unspecified.
   531  	//   "CRASHED" - The app crashed during the test.
   532  	//   "NOT_INSTALLED" - If an app is not installed and thus no test can be run
   533  	// with the app. This might be caused by trying to run a test on an unsupported
   534  	// platform.
   535  	//   "UNABLE_TO_CRAWL" - If the app could not be crawled (possibly because the
   536  	// app did not start).
   537  	//   "DEVICE_OUT_OF_MEMORY" - If the device ran out of memory during the test.
   538  	FailedReason string `json:"failedReason,omitempty"`
   539  	// InconclusiveReason: Output only. The reason why the test was inconclusive.
   540  	//
   541  	// Possible values:
   542  	//   "INCONCLUSIVE_REASON_UNSPECIFIED" - Reason unspecified.
   543  	//   "QUOTA_EXCEEDED" - Not enough quota remained to run the test.
   544  	//   "INFRASTRUCTURE_FAILURE" - The outcome of the test could not be determined
   545  	// because of a failure in the test running infrastructure.
   546  	//   "SERVICE_NOT_ACTIVATED" - A required cloud service api is not activated
   547  	// (Google Cloud Testing API or Cloud Tool Results API).
   548  	//   "NO_SIGNATURE" - The app was not signed.
   549  	//   "NO_LAUNCHER_ACTIVITY" - A main launcher activity could not be found.
   550  	//   "FORBIDDEN_PERMISSIONS" - The app declares one or more permissions that
   551  	// are not allowed.
   552  	//   "DEVICE_ADMIN_RECEIVER" - Device administrator applications are not
   553  	// allowed.
   554  	//   "NO_CODE_APK" - APK contains no code. See also
   555  	// https://developer.android.com/guide/topics/manifest/application-element.html#code
   556  	//   "INVALID_APK_PREVIEW_SDK" - APK is built for a preview SDK which is
   557  	// unsupported.
   558  	InconclusiveReason string `json:"inconclusiveReason,omitempty"`
   559  	// ResultsStoragePath: Output only. The path to a directory in Cloud Storage
   560  	// that will eventually contain the results for this execution. For example,
   561  	// gs://bucket/Nexus5-18-en-portrait.
   562  	ResultsStoragePath string `json:"resultsStoragePath,omitempty"`
   563  	// RoboStats: Output only. The statistics collected during the Robo test.
   564  	RoboStats *GoogleFirebaseAppdistroV1alphaRoboStats `json:"roboStats,omitempty"`
   565  	// ScreenshotUris: Output only. A list of screenshot image URIs taken from the
   566  	// Robo crawl. The file names are numbered by the order in which they were
   567  	// taken.
   568  	ScreenshotUris []string `json:"screenshotUris,omitempty"`
   569  	// State: Output only. The state of the test.
   570  	//
   571  	// Possible values:
   572  	//   "TEST_STATE_UNSPECIFIED" - Test state unspecified.
   573  	//   "IN_PROGRESS" - The test is in progress.
   574  	//   "PASSED" - The test has passed.
   575  	//   "FAILED" - The test has failed.
   576  	//   "INCONCLUSIVE" - The test was inconclusive.
   577  	State string `json:"state,omitempty"`
   578  	// VideoUri: Output only. A URI to a video of the test run.
   579  	VideoUri string `json:"videoUri,omitempty"`
   580  	// ForceSendFields is a list of field names (e.g. "AppCrash") to
   581  	// unconditionally include in API requests. By default, fields with empty or
   582  	// default values are omitted from API requests. See
   583  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   584  	// details.
   585  	ForceSendFields []string `json:"-"`
   586  	// NullFields is a list of field names (e.g. "AppCrash") to include in API
   587  	// requests with the JSON null value. By default, fields with empty values are
   588  	// omitted from API requests. See
   589  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   590  	NullFields []string `json:"-"`
   591  }
   592  
   593  func (s *GoogleFirebaseAppdistroV1alphaDeviceExecution) MarshalJSON() ([]byte, error) {
   594  	type NoMethod GoogleFirebaseAppdistroV1alphaDeviceExecution
   595  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   596  }
   597  
   598  type GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseRequest struct {
   599  	// BuildVersion: Optional. Ignored. Used to be build version of the app release
   600  	// if an instance identifier was provided for the release_id.
   601  	BuildVersion string `json:"buildVersion,omitempty"`
   602  	// DisplayVersion: Optional. Ignored. Used to be display version of the app
   603  	// release if an instance identifier was provided for the release_id.
   604  	DisplayVersion string `json:"displayVersion,omitempty"`
   605  	// Emails: Optional. An email address which should get access to this release,
   606  	// for example rebeccahe@google.com
   607  	Emails []string `json:"emails,omitempty"`
   608  	// GroupIds: Optional. A repeated list of group aliases to enable access to a
   609  	// release for Note: This field is misnamed, but can't be changed because we
   610  	// need to maintain compatibility with old build tools
   611  	GroupIds []string `json:"groupIds,omitempty"`
   612  	// ForceSendFields is a list of field names (e.g. "BuildVersion") to
   613  	// unconditionally include in API requests. By default, fields with empty or
   614  	// default values are omitted from API requests. See
   615  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   616  	// details.
   617  	ForceSendFields []string `json:"-"`
   618  	// NullFields is a list of field names (e.g. "BuildVersion") to include in API
   619  	// requests with the JSON null value. By default, fields with empty values are
   620  	// omitted from API requests. See
   621  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   622  	NullFields []string `json:"-"`
   623  }
   624  
   625  func (s *GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseRequest) MarshalJSON() ([]byte, error) {
   626  	type NoMethod GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseRequest
   627  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   628  }
   629  
   630  type GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseResponse struct {
   631  	// ServerResponse contains the HTTP response code and headers from the server.
   632  	googleapi.ServerResponse `json:"-"`
   633  }
   634  
   635  // GoogleFirebaseAppdistroV1alphaGetReleaseByUploadHashResponse: Response
   636  // object to get the release given a upload hash
   637  type GoogleFirebaseAppdistroV1alphaGetReleaseByUploadHashResponse struct {
   638  	// Release: Release object
   639  	Release *GoogleFirebaseAppdistroV1alphaRelease `json:"release,omitempty"`
   640  
   641  	// ServerResponse contains the HTTP response code and headers from the server.
   642  	googleapi.ServerResponse `json:"-"`
   643  	// ForceSendFields is a list of field names (e.g. "Release") to unconditionally
   644  	// include in API requests. By default, fields with empty or default values are
   645  	// omitted from API requests. See
   646  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   647  	// details.
   648  	ForceSendFields []string `json:"-"`
   649  	// NullFields is a list of field names (e.g. "Release") to include in API
   650  	// requests with the JSON null value. By default, fields with empty values are
   651  	// omitted from API requests. See
   652  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   653  	NullFields []string `json:"-"`
   654  }
   655  
   656  func (s *GoogleFirebaseAppdistroV1alphaGetReleaseByUploadHashResponse) MarshalJSON() ([]byte, error) {
   657  	type NoMethod GoogleFirebaseAppdistroV1alphaGetReleaseByUploadHashResponse
   658  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   659  }
   660  
   661  // GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse: Response containing
   662  // the UDIDs of tester iOS devices in a project
   663  type GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse struct {
   664  	// TesterUdids: The UDIDs of tester iOS devices in a project
   665  	TesterUdids []*GoogleFirebaseAppdistroV1alphaTesterUdid `json:"testerUdids,omitempty"`
   666  
   667  	// ServerResponse contains the HTTP response code and headers from the server.
   668  	googleapi.ServerResponse `json:"-"`
   669  	// ForceSendFields is a list of field names (e.g. "TesterUdids") to
   670  	// unconditionally include in API requests. By default, fields with empty or
   671  	// default values are omitted from API requests. See
   672  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   673  	// details.
   674  	ForceSendFields []string `json:"-"`
   675  	// NullFields is a list of field names (e.g. "TesterUdids") to include in API
   676  	// requests with the JSON null value. By default, fields with empty values are
   677  	// omitted from API requests. See
   678  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   679  	NullFields []string `json:"-"`
   680  }
   681  
   682  func (s *GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse) MarshalJSON() ([]byte, error) {
   683  	type NoMethod GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse
   684  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   685  }
   686  
   687  type GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse struct {
   688  	// ErrorCode: The error code associated with (only set on "FAILURE")
   689  	//
   690  	// Possible values:
   691  	//   "ERROR_UNSPECIFIED"
   692  	//   "INVALID_ZIP"
   693  	//   "MISSING_PLIST"
   694  	//   "MISSING_PROFILE"
   695  	//   "VERSION_TOO_LONG"
   696  	//   "MISSING_UUIDS"
   697  	//   "MISSING_RESOURCES"
   698  	//   "MISSING_MANIFEST"
   699  	//   "IOS_METADATA_ERROR"
   700  	//   "ANDROID_METADATA_ERROR"
   701  	//   "UNSUPPORTED_PLATFORM_TYPE"
   702  	//   "BUNDLE_ID_MISMATCH"
   703  	//   "APK_NOT_ZIP_ALIGNED"
   704  	//   "INVALID_CERTIFICATE"
   705  	//   "APK_TOO_LARGE"
   706  	//   "AAB_NOT_PUBLISHED"
   707  	//   "INVALID_PLIST_DEVICE_FAMILIES"
   708  	//   "AAB_TOS_NOT_ACCEPTED"
   709  	//   "APP_NAME_TOO_LONG"
   710  	//   "AAB_DEVELOPER_ACCOUNT_NOT_LINKED"
   711  	//   "AAB_NO_APP_WITH_GIVEN_PACKAGE_NAME_IN_ACCOUNT"
   712  	//   "AAB_UPLOAD_ERROR"
   713  	ErrorCode string `json:"errorCode,omitempty"`
   714  	// Message: Any additional context for the given upload status (e.g. error
   715  	// message) Meant to be displayed to the client
   716  	Message string `json:"message,omitempty"`
   717  	// Release: The release that was created from the upload (only set on
   718  	// "SUCCESS")
   719  	Release *GoogleFirebaseAppdistroV1alphaRelease `json:"release,omitempty"`
   720  	// Status: The status of the upload
   721  	//
   722  	// Possible values:
   723  	//   "STATUS_UNSPECIFIED"
   724  	//   "IN_PROGRESS"
   725  	//   "ALREADY_UPLOADED"
   726  	//   "SUCCESS"
   727  	//   "ERROR"
   728  	Status string `json:"status,omitempty"`
   729  
   730  	// ServerResponse contains the HTTP response code and headers from the server.
   731  	googleapi.ServerResponse `json:"-"`
   732  	// ForceSendFields is a list of field names (e.g. "ErrorCode") to
   733  	// unconditionally include in API requests. By default, fields with empty or
   734  	// default values are omitted from API requests. See
   735  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   736  	// details.
   737  	ForceSendFields []string `json:"-"`
   738  	// NullFields is a list of field names (e.g. "ErrorCode") to include in API
   739  	// requests with the JSON null value. By default, fields with empty values are
   740  	// omitted from API requests. See
   741  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   742  	NullFields []string `json:"-"`
   743  }
   744  
   745  func (s *GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse) MarshalJSON() ([]byte, error) {
   746  	type NoMethod GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse
   747  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   748  }
   749  
   750  type GoogleFirebaseAppdistroV1alphaJwt struct {
   751  	Token string `json:"token,omitempty"`
   752  
   753  	// ServerResponse contains the HTTP response code and headers from the server.
   754  	googleapi.ServerResponse `json:"-"`
   755  	// ForceSendFields is a list of field names (e.g. "Token") to unconditionally
   756  	// include in API requests. By default, fields with empty or default values are
   757  	// omitted from API requests. See
   758  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   759  	// details.
   760  	ForceSendFields []string `json:"-"`
   761  	// NullFields is a list of field names (e.g. "Token") to include in API
   762  	// requests with the JSON null value. By default, fields with empty values are
   763  	// omitted from API requests. See
   764  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   765  	NullFields []string `json:"-"`
   766  }
   767  
   768  func (s *GoogleFirebaseAppdistroV1alphaJwt) MarshalJSON() ([]byte, error) {
   769  	type NoMethod GoogleFirebaseAppdistroV1alphaJwt
   770  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   771  }
   772  
   773  // GoogleFirebaseAppdistroV1alphaListReleaseTestsResponse: The response message
   774  // for `ListReleaseTests`.
   775  type GoogleFirebaseAppdistroV1alphaListReleaseTestsResponse struct {
   776  	// NextPageToken: A short-lived token, which can be sent as `pageToken` to
   777  	// retrieve the next page. If this field is omitted, there are no subsequent
   778  	// pages.
   779  	NextPageToken string `json:"nextPageToken,omitempty"`
   780  	// ReleaseTests: The tests listed.
   781  	ReleaseTests []*GoogleFirebaseAppdistroV1alphaReleaseTest `json:"releaseTests,omitempty"`
   782  
   783  	// ServerResponse contains the HTTP response code and headers from the server.
   784  	googleapi.ServerResponse `json:"-"`
   785  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   786  	// unconditionally include in API requests. By default, fields with empty or
   787  	// default values are omitted from API requests. See
   788  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   789  	// details.
   790  	ForceSendFields []string `json:"-"`
   791  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   792  	// requests with the JSON null value. By default, fields with empty values are
   793  	// omitted from API requests. See
   794  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   795  	NullFields []string `json:"-"`
   796  }
   797  
   798  func (s *GoogleFirebaseAppdistroV1alphaListReleaseTestsResponse) MarshalJSON() ([]byte, error) {
   799  	type NoMethod GoogleFirebaseAppdistroV1alphaListReleaseTestsResponse
   800  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   801  }
   802  
   803  // GoogleFirebaseAppdistroV1alphaLoginCredential: Login credential for
   804  // automated tests
   805  type GoogleFirebaseAppdistroV1alphaLoginCredential struct {
   806  	// FieldHints: Optional. Hints to the crawler for identifying input fields
   807  	FieldHints *GoogleFirebaseAppdistroV1alphaLoginCredentialFieldHints `json:"fieldHints,omitempty"`
   808  	// Google: Optional. Are these credentials for Google?
   809  	Google bool `json:"google,omitempty"`
   810  	// Password: Optional. Password for automated tests
   811  	Password string `json:"password,omitempty"`
   812  	// Username: Optional. Username for automated tests
   813  	Username string `json:"username,omitempty"`
   814  	// ForceSendFields is a list of field names (e.g. "FieldHints") to
   815  	// unconditionally include in API requests. By default, fields with empty or
   816  	// default values are omitted from API requests. See
   817  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   818  	// details.
   819  	ForceSendFields []string `json:"-"`
   820  	// NullFields is a list of field names (e.g. "FieldHints") to include in API
   821  	// requests with the JSON null value. By default, fields with empty values are
   822  	// omitted from API requests. See
   823  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   824  	NullFields []string `json:"-"`
   825  }
   826  
   827  func (s *GoogleFirebaseAppdistroV1alphaLoginCredential) MarshalJSON() ([]byte, error) {
   828  	type NoMethod GoogleFirebaseAppdistroV1alphaLoginCredential
   829  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   830  }
   831  
   832  // GoogleFirebaseAppdistroV1alphaLoginCredentialFieldHints: Hints to the
   833  // crawler for identifying input fields
   834  type GoogleFirebaseAppdistroV1alphaLoginCredentialFieldHints struct {
   835  	// PasswordResourceName: Required. The Android resource name of the password UI
   836  	// element. For example, in Java: R.string.foo in xml: @string/foo Only the
   837  	// "foo" part is needed. Reference doc:
   838  	// https://developer.android.com/guide/topics/resources/accessing-resources.html
   839  	PasswordResourceName string `json:"passwordResourceName,omitempty"`
   840  	// UsernameResourceName: Required. The Android resource name of the username UI
   841  	// element. For example, in Java: R.string.foo in xml: @string/foo Only the
   842  	// "foo" part is needed. Reference doc:
   843  	// https://developer.android.com/guide/topics/resources/accessing-resources.html
   844  	UsernameResourceName string `json:"usernameResourceName,omitempty"`
   845  	// ForceSendFields is a list of field names (e.g. "PasswordResourceName") to
   846  	// unconditionally include in API requests. By default, fields with empty or
   847  	// default values are omitted from API requests. See
   848  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   849  	// details.
   850  	ForceSendFields []string `json:"-"`
   851  	// NullFields is a list of field names (e.g. "PasswordResourceName") to include
   852  	// in API requests with the JSON null value. By default, fields with empty
   853  	// values are omitted from API requests. See
   854  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   855  	NullFields []string `json:"-"`
   856  }
   857  
   858  func (s *GoogleFirebaseAppdistroV1alphaLoginCredentialFieldHints) MarshalJSON() ([]byte, error) {
   859  	type NoMethod GoogleFirebaseAppdistroV1alphaLoginCredentialFieldHints
   860  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   861  }
   862  
   863  type GoogleFirebaseAppdistroV1alphaProvisionAppResponse struct {
   864  	// ServerResponse contains the HTTP response code and headers from the server.
   865  	googleapi.ServerResponse `json:"-"`
   866  }
   867  
   868  // GoogleFirebaseAppdistroV1alphaRelease: Proto defining a release object
   869  type GoogleFirebaseAppdistroV1alphaRelease struct {
   870  	// BuildVersion: Release build version
   871  	BuildVersion string `json:"buildVersion,omitempty"`
   872  	// DisplayVersion: Release version
   873  	DisplayVersion string `json:"displayVersion,omitempty"`
   874  	// DistributedAt: Timestamp when the release was created
   875  	DistributedAt string `json:"distributedAt,omitempty"`
   876  	// Id: Release Id
   877  	Id string `json:"id,omitempty"`
   878  	// InstanceId: Instance id of the release
   879  	InstanceId string `json:"instanceId,omitempty"`
   880  	// LastActivityAt: Last activity timestamp
   881  	LastActivityAt string `json:"lastActivityAt,omitempty"`
   882  	// OpenInvitationCount: Number of testers who have open invitations for the
   883  	// release
   884  	OpenInvitationCount int64 `json:"openInvitationCount,omitempty"`
   885  	// ReceivedAt: unused.
   886  	ReceivedAt string `json:"receivedAt,omitempty"`
   887  	// ReleaseNotesSummary: Release notes summary
   888  	ReleaseNotesSummary string `json:"releaseNotesSummary,omitempty"`
   889  	// TesterCount: Count of testers added to the release
   890  	TesterCount int64 `json:"testerCount,omitempty"`
   891  	// TesterWithInstallCount: Number of testers who have installed the release
   892  	TesterWithInstallCount int64 `json:"testerWithInstallCount,omitempty"`
   893  	// ForceSendFields is a list of field names (e.g. "BuildVersion") to
   894  	// unconditionally include in API requests. By default, fields with empty or
   895  	// default values are omitted from API requests. See
   896  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   897  	// details.
   898  	ForceSendFields []string `json:"-"`
   899  	// NullFields is a list of field names (e.g. "BuildVersion") to include in API
   900  	// requests with the JSON null value. By default, fields with empty values are
   901  	// omitted from API requests. See
   902  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   903  	NullFields []string `json:"-"`
   904  }
   905  
   906  func (s *GoogleFirebaseAppdistroV1alphaRelease) MarshalJSON() ([]byte, error) {
   907  	type NoMethod GoogleFirebaseAppdistroV1alphaRelease
   908  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   909  }
   910  
   911  type GoogleFirebaseAppdistroV1alphaReleaseNotes struct {
   912  	ReleaseNotes string `json:"releaseNotes,omitempty"`
   913  	// ForceSendFields is a list of field names (e.g. "ReleaseNotes") to
   914  	// unconditionally include in API requests. By default, fields with empty or
   915  	// default values are omitted from API requests. See
   916  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   917  	// details.
   918  	ForceSendFields []string `json:"-"`
   919  	// NullFields is a list of field names (e.g. "ReleaseNotes") to include in API
   920  	// requests with the JSON null value. By default, fields with empty values are
   921  	// omitted from API requests. See
   922  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   923  	NullFields []string `json:"-"`
   924  }
   925  
   926  func (s *GoogleFirebaseAppdistroV1alphaReleaseNotes) MarshalJSON() ([]byte, error) {
   927  	type NoMethod GoogleFirebaseAppdistroV1alphaReleaseNotes
   928  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   929  }
   930  
   931  // GoogleFirebaseAppdistroV1alphaReleaseTest: The results of running an
   932  // automated test on a release.
   933  type GoogleFirebaseAppdistroV1alphaReleaseTest struct {
   934  	// CreateTime: Output only. Timestamp when the test was run.
   935  	CreateTime string `json:"createTime,omitempty"`
   936  	// DeviceExecutions: Required. The results of the test on each device.
   937  	DeviceExecutions []*GoogleFirebaseAppdistroV1alphaDeviceExecution `json:"deviceExecutions,omitempty"`
   938  	// LoginCredential: Optional. Input only. Login credentials for the test. Input
   939  	// only.
   940  	LoginCredential *GoogleFirebaseAppdistroV1alphaLoginCredential `json:"loginCredential,omitempty"`
   941  	// Name: The name of the release test resource. Format:
   942  	// `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id
   943  	// }`
   944  	Name string `json:"name,omitempty"`
   945  
   946  	// ServerResponse contains the HTTP response code and headers from the server.
   947  	googleapi.ServerResponse `json:"-"`
   948  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   949  	// unconditionally include in API requests. By default, fields with empty or
   950  	// default values are omitted from API requests. See
   951  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   952  	// details.
   953  	ForceSendFields []string `json:"-"`
   954  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   955  	// requests with the JSON null value. By default, fields with empty values are
   956  	// omitted from API requests. See
   957  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   958  	NullFields []string `json:"-"`
   959  }
   960  
   961  func (s *GoogleFirebaseAppdistroV1alphaReleaseTest) MarshalJSON() ([]byte, error) {
   962  	type NoMethod GoogleFirebaseAppdistroV1alphaReleaseTest
   963  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   964  }
   965  
   966  // GoogleFirebaseAppdistroV1alphaRoboCrawler: Configuration for Robo crawler
   967  type GoogleFirebaseAppdistroV1alphaRoboCrawler struct {
   968  	// LoginCredential: Optional. Login credential for automated tests
   969  	LoginCredential *GoogleFirebaseAppdistroV1alphaLoginCredential `json:"loginCredential,omitempty"`
   970  	// ForceSendFields is a list of field names (e.g. "LoginCredential") to
   971  	// unconditionally include in API requests. By default, fields with empty or
   972  	// default values are omitted from API requests. See
   973  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   974  	// details.
   975  	ForceSendFields []string `json:"-"`
   976  	// NullFields is a list of field names (e.g. "LoginCredential") to include in
   977  	// API requests with the JSON null value. By default, fields with empty values
   978  	// are omitted from API requests. See
   979  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   980  	NullFields []string `json:"-"`
   981  }
   982  
   983  func (s *GoogleFirebaseAppdistroV1alphaRoboCrawler) MarshalJSON() ([]byte, error) {
   984  	type NoMethod GoogleFirebaseAppdistroV1alphaRoboCrawler
   985  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   986  }
   987  
   988  // GoogleFirebaseAppdistroV1alphaRoboStats: Statistics collected during a Robo
   989  // test.
   990  type GoogleFirebaseAppdistroV1alphaRoboStats struct {
   991  	// ActionsPerformed: Output only. Number of actions that crawler performed.
   992  	ActionsPerformed int64 `json:"actionsPerformed,omitempty"`
   993  	// CrawlDuration: Output only. Duration of crawl.
   994  	CrawlDuration string `json:"crawlDuration,omitempty"`
   995  	// DistinctVisitedScreens: Output only. Number of distinct screens visited.
   996  	DistinctVisitedScreens int64 `json:"distinctVisitedScreens,omitempty"`
   997  	// MainActivityCrawlTimedOut: Output only. Whether the main activity crawl
   998  	// timed out.
   999  	MainActivityCrawlTimedOut bool `json:"mainActivityCrawlTimedOut,omitempty"`
  1000  	// ForceSendFields is a list of field names (e.g. "ActionsPerformed") to
  1001  	// unconditionally include in API requests. By default, fields with empty or
  1002  	// default values are omitted from API requests. See
  1003  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1004  	// details.
  1005  	ForceSendFields []string `json:"-"`
  1006  	// NullFields is a list of field names (e.g. "ActionsPerformed") to include in
  1007  	// API requests with the JSON null value. By default, fields with empty values
  1008  	// are omitted from API requests. See
  1009  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1010  	NullFields []string `json:"-"`
  1011  }
  1012  
  1013  func (s *GoogleFirebaseAppdistroV1alphaRoboStats) MarshalJSON() ([]byte, error) {
  1014  	type NoMethod GoogleFirebaseAppdistroV1alphaRoboStats
  1015  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1016  }
  1017  
  1018  // GoogleFirebaseAppdistroV1alphaTestConfig: Configuration for automated tests
  1019  type GoogleFirebaseAppdistroV1alphaTestConfig struct {
  1020  	// Name: Identifier. The name of the test configuration resource. Format:
  1021  	// `projects/{project_number}/apps/{app_id}/testConfig`
  1022  	Name string `json:"name,omitempty"`
  1023  	// RoboCrawler: Optional. Configuration for Robo crawler
  1024  	RoboCrawler *GoogleFirebaseAppdistroV1alphaRoboCrawler `json:"roboCrawler,omitempty"`
  1025  	// TestDevices: Optional. Tests will be run on this list of devices
  1026  	TestDevices []*GoogleFirebaseAppdistroV1alphaTestDevice `json:"testDevices,omitempty"`
  1027  
  1028  	// ServerResponse contains the HTTP response code and headers from the server.
  1029  	googleapi.ServerResponse `json:"-"`
  1030  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1031  	// include in API requests. By default, fields with empty or default values are
  1032  	// omitted from API requests. See
  1033  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1034  	// details.
  1035  	ForceSendFields []string `json:"-"`
  1036  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1037  	// with the JSON null value. By default, fields with empty values are omitted
  1038  	// from API requests. See
  1039  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1040  	NullFields []string `json:"-"`
  1041  }
  1042  
  1043  func (s *GoogleFirebaseAppdistroV1alphaTestConfig) MarshalJSON() ([]byte, error) {
  1044  	type NoMethod GoogleFirebaseAppdistroV1alphaTestConfig
  1045  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1046  }
  1047  
  1048  // GoogleFirebaseAppdistroV1alphaTestDevice: A device on which automated tests
  1049  // can be run.
  1050  type GoogleFirebaseAppdistroV1alphaTestDevice struct {
  1051  	// Locale: Optional. The locale of the device (e.g. "en_US" for US English)
  1052  	// during the test.
  1053  	Locale string `json:"locale,omitempty"`
  1054  	// Model: Required. The device model.
  1055  	Model string `json:"model,omitempty"`
  1056  	// Orientation: Optional. The orientation of the device during the test.
  1057  	Orientation string `json:"orientation,omitempty"`
  1058  	// Version: Required. The version of the device (API level on Android).
  1059  	Version string `json:"version,omitempty"`
  1060  	// ForceSendFields is a list of field names (e.g. "Locale") to unconditionally
  1061  	// include in API requests. By default, fields with empty or default values are
  1062  	// omitted from API requests. See
  1063  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1064  	// details.
  1065  	ForceSendFields []string `json:"-"`
  1066  	// NullFields is a list of field names (e.g. "Locale") to include in API
  1067  	// requests with the JSON null value. By default, fields with empty values are
  1068  	// omitted from API requests. See
  1069  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1070  	NullFields []string `json:"-"`
  1071  }
  1072  
  1073  func (s *GoogleFirebaseAppdistroV1alphaTestDevice) MarshalJSON() ([]byte, error) {
  1074  	type NoMethod GoogleFirebaseAppdistroV1alphaTestDevice
  1075  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1076  }
  1077  
  1078  // GoogleFirebaseAppdistroV1alphaTesterUdid: The UDIDs of a tester's iOS device
  1079  type GoogleFirebaseAppdistroV1alphaTesterUdid struct {
  1080  	// Name: The name of the tester's device
  1081  	Name string `json:"name,omitempty"`
  1082  	// Platform: The platform of the tester's device
  1083  	Platform string `json:"platform,omitempty"`
  1084  	// Udid: The UDID of the tester's device
  1085  	Udid string `json:"udid,omitempty"`
  1086  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1087  	// include in API requests. By default, fields with empty or default values are
  1088  	// omitted from API requests. See
  1089  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1090  	// details.
  1091  	ForceSendFields []string `json:"-"`
  1092  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1093  	// with the JSON null value. By default, fields with empty values are omitted
  1094  	// from API requests. See
  1095  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1096  	NullFields []string `json:"-"`
  1097  }
  1098  
  1099  func (s *GoogleFirebaseAppdistroV1alphaTesterUdid) MarshalJSON() ([]byte, error) {
  1100  	type NoMethod GoogleFirebaseAppdistroV1alphaTesterUdid
  1101  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1102  }
  1103  
  1104  type AppsGetCall struct {
  1105  	s              *Service
  1106  	mobilesdkAppId string
  1107  	urlParams_     gensupport.URLParams
  1108  	ifNoneMatch_   string
  1109  	ctx_           context.Context
  1110  	header_        http.Header
  1111  }
  1112  
  1113  // Get: Get the app, if it exists
  1114  //
  1115  //   - mobilesdkAppId: Unique id for a Firebase app of the format:
  1116  //     {version}:{project_number}:{platform}:{hash(bundle_id)} Example:
  1117  //     1:581234567376:android:aa0a3c7b135e90289.
  1118  func (r *AppsService) Get(mobilesdkAppId string) *AppsGetCall {
  1119  	c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1120  	c.mobilesdkAppId = mobilesdkAppId
  1121  	return c
  1122  }
  1123  
  1124  // AppView sets the optional parameter "appView": App view. When unset or set
  1125  // to BASIC, returns an App with everything set except for aab_state. When set
  1126  // to FULL, returns an App with aab_state set.
  1127  //
  1128  // Possible values:
  1129  //
  1130  //	"APP_VIEW_UNSPECIFIED" - The default / unset value. The API will default
  1131  //
  1132  // to the BASIC view.
  1133  //
  1134  //	"BASIC" - Include everything except aab_state.
  1135  //	"FULL" - Include everything.
  1136  func (c *AppsGetCall) AppView(appView string) *AppsGetCall {
  1137  	c.urlParams_.Set("appView", appView)
  1138  	return c
  1139  }
  1140  
  1141  // Fields allows partial responses to be retrieved. See
  1142  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1143  // details.
  1144  func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
  1145  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1146  	return c
  1147  }
  1148  
  1149  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1150  // object's ETag matches the given value. This is useful for getting updates
  1151  // only after the object has changed since the last request.
  1152  func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
  1153  	c.ifNoneMatch_ = entityTag
  1154  	return c
  1155  }
  1156  
  1157  // Context sets the context to be used in this call's Do method.
  1158  func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
  1159  	c.ctx_ = ctx
  1160  	return c
  1161  }
  1162  
  1163  // Header returns a http.Header that can be modified by the caller to add
  1164  // headers to the request.
  1165  func (c *AppsGetCall) Header() http.Header {
  1166  	if c.header_ == nil {
  1167  		c.header_ = make(http.Header)
  1168  	}
  1169  	return c.header_
  1170  }
  1171  
  1172  func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
  1173  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1174  	if c.ifNoneMatch_ != "" {
  1175  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1176  	}
  1177  	var body io.Reader = nil
  1178  	c.urlParams_.Set("alt", alt)
  1179  	c.urlParams_.Set("prettyPrint", "false")
  1180  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{mobilesdkAppId}")
  1181  	urls += "?" + c.urlParams_.Encode()
  1182  	req, err := http.NewRequest("GET", urls, body)
  1183  	if err != nil {
  1184  		return nil, err
  1185  	}
  1186  	req.Header = reqHeaders
  1187  	googleapi.Expand(req.URL, map[string]string{
  1188  		"mobilesdkAppId": c.mobilesdkAppId,
  1189  	})
  1190  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1191  }
  1192  
  1193  // Do executes the "firebaseappdistribution.apps.get" call.
  1194  // Any non-2xx status code is an error. Response headers are in either
  1195  // *GoogleFirebaseAppdistroV1alphaApp.ServerResponse.Header or (if a response
  1196  // was returned at all) in error.(*googleapi.Error).Header. Use
  1197  // googleapi.IsNotModified to check whether the returned error was because
  1198  // http.StatusNotModified was returned.
  1199  func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaApp, error) {
  1200  	gensupport.SetOptions(c.urlParams_, opts...)
  1201  	res, err := c.doRequest("json")
  1202  	if res != nil && res.StatusCode == http.StatusNotModified {
  1203  		if res.Body != nil {
  1204  			res.Body.Close()
  1205  		}
  1206  		return nil, gensupport.WrapError(&googleapi.Error{
  1207  			Code:   res.StatusCode,
  1208  			Header: res.Header,
  1209  		})
  1210  	}
  1211  	if err != nil {
  1212  		return nil, err
  1213  	}
  1214  	defer googleapi.CloseBody(res)
  1215  	if err := googleapi.CheckResponse(res); err != nil {
  1216  		return nil, gensupport.WrapError(err)
  1217  	}
  1218  	ret := &GoogleFirebaseAppdistroV1alphaApp{
  1219  		ServerResponse: googleapi.ServerResponse{
  1220  			Header:         res.Header,
  1221  			HTTPStatusCode: res.StatusCode,
  1222  		},
  1223  	}
  1224  	target := &ret
  1225  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1226  		return nil, err
  1227  	}
  1228  	return ret, nil
  1229  }
  1230  
  1231  type AppsGetJwtCall struct {
  1232  	s              *Service
  1233  	mobilesdkAppId string
  1234  	urlParams_     gensupport.URLParams
  1235  	ifNoneMatch_   string
  1236  	ctx_           context.Context
  1237  	header_        http.Header
  1238  }
  1239  
  1240  // GetJwt: Get a JWT token
  1241  //
  1242  //   - mobilesdkAppId: Unique id for a Firebase app of the format:
  1243  //     {version}:{project_number}:{platform}:{hash(bundle_id)} Example:
  1244  //     1:581234567376:android:aa0a3c7b135e90289.
  1245  func (r *AppsService) GetJwt(mobilesdkAppId string) *AppsGetJwtCall {
  1246  	c := &AppsGetJwtCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1247  	c.mobilesdkAppId = mobilesdkAppId
  1248  	return c
  1249  }
  1250  
  1251  // Fields allows partial responses to be retrieved. See
  1252  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1253  // details.
  1254  func (c *AppsGetJwtCall) Fields(s ...googleapi.Field) *AppsGetJwtCall {
  1255  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1256  	return c
  1257  }
  1258  
  1259  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1260  // object's ETag matches the given value. This is useful for getting updates
  1261  // only after the object has changed since the last request.
  1262  func (c *AppsGetJwtCall) IfNoneMatch(entityTag string) *AppsGetJwtCall {
  1263  	c.ifNoneMatch_ = entityTag
  1264  	return c
  1265  }
  1266  
  1267  // Context sets the context to be used in this call's Do method.
  1268  func (c *AppsGetJwtCall) Context(ctx context.Context) *AppsGetJwtCall {
  1269  	c.ctx_ = ctx
  1270  	return c
  1271  }
  1272  
  1273  // Header returns a http.Header that can be modified by the caller to add
  1274  // headers to the request.
  1275  func (c *AppsGetJwtCall) Header() http.Header {
  1276  	if c.header_ == nil {
  1277  		c.header_ = make(http.Header)
  1278  	}
  1279  	return c.header_
  1280  }
  1281  
  1282  func (c *AppsGetJwtCall) doRequest(alt string) (*http.Response, error) {
  1283  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1284  	if c.ifNoneMatch_ != "" {
  1285  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1286  	}
  1287  	var body io.Reader = nil
  1288  	c.urlParams_.Set("alt", alt)
  1289  	c.urlParams_.Set("prettyPrint", "false")
  1290  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{mobilesdkAppId}/jwt")
  1291  	urls += "?" + c.urlParams_.Encode()
  1292  	req, err := http.NewRequest("GET", urls, body)
  1293  	if err != nil {
  1294  		return nil, err
  1295  	}
  1296  	req.Header = reqHeaders
  1297  	googleapi.Expand(req.URL, map[string]string{
  1298  		"mobilesdkAppId": c.mobilesdkAppId,
  1299  	})
  1300  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1301  }
  1302  
  1303  // Do executes the "firebaseappdistribution.apps.getJwt" call.
  1304  // Any non-2xx status code is an error. Response headers are in either
  1305  // *GoogleFirebaseAppdistroV1alphaJwt.ServerResponse.Header or (if a response
  1306  // was returned at all) in error.(*googleapi.Error).Header. Use
  1307  // googleapi.IsNotModified to check whether the returned error was because
  1308  // http.StatusNotModified was returned.
  1309  func (c *AppsGetJwtCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaJwt, error) {
  1310  	gensupport.SetOptions(c.urlParams_, opts...)
  1311  	res, err := c.doRequest("json")
  1312  	if res != nil && res.StatusCode == http.StatusNotModified {
  1313  		if res.Body != nil {
  1314  			res.Body.Close()
  1315  		}
  1316  		return nil, gensupport.WrapError(&googleapi.Error{
  1317  			Code:   res.StatusCode,
  1318  			Header: res.Header,
  1319  		})
  1320  	}
  1321  	if err != nil {
  1322  		return nil, err
  1323  	}
  1324  	defer googleapi.CloseBody(res)
  1325  	if err := googleapi.CheckResponse(res); err != nil {
  1326  		return nil, gensupport.WrapError(err)
  1327  	}
  1328  	ret := &GoogleFirebaseAppdistroV1alphaJwt{
  1329  		ServerResponse: googleapi.ServerResponse{
  1330  			Header:         res.Header,
  1331  			HTTPStatusCode: res.StatusCode,
  1332  		},
  1333  	}
  1334  	target := &ret
  1335  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1336  		return nil, err
  1337  	}
  1338  	return ret, nil
  1339  }
  1340  
  1341  type AppsProvisionAppCall struct {
  1342  	s              *Service
  1343  	mobilesdkAppId string
  1344  	urlParams_     gensupport.URLParams
  1345  	ctx_           context.Context
  1346  	header_        http.Header
  1347  }
  1348  
  1349  // ProvisionApp: Provision app distribution for an existing Firebase app,
  1350  // enabling it to subsequently be used by appdistro.
  1351  //
  1352  //   - mobilesdkAppId: Unique id for a Firebase app of the format:
  1353  //     {version}:{project_number}:{platform}:{hash(bundle_id)} Example:
  1354  //     1:581234567376:android:aa0a3c7b135e90289.
  1355  func (r *AppsService) ProvisionApp(mobilesdkAppId string) *AppsProvisionAppCall {
  1356  	c := &AppsProvisionAppCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1357  	c.mobilesdkAppId = mobilesdkAppId
  1358  	return c
  1359  }
  1360  
  1361  // Fields allows partial responses to be retrieved. See
  1362  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1363  // details.
  1364  func (c *AppsProvisionAppCall) Fields(s ...googleapi.Field) *AppsProvisionAppCall {
  1365  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1366  	return c
  1367  }
  1368  
  1369  // Context sets the context to be used in this call's Do method.
  1370  func (c *AppsProvisionAppCall) Context(ctx context.Context) *AppsProvisionAppCall {
  1371  	c.ctx_ = ctx
  1372  	return c
  1373  }
  1374  
  1375  // Header returns a http.Header that can be modified by the caller to add
  1376  // headers to the request.
  1377  func (c *AppsProvisionAppCall) Header() http.Header {
  1378  	if c.header_ == nil {
  1379  		c.header_ = make(http.Header)
  1380  	}
  1381  	return c.header_
  1382  }
  1383  
  1384  func (c *AppsProvisionAppCall) doRequest(alt string) (*http.Response, error) {
  1385  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1386  	var body io.Reader = nil
  1387  	c.urlParams_.Set("alt", alt)
  1388  	c.urlParams_.Set("prettyPrint", "false")
  1389  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{mobilesdkAppId}")
  1390  	urls += "?" + c.urlParams_.Encode()
  1391  	req, err := http.NewRequest("POST", urls, body)
  1392  	if err != nil {
  1393  		return nil, err
  1394  	}
  1395  	req.Header = reqHeaders
  1396  	googleapi.Expand(req.URL, map[string]string{
  1397  		"mobilesdkAppId": c.mobilesdkAppId,
  1398  	})
  1399  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1400  }
  1401  
  1402  // Do executes the "firebaseappdistribution.apps.provisionApp" call.
  1403  // Any non-2xx status code is an error. Response headers are in either
  1404  // *GoogleFirebaseAppdistroV1alphaProvisionAppResponse.ServerResponse.Header or
  1405  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  1406  // googleapi.IsNotModified to check whether the returned error was because
  1407  // http.StatusNotModified was returned.
  1408  func (c *AppsProvisionAppCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaProvisionAppResponse, error) {
  1409  	gensupport.SetOptions(c.urlParams_, opts...)
  1410  	res, err := c.doRequest("json")
  1411  	if res != nil && res.StatusCode == http.StatusNotModified {
  1412  		if res.Body != nil {
  1413  			res.Body.Close()
  1414  		}
  1415  		return nil, gensupport.WrapError(&googleapi.Error{
  1416  			Code:   res.StatusCode,
  1417  			Header: res.Header,
  1418  		})
  1419  	}
  1420  	if err != nil {
  1421  		return nil, err
  1422  	}
  1423  	defer googleapi.CloseBody(res)
  1424  	if err := googleapi.CheckResponse(res); err != nil {
  1425  		return nil, gensupport.WrapError(err)
  1426  	}
  1427  	ret := &GoogleFirebaseAppdistroV1alphaProvisionAppResponse{
  1428  		ServerResponse: googleapi.ServerResponse{
  1429  			Header:         res.Header,
  1430  			HTTPStatusCode: res.StatusCode,
  1431  		},
  1432  	}
  1433  	target := &ret
  1434  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1435  		return nil, err
  1436  	}
  1437  	return ret, nil
  1438  }
  1439  
  1440  type AppsReleaseByHashGetCall struct {
  1441  	s              *Service
  1442  	mobilesdkAppId string
  1443  	uploadHash     string
  1444  	urlParams_     gensupport.URLParams
  1445  	ifNoneMatch_   string
  1446  	ctx_           context.Context
  1447  	header_        http.Header
  1448  }
  1449  
  1450  // Get: GET Release by binary upload hash
  1451  //
  1452  //   - mobilesdkAppId: Unique id for a Firebase app of the format:
  1453  //     {version}:{project_number}:{platform}:{hash(bundle_id)} Example:
  1454  //     1:581234567376:android:aa0a3c7b135e90289.
  1455  //   - uploadHash: The hash for the upload.
  1456  func (r *AppsReleaseByHashService) Get(mobilesdkAppId string, uploadHash string) *AppsReleaseByHashGetCall {
  1457  	c := &AppsReleaseByHashGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1458  	c.mobilesdkAppId = mobilesdkAppId
  1459  	c.uploadHash = uploadHash
  1460  	return c
  1461  }
  1462  
  1463  // Fields allows partial responses to be retrieved. See
  1464  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1465  // details.
  1466  func (c *AppsReleaseByHashGetCall) Fields(s ...googleapi.Field) *AppsReleaseByHashGetCall {
  1467  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1468  	return c
  1469  }
  1470  
  1471  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1472  // object's ETag matches the given value. This is useful for getting updates
  1473  // only after the object has changed since the last request.
  1474  func (c *AppsReleaseByHashGetCall) IfNoneMatch(entityTag string) *AppsReleaseByHashGetCall {
  1475  	c.ifNoneMatch_ = entityTag
  1476  	return c
  1477  }
  1478  
  1479  // Context sets the context to be used in this call's Do method.
  1480  func (c *AppsReleaseByHashGetCall) Context(ctx context.Context) *AppsReleaseByHashGetCall {
  1481  	c.ctx_ = ctx
  1482  	return c
  1483  }
  1484  
  1485  // Header returns a http.Header that can be modified by the caller to add
  1486  // headers to the request.
  1487  func (c *AppsReleaseByHashGetCall) Header() http.Header {
  1488  	if c.header_ == nil {
  1489  		c.header_ = make(http.Header)
  1490  	}
  1491  	return c.header_
  1492  }
  1493  
  1494  func (c *AppsReleaseByHashGetCall) doRequest(alt string) (*http.Response, error) {
  1495  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1496  	if c.ifNoneMatch_ != "" {
  1497  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1498  	}
  1499  	var body io.Reader = nil
  1500  	c.urlParams_.Set("alt", alt)
  1501  	c.urlParams_.Set("prettyPrint", "false")
  1502  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{mobilesdkAppId}/release_by_hash/{uploadHash}")
  1503  	urls += "?" + c.urlParams_.Encode()
  1504  	req, err := http.NewRequest("GET", urls, body)
  1505  	if err != nil {
  1506  		return nil, err
  1507  	}
  1508  	req.Header = reqHeaders
  1509  	googleapi.Expand(req.URL, map[string]string{
  1510  		"mobilesdkAppId": c.mobilesdkAppId,
  1511  		"uploadHash":     c.uploadHash,
  1512  	})
  1513  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1514  }
  1515  
  1516  // Do executes the "firebaseappdistribution.apps.release_by_hash.get" call.
  1517  // Any non-2xx status code is an error. Response headers are in either
  1518  // *GoogleFirebaseAppdistroV1alphaGetReleaseByUploadHashResponse.ServerResponse.
  1519  // Header or (if a response was returned at all) in
  1520  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1521  // whether the returned error was because http.StatusNotModified was returned.
  1522  func (c *AppsReleaseByHashGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaGetReleaseByUploadHashResponse, error) {
  1523  	gensupport.SetOptions(c.urlParams_, opts...)
  1524  	res, err := c.doRequest("json")
  1525  	if res != nil && res.StatusCode == http.StatusNotModified {
  1526  		if res.Body != nil {
  1527  			res.Body.Close()
  1528  		}
  1529  		return nil, gensupport.WrapError(&googleapi.Error{
  1530  			Code:   res.StatusCode,
  1531  			Header: res.Header,
  1532  		})
  1533  	}
  1534  	if err != nil {
  1535  		return nil, err
  1536  	}
  1537  	defer googleapi.CloseBody(res)
  1538  	if err := googleapi.CheckResponse(res); err != nil {
  1539  		return nil, gensupport.WrapError(err)
  1540  	}
  1541  	ret := &GoogleFirebaseAppdistroV1alphaGetReleaseByUploadHashResponse{
  1542  		ServerResponse: googleapi.ServerResponse{
  1543  			Header:         res.Header,
  1544  			HTTPStatusCode: res.StatusCode,
  1545  		},
  1546  	}
  1547  	target := &ret
  1548  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1549  		return nil, err
  1550  	}
  1551  	return ret, nil
  1552  }
  1553  
  1554  type AppsReleasesEnableAccessCall struct {
  1555  	s                                                          *Service
  1556  	mobilesdkAppId                                             string
  1557  	releaseId                                                  string
  1558  	googlefirebaseappdistrov1alphaenableaccessonreleaserequest *GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseRequest
  1559  	urlParams_                                                 gensupport.URLParams
  1560  	ctx_                                                       context.Context
  1561  	header_                                                    http.Header
  1562  }
  1563  
  1564  // EnableAccess: Enable access on a release for testers.
  1565  //
  1566  //   - mobilesdkAppId: Unique id for a Firebase app of the format:
  1567  //     {version}:{project_number}:{platform}:{hash(bundle_id)} Example:
  1568  //     1:581234567376:android:aa0a3c7b135e90289.
  1569  //   - releaseId: Release identifier.
  1570  func (r *AppsReleasesService) EnableAccess(mobilesdkAppId string, releaseId string, googlefirebaseappdistrov1alphaenableaccessonreleaserequest *GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseRequest) *AppsReleasesEnableAccessCall {
  1571  	c := &AppsReleasesEnableAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1572  	c.mobilesdkAppId = mobilesdkAppId
  1573  	c.releaseId = releaseId
  1574  	c.googlefirebaseappdistrov1alphaenableaccessonreleaserequest = googlefirebaseappdistrov1alphaenableaccessonreleaserequest
  1575  	return c
  1576  }
  1577  
  1578  // Fields allows partial responses to be retrieved. See
  1579  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1580  // details.
  1581  func (c *AppsReleasesEnableAccessCall) Fields(s ...googleapi.Field) *AppsReleasesEnableAccessCall {
  1582  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1583  	return c
  1584  }
  1585  
  1586  // Context sets the context to be used in this call's Do method.
  1587  func (c *AppsReleasesEnableAccessCall) Context(ctx context.Context) *AppsReleasesEnableAccessCall {
  1588  	c.ctx_ = ctx
  1589  	return c
  1590  }
  1591  
  1592  // Header returns a http.Header that can be modified by the caller to add
  1593  // headers to the request.
  1594  func (c *AppsReleasesEnableAccessCall) Header() http.Header {
  1595  	if c.header_ == nil {
  1596  		c.header_ = make(http.Header)
  1597  	}
  1598  	return c.header_
  1599  }
  1600  
  1601  func (c *AppsReleasesEnableAccessCall) doRequest(alt string) (*http.Response, error) {
  1602  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1603  	var body io.Reader = nil
  1604  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirebaseappdistrov1alphaenableaccessonreleaserequest)
  1605  	if err != nil {
  1606  		return nil, err
  1607  	}
  1608  	c.urlParams_.Set("alt", alt)
  1609  	c.urlParams_.Set("prettyPrint", "false")
  1610  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{mobilesdkAppId}/releases/{releaseId}/enable_access")
  1611  	urls += "?" + c.urlParams_.Encode()
  1612  	req, err := http.NewRequest("POST", urls, body)
  1613  	if err != nil {
  1614  		return nil, err
  1615  	}
  1616  	req.Header = reqHeaders
  1617  	googleapi.Expand(req.URL, map[string]string{
  1618  		"mobilesdkAppId": c.mobilesdkAppId,
  1619  		"releaseId":      c.releaseId,
  1620  	})
  1621  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1622  }
  1623  
  1624  // Do executes the "firebaseappdistribution.apps.releases.enable_access" call.
  1625  // Any non-2xx status code is an error. Response headers are in either
  1626  // *GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseResponse.ServerResponse.H
  1627  // eader or (if a response was returned at all) in
  1628  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1629  // whether the returned error was because http.StatusNotModified was returned.
  1630  func (c *AppsReleasesEnableAccessCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseResponse, error) {
  1631  	gensupport.SetOptions(c.urlParams_, opts...)
  1632  	res, err := c.doRequest("json")
  1633  	if res != nil && res.StatusCode == http.StatusNotModified {
  1634  		if res.Body != nil {
  1635  			res.Body.Close()
  1636  		}
  1637  		return nil, gensupport.WrapError(&googleapi.Error{
  1638  			Code:   res.StatusCode,
  1639  			Header: res.Header,
  1640  		})
  1641  	}
  1642  	if err != nil {
  1643  		return nil, err
  1644  	}
  1645  	defer googleapi.CloseBody(res)
  1646  	if err := googleapi.CheckResponse(res); err != nil {
  1647  		return nil, gensupport.WrapError(err)
  1648  	}
  1649  	ret := &GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseResponse{
  1650  		ServerResponse: googleapi.ServerResponse{
  1651  			Header:         res.Header,
  1652  			HTTPStatusCode: res.StatusCode,
  1653  		},
  1654  	}
  1655  	target := &ret
  1656  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1657  		return nil, err
  1658  	}
  1659  	return ret, nil
  1660  }
  1661  
  1662  type AppsReleasesNotesCreateCall struct {
  1663  	s                                                       *Service
  1664  	mobilesdkAppId                                          string
  1665  	releaseId                                               string
  1666  	googlefirebaseappdistrov1alphacreatereleasenotesrequest *GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest
  1667  	urlParams_                                              gensupport.URLParams
  1668  	ctx_                                                    context.Context
  1669  	header_                                                 http.Header
  1670  }
  1671  
  1672  // Create: Create release notes on a release.
  1673  //
  1674  //   - mobilesdkAppId: Unique id for a Firebase app of the format:
  1675  //     {version}:{project_number}:{platform}:{hash(bundle_id)} Example:
  1676  //     1:581234567376:android:aa0a3c7b135e90289.
  1677  //   - releaseId: Release identifier.
  1678  func (r *AppsReleasesNotesService) Create(mobilesdkAppId string, releaseId string, googlefirebaseappdistrov1alphacreatereleasenotesrequest *GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest) *AppsReleasesNotesCreateCall {
  1679  	c := &AppsReleasesNotesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1680  	c.mobilesdkAppId = mobilesdkAppId
  1681  	c.releaseId = releaseId
  1682  	c.googlefirebaseappdistrov1alphacreatereleasenotesrequest = googlefirebaseappdistrov1alphacreatereleasenotesrequest
  1683  	return c
  1684  }
  1685  
  1686  // Fields allows partial responses to be retrieved. See
  1687  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1688  // details.
  1689  func (c *AppsReleasesNotesCreateCall) Fields(s ...googleapi.Field) *AppsReleasesNotesCreateCall {
  1690  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1691  	return c
  1692  }
  1693  
  1694  // Context sets the context to be used in this call's Do method.
  1695  func (c *AppsReleasesNotesCreateCall) Context(ctx context.Context) *AppsReleasesNotesCreateCall {
  1696  	c.ctx_ = ctx
  1697  	return c
  1698  }
  1699  
  1700  // Header returns a http.Header that can be modified by the caller to add
  1701  // headers to the request.
  1702  func (c *AppsReleasesNotesCreateCall) Header() http.Header {
  1703  	if c.header_ == nil {
  1704  		c.header_ = make(http.Header)
  1705  	}
  1706  	return c.header_
  1707  }
  1708  
  1709  func (c *AppsReleasesNotesCreateCall) doRequest(alt string) (*http.Response, error) {
  1710  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1711  	var body io.Reader = nil
  1712  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirebaseappdistrov1alphacreatereleasenotesrequest)
  1713  	if err != nil {
  1714  		return nil, err
  1715  	}
  1716  	c.urlParams_.Set("alt", alt)
  1717  	c.urlParams_.Set("prettyPrint", "false")
  1718  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{mobilesdkAppId}/releases/{releaseId}/notes")
  1719  	urls += "?" + c.urlParams_.Encode()
  1720  	req, err := http.NewRequest("POST", urls, body)
  1721  	if err != nil {
  1722  		return nil, err
  1723  	}
  1724  	req.Header = reqHeaders
  1725  	googleapi.Expand(req.URL, map[string]string{
  1726  		"mobilesdkAppId": c.mobilesdkAppId,
  1727  		"releaseId":      c.releaseId,
  1728  	})
  1729  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1730  }
  1731  
  1732  // Do executes the "firebaseappdistribution.apps.releases.notes.create" call.
  1733  // Any non-2xx status code is an error. Response headers are in either
  1734  // *GoogleFirebaseAppdistroV1alphaCreateReleaseNotesResponse.ServerResponse.Head
  1735  // er or (if a response was returned at all) in
  1736  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1737  // whether the returned error was because http.StatusNotModified was returned.
  1738  func (c *AppsReleasesNotesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaCreateReleaseNotesResponse, error) {
  1739  	gensupport.SetOptions(c.urlParams_, opts...)
  1740  	res, err := c.doRequest("json")
  1741  	if res != nil && res.StatusCode == http.StatusNotModified {
  1742  		if res.Body != nil {
  1743  			res.Body.Close()
  1744  		}
  1745  		return nil, gensupport.WrapError(&googleapi.Error{
  1746  			Code:   res.StatusCode,
  1747  			Header: res.Header,
  1748  		})
  1749  	}
  1750  	if err != nil {
  1751  		return nil, err
  1752  	}
  1753  	defer googleapi.CloseBody(res)
  1754  	if err := googleapi.CheckResponse(res); err != nil {
  1755  		return nil, gensupport.WrapError(err)
  1756  	}
  1757  	ret := &GoogleFirebaseAppdistroV1alphaCreateReleaseNotesResponse{
  1758  		ServerResponse: googleapi.ServerResponse{
  1759  			Header:         res.Header,
  1760  			HTTPStatusCode: res.StatusCode,
  1761  		},
  1762  	}
  1763  	target := &ret
  1764  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1765  		return nil, err
  1766  	}
  1767  	return ret, nil
  1768  }
  1769  
  1770  type AppsTestersGetTesterUdidsCall struct {
  1771  	s              *Service
  1772  	mobilesdkAppId string
  1773  	urlParams_     gensupport.URLParams
  1774  	ifNoneMatch_   string
  1775  	ctx_           context.Context
  1776  	header_        http.Header
  1777  }
  1778  
  1779  // GetTesterUdids: Get UDIDs of tester iOS devices in a project
  1780  //
  1781  //   - mobilesdkAppId: Unique id for a Firebase app of the format:
  1782  //     {version}:{project_number}:{platform}:{hash(bundle_id)} Example:
  1783  //     1:581234567376:android:aa0a3c7b135e90289.
  1784  func (r *AppsTestersService) GetTesterUdids(mobilesdkAppId string) *AppsTestersGetTesterUdidsCall {
  1785  	c := &AppsTestersGetTesterUdidsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1786  	c.mobilesdkAppId = mobilesdkAppId
  1787  	return c
  1788  }
  1789  
  1790  // Project sets the optional parameter "project": The name of the project,
  1791  // which is the parent of testers Format: `projects/{project_number}`
  1792  func (c *AppsTestersGetTesterUdidsCall) Project(project string) *AppsTestersGetTesterUdidsCall {
  1793  	c.urlParams_.Set("project", project)
  1794  	return c
  1795  }
  1796  
  1797  // Fields allows partial responses to be retrieved. See
  1798  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1799  // details.
  1800  func (c *AppsTestersGetTesterUdidsCall) Fields(s ...googleapi.Field) *AppsTestersGetTesterUdidsCall {
  1801  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1802  	return c
  1803  }
  1804  
  1805  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1806  // object's ETag matches the given value. This is useful for getting updates
  1807  // only after the object has changed since the last request.
  1808  func (c *AppsTestersGetTesterUdidsCall) IfNoneMatch(entityTag string) *AppsTestersGetTesterUdidsCall {
  1809  	c.ifNoneMatch_ = entityTag
  1810  	return c
  1811  }
  1812  
  1813  // Context sets the context to be used in this call's Do method.
  1814  func (c *AppsTestersGetTesterUdidsCall) Context(ctx context.Context) *AppsTestersGetTesterUdidsCall {
  1815  	c.ctx_ = ctx
  1816  	return c
  1817  }
  1818  
  1819  // Header returns a http.Header that can be modified by the caller to add
  1820  // headers to the request.
  1821  func (c *AppsTestersGetTesterUdidsCall) Header() http.Header {
  1822  	if c.header_ == nil {
  1823  		c.header_ = make(http.Header)
  1824  	}
  1825  	return c.header_
  1826  }
  1827  
  1828  func (c *AppsTestersGetTesterUdidsCall) doRequest(alt string) (*http.Response, error) {
  1829  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1830  	if c.ifNoneMatch_ != "" {
  1831  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1832  	}
  1833  	var body io.Reader = nil
  1834  	c.urlParams_.Set("alt", alt)
  1835  	c.urlParams_.Set("prettyPrint", "false")
  1836  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{mobilesdkAppId}/testers:getTesterUdids")
  1837  	urls += "?" + c.urlParams_.Encode()
  1838  	req, err := http.NewRequest("GET", urls, body)
  1839  	if err != nil {
  1840  		return nil, err
  1841  	}
  1842  	req.Header = reqHeaders
  1843  	googleapi.Expand(req.URL, map[string]string{
  1844  		"mobilesdkAppId": c.mobilesdkAppId,
  1845  	})
  1846  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1847  }
  1848  
  1849  // Do executes the "firebaseappdistribution.apps.testers.getTesterUdids" call.
  1850  // Any non-2xx status code is an error. Response headers are in either
  1851  // *GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse.ServerResponse.Header
  1852  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  1853  // Use googleapi.IsNotModified to check whether the returned error was because
  1854  // http.StatusNotModified was returned.
  1855  func (c *AppsTestersGetTesterUdidsCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse, error) {
  1856  	gensupport.SetOptions(c.urlParams_, opts...)
  1857  	res, err := c.doRequest("json")
  1858  	if res != nil && res.StatusCode == http.StatusNotModified {
  1859  		if res.Body != nil {
  1860  			res.Body.Close()
  1861  		}
  1862  		return nil, gensupport.WrapError(&googleapi.Error{
  1863  			Code:   res.StatusCode,
  1864  			Header: res.Header,
  1865  		})
  1866  	}
  1867  	if err != nil {
  1868  		return nil, err
  1869  	}
  1870  	defer googleapi.CloseBody(res)
  1871  	if err := googleapi.CheckResponse(res); err != nil {
  1872  		return nil, gensupport.WrapError(err)
  1873  	}
  1874  	ret := &GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse{
  1875  		ServerResponse: googleapi.ServerResponse{
  1876  			Header:         res.Header,
  1877  			HTTPStatusCode: res.StatusCode,
  1878  		},
  1879  	}
  1880  	target := &ret
  1881  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1882  		return nil, err
  1883  	}
  1884  	return ret, nil
  1885  }
  1886  
  1887  type AppsUploadStatusGetCall struct {
  1888  	s              *Service
  1889  	mobilesdkAppId string
  1890  	uploadToken    string
  1891  	urlParams_     gensupport.URLParams
  1892  	ifNoneMatch_   string
  1893  	ctx_           context.Context
  1894  	header_        http.Header
  1895  }
  1896  
  1897  // Get: GET Binary upload status by token
  1898  //
  1899  //   - mobilesdkAppId: Unique id for a Firebase app of the format:
  1900  //     {version}:{project_number}:{platform}:{hash(bundle_id)} Example:
  1901  //     1:581234567376:android:aa0a3c7b135e90289.
  1902  //   - uploadToken: The token for the upload.
  1903  func (r *AppsUploadStatusService) Get(mobilesdkAppId string, uploadToken string) *AppsUploadStatusGetCall {
  1904  	c := &AppsUploadStatusGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1905  	c.mobilesdkAppId = mobilesdkAppId
  1906  	c.uploadToken = uploadToken
  1907  	return c
  1908  }
  1909  
  1910  // Fields allows partial responses to be retrieved. See
  1911  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1912  // details.
  1913  func (c *AppsUploadStatusGetCall) Fields(s ...googleapi.Field) *AppsUploadStatusGetCall {
  1914  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1915  	return c
  1916  }
  1917  
  1918  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1919  // object's ETag matches the given value. This is useful for getting updates
  1920  // only after the object has changed since the last request.
  1921  func (c *AppsUploadStatusGetCall) IfNoneMatch(entityTag string) *AppsUploadStatusGetCall {
  1922  	c.ifNoneMatch_ = entityTag
  1923  	return c
  1924  }
  1925  
  1926  // Context sets the context to be used in this call's Do method.
  1927  func (c *AppsUploadStatusGetCall) Context(ctx context.Context) *AppsUploadStatusGetCall {
  1928  	c.ctx_ = ctx
  1929  	return c
  1930  }
  1931  
  1932  // Header returns a http.Header that can be modified by the caller to add
  1933  // headers to the request.
  1934  func (c *AppsUploadStatusGetCall) Header() http.Header {
  1935  	if c.header_ == nil {
  1936  		c.header_ = make(http.Header)
  1937  	}
  1938  	return c.header_
  1939  }
  1940  
  1941  func (c *AppsUploadStatusGetCall) doRequest(alt string) (*http.Response, error) {
  1942  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1943  	if c.ifNoneMatch_ != "" {
  1944  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1945  	}
  1946  	var body io.Reader = nil
  1947  	c.urlParams_.Set("alt", alt)
  1948  	c.urlParams_.Set("prettyPrint", "false")
  1949  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{mobilesdkAppId}/upload_status/{uploadToken}")
  1950  	urls += "?" + c.urlParams_.Encode()
  1951  	req, err := http.NewRequest("GET", urls, body)
  1952  	if err != nil {
  1953  		return nil, err
  1954  	}
  1955  	req.Header = reqHeaders
  1956  	googleapi.Expand(req.URL, map[string]string{
  1957  		"mobilesdkAppId": c.mobilesdkAppId,
  1958  		"uploadToken":    c.uploadToken,
  1959  	})
  1960  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1961  }
  1962  
  1963  // Do executes the "firebaseappdistribution.apps.upload_status.get" call.
  1964  // Any non-2xx status code is an error. Response headers are in either
  1965  // *GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse.ServerResponse.Header
  1966  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  1967  // Use googleapi.IsNotModified to check whether the returned error was because
  1968  // http.StatusNotModified was returned.
  1969  func (c *AppsUploadStatusGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse, error) {
  1970  	gensupport.SetOptions(c.urlParams_, opts...)
  1971  	res, err := c.doRequest("json")
  1972  	if res != nil && res.StatusCode == http.StatusNotModified {
  1973  		if res.Body != nil {
  1974  			res.Body.Close()
  1975  		}
  1976  		return nil, gensupport.WrapError(&googleapi.Error{
  1977  			Code:   res.StatusCode,
  1978  			Header: res.Header,
  1979  		})
  1980  	}
  1981  	if err != nil {
  1982  		return nil, err
  1983  	}
  1984  	defer googleapi.CloseBody(res)
  1985  	if err := googleapi.CheckResponse(res); err != nil {
  1986  		return nil, gensupport.WrapError(err)
  1987  	}
  1988  	ret := &GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse{
  1989  		ServerResponse: googleapi.ServerResponse{
  1990  			Header:         res.Header,
  1991  			HTTPStatusCode: res.StatusCode,
  1992  		},
  1993  	}
  1994  	target := &ret
  1995  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1996  		return nil, err
  1997  	}
  1998  	return ret, nil
  1999  }
  2000  
  2001  type ProjectsAppsGetTestConfigCall struct {
  2002  	s            *Service
  2003  	name         string
  2004  	urlParams_   gensupport.URLParams
  2005  	ifNoneMatch_ string
  2006  	ctx_         context.Context
  2007  	header_      http.Header
  2008  }
  2009  
  2010  // GetTestConfig: Gets configuration for automated tests.
  2011  //
  2012  //   - name: The name of the `TestConfig` resource to retrieve. Format:
  2013  //     `projects/{project_number}/apps/{app_id}/testConfig`.
  2014  func (r *ProjectsAppsService) GetTestConfig(name string) *ProjectsAppsGetTestConfigCall {
  2015  	c := &ProjectsAppsGetTestConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2016  	c.name = name
  2017  	return c
  2018  }
  2019  
  2020  // Fields allows partial responses to be retrieved. See
  2021  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2022  // details.
  2023  func (c *ProjectsAppsGetTestConfigCall) Fields(s ...googleapi.Field) *ProjectsAppsGetTestConfigCall {
  2024  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2025  	return c
  2026  }
  2027  
  2028  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2029  // object's ETag matches the given value. This is useful for getting updates
  2030  // only after the object has changed since the last request.
  2031  func (c *ProjectsAppsGetTestConfigCall) IfNoneMatch(entityTag string) *ProjectsAppsGetTestConfigCall {
  2032  	c.ifNoneMatch_ = entityTag
  2033  	return c
  2034  }
  2035  
  2036  // Context sets the context to be used in this call's Do method.
  2037  func (c *ProjectsAppsGetTestConfigCall) Context(ctx context.Context) *ProjectsAppsGetTestConfigCall {
  2038  	c.ctx_ = ctx
  2039  	return c
  2040  }
  2041  
  2042  // Header returns a http.Header that can be modified by the caller to add
  2043  // headers to the request.
  2044  func (c *ProjectsAppsGetTestConfigCall) Header() http.Header {
  2045  	if c.header_ == nil {
  2046  		c.header_ = make(http.Header)
  2047  	}
  2048  	return c.header_
  2049  }
  2050  
  2051  func (c *ProjectsAppsGetTestConfigCall) doRequest(alt string) (*http.Response, error) {
  2052  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2053  	if c.ifNoneMatch_ != "" {
  2054  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2055  	}
  2056  	var body io.Reader = nil
  2057  	c.urlParams_.Set("alt", alt)
  2058  	c.urlParams_.Set("prettyPrint", "false")
  2059  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  2060  	urls += "?" + c.urlParams_.Encode()
  2061  	req, err := http.NewRequest("GET", urls, body)
  2062  	if err != nil {
  2063  		return nil, err
  2064  	}
  2065  	req.Header = reqHeaders
  2066  	googleapi.Expand(req.URL, map[string]string{
  2067  		"name": c.name,
  2068  	})
  2069  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2070  }
  2071  
  2072  // Do executes the "firebaseappdistribution.projects.apps.getTestConfig" call.
  2073  // Any non-2xx status code is an error. Response headers are in either
  2074  // *GoogleFirebaseAppdistroV1alphaTestConfig.ServerResponse.Header or (if a
  2075  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2076  // googleapi.IsNotModified to check whether the returned error was because
  2077  // http.StatusNotModified was returned.
  2078  func (c *ProjectsAppsGetTestConfigCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaTestConfig, error) {
  2079  	gensupport.SetOptions(c.urlParams_, opts...)
  2080  	res, err := c.doRequest("json")
  2081  	if res != nil && res.StatusCode == http.StatusNotModified {
  2082  		if res.Body != nil {
  2083  			res.Body.Close()
  2084  		}
  2085  		return nil, gensupport.WrapError(&googleapi.Error{
  2086  			Code:   res.StatusCode,
  2087  			Header: res.Header,
  2088  		})
  2089  	}
  2090  	if err != nil {
  2091  		return nil, err
  2092  	}
  2093  	defer googleapi.CloseBody(res)
  2094  	if err := googleapi.CheckResponse(res); err != nil {
  2095  		return nil, gensupport.WrapError(err)
  2096  	}
  2097  	ret := &GoogleFirebaseAppdistroV1alphaTestConfig{
  2098  		ServerResponse: googleapi.ServerResponse{
  2099  			Header:         res.Header,
  2100  			HTTPStatusCode: res.StatusCode,
  2101  		},
  2102  	}
  2103  	target := &ret
  2104  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2105  		return nil, err
  2106  	}
  2107  	return ret, nil
  2108  }
  2109  
  2110  type ProjectsAppsUpdateTestConfigCall struct {
  2111  	s                                        *Service
  2112  	name                                     string
  2113  	googlefirebaseappdistrov1alphatestconfig *GoogleFirebaseAppdistroV1alphaTestConfig
  2114  	urlParams_                               gensupport.URLParams
  2115  	ctx_                                     context.Context
  2116  	header_                                  http.Header
  2117  }
  2118  
  2119  // UpdateTestConfig: Updates a release.
  2120  //
  2121  //   - name: Identifier. The name of the test configuration resource. Format:
  2122  //     `projects/{project_number}/apps/{app_id}/testConfig`.
  2123  func (r *ProjectsAppsService) UpdateTestConfig(name string, googlefirebaseappdistrov1alphatestconfig *GoogleFirebaseAppdistroV1alphaTestConfig) *ProjectsAppsUpdateTestConfigCall {
  2124  	c := &ProjectsAppsUpdateTestConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2125  	c.name = name
  2126  	c.googlefirebaseappdistrov1alphatestconfig = googlefirebaseappdistrov1alphatestconfig
  2127  	return c
  2128  }
  2129  
  2130  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  2131  // update.
  2132  func (c *ProjectsAppsUpdateTestConfigCall) UpdateMask(updateMask string) *ProjectsAppsUpdateTestConfigCall {
  2133  	c.urlParams_.Set("updateMask", updateMask)
  2134  	return c
  2135  }
  2136  
  2137  // Fields allows partial responses to be retrieved. See
  2138  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2139  // details.
  2140  func (c *ProjectsAppsUpdateTestConfigCall) Fields(s ...googleapi.Field) *ProjectsAppsUpdateTestConfigCall {
  2141  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2142  	return c
  2143  }
  2144  
  2145  // Context sets the context to be used in this call's Do method.
  2146  func (c *ProjectsAppsUpdateTestConfigCall) Context(ctx context.Context) *ProjectsAppsUpdateTestConfigCall {
  2147  	c.ctx_ = ctx
  2148  	return c
  2149  }
  2150  
  2151  // Header returns a http.Header that can be modified by the caller to add
  2152  // headers to the request.
  2153  func (c *ProjectsAppsUpdateTestConfigCall) Header() http.Header {
  2154  	if c.header_ == nil {
  2155  		c.header_ = make(http.Header)
  2156  	}
  2157  	return c.header_
  2158  }
  2159  
  2160  func (c *ProjectsAppsUpdateTestConfigCall) doRequest(alt string) (*http.Response, error) {
  2161  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2162  	var body io.Reader = nil
  2163  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirebaseappdistrov1alphatestconfig)
  2164  	if err != nil {
  2165  		return nil, err
  2166  	}
  2167  	c.urlParams_.Set("alt", alt)
  2168  	c.urlParams_.Set("prettyPrint", "false")
  2169  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  2170  	urls += "?" + c.urlParams_.Encode()
  2171  	req, err := http.NewRequest("PATCH", urls, body)
  2172  	if err != nil {
  2173  		return nil, err
  2174  	}
  2175  	req.Header = reqHeaders
  2176  	googleapi.Expand(req.URL, map[string]string{
  2177  		"name": c.name,
  2178  	})
  2179  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2180  }
  2181  
  2182  // Do executes the "firebaseappdistribution.projects.apps.updateTestConfig" call.
  2183  // Any non-2xx status code is an error. Response headers are in either
  2184  // *GoogleFirebaseAppdistroV1alphaTestConfig.ServerResponse.Header or (if a
  2185  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2186  // googleapi.IsNotModified to check whether the returned error was because
  2187  // http.StatusNotModified was returned.
  2188  func (c *ProjectsAppsUpdateTestConfigCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaTestConfig, error) {
  2189  	gensupport.SetOptions(c.urlParams_, opts...)
  2190  	res, err := c.doRequest("json")
  2191  	if res != nil && res.StatusCode == http.StatusNotModified {
  2192  		if res.Body != nil {
  2193  			res.Body.Close()
  2194  		}
  2195  		return nil, gensupport.WrapError(&googleapi.Error{
  2196  			Code:   res.StatusCode,
  2197  			Header: res.Header,
  2198  		})
  2199  	}
  2200  	if err != nil {
  2201  		return nil, err
  2202  	}
  2203  	defer googleapi.CloseBody(res)
  2204  	if err := googleapi.CheckResponse(res); err != nil {
  2205  		return nil, gensupport.WrapError(err)
  2206  	}
  2207  	ret := &GoogleFirebaseAppdistroV1alphaTestConfig{
  2208  		ServerResponse: googleapi.ServerResponse{
  2209  			Header:         res.Header,
  2210  			HTTPStatusCode: res.StatusCode,
  2211  		},
  2212  	}
  2213  	target := &ret
  2214  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2215  		return nil, err
  2216  	}
  2217  	return ret, nil
  2218  }
  2219  
  2220  type ProjectsAppsReleasesTestsCreateCall struct {
  2221  	s                                         *Service
  2222  	parent                                    string
  2223  	googlefirebaseappdistrov1alphareleasetest *GoogleFirebaseAppdistroV1alphaReleaseTest
  2224  	urlParams_                                gensupport.URLParams
  2225  	ctx_                                      context.Context
  2226  	header_                                   http.Header
  2227  }
  2228  
  2229  // Create: Run automated test(s) on release.
  2230  //
  2231  //   - parent: The name of the release resource, which is the parent of the test
  2232  //     Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}`.
  2233  func (r *ProjectsAppsReleasesTestsService) Create(parent string, googlefirebaseappdistrov1alphareleasetest *GoogleFirebaseAppdistroV1alphaReleaseTest) *ProjectsAppsReleasesTestsCreateCall {
  2234  	c := &ProjectsAppsReleasesTestsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2235  	c.parent = parent
  2236  	c.googlefirebaseappdistrov1alphareleasetest = googlefirebaseappdistrov1alphareleasetest
  2237  	return c
  2238  }
  2239  
  2240  // ReleaseTestId sets the optional parameter "releaseTestId": The ID to use for
  2241  // the test, which will become the final component of the tests's resource
  2242  // name. This value should be 4-63 characters, and valid characters are /a-z-/.
  2243  // If it is not provided one will be automatically generated.
  2244  func (c *ProjectsAppsReleasesTestsCreateCall) ReleaseTestId(releaseTestId string) *ProjectsAppsReleasesTestsCreateCall {
  2245  	c.urlParams_.Set("releaseTestId", releaseTestId)
  2246  	return c
  2247  }
  2248  
  2249  // Fields allows partial responses to be retrieved. See
  2250  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2251  // details.
  2252  func (c *ProjectsAppsReleasesTestsCreateCall) Fields(s ...googleapi.Field) *ProjectsAppsReleasesTestsCreateCall {
  2253  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2254  	return c
  2255  }
  2256  
  2257  // Context sets the context to be used in this call's Do method.
  2258  func (c *ProjectsAppsReleasesTestsCreateCall) Context(ctx context.Context) *ProjectsAppsReleasesTestsCreateCall {
  2259  	c.ctx_ = ctx
  2260  	return c
  2261  }
  2262  
  2263  // Header returns a http.Header that can be modified by the caller to add
  2264  // headers to the request.
  2265  func (c *ProjectsAppsReleasesTestsCreateCall) Header() http.Header {
  2266  	if c.header_ == nil {
  2267  		c.header_ = make(http.Header)
  2268  	}
  2269  	return c.header_
  2270  }
  2271  
  2272  func (c *ProjectsAppsReleasesTestsCreateCall) doRequest(alt string) (*http.Response, error) {
  2273  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2274  	var body io.Reader = nil
  2275  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirebaseappdistrov1alphareleasetest)
  2276  	if err != nil {
  2277  		return nil, err
  2278  	}
  2279  	c.urlParams_.Set("alt", alt)
  2280  	c.urlParams_.Set("prettyPrint", "false")
  2281  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/tests")
  2282  	urls += "?" + c.urlParams_.Encode()
  2283  	req, err := http.NewRequest("POST", urls, body)
  2284  	if err != nil {
  2285  		return nil, err
  2286  	}
  2287  	req.Header = reqHeaders
  2288  	googleapi.Expand(req.URL, map[string]string{
  2289  		"parent": c.parent,
  2290  	})
  2291  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2292  }
  2293  
  2294  // Do executes the "firebaseappdistribution.projects.apps.releases.tests.create" call.
  2295  // Any non-2xx status code is an error. Response headers are in either
  2296  // *GoogleFirebaseAppdistroV1alphaReleaseTest.ServerResponse.Header or (if a
  2297  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2298  // googleapi.IsNotModified to check whether the returned error was because
  2299  // http.StatusNotModified was returned.
  2300  func (c *ProjectsAppsReleasesTestsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaReleaseTest, error) {
  2301  	gensupport.SetOptions(c.urlParams_, opts...)
  2302  	res, err := c.doRequest("json")
  2303  	if res != nil && res.StatusCode == http.StatusNotModified {
  2304  		if res.Body != nil {
  2305  			res.Body.Close()
  2306  		}
  2307  		return nil, gensupport.WrapError(&googleapi.Error{
  2308  			Code:   res.StatusCode,
  2309  			Header: res.Header,
  2310  		})
  2311  	}
  2312  	if err != nil {
  2313  		return nil, err
  2314  	}
  2315  	defer googleapi.CloseBody(res)
  2316  	if err := googleapi.CheckResponse(res); err != nil {
  2317  		return nil, gensupport.WrapError(err)
  2318  	}
  2319  	ret := &GoogleFirebaseAppdistroV1alphaReleaseTest{
  2320  		ServerResponse: googleapi.ServerResponse{
  2321  			Header:         res.Header,
  2322  			HTTPStatusCode: res.StatusCode,
  2323  		},
  2324  	}
  2325  	target := &ret
  2326  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2327  		return nil, err
  2328  	}
  2329  	return ret, nil
  2330  }
  2331  
  2332  type ProjectsAppsReleasesTestsGetCall struct {
  2333  	s            *Service
  2334  	name         string
  2335  	urlParams_   gensupport.URLParams
  2336  	ifNoneMatch_ string
  2337  	ctx_         context.Context
  2338  	header_      http.Header
  2339  }
  2340  
  2341  // Get: Get results for automated test run on release.
  2342  //
  2343  //   - name: The name of the release test resource. Format:
  2344  //     `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_
  2345  //     id}`.
  2346  func (r *ProjectsAppsReleasesTestsService) Get(name string) *ProjectsAppsReleasesTestsGetCall {
  2347  	c := &ProjectsAppsReleasesTestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2348  	c.name = name
  2349  	return c
  2350  }
  2351  
  2352  // Fields allows partial responses to be retrieved. See
  2353  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2354  // details.
  2355  func (c *ProjectsAppsReleasesTestsGetCall) Fields(s ...googleapi.Field) *ProjectsAppsReleasesTestsGetCall {
  2356  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2357  	return c
  2358  }
  2359  
  2360  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2361  // object's ETag matches the given value. This is useful for getting updates
  2362  // only after the object has changed since the last request.
  2363  func (c *ProjectsAppsReleasesTestsGetCall) IfNoneMatch(entityTag string) *ProjectsAppsReleasesTestsGetCall {
  2364  	c.ifNoneMatch_ = entityTag
  2365  	return c
  2366  }
  2367  
  2368  // Context sets the context to be used in this call's Do method.
  2369  func (c *ProjectsAppsReleasesTestsGetCall) Context(ctx context.Context) *ProjectsAppsReleasesTestsGetCall {
  2370  	c.ctx_ = ctx
  2371  	return c
  2372  }
  2373  
  2374  // Header returns a http.Header that can be modified by the caller to add
  2375  // headers to the request.
  2376  func (c *ProjectsAppsReleasesTestsGetCall) Header() http.Header {
  2377  	if c.header_ == nil {
  2378  		c.header_ = make(http.Header)
  2379  	}
  2380  	return c.header_
  2381  }
  2382  
  2383  func (c *ProjectsAppsReleasesTestsGetCall) doRequest(alt string) (*http.Response, error) {
  2384  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2385  	if c.ifNoneMatch_ != "" {
  2386  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2387  	}
  2388  	var body io.Reader = nil
  2389  	c.urlParams_.Set("alt", alt)
  2390  	c.urlParams_.Set("prettyPrint", "false")
  2391  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  2392  	urls += "?" + c.urlParams_.Encode()
  2393  	req, err := http.NewRequest("GET", urls, body)
  2394  	if err != nil {
  2395  		return nil, err
  2396  	}
  2397  	req.Header = reqHeaders
  2398  	googleapi.Expand(req.URL, map[string]string{
  2399  		"name": c.name,
  2400  	})
  2401  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2402  }
  2403  
  2404  // Do executes the "firebaseappdistribution.projects.apps.releases.tests.get" call.
  2405  // Any non-2xx status code is an error. Response headers are in either
  2406  // *GoogleFirebaseAppdistroV1alphaReleaseTest.ServerResponse.Header or (if a
  2407  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2408  // googleapi.IsNotModified to check whether the returned error was because
  2409  // http.StatusNotModified was returned.
  2410  func (c *ProjectsAppsReleasesTestsGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaReleaseTest, error) {
  2411  	gensupport.SetOptions(c.urlParams_, opts...)
  2412  	res, err := c.doRequest("json")
  2413  	if res != nil && res.StatusCode == http.StatusNotModified {
  2414  		if res.Body != nil {
  2415  			res.Body.Close()
  2416  		}
  2417  		return nil, gensupport.WrapError(&googleapi.Error{
  2418  			Code:   res.StatusCode,
  2419  			Header: res.Header,
  2420  		})
  2421  	}
  2422  	if err != nil {
  2423  		return nil, err
  2424  	}
  2425  	defer googleapi.CloseBody(res)
  2426  	if err := googleapi.CheckResponse(res); err != nil {
  2427  		return nil, gensupport.WrapError(err)
  2428  	}
  2429  	ret := &GoogleFirebaseAppdistroV1alphaReleaseTest{
  2430  		ServerResponse: googleapi.ServerResponse{
  2431  			Header:         res.Header,
  2432  			HTTPStatusCode: res.StatusCode,
  2433  		},
  2434  	}
  2435  	target := &ret
  2436  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2437  		return nil, err
  2438  	}
  2439  	return ret, nil
  2440  }
  2441  
  2442  type ProjectsAppsReleasesTestsListCall struct {
  2443  	s            *Service
  2444  	parent       string
  2445  	urlParams_   gensupport.URLParams
  2446  	ifNoneMatch_ string
  2447  	ctx_         context.Context
  2448  	header_      http.Header
  2449  }
  2450  
  2451  // List: List results for automated tests run on release.
  2452  //
  2453  //   - parent: The name of the release resource, which is the parent of the tests
  2454  //     Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}`.
  2455  func (r *ProjectsAppsReleasesTestsService) List(parent string) *ProjectsAppsReleasesTestsListCall {
  2456  	c := &ProjectsAppsReleasesTestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2457  	c.parent = parent
  2458  	return c
  2459  }
  2460  
  2461  // PageSize sets the optional parameter "pageSize": The maximum number of tests
  2462  // to return. The service may return fewer than this value.
  2463  func (c *ProjectsAppsReleasesTestsListCall) PageSize(pageSize int64) *ProjectsAppsReleasesTestsListCall {
  2464  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2465  	return c
  2466  }
  2467  
  2468  // PageToken sets the optional parameter "pageToken": A page token, received
  2469  // from a previous `ListReleaseTests` call. Provide this to retrieve the
  2470  // subsequent page.
  2471  func (c *ProjectsAppsReleasesTestsListCall) PageToken(pageToken string) *ProjectsAppsReleasesTestsListCall {
  2472  	c.urlParams_.Set("pageToken", pageToken)
  2473  	return c
  2474  }
  2475  
  2476  // Fields allows partial responses to be retrieved. See
  2477  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2478  // details.
  2479  func (c *ProjectsAppsReleasesTestsListCall) Fields(s ...googleapi.Field) *ProjectsAppsReleasesTestsListCall {
  2480  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2481  	return c
  2482  }
  2483  
  2484  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2485  // object's ETag matches the given value. This is useful for getting updates
  2486  // only after the object has changed since the last request.
  2487  func (c *ProjectsAppsReleasesTestsListCall) IfNoneMatch(entityTag string) *ProjectsAppsReleasesTestsListCall {
  2488  	c.ifNoneMatch_ = entityTag
  2489  	return c
  2490  }
  2491  
  2492  // Context sets the context to be used in this call's Do method.
  2493  func (c *ProjectsAppsReleasesTestsListCall) Context(ctx context.Context) *ProjectsAppsReleasesTestsListCall {
  2494  	c.ctx_ = ctx
  2495  	return c
  2496  }
  2497  
  2498  // Header returns a http.Header that can be modified by the caller to add
  2499  // headers to the request.
  2500  func (c *ProjectsAppsReleasesTestsListCall) Header() http.Header {
  2501  	if c.header_ == nil {
  2502  		c.header_ = make(http.Header)
  2503  	}
  2504  	return c.header_
  2505  }
  2506  
  2507  func (c *ProjectsAppsReleasesTestsListCall) doRequest(alt string) (*http.Response, error) {
  2508  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2509  	if c.ifNoneMatch_ != "" {
  2510  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2511  	}
  2512  	var body io.Reader = nil
  2513  	c.urlParams_.Set("alt", alt)
  2514  	c.urlParams_.Set("prettyPrint", "false")
  2515  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/tests")
  2516  	urls += "?" + c.urlParams_.Encode()
  2517  	req, err := http.NewRequest("GET", urls, body)
  2518  	if err != nil {
  2519  		return nil, err
  2520  	}
  2521  	req.Header = reqHeaders
  2522  	googleapi.Expand(req.URL, map[string]string{
  2523  		"parent": c.parent,
  2524  	})
  2525  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2526  }
  2527  
  2528  // Do executes the "firebaseappdistribution.projects.apps.releases.tests.list" call.
  2529  // Any non-2xx status code is an error. Response headers are in either
  2530  // *GoogleFirebaseAppdistroV1alphaListReleaseTestsResponse.ServerResponse.Header
  2531  //
  2532  //	or (if a response was returned at all) in error.(*googleapi.Error).Header.
  2533  //
  2534  // Use googleapi.IsNotModified to check whether the returned error was because
  2535  // http.StatusNotModified was returned.
  2536  func (c *ProjectsAppsReleasesTestsListCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaListReleaseTestsResponse, error) {
  2537  	gensupport.SetOptions(c.urlParams_, opts...)
  2538  	res, err := c.doRequest("json")
  2539  	if res != nil && res.StatusCode == http.StatusNotModified {
  2540  		if res.Body != nil {
  2541  			res.Body.Close()
  2542  		}
  2543  		return nil, gensupport.WrapError(&googleapi.Error{
  2544  			Code:   res.StatusCode,
  2545  			Header: res.Header,
  2546  		})
  2547  	}
  2548  	if err != nil {
  2549  		return nil, err
  2550  	}
  2551  	defer googleapi.CloseBody(res)
  2552  	if err := googleapi.CheckResponse(res); err != nil {
  2553  		return nil, gensupport.WrapError(err)
  2554  	}
  2555  	ret := &GoogleFirebaseAppdistroV1alphaListReleaseTestsResponse{
  2556  		ServerResponse: googleapi.ServerResponse{
  2557  			Header:         res.Header,
  2558  			HTTPStatusCode: res.StatusCode,
  2559  		},
  2560  	}
  2561  	target := &ret
  2562  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2563  		return nil, err
  2564  	}
  2565  	return ret, nil
  2566  }
  2567  
  2568  // Pages invokes f for each page of results.
  2569  // A non-nil error returned from f will halt the iteration.
  2570  // The provided context supersedes any context provided to the Context method.
  2571  func (c *ProjectsAppsReleasesTestsListCall) Pages(ctx context.Context, f func(*GoogleFirebaseAppdistroV1alphaListReleaseTestsResponse) error) error {
  2572  	c.ctx_ = ctx
  2573  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2574  	for {
  2575  		x, err := c.Do()
  2576  		if err != nil {
  2577  			return err
  2578  		}
  2579  		if err := f(x); err != nil {
  2580  			return err
  2581  		}
  2582  		if x.NextPageToken == "" {
  2583  			return nil
  2584  		}
  2585  		c.PageToken(x.NextPageToken)
  2586  	}
  2587  }
  2588  
  2589  type ProjectsTestersGetUdidsCall struct {
  2590  	s            *Service
  2591  	project      string
  2592  	urlParams_   gensupport.URLParams
  2593  	ifNoneMatch_ string
  2594  	ctx_         context.Context
  2595  	header_      http.Header
  2596  }
  2597  
  2598  // GetUdids: Get UDIDs of tester iOS devices in a project
  2599  //
  2600  //   - project: The name of the project, which is the parent of testers Format:
  2601  //     `projects/{project_number}`.
  2602  func (r *ProjectsTestersService) GetUdids(project string) *ProjectsTestersGetUdidsCall {
  2603  	c := &ProjectsTestersGetUdidsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2604  	c.project = project
  2605  	return c
  2606  }
  2607  
  2608  // MobilesdkAppId sets the optional parameter "mobilesdkAppId": Unique id for a
  2609  // Firebase app of the format:
  2610  // {version}:{project_number}:{platform}:{hash(bundle_id)} Example:
  2611  // 1:581234567376:android:aa0a3c7b135e90289
  2612  func (c *ProjectsTestersGetUdidsCall) MobilesdkAppId(mobilesdkAppId string) *ProjectsTestersGetUdidsCall {
  2613  	c.urlParams_.Set("mobilesdkAppId", mobilesdkAppId)
  2614  	return c
  2615  }
  2616  
  2617  // Fields allows partial responses to be retrieved. See
  2618  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2619  // details.
  2620  func (c *ProjectsTestersGetUdidsCall) Fields(s ...googleapi.Field) *ProjectsTestersGetUdidsCall {
  2621  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2622  	return c
  2623  }
  2624  
  2625  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2626  // object's ETag matches the given value. This is useful for getting updates
  2627  // only after the object has changed since the last request.
  2628  func (c *ProjectsTestersGetUdidsCall) IfNoneMatch(entityTag string) *ProjectsTestersGetUdidsCall {
  2629  	c.ifNoneMatch_ = entityTag
  2630  	return c
  2631  }
  2632  
  2633  // Context sets the context to be used in this call's Do method.
  2634  func (c *ProjectsTestersGetUdidsCall) Context(ctx context.Context) *ProjectsTestersGetUdidsCall {
  2635  	c.ctx_ = ctx
  2636  	return c
  2637  }
  2638  
  2639  // Header returns a http.Header that can be modified by the caller to add
  2640  // headers to the request.
  2641  func (c *ProjectsTestersGetUdidsCall) Header() http.Header {
  2642  	if c.header_ == nil {
  2643  		c.header_ = make(http.Header)
  2644  	}
  2645  	return c.header_
  2646  }
  2647  
  2648  func (c *ProjectsTestersGetUdidsCall) doRequest(alt string) (*http.Response, error) {
  2649  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2650  	if c.ifNoneMatch_ != "" {
  2651  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2652  	}
  2653  	var body io.Reader = nil
  2654  	c.urlParams_.Set("alt", alt)
  2655  	c.urlParams_.Set("prettyPrint", "false")
  2656  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+project}/testers:udids")
  2657  	urls += "?" + c.urlParams_.Encode()
  2658  	req, err := http.NewRequest("GET", urls, body)
  2659  	if err != nil {
  2660  		return nil, err
  2661  	}
  2662  	req.Header = reqHeaders
  2663  	googleapi.Expand(req.URL, map[string]string{
  2664  		"project": c.project,
  2665  	})
  2666  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2667  }
  2668  
  2669  // Do executes the "firebaseappdistribution.projects.testers.getUdids" call.
  2670  // Any non-2xx status code is an error. Response headers are in either
  2671  // *GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse.ServerResponse.Header
  2672  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  2673  // Use googleapi.IsNotModified to check whether the returned error was because
  2674  // http.StatusNotModified was returned.
  2675  func (c *ProjectsTestersGetUdidsCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse, error) {
  2676  	gensupport.SetOptions(c.urlParams_, opts...)
  2677  	res, err := c.doRequest("json")
  2678  	if res != nil && res.StatusCode == http.StatusNotModified {
  2679  		if res.Body != nil {
  2680  			res.Body.Close()
  2681  		}
  2682  		return nil, gensupport.WrapError(&googleapi.Error{
  2683  			Code:   res.StatusCode,
  2684  			Header: res.Header,
  2685  		})
  2686  	}
  2687  	if err != nil {
  2688  		return nil, err
  2689  	}
  2690  	defer googleapi.CloseBody(res)
  2691  	if err := googleapi.CheckResponse(res); err != nil {
  2692  		return nil, gensupport.WrapError(err)
  2693  	}
  2694  	ret := &GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse{
  2695  		ServerResponse: googleapi.ServerResponse{
  2696  			Header:         res.Header,
  2697  			HTTPStatusCode: res.StatusCode,
  2698  		},
  2699  	}
  2700  	target := &ret
  2701  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2702  		return nil, err
  2703  	}
  2704  	return ret, nil
  2705  }
  2706  

View as plain text