You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2142 lines
80 KiB

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