...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package firebasedynamiclinks provides access to the Firebase Dynamic Links API.
     8  //
     9  // For product documentation, see: https://firebase.google.com/docs/dynamic-links/
    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/firebasedynamiclinks/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	firebasedynamiclinksService, err := firebasedynamiclinks.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  //	firebasedynamiclinksService, err := firebasedynamiclinks.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  //	firebasedynamiclinksService, err := firebasedynamiclinks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package firebasedynamiclinks // import "google.golang.org/api/firebasedynamiclinks/v1"
    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 = "firebasedynamiclinks:v1"
    90  const apiName = "firebasedynamiclinks"
    91  const apiVersion = "v1"
    92  const basePath = "https://firebasedynamiclinks.googleapis.com/"
    93  const basePathTemplate = "https://firebasedynamiclinks.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://firebasedynamiclinks.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// View and administer all your Firebase data and settings
    99  	FirebaseScope = "https://www.googleapis.com/auth/firebase"
   100  )
   101  
   102  // NewService creates a new Service.
   103  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   104  	scopesOption := internaloption.WithDefaultScopes(
   105  		"https://www.googleapis.com/auth/firebase",
   106  	)
   107  	// NOTE: prepend, so we don't override user-specified scopes.
   108  	opts = append([]option.ClientOption{scopesOption}, opts...)
   109  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   110  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   111  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   112  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   113  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   114  	if err != nil {
   115  		return nil, err
   116  	}
   117  	s, err := New(client)
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	if endpoint != "" {
   122  		s.BasePath = endpoint
   123  	}
   124  	return s, nil
   125  }
   126  
   127  // New creates a new Service. It uses the provided http.Client for requests.
   128  //
   129  // Deprecated: please use NewService instead.
   130  // To provide a custom HTTP client, use option.WithHTTPClient.
   131  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   132  func New(client *http.Client) (*Service, error) {
   133  	if client == nil {
   134  		return nil, errors.New("client is nil")
   135  	}
   136  	s := &Service{client: client, BasePath: basePath}
   137  	s.ManagedShortLinks = NewManagedShortLinksService(s)
   138  	s.ShortLinks = NewShortLinksService(s)
   139  	s.V1 = NewV1Service(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  	ManagedShortLinks *ManagedShortLinksService
   149  
   150  	ShortLinks *ShortLinksService
   151  
   152  	V1 *V1Service
   153  }
   154  
   155  func (s *Service) userAgent() string {
   156  	if s.UserAgent == "" {
   157  		return googleapi.UserAgent
   158  	}
   159  	return googleapi.UserAgent + " " + s.UserAgent
   160  }
   161  
   162  func NewManagedShortLinksService(s *Service) *ManagedShortLinksService {
   163  	rs := &ManagedShortLinksService{s: s}
   164  	return rs
   165  }
   166  
   167  type ManagedShortLinksService struct {
   168  	s *Service
   169  }
   170  
   171  func NewShortLinksService(s *Service) *ShortLinksService {
   172  	rs := &ShortLinksService{s: s}
   173  	return rs
   174  }
   175  
   176  type ShortLinksService struct {
   177  	s *Service
   178  }
   179  
   180  func NewV1Service(s *Service) *V1Service {
   181  	rs := &V1Service{s: s}
   182  	return rs
   183  }
   184  
   185  type V1Service struct {
   186  	s *Service
   187  }
   188  
   189  // AnalyticsInfo: Tracking parameters supported by Dynamic Link.
   190  type AnalyticsInfo struct {
   191  	// GooglePlayAnalytics: Google Play Campaign Measurements.
   192  	GooglePlayAnalytics *GooglePlayAnalytics `json:"googlePlayAnalytics,omitempty"`
   193  	// ItunesConnectAnalytics: iTunes Connect App Analytics.
   194  	ItunesConnectAnalytics *ITunesConnectAnalytics `json:"itunesConnectAnalytics,omitempty"`
   195  	// ForceSendFields is a list of field names (e.g. "GooglePlayAnalytics") to
   196  	// unconditionally include in API requests. By default, fields with empty or
   197  	// default values are omitted from API requests. See
   198  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   199  	// details.
   200  	ForceSendFields []string `json:"-"`
   201  	// NullFields is a list of field names (e.g. "GooglePlayAnalytics") to include
   202  	// in API requests with the JSON null value. By default, fields with empty
   203  	// values are omitted from API requests. See
   204  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   205  	NullFields []string `json:"-"`
   206  }
   207  
   208  func (s *AnalyticsInfo) MarshalJSON() ([]byte, error) {
   209  	type NoMethod AnalyticsInfo
   210  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   211  }
   212  
   213  // AndroidInfo: Android related attributes to the Dynamic Link.
   214  type AndroidInfo struct {
   215  	// AndroidFallbackLink: Link to open on Android if the app is not installed.
   216  	AndroidFallbackLink string `json:"androidFallbackLink,omitempty"`
   217  	// AndroidLink: If specified, this overrides the ‘link’ parameter on
   218  	// Android.
   219  	AndroidLink string `json:"androidLink,omitempty"`
   220  	// AndroidMinPackageVersionCode: Minimum version code for the Android app. If
   221  	// the installed app’s version code is lower, then the user is taken to the
   222  	// Play Store.
   223  	AndroidMinPackageVersionCode string `json:"androidMinPackageVersionCode,omitempty"`
   224  	// AndroidPackageName: Android package name of the app.
   225  	AndroidPackageName string `json:"androidPackageName,omitempty"`
   226  	// ForceSendFields is a list of field names (e.g. "AndroidFallbackLink") to
   227  	// unconditionally include in API requests. By default, fields with empty or
   228  	// default values are omitted from API requests. See
   229  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   230  	// details.
   231  	ForceSendFields []string `json:"-"`
   232  	// NullFields is a list of field names (e.g. "AndroidFallbackLink") to include
   233  	// in API requests with the JSON null value. By default, fields with empty
   234  	// values are omitted from API requests. See
   235  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   236  	NullFields []string `json:"-"`
   237  }
   238  
   239  func (s *AndroidInfo) MarshalJSON() ([]byte, error) {
   240  	type NoMethod AndroidInfo
   241  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   242  }
   243  
   244  // CreateManagedShortLinkRequest: Request to create a managed Short Dynamic
   245  // Link.
   246  type CreateManagedShortLinkRequest struct {
   247  	// DynamicLinkInfo: Information about the Dynamic Link to be shortened. Learn
   248  	// more
   249  	// (https://firebase.google.com/docs/reference/dynamic-links/link-shortener).
   250  	DynamicLinkInfo *DynamicLinkInfo `json:"dynamicLinkInfo,omitempty"`
   251  	// LongDynamicLink: Full long Dynamic Link URL with desired query parameters
   252  	// specified. For example,
   253  	// "https://sample.app.goo.gl/?link=http://www.google.com&apn=com.sample",
   254  	// Learn more
   255  	// (https://firebase.google.com/docs/reference/dynamic-links/link-shortener).
   256  	LongDynamicLink string `json:"longDynamicLink,omitempty"`
   257  	// Name: Link name to associate with the link. It's used for marketer to
   258  	// identify manually-created links in the Firebase console
   259  	// (https://console.firebase.google.com/). Links must be named to be tracked.
   260  	Name string `json:"name,omitempty"`
   261  	// SdkVersion: Google SDK version. Version takes the form
   262  	// "$major.$minor.$patch"
   263  	SdkVersion string `json:"sdkVersion,omitempty"`
   264  	// Suffix: Short Dynamic Link suffix. Optional.
   265  	Suffix *Suffix `json:"suffix,omitempty"`
   266  	// ForceSendFields is a list of field names (e.g. "DynamicLinkInfo") to
   267  	// unconditionally include in API requests. By default, fields with empty or
   268  	// default values are omitted from API requests. See
   269  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   270  	// details.
   271  	ForceSendFields []string `json:"-"`
   272  	// NullFields is a list of field names (e.g. "DynamicLinkInfo") to include in
   273  	// API requests with the JSON null value. By default, fields with empty values
   274  	// are omitted from API requests. See
   275  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   276  	NullFields []string `json:"-"`
   277  }
   278  
   279  func (s *CreateManagedShortLinkRequest) MarshalJSON() ([]byte, error) {
   280  	type NoMethod CreateManagedShortLinkRequest
   281  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   282  }
   283  
   284  // CreateManagedShortLinkResponse: Response to create a short Dynamic Link.
   285  type CreateManagedShortLinkResponse struct {
   286  	// ManagedShortLink: Short Dynamic Link value. e.g.
   287  	// https://abcd.app.goo.gl/wxyz
   288  	ManagedShortLink *ManagedShortLink `json:"managedShortLink,omitempty"`
   289  	// PreviewLink: Preview link to show the link flow chart. (debug info.)
   290  	PreviewLink string `json:"previewLink,omitempty"`
   291  	// Warning: Information about potential warnings on link creation.
   292  	Warning []*DynamicLinkWarning `json:"warning,omitempty"`
   293  
   294  	// ServerResponse contains the HTTP response code and headers from the server.
   295  	googleapi.ServerResponse `json:"-"`
   296  	// ForceSendFields is a list of field names (e.g. "ManagedShortLink") to
   297  	// unconditionally include in API requests. By default, fields with empty or
   298  	// default values are omitted from API requests. See
   299  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   300  	// details.
   301  	ForceSendFields []string `json:"-"`
   302  	// NullFields is a list of field names (e.g. "ManagedShortLink") to include in
   303  	// API requests with the JSON null value. By default, fields with empty values
   304  	// are omitted from API requests. See
   305  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   306  	NullFields []string `json:"-"`
   307  }
   308  
   309  func (s *CreateManagedShortLinkResponse) MarshalJSON() ([]byte, error) {
   310  	type NoMethod CreateManagedShortLinkResponse
   311  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   312  }
   313  
   314  // CreateShortDynamicLinkRequest: Request to create a short Dynamic Link.
   315  type CreateShortDynamicLinkRequest struct {
   316  	// DynamicLinkInfo: Information about the Dynamic Link to be shortened. Learn
   317  	// more
   318  	// (https://firebase.google.com/docs/reference/dynamic-links/link-shortener).
   319  	DynamicLinkInfo *DynamicLinkInfo `json:"dynamicLinkInfo,omitempty"`
   320  	// LongDynamicLink: Full long Dynamic Link URL with desired query parameters
   321  	// specified. For example,
   322  	// "https://sample.app.goo.gl/?link=http://www.google.com&apn=com.sample",
   323  	// Learn more
   324  	// (https://firebase.google.com/docs/reference/dynamic-links/link-shortener).
   325  	LongDynamicLink string `json:"longDynamicLink,omitempty"`
   326  	// SdkVersion: Google SDK version. Version takes the form
   327  	// "$major.$minor.$patch"
   328  	SdkVersion string `json:"sdkVersion,omitempty"`
   329  	// Suffix: Short Dynamic Link suffix. Optional.
   330  	Suffix *Suffix `json:"suffix,omitempty"`
   331  	// ForceSendFields is a list of field names (e.g. "DynamicLinkInfo") to
   332  	// unconditionally include in API requests. By default, fields with empty or
   333  	// default values are omitted from API requests. See
   334  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   335  	// details.
   336  	ForceSendFields []string `json:"-"`
   337  	// NullFields is a list of field names (e.g. "DynamicLinkInfo") to include in
   338  	// API requests with the JSON null value. By default, fields with empty values
   339  	// are omitted from API requests. See
   340  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   341  	NullFields []string `json:"-"`
   342  }
   343  
   344  func (s *CreateShortDynamicLinkRequest) MarshalJSON() ([]byte, error) {
   345  	type NoMethod CreateShortDynamicLinkRequest
   346  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   347  }
   348  
   349  // CreateShortDynamicLinkResponse: Response to create a short Dynamic Link.
   350  type CreateShortDynamicLinkResponse struct {
   351  	// PreviewLink: Preview link to show the link flow chart. (debug info.)
   352  	PreviewLink string `json:"previewLink,omitempty"`
   353  	// ShortLink: Short Dynamic Link value. e.g. https://abcd.app.goo.gl/wxyz
   354  	ShortLink string `json:"shortLink,omitempty"`
   355  	// Warning: Information about potential warnings on link creation.
   356  	Warning []*DynamicLinkWarning `json:"warning,omitempty"`
   357  
   358  	// ServerResponse contains the HTTP response code and headers from the server.
   359  	googleapi.ServerResponse `json:"-"`
   360  	// ForceSendFields is a list of field names (e.g. "PreviewLink") to
   361  	// unconditionally include in API requests. By default, fields with empty or
   362  	// default values are omitted from API requests. See
   363  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   364  	// details.
   365  	ForceSendFields []string `json:"-"`
   366  	// NullFields is a list of field names (e.g. "PreviewLink") to include in API
   367  	// requests with the JSON null value. By default, fields with empty values are
   368  	// omitted from API requests. See
   369  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   370  	NullFields []string `json:"-"`
   371  }
   372  
   373  func (s *CreateShortDynamicLinkResponse) MarshalJSON() ([]byte, error) {
   374  	type NoMethod CreateShortDynamicLinkResponse
   375  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   376  }
   377  
   378  // DesktopInfo: Desktop related attributes to the Dynamic Link.
   379  type DesktopInfo struct {
   380  	// DesktopFallbackLink: Link to open on desktop.
   381  	DesktopFallbackLink string `json:"desktopFallbackLink,omitempty"`
   382  	// ForceSendFields is a list of field names (e.g. "DesktopFallbackLink") to
   383  	// unconditionally include in API requests. By default, fields with empty or
   384  	// default values are omitted from API requests. See
   385  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   386  	// details.
   387  	ForceSendFields []string `json:"-"`
   388  	// NullFields is a list of field names (e.g. "DesktopFallbackLink") to include
   389  	// in API requests with the JSON null value. By default, fields with empty
   390  	// values are omitted from API requests. See
   391  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   392  	NullFields []string `json:"-"`
   393  }
   394  
   395  func (s *DesktopInfo) MarshalJSON() ([]byte, error) {
   396  	type NoMethod DesktopInfo
   397  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   398  }
   399  
   400  // DeviceInfo: Signals associated with the device making the request.
   401  type DeviceInfo struct {
   402  	// DeviceModelName: Device model name.
   403  	DeviceModelName string `json:"deviceModelName,omitempty"`
   404  	// LanguageCode: Device language code setting.
   405  	LanguageCode string `json:"languageCode,omitempty"`
   406  	// LanguageCodeFromWebview: Device language code setting obtained by executing
   407  	// JavaScript code in WebView.
   408  	LanguageCodeFromWebview string `json:"languageCodeFromWebview,omitempty"`
   409  	// LanguageCodeRaw: Device language code raw setting. iOS does returns language
   410  	// code in different format than iOS WebView. For example WebView returns
   411  	// en_US, but iOS returns en-US. Field below will return raw value returned by
   412  	// iOS.
   413  	LanguageCodeRaw string `json:"languageCodeRaw,omitempty"`
   414  	// ScreenResolutionHeight: Device display resolution height.
   415  	ScreenResolutionHeight int64 `json:"screenResolutionHeight,omitempty,string"`
   416  	// ScreenResolutionWidth: Device display resolution width.
   417  	ScreenResolutionWidth int64 `json:"screenResolutionWidth,omitempty,string"`
   418  	// Timezone: Device timezone setting.
   419  	Timezone string `json:"timezone,omitempty"`
   420  	// ForceSendFields is a list of field names (e.g. "DeviceModelName") to
   421  	// unconditionally include in API requests. By default, fields with empty or
   422  	// default values are omitted from API requests. See
   423  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   424  	// details.
   425  	ForceSendFields []string `json:"-"`
   426  	// NullFields is a list of field names (e.g. "DeviceModelName") to include in
   427  	// API requests with the JSON null value. By default, fields with empty values
   428  	// are omitted from API requests. See
   429  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   430  	NullFields []string `json:"-"`
   431  }
   432  
   433  func (s *DeviceInfo) MarshalJSON() ([]byte, error) {
   434  	type NoMethod DeviceInfo
   435  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   436  }
   437  
   438  // DynamicLinkEventStat: Dynamic Link event stat.
   439  type DynamicLinkEventStat struct {
   440  	// Count: The number of times this event occurred.
   441  	Count int64 `json:"count,omitempty,string"`
   442  	// Event: Link event.
   443  	//
   444  	// Possible values:
   445  	//   "DYNAMIC_LINK_EVENT_UNSPECIFIED" - Unspecified type.
   446  	//   "CLICK" - Indicates that an FDL is clicked by users.
   447  	//   "REDIRECT" - Indicates that an FDL redirects users to fallback link.
   448  	//   "APP_INSTALL" - Indicates that an FDL triggers an app install from Play
   449  	// store, currently it's impossible to get stats from App store.
   450  	//   "APP_FIRST_OPEN" - Indicates that the app is opened for the first time
   451  	// after an install triggered by FDLs
   452  	//   "APP_RE_OPEN" - Indicates that the app is opened via an FDL for non-first
   453  	// time.
   454  	Event string `json:"event,omitempty"`
   455  	// Platform: Requested platform.
   456  	//
   457  	// Possible values:
   458  	//   "DYNAMIC_LINK_PLATFORM_UNSPECIFIED" - Unspecified platform.
   459  	//   "ANDROID" - Represents Android platform. All apps and browsers on Android
   460  	// are classfied in this category.
   461  	//   "IOS" - Represents iOS platform. All apps and browsers on iOS are
   462  	// classfied in this category.
   463  	//   "DESKTOP" - Represents desktop.
   464  	//   "OTHER" - Platforms are not categorized as Android/iOS/Destop fall into
   465  	// here.
   466  	Platform string `json:"platform,omitempty"`
   467  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
   468  	// include in API requests. By default, fields with empty or default values are
   469  	// omitted from API requests. See
   470  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   471  	// details.
   472  	ForceSendFields []string `json:"-"`
   473  	// NullFields is a list of field names (e.g. "Count") to include in API
   474  	// requests with the JSON null value. By default, fields with empty values are
   475  	// omitted from API requests. See
   476  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   477  	NullFields []string `json:"-"`
   478  }
   479  
   480  func (s *DynamicLinkEventStat) MarshalJSON() ([]byte, error) {
   481  	type NoMethod DynamicLinkEventStat
   482  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   483  }
   484  
   485  // DynamicLinkInfo: Information about a Dynamic Link.
   486  type DynamicLinkInfo struct {
   487  	// AnalyticsInfo: Parameters used for tracking. See all tracking parameters in
   488  	// the documentation
   489  	// (https://firebase.google.com/docs/dynamic-links/create-manually).
   490  	AnalyticsInfo *AnalyticsInfo `json:"analyticsInfo,omitempty"`
   491  	// AndroidInfo: Android related information. See Android related parameters in
   492  	// the documentation
   493  	// (https://firebase.google.com/docs/dynamic-links/create-manually).
   494  	AndroidInfo *AndroidInfo `json:"androidInfo,omitempty"`
   495  	// DesktopInfo: Desktop related information. See desktop related parameters in
   496  	// the documentation
   497  	// (https://firebase.google.com/docs/dynamic-links/create-manually).
   498  	DesktopInfo *DesktopInfo `json:"desktopInfo,omitempty"`
   499  	// DomainUriPrefix: E.g. https://maps.app.goo.gl, https://maps.page.link,
   500  	// https://g.co/maps More examples can be found in description of
   501  	// getNormalizedUriPrefix in j/c/g/firebase/dynamiclinks/uri/DdlDomain.java
   502  	// Will fallback to dynamic_link_domain is this field is missing
   503  	DomainUriPrefix string `json:"domainUriPrefix,omitempty"`
   504  	// DynamicLinkDomain: Dynamic Links domain that the project owns, e.g.
   505  	// abcd.app.goo.gl Learn more
   506  	// (https://firebase.google.com/docs/dynamic-links/android/receive) on how to
   507  	// set up Dynamic Link domain associated with your Firebase project. Required
   508  	// if missing domain_uri_prefix.
   509  	DynamicLinkDomain string `json:"dynamicLinkDomain,omitempty"`
   510  	// IosInfo: iOS related information. See iOS related parameters in the
   511  	// documentation
   512  	// (https://firebase.google.com/docs/dynamic-links/create-manually).
   513  	IosInfo *IosInfo `json:"iosInfo,omitempty"`
   514  	// Link: The link your app will open, You can specify any URL your app can
   515  	// handle. This link must be a well-formatted URL, be properly URL-encoded, and
   516  	// use the HTTP or HTTPS scheme. See 'link' parameters in the documentation
   517  	// (https://firebase.google.com/docs/dynamic-links/create-manually). Required.
   518  	Link string `json:"link,omitempty"`
   519  	// NavigationInfo: Information of navigation behavior of a Firebase Dynamic
   520  	// Links.
   521  	NavigationInfo *NavigationInfo `json:"navigationInfo,omitempty"`
   522  	// SocialMetaTagInfo: Parameters for social meta tag params. Used to set meta
   523  	// tag data for link previews on social sites.
   524  	SocialMetaTagInfo *SocialMetaTagInfo `json:"socialMetaTagInfo,omitempty"`
   525  	// ForceSendFields is a list of field names (e.g. "AnalyticsInfo") to
   526  	// unconditionally include in API requests. By default, fields with empty or
   527  	// default values are omitted from API requests. See
   528  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   529  	// details.
   530  	ForceSendFields []string `json:"-"`
   531  	// NullFields is a list of field names (e.g. "AnalyticsInfo") to include in API
   532  	// requests with the JSON null value. By default, fields with empty values are
   533  	// omitted from API requests. See
   534  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   535  	NullFields []string `json:"-"`
   536  }
   537  
   538  func (s *DynamicLinkInfo) MarshalJSON() ([]byte, error) {
   539  	type NoMethod DynamicLinkInfo
   540  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   541  }
   542  
   543  // DynamicLinkStats: Analytics stats of a Dynamic Link for a given timeframe.
   544  type DynamicLinkStats struct {
   545  	// LinkEventStats: Dynamic Link event stats.
   546  	LinkEventStats []*DynamicLinkEventStat `json:"linkEventStats,omitempty"`
   547  
   548  	// ServerResponse contains the HTTP response code and headers from the server.
   549  	googleapi.ServerResponse `json:"-"`
   550  	// ForceSendFields is a list of field names (e.g. "LinkEventStats") to
   551  	// unconditionally include in API requests. By default, fields with empty or
   552  	// default values are omitted from API requests. See
   553  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   554  	// details.
   555  	ForceSendFields []string `json:"-"`
   556  	// NullFields is a list of field names (e.g. "LinkEventStats") to include in
   557  	// API requests with the JSON null value. By default, fields with empty values
   558  	// are omitted from API requests. See
   559  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   560  	NullFields []string `json:"-"`
   561  }
   562  
   563  func (s *DynamicLinkStats) MarshalJSON() ([]byte, error) {
   564  	type NoMethod DynamicLinkStats
   565  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   566  }
   567  
   568  // DynamicLinkWarning: Dynamic Links warning messages.
   569  type DynamicLinkWarning struct {
   570  	// WarningCode: The warning code.
   571  	//
   572  	// Possible values:
   573  	//   "CODE_UNSPECIFIED" - Unknown code.
   574  	//   "NOT_IN_PROJECT_ANDROID_PACKAGE_NAME" - The Android package does not match
   575  	// any in developer's DevConsole project.
   576  	//   "NOT_INTEGER_ANDROID_PACKAGE_MIN_VERSION" - The Android minimum version
   577  	// code has to be a valid integer.
   578  	//   "UNNECESSARY_ANDROID_PACKAGE_MIN_VERSION" - Android package min version
   579  	// param is not needed, e.g. when 'apn' is missing.
   580  	//   "NOT_URI_ANDROID_LINK" - Android link is not a valid URI.
   581  	//   "UNNECESSARY_ANDROID_LINK" - Android link param is not needed, e.g. when
   582  	// param 'al' and 'link' have the same value..
   583  	//   "NOT_URI_ANDROID_FALLBACK_LINK" - Android fallback link is not a valid
   584  	// URI.
   585  	//   "BAD_URI_SCHEME_ANDROID_FALLBACK_LINK" - Android fallback link has an
   586  	// invalid (non http/https) URI scheme.
   587  	//   "NOT_IN_PROJECT_IOS_BUNDLE_ID" - The iOS bundle ID does not match any in
   588  	// developer's DevConsole project.
   589  	//   "NOT_IN_PROJECT_IPAD_BUNDLE_ID" - The iPad bundle ID does not match any in
   590  	// developer's DevConsole project.
   591  	//   "UNNECESSARY_IOS_URL_SCHEME" - iOS URL scheme is not needed, e.g. when
   592  	// 'ibi' are 'ipbi' are all missing.
   593  	//   "NOT_NUMERIC_IOS_APP_STORE_ID" - iOS app store ID format is incorrect,
   594  	// e.g. not numeric.
   595  	//   "UNNECESSARY_IOS_APP_STORE_ID" - iOS app store ID is not needed.
   596  	//   "NOT_URI_IOS_FALLBACK_LINK" - iOS fallback link is not a valid URI.
   597  	//   "BAD_URI_SCHEME_IOS_FALLBACK_LINK" - iOS fallback link has an invalid (non
   598  	// http/https) URI scheme.
   599  	//   "NOT_URI_IPAD_FALLBACK_LINK" - iPad fallback link is not a valid URI.
   600  	//   "BAD_URI_SCHEME_IPAD_FALLBACK_LINK" - iPad fallback link has an invalid
   601  	// (non http/https) URI scheme.
   602  	//   "BAD_DEBUG_PARAM" - Debug param format is incorrect.
   603  	//   "BAD_AD_PARAM" - isAd param format is incorrect.
   604  	//   "DEPRECATED_PARAM" - Indicates a certain param is deprecated.
   605  	//   "UNRECOGNIZED_PARAM" - Indicates certain paramater is not recognized.
   606  	//   "TOO_LONG_PARAM" - Indicates certain paramater is too long.
   607  	//   "NOT_URI_SOCIAL_IMAGE_LINK" - Social meta tag image link is not a valid
   608  	// URI.
   609  	//   "BAD_URI_SCHEME_SOCIAL_IMAGE_LINK" - Social meta tag image link has an
   610  	// invalid (non http/https) URI scheme.
   611  	//   "NOT_URI_SOCIAL_URL"
   612  	//   "BAD_URI_SCHEME_SOCIAL_URL"
   613  	//   "LINK_LENGTH_TOO_LONG" - Dynamic Link URL length is too long.
   614  	//   "LINK_WITH_FRAGMENTS" - Dynamic Link URL contains fragments.
   615  	//   "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID" - The iOS bundle ID does not
   616  	// match with the given iOS store ID.
   617  	WarningCode string `json:"warningCode,omitempty"`
   618  	// WarningDocumentLink: The document describing the warning, and helps resolve.
   619  	WarningDocumentLink string `json:"warningDocumentLink,omitempty"`
   620  	// WarningMessage: The warning message to help developers improve their
   621  	// requests.
   622  	WarningMessage string `json:"warningMessage,omitempty"`
   623  	// ForceSendFields is a list of field names (e.g. "WarningCode") to
   624  	// unconditionally include in API requests. By default, fields with empty or
   625  	// default values are omitted from API requests. See
   626  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   627  	// details.
   628  	ForceSendFields []string `json:"-"`
   629  	// NullFields is a list of field names (e.g. "WarningCode") to include in API
   630  	// requests with the JSON null value. By default, fields with empty values are
   631  	// omitted from API requests. See
   632  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   633  	NullFields []string `json:"-"`
   634  }
   635  
   636  func (s *DynamicLinkWarning) MarshalJSON() ([]byte, error) {
   637  	type NoMethod DynamicLinkWarning
   638  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   639  }
   640  
   641  // GetIosPostInstallAttributionRequest: Request for iSDK to execute strong
   642  // match flow for post-install attribution. This is meant for iOS requests
   643  // only. Requests from other platforms will not be honored.
   644  type GetIosPostInstallAttributionRequest struct {
   645  	// AppInstallationTime: App installation epoch time
   646  	// (https://en.wikipedia.org/wiki/Unix_time). This is a client signal for a
   647  	// more accurate weak match.
   648  	AppInstallationTime int64 `json:"appInstallationTime,omitempty,string"`
   649  	// BundleId: APP bundle ID.
   650  	BundleId string `json:"bundleId,omitempty"`
   651  	// Device: Device information.
   652  	Device *DeviceInfo `json:"device,omitempty"`
   653  	// IosVersion: iOS version, ie: 9.3.5. Consider adding "build".
   654  	IosVersion string `json:"iosVersion,omitempty"`
   655  	// RetrievalMethod: App post install attribution retrieval information.
   656  	// Disambiguates mechanism (iSDK or developer invoked) to retrieve payload from
   657  	// clicked link.
   658  	//
   659  	// Possible values:
   660  	//   "UNKNOWN_PAYLOAD_RETRIEVAL_METHOD" - Unknown method.
   661  	//   "IMPLICIT_WEAK_MATCH" - iSDK performs a server lookup by device heuristics
   662  	// in the background when app is first-opened; no API called by developer.
   663  	//   "EXPLICIT_WEAK_MATCH" - iSDK performs a server lookup by device heuristics
   664  	// upon a dev API call.
   665  	//   "EXPLICIT_STRONG_AFTER_WEAK_MATCH" - iSDK performs a strong match only if
   666  	// weak match is found upon a dev API call.
   667  	RetrievalMethod string `json:"retrievalMethod,omitempty"`
   668  	// SdkVersion: Google SDK version. Version takes the form
   669  	// "$major.$minor.$patch"
   670  	SdkVersion string `json:"sdkVersion,omitempty"`
   671  	// UniqueMatchLinkToCheck: Possible unique matched link that server need to
   672  	// check before performing device heuristics match. If passed link is short
   673  	// server need to expand the link. If link is long server need to vslidate the
   674  	// link.
   675  	UniqueMatchLinkToCheck string `json:"uniqueMatchLinkToCheck,omitempty"`
   676  	// VisualStyle: Strong match page information. Disambiguates between default UI
   677  	// and custom page to present when strong match succeeds/fails to find cookie.
   678  	//
   679  	// Possible values:
   680  	//   "UNKNOWN_VISUAL_STYLE" - Unknown style.
   681  	//   "DEFAULT_STYLE" - Default style.
   682  	//   "CUSTOM_STYLE" - Custom style.
   683  	VisualStyle string `json:"visualStyle,omitempty"`
   684  	// ForceSendFields is a list of field names (e.g. "AppInstallationTime") to
   685  	// unconditionally include in API requests. By default, fields with empty or
   686  	// default values are omitted from API requests. See
   687  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   688  	// details.
   689  	ForceSendFields []string `json:"-"`
   690  	// NullFields is a list of field names (e.g. "AppInstallationTime") to include
   691  	// in API requests with the JSON null value. By default, fields with empty
   692  	// values are omitted from API requests. See
   693  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   694  	NullFields []string `json:"-"`
   695  }
   696  
   697  func (s *GetIosPostInstallAttributionRequest) MarshalJSON() ([]byte, error) {
   698  	type NoMethod GetIosPostInstallAttributionRequest
   699  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   700  }
   701  
   702  // GetIosPostInstallAttributionResponse: Response for iSDK to execute strong
   703  // match flow for post-install attribution. Information of the resolved FDL
   704  // link.
   705  type GetIosPostInstallAttributionResponse struct {
   706  	// AppMinimumVersion: The minimum version for app, specified by dev through
   707  	// ?imv= parameter. Return to iSDK to allow app to evaluate if current version
   708  	// meets this.
   709  	AppMinimumVersion string `json:"appMinimumVersion,omitempty"`
   710  	// AttributionConfidence: The confidence of the returned attribution.
   711  	//
   712  	// Possible values:
   713  	//   "UNKNOWN_ATTRIBUTION_CONFIDENCE" - Unset.
   714  	//   "WEAK" - Weak confidence, more than one matching link found or link
   715  	// suspected to be false positive.
   716  	//   "DEFAULT" - Default confidence, match based on device heuristics.
   717  	//   "UNIQUE" - Unique confidence, match based on "unique match link to check"
   718  	// or other means.
   719  	AttributionConfidence string `json:"attributionConfidence,omitempty"`
   720  	// DeepLink: The deep-link attributed post-install via one of several
   721  	// techniques (device heuristics, copy unique).
   722  	DeepLink string `json:"deepLink,omitempty"`
   723  	// ExternalBrowserDestinationLink: User-agent specific custom-scheme URIs for
   724  	// iSDK to open. This will be set according to the user-agent tha the click was
   725  	// originally made in. There is no Safari-equivalent custom-scheme open URLs.
   726  	// ie: googlechrome://www.example.com ie:
   727  	// firefox://open-url?url=http://www.example.com ie: opera-http://example.com
   728  	ExternalBrowserDestinationLink string `json:"externalBrowserDestinationLink,omitempty"`
   729  	// FallbackLink: The link to navigate to update the app if min version is not
   730  	// met. This is either (in order): 1) fallback link (from ?ifl= parameter, if
   731  	// specified by developer) or 2) AppStore URL (from ?isi= parameter, if
   732  	// specified), or 3) the payload link (from required link= parameter).
   733  	FallbackLink string `json:"fallbackLink,omitempty"`
   734  	// InvitationId: Invitation ID attributed post-install via one of several
   735  	// techniques (device heuristics, copy unique).
   736  	InvitationId string `json:"invitationId,omitempty"`
   737  	// IsStrongMatchExecutable: Instruction for iSDK to attemmpt to perform strong
   738  	// match. For instance, if browser does not support/allow cookie or outside of
   739  	// support browsers, this will be false.
   740  	IsStrongMatchExecutable bool `json:"isStrongMatchExecutable,omitempty"`
   741  	// MatchMessage: Describes why match failed, ie: "discarded due to low
   742  	// confidence". This message will be publicly visible.
   743  	MatchMessage string `json:"matchMessage,omitempty"`
   744  	// RequestIpVersion: Which IP version the request was made from.
   745  	//
   746  	// Possible values:
   747  	//   "UNKNOWN_IP_VERSION" - Unset.
   748  	//   "IP_V4" - Request made from an IPv4 IP address.
   749  	//   "IP_V6" - Request made from an IPv6 IP address.
   750  	RequestIpVersion string `json:"requestIpVersion,omitempty"`
   751  	// RequestedLink: Entire FDL (short or long) attributed post-install via one of
   752  	// several techniques (device heuristics, copy unique).
   753  	RequestedLink string `json:"requestedLink,omitempty"`
   754  	// ResolvedLink: The entire FDL, expanded from a short link. It is the same as
   755  	// the requested_link, if it is long. Parameters from this should not be used
   756  	// directly (ie: server can default utm_[campaign|medium|source] to a value
   757  	// when requested_link lack them, server determine the best fallback_link when
   758  	// requested_link specifies >1 fallback links).
   759  	ResolvedLink string `json:"resolvedLink,omitempty"`
   760  	// UtmCampaign: Scion campaign value to be propagated by iSDK to Scion at
   761  	// post-install.
   762  	UtmCampaign string `json:"utmCampaign,omitempty"`
   763  	// UtmContent: Scion content value to be propagated by iSDK to Scion at
   764  	// app-reopen.
   765  	UtmContent string `json:"utmContent,omitempty"`
   766  	// UtmMedium: Scion medium value to be propagated by iSDK to Scion at
   767  	// post-install.
   768  	UtmMedium string `json:"utmMedium,omitempty"`
   769  	// UtmSource: Scion source value to be propagated by iSDK to Scion at
   770  	// post-install.
   771  	UtmSource string `json:"utmSource,omitempty"`
   772  	// UtmTerm: Scion term value to be propagated by iSDK to Scion at app-reopen.
   773  	UtmTerm string `json:"utmTerm,omitempty"`
   774  
   775  	// ServerResponse contains the HTTP response code and headers from the server.
   776  	googleapi.ServerResponse `json:"-"`
   777  	// ForceSendFields is a list of field names (e.g. "AppMinimumVersion") to
   778  	// unconditionally include in API requests. By default, fields with empty or
   779  	// default values are omitted from API requests. See
   780  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   781  	// details.
   782  	ForceSendFields []string `json:"-"`
   783  	// NullFields is a list of field names (e.g. "AppMinimumVersion") to include in
   784  	// API requests with the JSON null value. By default, fields with empty values
   785  	// are omitted from API requests. See
   786  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   787  	NullFields []string `json:"-"`
   788  }
   789  
   790  func (s *GetIosPostInstallAttributionResponse) MarshalJSON() ([]byte, error) {
   791  	type NoMethod GetIosPostInstallAttributionResponse
   792  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   793  }
   794  
   795  // GetIosReopenAttributionRequest: Request for iSDK to get reopen attribution
   796  // for app universal link open deeplinking. This endpoint is meant for only iOS
   797  // requests.
   798  type GetIosReopenAttributionRequest struct {
   799  	// BundleId: APP bundle ID.
   800  	BundleId string `json:"bundleId,omitempty"`
   801  	// RequestedLink: FDL link to be verified from an app universal link open. The
   802  	// FDL link can be one of: 1) short FDL. e.g. .page.link/, or 2) long FDL. e.g.
   803  	// .page.link/?{query params}, or 3) Invite FDL. e.g. .page.link/i/
   804  	RequestedLink string `json:"requestedLink,omitempty"`
   805  	// SdkVersion: Google SDK version. Version takes the form
   806  	// "$major.$minor.$patch"
   807  	SdkVersion string `json:"sdkVersion,omitempty"`
   808  	// ForceSendFields is a list of field names (e.g. "BundleId") to
   809  	// unconditionally include in API requests. By default, fields with empty or
   810  	// default values are omitted from API requests. See
   811  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   812  	// details.
   813  	ForceSendFields []string `json:"-"`
   814  	// NullFields is a list of field names (e.g. "BundleId") to include in API
   815  	// requests with the JSON null value. By default, fields with empty values are
   816  	// omitted from API requests. See
   817  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   818  	NullFields []string `json:"-"`
   819  }
   820  
   821  func (s *GetIosReopenAttributionRequest) MarshalJSON() ([]byte, error) {
   822  	type NoMethod GetIosReopenAttributionRequest
   823  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   824  }
   825  
   826  // GetIosReopenAttributionResponse: Response for iSDK to get reopen attribution
   827  // for app universal link open deeplinking. This endpoint is meant for only iOS
   828  // requests.
   829  type GetIosReopenAttributionResponse struct {
   830  	// DeepLink: The deep-link attributed the app universal link open. For both
   831  	// regular FDL links and invite FDL links.
   832  	DeepLink string `json:"deepLink,omitempty"`
   833  	// InvitationId: Optional invitation ID, for only invite typed requested FDL
   834  	// links.
   835  	InvitationId string `json:"invitationId,omitempty"`
   836  	// IosMinAppVersion: FDL input value of the "&imv=" parameter, minimum app
   837  	// version to be returned to Google Firebase SDK running on iOS-9.
   838  	IosMinAppVersion string `json:"iosMinAppVersion,omitempty"`
   839  	// ResolvedLink: The entire FDL, expanded from a short link. It is the same as
   840  	// the requested_link, if it is long.
   841  	ResolvedLink string `json:"resolvedLink,omitempty"`
   842  	// UtmCampaign: Scion campaign value to be propagated by iSDK to Scion at
   843  	// app-reopen.
   844  	UtmCampaign string `json:"utmCampaign,omitempty"`
   845  	// UtmContent: Scion content value to be propagated by iSDK to Scion at
   846  	// app-reopen.
   847  	UtmContent string `json:"utmContent,omitempty"`
   848  	// UtmMedium: Scion medium value to be propagated by iSDK to Scion at
   849  	// app-reopen.
   850  	UtmMedium string `json:"utmMedium,omitempty"`
   851  	// UtmSource: Scion source value to be propagated by iSDK to Scion at
   852  	// app-reopen.
   853  	UtmSource string `json:"utmSource,omitempty"`
   854  	// UtmTerm: Scion term value to be propagated by iSDK to Scion at app-reopen.
   855  	UtmTerm string `json:"utmTerm,omitempty"`
   856  
   857  	// ServerResponse contains the HTTP response code and headers from the server.
   858  	googleapi.ServerResponse `json:"-"`
   859  	// ForceSendFields is a list of field names (e.g. "DeepLink") to
   860  	// unconditionally include in API requests. By default, fields with empty or
   861  	// default values are omitted from API requests. See
   862  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   863  	// details.
   864  	ForceSendFields []string `json:"-"`
   865  	// NullFields is a list of field names (e.g. "DeepLink") to include in API
   866  	// requests with the JSON null value. By default, fields with empty values are
   867  	// omitted from API requests. See
   868  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   869  	NullFields []string `json:"-"`
   870  }
   871  
   872  func (s *GetIosReopenAttributionResponse) MarshalJSON() ([]byte, error) {
   873  	type NoMethod GetIosReopenAttributionResponse
   874  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   875  }
   876  
   877  // GooglePlayAnalytics: Parameters for Google Play Campaign Measurements. Learn
   878  // more
   879  // (https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#campaign-params)
   880  type GooglePlayAnalytics struct {
   881  	// Gclid: Deprecated; FDL SDK does not process nor log it.
   882  	Gclid string `json:"gclid,omitempty"`
   883  	// UtmCampaign: Campaign name; used for keyword analysis to identify a specific
   884  	// product promotion or strategic campaign.
   885  	UtmCampaign string `json:"utmCampaign,omitempty"`
   886  	// UtmContent: Campaign content; used for A/B testing and content-targeted ads
   887  	// to differentiate ads or links that point to the same URL.
   888  	UtmContent string `json:"utmContent,omitempty"`
   889  	// UtmMedium: Campaign medium; used to identify a medium such as email or
   890  	// cost-per-click.
   891  	UtmMedium string `json:"utmMedium,omitempty"`
   892  	// UtmSource: Campaign source; used to identify a search engine, newsletter, or
   893  	// other source.
   894  	UtmSource string `json:"utmSource,omitempty"`
   895  	// UtmTerm: Campaign term; used with paid search to supply the keywords for
   896  	// ads.
   897  	UtmTerm string `json:"utmTerm,omitempty"`
   898  	// ForceSendFields is a list of field names (e.g. "Gclid") to unconditionally
   899  	// include in API requests. By default, fields with empty or default values are
   900  	// omitted from API requests. See
   901  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   902  	// details.
   903  	ForceSendFields []string `json:"-"`
   904  	// NullFields is a list of field names (e.g. "Gclid") to include in API
   905  	// requests with the JSON null value. By default, fields with empty values are
   906  	// omitted from API requests. See
   907  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   908  	NullFields []string `json:"-"`
   909  }
   910  
   911  func (s *GooglePlayAnalytics) MarshalJSON() ([]byte, error) {
   912  	type NoMethod GooglePlayAnalytics
   913  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   914  }
   915  
   916  // ITunesConnectAnalytics: Parameters for iTunes Connect App Analytics.
   917  type ITunesConnectAnalytics struct {
   918  	// At: Affiliate token used to create affiliate-coded links.
   919  	At string `json:"at,omitempty"`
   920  	// Ct: Campaign text that developers can optionally add to any link in order to
   921  	// track sales from a specific marketing campaign.
   922  	Ct string `json:"ct,omitempty"`
   923  	// Mt: iTune media types, including music, podcasts, audiobooks and so on.
   924  	Mt string `json:"mt,omitempty"`
   925  	// Pt: Provider token that enables analytics for Dynamic Links from within
   926  	// iTunes Connect.
   927  	Pt string `json:"pt,omitempty"`
   928  	// ForceSendFields is a list of field names (e.g. "At") to unconditionally
   929  	// include in API requests. By default, fields with empty or default values are
   930  	// omitted from API requests. See
   931  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   932  	// details.
   933  	ForceSendFields []string `json:"-"`
   934  	// NullFields is a list of field names (e.g. "At") to include in API requests
   935  	// with the JSON null value. By default, fields with empty values are omitted
   936  	// from API requests. See
   937  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   938  	NullFields []string `json:"-"`
   939  }
   940  
   941  func (s *ITunesConnectAnalytics) MarshalJSON() ([]byte, error) {
   942  	type NoMethod ITunesConnectAnalytics
   943  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   944  }
   945  
   946  // IosInfo: iOS related attributes to the Dynamic Link..
   947  type IosInfo struct {
   948  	// IosAppStoreId: iOS App Store ID.
   949  	IosAppStoreId string `json:"iosAppStoreId,omitempty"`
   950  	// IosBundleId: iOS bundle ID of the app.
   951  	IosBundleId string `json:"iosBundleId,omitempty"`
   952  	// IosCustomScheme: Custom (destination) scheme to use for iOS. By default,
   953  	// we’ll use the bundle ID as the custom scheme. Developer can override this
   954  	// behavior using this param.
   955  	IosCustomScheme string `json:"iosCustomScheme,omitempty"`
   956  	// IosFallbackLink: Link to open on iOS if the app is not installed.
   957  	IosFallbackLink string `json:"iosFallbackLink,omitempty"`
   958  	// IosIpadBundleId: iPad bundle ID of the app.
   959  	IosIpadBundleId string `json:"iosIpadBundleId,omitempty"`
   960  	// IosIpadFallbackLink: If specified, this overrides the ios_fallback_link
   961  	// value on iPads.
   962  	IosIpadFallbackLink string `json:"iosIpadFallbackLink,omitempty"`
   963  	// IosMinimumVersion: iOS minimum version.
   964  	IosMinimumVersion string `json:"iosMinimumVersion,omitempty"`
   965  	// ForceSendFields is a list of field names (e.g. "IosAppStoreId") to
   966  	// unconditionally include in API requests. By default, fields with empty or
   967  	// default values are omitted from API requests. See
   968  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   969  	// details.
   970  	ForceSendFields []string `json:"-"`
   971  	// NullFields is a list of field names (e.g. "IosAppStoreId") to include in API
   972  	// requests with the JSON null value. By default, fields with empty values are
   973  	// omitted from API requests. See
   974  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   975  	NullFields []string `json:"-"`
   976  }
   977  
   978  func (s *IosInfo) MarshalJSON() ([]byte, error) {
   979  	type NoMethod IosInfo
   980  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   981  }
   982  
   983  // ManagedShortLink: Managed Short Link.
   984  type ManagedShortLink struct {
   985  	// CreationTime: Creation timestamp of the short link.
   986  	CreationTime string `json:"creationTime,omitempty"`
   987  	// FlaggedAttribute: Attributes that have been flagged about this short url.
   988  	//
   989  	// Possible values:
   990  	//   "UNSPECIFIED_ATTRIBUTE" - Indicates that no attributes were found for this
   991  	// short url.
   992  	//   "SPAM" - Indicates that short url has been flagged by AbuseIAm team as
   993  	// spam.
   994  	FlaggedAttribute []string `json:"flaggedAttribute,omitempty"`
   995  	// Info: Full Dyamic Link info
   996  	Info *DynamicLinkInfo `json:"info,omitempty"`
   997  	// Link: Short durable link url, for example,
   998  	// "https://sample.app.goo.gl/xyz123". Required.
   999  	Link string `json:"link,omitempty"`
  1000  	// LinkName: Link name defined by the creator. Required.
  1001  	LinkName string `json:"linkName,omitempty"`
  1002  	// Visibility: Visibility status of link.
  1003  	//
  1004  	// Possible values:
  1005  	//   "UNSPECIFIED_VISIBILITY" - Visibility of the link is not specified.
  1006  	//   "UNARCHIVED" - Link created in console and should be shown in console.
  1007  	//   "ARCHIVED" - Link created in console and should not be shown in console
  1008  	// (but can be shown in the console again if it is unarchived).
  1009  	//   "NEVER_SHOWN" - Link created outside of console and should never be shown
  1010  	// in console.
  1011  	Visibility string `json:"visibility,omitempty"`
  1012  	// ForceSendFields is a list of field names (e.g. "CreationTime") to
  1013  	// unconditionally include in API requests. By default, fields with empty or
  1014  	// default values are omitted from API requests. See
  1015  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1016  	// details.
  1017  	ForceSendFields []string `json:"-"`
  1018  	// NullFields is a list of field names (e.g. "CreationTime") to include in API
  1019  	// requests with the JSON null value. By default, fields with empty values are
  1020  	// omitted from API requests. See
  1021  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1022  	NullFields []string `json:"-"`
  1023  }
  1024  
  1025  func (s *ManagedShortLink) MarshalJSON() ([]byte, error) {
  1026  	type NoMethod ManagedShortLink
  1027  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1028  }
  1029  
  1030  // NavigationInfo: Information of navigation behavior.
  1031  type NavigationInfo struct {
  1032  	// EnableForcedRedirect: If this option is on, FDL click will be forced to
  1033  	// redirect rather than show an interstitial page.
  1034  	EnableForcedRedirect bool `json:"enableForcedRedirect,omitempty"`
  1035  	// ForceSendFields is a list of field names (e.g. "EnableForcedRedirect") to
  1036  	// unconditionally include in API requests. By default, fields with empty or
  1037  	// default values are omitted from API requests. See
  1038  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1039  	// details.
  1040  	ForceSendFields []string `json:"-"`
  1041  	// NullFields is a list of field names (e.g. "EnableForcedRedirect") to include
  1042  	// in API requests with the JSON null value. By default, fields with empty
  1043  	// values are omitted from API requests. See
  1044  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1045  	NullFields []string `json:"-"`
  1046  }
  1047  
  1048  func (s *NavigationInfo) MarshalJSON() ([]byte, error) {
  1049  	type NoMethod NavigationInfo
  1050  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1051  }
  1052  
  1053  // SocialMetaTagInfo: Parameters for social meta tag params. Used to set meta
  1054  // tag data for link previews on social sites.
  1055  type SocialMetaTagInfo struct {
  1056  	// SocialDescription: A short description of the link. Optional.
  1057  	SocialDescription string `json:"socialDescription,omitempty"`
  1058  	// SocialImageLink: An image url string. Optional.
  1059  	SocialImageLink string `json:"socialImageLink,omitempty"`
  1060  	// SocialTitle: Title to be displayed. Optional.
  1061  	SocialTitle string `json:"socialTitle,omitempty"`
  1062  	// ForceSendFields is a list of field names (e.g. "SocialDescription") to
  1063  	// unconditionally include in API requests. By default, fields with empty or
  1064  	// default values are omitted from API requests. See
  1065  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1066  	// details.
  1067  	ForceSendFields []string `json:"-"`
  1068  	// NullFields is a list of field names (e.g. "SocialDescription") to include in
  1069  	// API requests with the JSON null value. By default, fields with empty values
  1070  	// are omitted from API requests. See
  1071  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1072  	NullFields []string `json:"-"`
  1073  }
  1074  
  1075  func (s *SocialMetaTagInfo) MarshalJSON() ([]byte, error) {
  1076  	type NoMethod SocialMetaTagInfo
  1077  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1078  }
  1079  
  1080  // Suffix: Short Dynamic Link suffix.
  1081  type Suffix struct {
  1082  	// CustomSuffix: Only applies to Option.CUSTOM.
  1083  	CustomSuffix string `json:"customSuffix,omitempty"`
  1084  	// Option: Suffix option.
  1085  	//
  1086  	// Possible values:
  1087  	//   "OPTION_UNSPECIFIED" - The suffix option is not specified, performs as
  1088  	// UNGUESSABLE .
  1089  	//   "UNGUESSABLE" - Short Dynamic Link suffix is a base62 [0-9A-Za-z] encoded
  1090  	// string of a random generated 96 bit random number, which has a length of 17
  1091  	// chars. For example, "nlAR8U4SlKRZw1cb2". It prevents other people from
  1092  	// guessing and crawling short Dynamic Links that contain personal identifiable
  1093  	// information.
  1094  	//   "SHORT" - Short Dynamic Link suffix is a base62 [0-9A-Za-z] string
  1095  	// starting with a length of 4 chars. the length will increase when all the
  1096  	// space is occupied.
  1097  	//   "CUSTOM" - Custom DDL suffix is a client specified string, for example,
  1098  	// "buy2get1free". NOTE: custom suffix should only be available to managed
  1099  	// short link creation
  1100  	Option string `json:"option,omitempty"`
  1101  	// ForceSendFields is a list of field names (e.g. "CustomSuffix") to
  1102  	// unconditionally include in API requests. By default, fields with empty or
  1103  	// default values are omitted from API requests. See
  1104  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1105  	// details.
  1106  	ForceSendFields []string `json:"-"`
  1107  	// NullFields is a list of field names (e.g. "CustomSuffix") to include in API
  1108  	// requests with the JSON null value. By default, fields with empty values are
  1109  	// omitted from API requests. See
  1110  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1111  	NullFields []string `json:"-"`
  1112  }
  1113  
  1114  func (s *Suffix) MarshalJSON() ([]byte, error) {
  1115  	type NoMethod Suffix
  1116  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1117  }
  1118  
  1119  type ManagedShortLinksCreateCall struct {
  1120  	s                             *Service
  1121  	createmanagedshortlinkrequest *CreateManagedShortLinkRequest
  1122  	urlParams_                    gensupport.URLParams
  1123  	ctx_                          context.Context
  1124  	header_                       http.Header
  1125  }
  1126  
  1127  // Create: Creates a managed short Dynamic Link given either a valid long
  1128  // Dynamic Link or details such as Dynamic Link domain, Android and iOS app
  1129  // information. The created short Dynamic Link will not expire. This differs
  1130  // from CreateShortDynamicLink in the following ways: - The request will also
  1131  // contain a name for the link (non unique name for the front end). - The
  1132  // response must be authenticated with an auth token (generated with the admin
  1133  // service account). - The link will appear in the FDL list of links in the
  1134  // console front end. The Dynamic Link domain in the request must be owned by
  1135  // requester's Firebase project.
  1136  func (r *ManagedShortLinksService) Create(createmanagedshortlinkrequest *CreateManagedShortLinkRequest) *ManagedShortLinksCreateCall {
  1137  	c := &ManagedShortLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1138  	c.createmanagedshortlinkrequest = createmanagedshortlinkrequest
  1139  	return c
  1140  }
  1141  
  1142  // Fields allows partial responses to be retrieved. See
  1143  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1144  // details.
  1145  func (c *ManagedShortLinksCreateCall) Fields(s ...googleapi.Field) *ManagedShortLinksCreateCall {
  1146  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1147  	return c
  1148  }
  1149  
  1150  // Context sets the context to be used in this call's Do method.
  1151  func (c *ManagedShortLinksCreateCall) Context(ctx context.Context) *ManagedShortLinksCreateCall {
  1152  	c.ctx_ = ctx
  1153  	return c
  1154  }
  1155  
  1156  // Header returns a http.Header that can be modified by the caller to add
  1157  // headers to the request.
  1158  func (c *ManagedShortLinksCreateCall) Header() http.Header {
  1159  	if c.header_ == nil {
  1160  		c.header_ = make(http.Header)
  1161  	}
  1162  	return c.header_
  1163  }
  1164  
  1165  func (c *ManagedShortLinksCreateCall) doRequest(alt string) (*http.Response, error) {
  1166  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1167  	var body io.Reader = nil
  1168  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createmanagedshortlinkrequest)
  1169  	if err != nil {
  1170  		return nil, err
  1171  	}
  1172  	c.urlParams_.Set("alt", alt)
  1173  	c.urlParams_.Set("prettyPrint", "false")
  1174  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/managedShortLinks:create")
  1175  	urls += "?" + c.urlParams_.Encode()
  1176  	req, err := http.NewRequest("POST", urls, body)
  1177  	if err != nil {
  1178  		return nil, err
  1179  	}
  1180  	req.Header = reqHeaders
  1181  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1182  }
  1183  
  1184  // Do executes the "firebasedynamiclinks.managedShortLinks.create" call.
  1185  // Any non-2xx status code is an error. Response headers are in either
  1186  // *CreateManagedShortLinkResponse.ServerResponse.Header or (if a response was
  1187  // returned at all) in error.(*googleapi.Error).Header. Use
  1188  // googleapi.IsNotModified to check whether the returned error was because
  1189  // http.StatusNotModified was returned.
  1190  func (c *ManagedShortLinksCreateCall) Do(opts ...googleapi.CallOption) (*CreateManagedShortLinkResponse, error) {
  1191  	gensupport.SetOptions(c.urlParams_, opts...)
  1192  	res, err := c.doRequest("json")
  1193  	if res != nil && res.StatusCode == http.StatusNotModified {
  1194  		if res.Body != nil {
  1195  			res.Body.Close()
  1196  		}
  1197  		return nil, gensupport.WrapError(&googleapi.Error{
  1198  			Code:   res.StatusCode,
  1199  			Header: res.Header,
  1200  		})
  1201  	}
  1202  	if err != nil {
  1203  		return nil, err
  1204  	}
  1205  	defer googleapi.CloseBody(res)
  1206  	if err := googleapi.CheckResponse(res); err != nil {
  1207  		return nil, gensupport.WrapError(err)
  1208  	}
  1209  	ret := &CreateManagedShortLinkResponse{
  1210  		ServerResponse: googleapi.ServerResponse{
  1211  			Header:         res.Header,
  1212  			HTTPStatusCode: res.StatusCode,
  1213  		},
  1214  	}
  1215  	target := &ret
  1216  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1217  		return nil, err
  1218  	}
  1219  	return ret, nil
  1220  }
  1221  
  1222  type ShortLinksCreateCall struct {
  1223  	s                             *Service
  1224  	createshortdynamiclinkrequest *CreateShortDynamicLinkRequest
  1225  	urlParams_                    gensupport.URLParams
  1226  	ctx_                          context.Context
  1227  	header_                       http.Header
  1228  }
  1229  
  1230  // Create: Creates a short Dynamic Link given either a valid long Dynamic Link
  1231  // or details such as Dynamic Link domain, Android and iOS app information. The
  1232  // created short Dynamic Link will not expire. Repeated calls with the same
  1233  // long Dynamic Link or Dynamic Link information will produce the same short
  1234  // Dynamic Link. The Dynamic Link domain in the request must be owned by
  1235  // requester's Firebase project.
  1236  func (r *ShortLinksService) Create(createshortdynamiclinkrequest *CreateShortDynamicLinkRequest) *ShortLinksCreateCall {
  1237  	c := &ShortLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1238  	c.createshortdynamiclinkrequest = createshortdynamiclinkrequest
  1239  	return c
  1240  }
  1241  
  1242  // Fields allows partial responses to be retrieved. See
  1243  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1244  // details.
  1245  func (c *ShortLinksCreateCall) Fields(s ...googleapi.Field) *ShortLinksCreateCall {
  1246  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1247  	return c
  1248  }
  1249  
  1250  // Context sets the context to be used in this call's Do method.
  1251  func (c *ShortLinksCreateCall) Context(ctx context.Context) *ShortLinksCreateCall {
  1252  	c.ctx_ = ctx
  1253  	return c
  1254  }
  1255  
  1256  // Header returns a http.Header that can be modified by the caller to add
  1257  // headers to the request.
  1258  func (c *ShortLinksCreateCall) Header() http.Header {
  1259  	if c.header_ == nil {
  1260  		c.header_ = make(http.Header)
  1261  	}
  1262  	return c.header_
  1263  }
  1264  
  1265  func (c *ShortLinksCreateCall) doRequest(alt string) (*http.Response, error) {
  1266  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1267  	var body io.Reader = nil
  1268  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createshortdynamiclinkrequest)
  1269  	if err != nil {
  1270  		return nil, err
  1271  	}
  1272  	c.urlParams_.Set("alt", alt)
  1273  	c.urlParams_.Set("prettyPrint", "false")
  1274  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/shortLinks")
  1275  	urls += "?" + c.urlParams_.Encode()
  1276  	req, err := http.NewRequest("POST", urls, body)
  1277  	if err != nil {
  1278  		return nil, err
  1279  	}
  1280  	req.Header = reqHeaders
  1281  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1282  }
  1283  
  1284  // Do executes the "firebasedynamiclinks.shortLinks.create" call.
  1285  // Any non-2xx status code is an error. Response headers are in either
  1286  // *CreateShortDynamicLinkResponse.ServerResponse.Header or (if a response was
  1287  // returned at all) in error.(*googleapi.Error).Header. Use
  1288  // googleapi.IsNotModified to check whether the returned error was because
  1289  // http.StatusNotModified was returned.
  1290  func (c *ShortLinksCreateCall) Do(opts ...googleapi.CallOption) (*CreateShortDynamicLinkResponse, error) {
  1291  	gensupport.SetOptions(c.urlParams_, opts...)
  1292  	res, err := c.doRequest("json")
  1293  	if res != nil && res.StatusCode == http.StatusNotModified {
  1294  		if res.Body != nil {
  1295  			res.Body.Close()
  1296  		}
  1297  		return nil, gensupport.WrapError(&googleapi.Error{
  1298  			Code:   res.StatusCode,
  1299  			Header: res.Header,
  1300  		})
  1301  	}
  1302  	if err != nil {
  1303  		return nil, err
  1304  	}
  1305  	defer googleapi.CloseBody(res)
  1306  	if err := googleapi.CheckResponse(res); err != nil {
  1307  		return nil, gensupport.WrapError(err)
  1308  	}
  1309  	ret := &CreateShortDynamicLinkResponse{
  1310  		ServerResponse: googleapi.ServerResponse{
  1311  			Header:         res.Header,
  1312  			HTTPStatusCode: res.StatusCode,
  1313  		},
  1314  	}
  1315  	target := &ret
  1316  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1317  		return nil, err
  1318  	}
  1319  	return ret, nil
  1320  }
  1321  
  1322  type V1GetLinkStatsCall struct {
  1323  	s            *Service
  1324  	dynamicLink  string
  1325  	urlParams_   gensupport.URLParams
  1326  	ifNoneMatch_ string
  1327  	ctx_         context.Context
  1328  	header_      http.Header
  1329  }
  1330  
  1331  // GetLinkStats: Fetches analytics stats of a short Dynamic Link for a given
  1332  // duration. Metrics include number of clicks, redirects, installs, app first
  1333  // opens, and app reopens.
  1334  //
  1335  // - dynamicLink: Dynamic Link URL. e.g. https://abcd.app.goo.gl/wxyz.
  1336  func (r *V1Service) GetLinkStats(dynamicLink string) *V1GetLinkStatsCall {
  1337  	c := &V1GetLinkStatsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1338  	c.dynamicLink = dynamicLink
  1339  	return c
  1340  }
  1341  
  1342  // DurationDays sets the optional parameter "durationDays": The span of time
  1343  // requested in days.
  1344  func (c *V1GetLinkStatsCall) DurationDays(durationDays int64) *V1GetLinkStatsCall {
  1345  	c.urlParams_.Set("durationDays", fmt.Sprint(durationDays))
  1346  	return c
  1347  }
  1348  
  1349  // SdkVersion sets the optional parameter "sdkVersion": Google SDK version.
  1350  // Version takes the form "$major.$minor.$patch"
  1351  func (c *V1GetLinkStatsCall) SdkVersion(sdkVersion string) *V1GetLinkStatsCall {
  1352  	c.urlParams_.Set("sdkVersion", sdkVersion)
  1353  	return c
  1354  }
  1355  
  1356  // Fields allows partial responses to be retrieved. See
  1357  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1358  // details.
  1359  func (c *V1GetLinkStatsCall) Fields(s ...googleapi.Field) *V1GetLinkStatsCall {
  1360  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1361  	return c
  1362  }
  1363  
  1364  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1365  // object's ETag matches the given value. This is useful for getting updates
  1366  // only after the object has changed since the last request.
  1367  func (c *V1GetLinkStatsCall) IfNoneMatch(entityTag string) *V1GetLinkStatsCall {
  1368  	c.ifNoneMatch_ = entityTag
  1369  	return c
  1370  }
  1371  
  1372  // Context sets the context to be used in this call's Do method.
  1373  func (c *V1GetLinkStatsCall) Context(ctx context.Context) *V1GetLinkStatsCall {
  1374  	c.ctx_ = ctx
  1375  	return c
  1376  }
  1377  
  1378  // Header returns a http.Header that can be modified by the caller to add
  1379  // headers to the request.
  1380  func (c *V1GetLinkStatsCall) Header() http.Header {
  1381  	if c.header_ == nil {
  1382  		c.header_ = make(http.Header)
  1383  	}
  1384  	return c.header_
  1385  }
  1386  
  1387  func (c *V1GetLinkStatsCall) doRequest(alt string) (*http.Response, error) {
  1388  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1389  	if c.ifNoneMatch_ != "" {
  1390  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1391  	}
  1392  	var body io.Reader = nil
  1393  	c.urlParams_.Set("alt", alt)
  1394  	c.urlParams_.Set("prettyPrint", "false")
  1395  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{dynamicLink}/linkStats")
  1396  	urls += "?" + c.urlParams_.Encode()
  1397  	req, err := http.NewRequest("GET", urls, body)
  1398  	if err != nil {
  1399  		return nil, err
  1400  	}
  1401  	req.Header = reqHeaders
  1402  	googleapi.Expand(req.URL, map[string]string{
  1403  		"dynamicLink": c.dynamicLink,
  1404  	})
  1405  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1406  }
  1407  
  1408  // Do executes the "firebasedynamiclinks.getLinkStats" call.
  1409  // Any non-2xx status code is an error. Response headers are in either
  1410  // *DynamicLinkStats.ServerResponse.Header or (if a response was returned at
  1411  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1412  // check whether the returned error was because http.StatusNotModified was
  1413  // returned.
  1414  func (c *V1GetLinkStatsCall) Do(opts ...googleapi.CallOption) (*DynamicLinkStats, error) {
  1415  	gensupport.SetOptions(c.urlParams_, opts...)
  1416  	res, err := c.doRequest("json")
  1417  	if res != nil && res.StatusCode == http.StatusNotModified {
  1418  		if res.Body != nil {
  1419  			res.Body.Close()
  1420  		}
  1421  		return nil, gensupport.WrapError(&googleapi.Error{
  1422  			Code:   res.StatusCode,
  1423  			Header: res.Header,
  1424  		})
  1425  	}
  1426  	if err != nil {
  1427  		return nil, err
  1428  	}
  1429  	defer googleapi.CloseBody(res)
  1430  	if err := googleapi.CheckResponse(res); err != nil {
  1431  		return nil, gensupport.WrapError(err)
  1432  	}
  1433  	ret := &DynamicLinkStats{
  1434  		ServerResponse: googleapi.ServerResponse{
  1435  			Header:         res.Header,
  1436  			HTTPStatusCode: res.StatusCode,
  1437  		},
  1438  	}
  1439  	target := &ret
  1440  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1441  		return nil, err
  1442  	}
  1443  	return ret, nil
  1444  }
  1445  
  1446  type V1InstallAttributionCall struct {
  1447  	s                                   *Service
  1448  	getiospostinstallattributionrequest *GetIosPostInstallAttributionRequest
  1449  	urlParams_                          gensupport.URLParams
  1450  	ctx_                                context.Context
  1451  	header_                             http.Header
  1452  }
  1453  
  1454  // InstallAttribution: Get iOS strong/weak-match info for post-install
  1455  // attribution.
  1456  func (r *V1Service) InstallAttribution(getiospostinstallattributionrequest *GetIosPostInstallAttributionRequest) *V1InstallAttributionCall {
  1457  	c := &V1InstallAttributionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1458  	c.getiospostinstallattributionrequest = getiospostinstallattributionrequest
  1459  	return c
  1460  }
  1461  
  1462  // Fields allows partial responses to be retrieved. See
  1463  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1464  // details.
  1465  func (c *V1InstallAttributionCall) Fields(s ...googleapi.Field) *V1InstallAttributionCall {
  1466  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1467  	return c
  1468  }
  1469  
  1470  // Context sets the context to be used in this call's Do method.
  1471  func (c *V1InstallAttributionCall) Context(ctx context.Context) *V1InstallAttributionCall {
  1472  	c.ctx_ = ctx
  1473  	return c
  1474  }
  1475  
  1476  // Header returns a http.Header that can be modified by the caller to add
  1477  // headers to the request.
  1478  func (c *V1InstallAttributionCall) Header() http.Header {
  1479  	if c.header_ == nil {
  1480  		c.header_ = make(http.Header)
  1481  	}
  1482  	return c.header_
  1483  }
  1484  
  1485  func (c *V1InstallAttributionCall) doRequest(alt string) (*http.Response, error) {
  1486  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1487  	var body io.Reader = nil
  1488  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiospostinstallattributionrequest)
  1489  	if err != nil {
  1490  		return nil, err
  1491  	}
  1492  	c.urlParams_.Set("alt", alt)
  1493  	c.urlParams_.Set("prettyPrint", "false")
  1494  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/installAttribution")
  1495  	urls += "?" + c.urlParams_.Encode()
  1496  	req, err := http.NewRequest("POST", urls, body)
  1497  	if err != nil {
  1498  		return nil, err
  1499  	}
  1500  	req.Header = reqHeaders
  1501  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1502  }
  1503  
  1504  // Do executes the "firebasedynamiclinks.installAttribution" call.
  1505  // Any non-2xx status code is an error. Response headers are in either
  1506  // *GetIosPostInstallAttributionResponse.ServerResponse.Header or (if a
  1507  // response was returned at all) in error.(*googleapi.Error).Header. Use
  1508  // googleapi.IsNotModified to check whether the returned error was because
  1509  // http.StatusNotModified was returned.
  1510  func (c *V1InstallAttributionCall) Do(opts ...googleapi.CallOption) (*GetIosPostInstallAttributionResponse, error) {
  1511  	gensupport.SetOptions(c.urlParams_, opts...)
  1512  	res, err := c.doRequest("json")
  1513  	if res != nil && res.StatusCode == http.StatusNotModified {
  1514  		if res.Body != nil {
  1515  			res.Body.Close()
  1516  		}
  1517  		return nil, gensupport.WrapError(&googleapi.Error{
  1518  			Code:   res.StatusCode,
  1519  			Header: res.Header,
  1520  		})
  1521  	}
  1522  	if err != nil {
  1523  		return nil, err
  1524  	}
  1525  	defer googleapi.CloseBody(res)
  1526  	if err := googleapi.CheckResponse(res); err != nil {
  1527  		return nil, gensupport.WrapError(err)
  1528  	}
  1529  	ret := &GetIosPostInstallAttributionResponse{
  1530  		ServerResponse: googleapi.ServerResponse{
  1531  			Header:         res.Header,
  1532  			HTTPStatusCode: res.StatusCode,
  1533  		},
  1534  	}
  1535  	target := &ret
  1536  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1537  		return nil, err
  1538  	}
  1539  	return ret, nil
  1540  }
  1541  
  1542  type V1ReopenAttributionCall struct {
  1543  	s                              *Service
  1544  	getiosreopenattributionrequest *GetIosReopenAttributionRequest
  1545  	urlParams_                     gensupport.URLParams
  1546  	ctx_                           context.Context
  1547  	header_                        http.Header
  1548  }
  1549  
  1550  // ReopenAttribution: Get iOS reopen attribution for app universal link open
  1551  // deeplinking.
  1552  func (r *V1Service) ReopenAttribution(getiosreopenattributionrequest *GetIosReopenAttributionRequest) *V1ReopenAttributionCall {
  1553  	c := &V1ReopenAttributionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1554  	c.getiosreopenattributionrequest = getiosreopenattributionrequest
  1555  	return c
  1556  }
  1557  
  1558  // Fields allows partial responses to be retrieved. See
  1559  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1560  // details.
  1561  func (c *V1ReopenAttributionCall) Fields(s ...googleapi.Field) *V1ReopenAttributionCall {
  1562  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1563  	return c
  1564  }
  1565  
  1566  // Context sets the context to be used in this call's Do method.
  1567  func (c *V1ReopenAttributionCall) Context(ctx context.Context) *V1ReopenAttributionCall {
  1568  	c.ctx_ = ctx
  1569  	return c
  1570  }
  1571  
  1572  // Header returns a http.Header that can be modified by the caller to add
  1573  // headers to the request.
  1574  func (c *V1ReopenAttributionCall) Header() http.Header {
  1575  	if c.header_ == nil {
  1576  		c.header_ = make(http.Header)
  1577  	}
  1578  	return c.header_
  1579  }
  1580  
  1581  func (c *V1ReopenAttributionCall) doRequest(alt string) (*http.Response, error) {
  1582  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1583  	var body io.Reader = nil
  1584  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiosreopenattributionrequest)
  1585  	if err != nil {
  1586  		return nil, err
  1587  	}
  1588  	c.urlParams_.Set("alt", alt)
  1589  	c.urlParams_.Set("prettyPrint", "false")
  1590  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/reopenAttribution")
  1591  	urls += "?" + c.urlParams_.Encode()
  1592  	req, err := http.NewRequest("POST", urls, body)
  1593  	if err != nil {
  1594  		return nil, err
  1595  	}
  1596  	req.Header = reqHeaders
  1597  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1598  }
  1599  
  1600  // Do executes the "firebasedynamiclinks.reopenAttribution" call.
  1601  // Any non-2xx status code is an error. Response headers are in either
  1602  // *GetIosReopenAttributionResponse.ServerResponse.Header or (if a response was
  1603  // returned at all) in error.(*googleapi.Error).Header. Use
  1604  // googleapi.IsNotModified to check whether the returned error was because
  1605  // http.StatusNotModified was returned.
  1606  func (c *V1ReopenAttributionCall) Do(opts ...googleapi.CallOption) (*GetIosReopenAttributionResponse, error) {
  1607  	gensupport.SetOptions(c.urlParams_, opts...)
  1608  	res, err := c.doRequest("json")
  1609  	if res != nil && res.StatusCode == http.StatusNotModified {
  1610  		if res.Body != nil {
  1611  			res.Body.Close()
  1612  		}
  1613  		return nil, gensupport.WrapError(&googleapi.Error{
  1614  			Code:   res.StatusCode,
  1615  			Header: res.Header,
  1616  		})
  1617  	}
  1618  	if err != nil {
  1619  		return nil, err
  1620  	}
  1621  	defer googleapi.CloseBody(res)
  1622  	if err := googleapi.CheckResponse(res); err != nil {
  1623  		return nil, gensupport.WrapError(err)
  1624  	}
  1625  	ret := &GetIosReopenAttributionResponse{
  1626  		ServerResponse: googleapi.ServerResponse{
  1627  			Header:         res.Header,
  1628  			HTTPStatusCode: res.StatusCode,
  1629  		},
  1630  	}
  1631  	target := &ret
  1632  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1633  		return nil, err
  1634  	}
  1635  	return ret, nil
  1636  }
  1637  

View as plain text