blob: 8e9bf73bc6daa96b36ac284400dd9e50ed4dadff [file] [log] [blame]
// Copyright 2019 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package androidpublisher provides access to the Google Play Developer API.
//
// See https://developers.google.com/android-publisher
//
// Usage example:
//
// import "google.golang.org/api/androidpublisher/v2"
// ...
// androidpublisherService, err := androidpublisher.New(oauthHttpClient)
package androidpublisher // import "google.golang.org/api/androidpublisher/v2"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
const apiId = "androidpublisher:v2"
const apiName = "androidpublisher"
const apiVersion = "v2"
const basePath = "https://www.googleapis.com/androidpublisher/v2/applications/"
// OAuth2 scopes used by this API.
const (
// View and manage your Google Play Developer account
AndroidpublisherScope = "https://www.googleapis.com/auth/androidpublisher"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Edits = NewEditsService(s)
s.Inappproducts = NewInappproductsService(s)
s.Orders = NewOrdersService(s)
s.Purchases = NewPurchasesService(s)
s.Reviews = NewReviewsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Edits *EditsService
Inappproducts *InappproductsService
Orders *OrdersService
Purchases *PurchasesService
Reviews *ReviewsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewEditsService(s *Service) *EditsService {
rs := &EditsService{s: s}
rs.Apklistings = NewEditsApklistingsService(s)
rs.Apks = NewEditsApksService(s)
rs.Bundles = NewEditsBundlesService(s)
rs.Deobfuscationfiles = NewEditsDeobfuscationfilesService(s)
rs.Details = NewEditsDetailsService(s)
rs.Expansionfiles = NewEditsExpansionfilesService(s)
rs.Images = NewEditsImagesService(s)
rs.Listings = NewEditsListingsService(s)
rs.Testers = NewEditsTestersService(s)
rs.Tracks = NewEditsTracksService(s)
return rs
}
type EditsService struct {
s *Service
Apklistings *EditsApklistingsService
Apks *EditsApksService
Bundles *EditsBundlesService
Deobfuscationfiles *EditsDeobfuscationfilesService
Details *EditsDetailsService
Expansionfiles *EditsExpansionfilesService
Images *EditsImagesService
Listings *EditsListingsService
Testers *EditsTestersService
Tracks *EditsTracksService
}
func NewEditsApklistingsService(s *Service) *EditsApklistingsService {
rs := &EditsApklistingsService{s: s}
return rs
}
type EditsApklistingsService struct {
s *Service
}
func NewEditsApksService(s *Service) *EditsApksService {
rs := &EditsApksService{s: s}
return rs
}
type EditsApksService struct {
s *Service
}
func NewEditsBundlesService(s *Service) *EditsBundlesService {
rs := &EditsBundlesService{s: s}
return rs
}
type EditsBundlesService struct {
s *Service
}
func NewEditsDeobfuscationfilesService(s *Service) *EditsDeobfuscationfilesService {
rs := &EditsDeobfuscationfilesService{s: s}
return rs
}
type EditsDeobfuscationfilesService struct {
s *Service
}
func NewEditsDetailsService(s *Service) *EditsDetailsService {
rs := &EditsDetailsService{s: s}
return rs
}
type EditsDetailsService struct {
s *Service
}
func NewEditsExpansionfilesService(s *Service) *EditsExpansionfilesService {
rs := &EditsExpansionfilesService{s: s}
return rs
}
type EditsExpansionfilesService struct {
s *Service
}
func NewEditsImagesService(s *Service) *EditsImagesService {
rs := &EditsImagesService{s: s}
return rs
}
type EditsImagesService struct {
s *Service
}
func NewEditsListingsService(s *Service) *EditsListingsService {
rs := &EditsListingsService{s: s}
return rs
}
type EditsListingsService struct {
s *Service
}
func NewEditsTestersService(s *Service) *EditsTestersService {
rs := &EditsTestersService{s: s}
return rs
}
type EditsTestersService struct {
s *Service
}
func NewEditsTracksService(s *Service) *EditsTracksService {
rs := &EditsTracksService{s: s}
return rs
}
type EditsTracksService struct {
s *Service
}
func NewInappproductsService(s *Service) *InappproductsService {
rs := &InappproductsService{s: s}
return rs
}
type InappproductsService struct {
s *Service
}
func NewOrdersService(s *Service) *OrdersService {
rs := &OrdersService{s: s}
return rs
}
type OrdersService struct {
s *Service
}
func NewPurchasesService(s *Service) *PurchasesService {
rs := &PurchasesService{s: s}
rs.Products = NewPurchasesProductsService(s)
rs.Subscriptions = NewPurchasesSubscriptionsService(s)
rs.Voidedpurchases = NewPurchasesVoidedpurchasesService(s)
return rs
}
type PurchasesService struct {
s *Service
Products *PurchasesProductsService
Subscriptions *PurchasesSubscriptionsService
Voidedpurchases *PurchasesVoidedpurchasesService
}
func NewPurchasesProductsService(s *Service) *PurchasesProductsService {
rs := &PurchasesProductsService{s: s}
return rs
}
type PurchasesProductsService struct {
s *Service
}
func NewPurchasesSubscriptionsService(s *Service) *PurchasesSubscriptionsService {
rs := &PurchasesSubscriptionsService{s: s}
return rs
}
type PurchasesSubscriptionsService struct {
s *Service
}
func NewPurchasesVoidedpurchasesService(s *Service) *PurchasesVoidedpurchasesService {
rs := &PurchasesVoidedpurchasesService{s: s}
return rs
}
type PurchasesVoidedpurchasesService struct {
s *Service
}
func NewReviewsService(s *Service) *ReviewsService {
rs := &ReviewsService{s: s}
return rs
}
type ReviewsService struct {
s *Service
}
type Apk struct {
// Binary: Information about the binary payload of this APK.
Binary *ApkBinary `json:"binary,omitempty"`
// VersionCode: The version code of the APK, as specified in the APK's
// manifest file.
VersionCode int64 `json:"versionCode,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Binary") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Binary") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Apk) MarshalJSON() ([]byte, error) {
type NoMethod Apk
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ApkBinary: Represents the binary payload of an APK.
type ApkBinary struct {
// Sha1: A sha1 hash of the APK payload, encoded as a hex string and
// matching the output of the sha1sum command.
Sha1 string `json:"sha1,omitempty"`
// Sha256: A sha256 hash of the APK payload, encoded as a hex string and
// matching the output of the sha256sum command.
Sha256 string `json:"sha256,omitempty"`
// ForceSendFields is a list of field names (e.g. "Sha1") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Sha1") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ApkBinary) MarshalJSON() ([]byte, error) {
type NoMethod ApkBinary
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ApkListing struct {
// Language: The language code, in BCP 47 format (eg "en-US").
Language string `json:"language,omitempty"`
// RecentChanges: Describe what's new in your APK.
RecentChanges string `json:"recentChanges,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Language") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Language") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ApkListing) MarshalJSON() ([]byte, error) {
type NoMethod ApkListing
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ApkListingsListResponse struct {
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "androidpublisher#apkListingsListResponse".
Kind string `json:"kind,omitempty"`
Listings []*ApkListing `json:"listings,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ApkListingsListResponse) MarshalJSON() ([]byte, error) {
type NoMethod ApkListingsListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ApksAddExternallyHostedRequest struct {
// ExternallyHostedApk: The definition of the externally-hosted APK and
// where it is located.
ExternallyHostedApk *ExternallyHostedApk `json:"externallyHostedApk,omitempty"`
// ForceSendFields is a list of field names (e.g. "ExternallyHostedApk")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExternallyHostedApk") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ApksAddExternallyHostedRequest) MarshalJSON() ([]byte, error) {
type NoMethod ApksAddExternallyHostedRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ApksAddExternallyHostedResponse struct {
// ExternallyHostedApk: The definition of the externally-hosted APK and
// where it is located.
ExternallyHostedApk *ExternallyHostedApk `json:"externallyHostedApk,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ExternallyHostedApk")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExternallyHostedApk") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ApksAddExternallyHostedResponse) MarshalJSON() ([]byte, error) {
type NoMethod ApksAddExternallyHostedResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ApksListResponse struct {
Apks []*Apk `json:"apks,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "androidpublisher#apksListResponse".
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Apks") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Apks") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ApksListResponse) MarshalJSON() ([]byte, error) {
type NoMethod ApksListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AppDetails struct {
// ContactEmail: The user-visible support email for this app.
ContactEmail string `json:"contactEmail,omitempty"`
// ContactPhone: The user-visible support telephone number for this app.
ContactPhone string `json:"contactPhone,omitempty"`
// ContactWebsite: The user-visible website for this app.
ContactWebsite string `json:"contactWebsite,omitempty"`
// DefaultLanguage: Default language code, in BCP 47 format (eg
// "en-US").
DefaultLanguage string `json:"defaultLanguage,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ContactEmail") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ContactEmail") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AppDetails) MarshalJSON() ([]byte, error) {
type NoMethod AppDetails
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AppEdit: Represents an edit of an app. An edit allows clients to make
// multiple changes before committing them in one operation.
type AppEdit struct {
// ExpiryTimeSeconds: The time at which the edit will expire and will be
// no longer valid for use in any subsequent API calls (encoded as
// seconds since the Epoch).
ExpiryTimeSeconds string `json:"expiryTimeSeconds,omitempty"`
// Id: The ID of the edit that can be used in subsequent API calls.
Id string `json:"id,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ExpiryTimeSeconds")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExpiryTimeSeconds") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *AppEdit) MarshalJSON() ([]byte, error) {
type NoMethod AppEdit
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Bundle struct {
// Sha1: A sha1 hash of the upload payload, encoded as a hex string and
// matching the output of the sha1sum command.
Sha1 string `json:"sha1,omitempty"`
// Sha256: A sha256 hash of the upload payload, encoded as a hex string
// and matching the output of the sha256sum command.
Sha256 string `json:"sha256,omitempty"`
// VersionCode: The version code of the Android App Bundle. As specified
// in the Android App Bundle's base module APK manifest file.
VersionCode int64 `json:"versionCode,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Sha1") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Sha1") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Bundle) MarshalJSON() ([]byte, error) {
type NoMethod Bundle
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type BundlesListResponse struct {
Bundles []*Bundle `json:"bundles,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "androidpublisher#bundlesListResponse".
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Bundles") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Bundles") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BundlesListResponse) MarshalJSON() ([]byte, error) {
type NoMethod BundlesListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Comment struct {
// DeveloperComment: A comment from a developer.
DeveloperComment *DeveloperComment `json:"developerComment,omitempty"`
// UserComment: A comment from a user.
UserComment *UserComment `json:"userComment,omitempty"`
// ForceSendFields is a list of field names (e.g. "DeveloperComment") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DeveloperComment") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Comment) MarshalJSON() ([]byte, error) {
type NoMethod Comment
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DeobfuscationFile: Represents a deobfuscation file.
type DeobfuscationFile struct {
// SymbolType: The type of the deobfuscation file.
SymbolType string `json:"symbolType,omitempty"`
// ForceSendFields is a list of field names (e.g. "SymbolType") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "SymbolType") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DeobfuscationFile) MarshalJSON() ([]byte, error) {
type NoMethod DeobfuscationFile
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type DeobfuscationFilesUploadResponse struct {
DeobfuscationFile *DeobfuscationFile `json:"deobfuscationFile,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "DeobfuscationFile")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DeobfuscationFile") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *DeobfuscationFilesUploadResponse) MarshalJSON() ([]byte, error) {
type NoMethod DeobfuscationFilesUploadResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type DeveloperComment struct {
// LastModified: The last time at which this comment was updated.
LastModified *Timestamp `json:"lastModified,omitempty"`
// Text: The content of the comment, i.e. reply body.
Text string `json:"text,omitempty"`
// ForceSendFields is a list of field names (e.g. "LastModified") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "LastModified") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DeveloperComment) MarshalJSON() ([]byte, error) {
type NoMethod DeveloperComment
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type DeviceMetadata struct {
// CpuMake: Device CPU make e.g. "Qualcomm"
CpuMake string `json:"cpuMake,omitempty"`
// CpuModel: Device CPU model e.g. "MSM8974"
CpuModel string `json:"cpuModel,omitempty"`
// DeviceClass: Device class (e.g. tablet)
DeviceClass string `json:"deviceClass,omitempty"`
// GlEsVersion: OpenGL version
GlEsVersion int64 `json:"glEsVersion,omitempty"`
// Manufacturer: Device manufacturer (e.g. Motorola)
Manufacturer string `json:"manufacturer,omitempty"`
// NativePlatform: Comma separated list of native platforms (e.g. "arm",
// "arm7")
NativePlatform string `json:"nativePlatform,omitempty"`
// ProductName: Device model name (e.g. Droid)
ProductName string `json:"productName,omitempty"`
// RamMb: Device RAM in Megabytes e.g. "2048"
RamMb int64 `json:"ramMb,omitempty"`
// ScreenDensityDpi: Screen density in DPI
ScreenDensityDpi int64 `json:"screenDensityDpi,omitempty"`
// ScreenHeightPx: Screen height in pixels
ScreenHeightPx int64 `json:"screenHeightPx,omitempty"`
// ScreenWidthPx: Screen width in pixels
ScreenWidthPx int64 `json:"screenWidthPx,omitempty"`
// ForceSendFields is a list of field names (e.g. "CpuMake") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CpuMake") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DeviceMetadata) MarshalJSON() ([]byte, error) {
type NoMethod DeviceMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ExpansionFile struct {
// FileSize: If set this field indicates that this APK has an Expansion
// File uploaded to it: this APK does not reference another APK's
// Expansion File. The field's value is the size of the uploaded
// Expansion File in bytes.
FileSize int64 `json:"fileSize,omitempty,string"`
// ReferencesVersion: If set this APK's Expansion File references
// another APK's Expansion File. The file_size field will not be set.
ReferencesVersion int64 `json:"referencesVersion,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "FileSize") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FileSize") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ExpansionFile) MarshalJSON() ([]byte, error) {
type NoMethod ExpansionFile
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ExpansionFilesUploadResponse struct {
ExpansionFile *ExpansionFile `json:"expansionFile,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ExpansionFile") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExpansionFile") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ExpansionFilesUploadResponse) MarshalJSON() ([]byte, error) {
type NoMethod ExpansionFilesUploadResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ExternallyHostedApk: Defines an APK available for this application
// that is hosted externally and not uploaded to Google Play. This
// function is only available to enterprises who are using Google Play
// for Work, and whos application is restricted to the enterprise
// private channel
type ExternallyHostedApk struct {
// ApplicationLabel: The application label.
ApplicationLabel string `json:"applicationLabel,omitempty"`
// CertificateBase64s: A certificate (or array of certificates if a
// certificate-chain is used) used to signed this APK, represented as a
// base64 encoded byte array.
CertificateBase64s []string `json:"certificateBase64s,omitempty"`
// ExternallyHostedUrl: The URL at which the APK is hosted. This must be
// an https URL.
ExternallyHostedUrl string `json:"externallyHostedUrl,omitempty"`
// FileSha1Base64: The SHA1 checksum of this APK, represented as a
// base64 encoded byte array.
FileSha1Base64 string `json:"fileSha1Base64,omitempty"`
// FileSha256Base64: The SHA256 checksum of this APK, represented as a
// base64 encoded byte array.
FileSha256Base64 string `json:"fileSha256Base64,omitempty"`
// FileSize: The file size in bytes of this APK.
FileSize int64 `json:"fileSize,omitempty,string"`
// IconBase64: The icon image from the APK, as a base64 encoded byte
// array.
IconBase64 string `json:"iconBase64,omitempty"`
// MaximumSdk: The maximum SDK supported by this APK (optional).
MaximumSdk int64 `json:"maximumSdk,omitempty"`
// MinimumSdk: The minimum SDK targeted by this APK.
MinimumSdk int64 `json:"minimumSdk,omitempty"`
// NativeCodes: The native code environments supported by this APK
// (optional).
NativeCodes []string `json:"nativeCodes,omitempty"`
// PackageName: The package name.
PackageName string `json:"packageName,omitempty"`
// UsesFeatures: The features required by this APK (optional).
UsesFeatures []string `json:"usesFeatures,omitempty"`
// UsesPermissions: The permissions requested by this APK.
UsesPermissions []*ExternallyHostedApkUsesPermission `json:"usesPermissions,omitempty"`
// VersionCode: The version code of this APK.
VersionCode int64 `json:"versionCode,omitempty"`
// VersionName: The version name of this APK.
VersionName string `json:"versionName,omitempty"`
// ForceSendFields is a list of field names (e.g. "ApplicationLabel") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ApplicationLabel") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ExternallyHostedApk) MarshalJSON() ([]byte, error) {
type NoMethod ExternallyHostedApk
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ExternallyHostedApkUsesPermission: A permission used by this APK.
type ExternallyHostedApkUsesPermission struct {
// MaxSdkVersion: Optionally, the maximum SDK version for which the
// permission is required.
MaxSdkVersion int64 `json:"maxSdkVersion,omitempty"`
// Name: The name of the permission requested.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "MaxSdkVersion") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "MaxSdkVersion") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ExternallyHostedApkUsesPermission) MarshalJSON() ([]byte, error) {
type NoMethod ExternallyHostedApkUsesPermission
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Image struct {
// Id: A unique id representing this image.
Id string `json:"id,omitempty"`
// Sha1: A sha1 hash of the image that was uploaded.
Sha1 string `json:"sha1,omitempty"`
// Url: A URL that will serve a preview of the image.
Url string `json:"url,omitempty"`
// ForceSendFields is a list of field names (e.g. "Id") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Id") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Image) MarshalJSON() ([]byte, error) {
type NoMethod Image
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ImagesDeleteAllResponse struct {
Deleted []*Image `json:"deleted,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Deleted") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Deleted") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ImagesDeleteAllResponse) MarshalJSON() ([]byte, error) {
type NoMethod ImagesDeleteAllResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ImagesListResponse struct {
Images []*Image `json:"images,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Images") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Images") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ImagesListResponse) MarshalJSON() ([]byte, error) {
type NoMethod ImagesListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ImagesUploadResponse struct {
Image *Image `json:"image,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Image") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Image") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ImagesUploadResponse) MarshalJSON() ([]byte, error) {
type NoMethod ImagesUploadResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type InAppProduct struct {
// DefaultLanguage: The default language of the localized data, as
// defined by BCP 47. e.g. "en-US", "en-GB".
DefaultLanguage string `json:"defaultLanguage,omitempty"`
// DefaultPrice: Default price cannot be zero. In-app products can never
// be free. Default price is always in the developer's Checkout merchant
// currency.
DefaultPrice *Price `json:"defaultPrice,omitempty"`
// GracePeriod: Grace period of the subscription, specified in ISO 8601
// format. It will allow developers to give their subscribers a grace
// period when the payment for the new recurrence period is declined.
// Acceptable values = "P3D" (three days) and "P7D" (seven days)
GracePeriod string `json:"gracePeriod,omitempty"`
// Listings: List of localized title and description data.
Listings map[string]InAppProductListing `json:"listings,omitempty"`
// PackageName: The package name of the parent app.
PackageName string `json:"packageName,omitempty"`
// Prices: Prices per buyer region. None of these prices should be zero.
// In-app products can never be free.
Prices map[string]Price `json:"prices,omitempty"`
// PurchaseType: Purchase type enum value. Unmodifiable after creation.
PurchaseType string `json:"purchaseType,omitempty"`
// Season: Definition of a season for a seasonal subscription. Can be
// defined only for yearly subscriptions.
Season *Season `json:"season,omitempty"`
// Sku: The stock-keeping-unit (SKU) of the product, unique within an
// app.
Sku string `json:"sku,omitempty"`
Status string `json:"status,omitempty"`
// SubscriptionPeriod: Subscription period, specified in ISO 8601
// format. Acceptable values are "P1W" (one week), "P1M" (one month),
// "P3M" (three months), "P6M" (six months), and "P1Y" (one year).
SubscriptionPeriod string `json:"subscriptionPeriod,omitempty"`
// TrialPeriod: Trial period, specified in ISO 8601 format. Acceptable
// values are anything between "P7D" (seven days) and "P999D" (999
// days). Seasonal subscriptions cannot have a trial period.
TrialPeriod string `json:"trialPeriod,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "DefaultLanguage") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DefaultLanguage") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *InAppProduct) MarshalJSON() ([]byte, error) {
type NoMethod InAppProduct
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type InAppProductListing struct {
Description string `json:"description,omitempty"`
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Description") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *InAppProductListing) MarshalJSON() ([]byte, error) {
type NoMethod InAppProductListing
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type InappproductsListResponse struct {
Inappproduct []*InAppProduct `json:"inappproduct,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "androidpublisher#inappproductsListResponse".
Kind string `json:"kind,omitempty"`
PageInfo *PageInfo `json:"pageInfo,omitempty"`
TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Inappproduct") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Inappproduct") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *InappproductsListResponse) MarshalJSON() ([]byte, error) {
type NoMethod InappproductsListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Listing struct {
// FullDescription: Full description of the app; this may be up to 4000
// characters in length.
FullDescription string `json:"fullDescription,omitempty"`
// Language: Language localization code (for example, "de-AT" for
// Austrian German).
Language string `json:"language,omitempty"`
// ShortDescription: Short description of the app (previously known as
// promo text); this may be up to 80 characters in length.
ShortDescription string `json:"shortDescription,omitempty"`
// Title: App's localized title.
Title string `json:"title,omitempty"`
// Video: URL of a promotional YouTube video for the app.
Video string `json:"video,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "FullDescription") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FullDescription") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Listing) MarshalJSON() ([]byte, error) {
type NoMethod Listing
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ListingsListResponse struct {
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "androidpublisher#listingsListResponse".
Kind string `json:"kind,omitempty"`
Listings []*Listing `json:"listings,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListingsListResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListingsListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type MonthDay struct {
// Day: Day of a month, value in [1, 31] range. Valid range depends on
// the specified month.
Day int64 `json:"day,omitempty"`
// Month: Month of a year. e.g. 1 = JAN, 2 = FEB etc.
Month int64 `json:"month,omitempty"`
// ForceSendFields is a list of field names (e.g. "Day") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Day") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MonthDay) MarshalJSON() ([]byte, error) {
type NoMethod MonthDay
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type PageInfo struct {
ResultPerPage int64 `json:"resultPerPage,omitempty"`
StartIndex int64 `json:"startIndex,omitempty"`
TotalResults int64 `json:"totalResults,omitempty"`
// ForceSendFields is a list of field names (e.g. "ResultPerPage") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ResultPerPage") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *PageInfo) MarshalJSON() ([]byte, error) {
type NoMethod PageInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Price struct {
// Currency: 3 letter Currency code, as defined by ISO 4217.
Currency string `json:"currency,omitempty"`
// PriceMicros: The price in millionths of the currency base unit
// represented as a string.
PriceMicros string `json:"priceMicros,omitempty"`
// ForceSendFields is a list of field names (e.g. "Currency") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Currency") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Price) MarshalJSON() ([]byte, error) {
type NoMethod Price
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ProductPurchase: A ProductPurchase resource indicates the status of a
// user's inapp product purchase.
type ProductPurchase struct {
// ConsumptionState: The consumption state of the inapp product.
// Possible values are:
// - Yet to be consumed
// - Consumed
ConsumptionState int64 `json:"consumptionState,omitempty"`
// DeveloperPayload: A developer-specified string that contains
// supplemental information about an order.
DeveloperPayload string `json:"developerPayload,omitempty"`
// Kind: This kind represents an inappPurchase object in the
// androidpublisher service.
Kind string `json:"kind,omitempty"`
// OrderId: The order id associated with the purchase of the inapp
// product.
OrderId string `json:"orderId,omitempty"`
// PurchaseState: The purchase state of the order. Possible values are:
//
// - Purchased
// - Canceled
PurchaseState int64 `json:"purchaseState,omitempty"`
// PurchaseTimeMillis: The time the product was purchased, in
// milliseconds since the epoch (Jan 1, 1970).
PurchaseTimeMillis int64 `json:"purchaseTimeMillis,omitempty,string"`
// PurchaseType: The type of purchase of the inapp product. This field
// is only set if this purchase was not made using the standard in-app
// billing flow. Possible values are:
// - Test (i.e. purchased from a license testing account)
// - Promo (i.e. purchased using a promo code)
PurchaseType *int64 `json:"purchaseType,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ConsumptionState") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ConsumptionState") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ProductPurchase) MarshalJSON() ([]byte, error) {
type NoMethod ProductPurchase
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Prorate struct {
// DefaultPrice: Default price cannot be zero and must be less than the
// full subscription price. Default price is always in the developer's
// Checkout merchant currency. Targeted countries have their prices set
// automatically based on the default_price.
DefaultPrice *Price `json:"defaultPrice,omitempty"`
// Start: Defines the first day on which the price takes effect.
Start *MonthDay `json:"start,omitempty"`
// ForceSendFields is a list of field names (e.g. "DefaultPrice") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DefaultPrice") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Prorate) MarshalJSON() ([]byte, error) {
type NoMethod Prorate
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Review struct {
// AuthorName: The name of the user who wrote the review.
AuthorName string `json:"authorName,omitempty"`
// Comments: A repeated field containing comments for the review.
Comments []*Comment `json:"comments,omitempty"`
// ReviewId: Unique identifier for this review.
ReviewId string `json:"reviewId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AuthorName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AuthorName") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Review) MarshalJSON() ([]byte, error) {
type NoMethod Review
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ReviewReplyResult struct {
// LastEdited: The time at which the reply took effect.
LastEdited *Timestamp `json:"lastEdited,omitempty"`
// ReplyText: The reply text that was applied.
ReplyText string `json:"replyText,omitempty"`
// ForceSendFields is a list of field names (e.g. "LastEdited") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "LastEdited") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ReviewReplyResult) MarshalJSON() ([]byte, error) {
type NoMethod ReviewReplyResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ReviewsListResponse struct {
PageInfo *PageInfo `json:"pageInfo,omitempty"`
Reviews []*Review `json:"reviews,omitempty"`
TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "PageInfo") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "PageInfo") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ReviewsListResponse) MarshalJSON() ([]byte, error) {
type NoMethod ReviewsListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ReviewsReplyRequest struct {
// ReplyText: The text to set as the reply. Replies of more than
// approximately 350 characters will be rejected. HTML tags will be
// stripped.
ReplyText string `json:"replyText,omitempty"`
// ForceSendFields is a list of field names (e.g. "ReplyText") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ReplyText") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ReviewsReplyRequest) MarshalJSON() ([]byte, error) {
type NoMethod ReviewsReplyRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ReviewsReplyResponse struct {
Result *ReviewReplyResult `json:"result,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Result") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Result") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ReviewsReplyResponse) MarshalJSON() ([]byte, error) {
type NoMethod ReviewsReplyResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Season struct {
// End: Inclusive end date of the recurrence period.
End *MonthDay `json:"end,omitempty"`
// Prorations: Optionally present list of prorations for the season.
// Each proration is a one-off discounted entry into a subscription.
// Each proration contains the first date on which the discount is
// available and the new pricing information.
Prorations []*Prorate `json:"prorations,omitempty"`
// Start: Inclusive start date of the recurrence period.
Start *MonthDay `json:"start,omitempty"`
// ForceSendFields is a list of field names (e.g. "End") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "End") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Season) MarshalJSON() ([]byte, error) {
type NoMethod Season
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SubscriptionCancelSurveyResult: Information provided by the user when
// they complete the subscription cancellation flow (cancellation reason
// survey).
type SubscriptionCancelSurveyResult struct {
// CancelSurveyReason: The cancellation reason the user chose in the
// survey. Possible values are:
// - Other
// - I don't use this service enough
// - Technical issues
// - Cost-related reasons
// - I found a better app
CancelSurveyReason int64 `json:"cancelSurveyReason,omitempty"`
// UserInputCancelReason: The customized input cancel reason from the
// user. Only present when cancelReason is 0.
UserInputCancelReason string `json:"userInputCancelReason,omitempty"`
// ForceSendFields is a list of field names (e.g. "CancelSurveyReason")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CancelSurveyReason") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *SubscriptionCancelSurveyResult) MarshalJSON() ([]byte, error) {
type NoMethod SubscriptionCancelSurveyResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SubscriptionDeferralInfo: A SubscriptionDeferralInfo contains the
// data needed to defer a subscription purchase to a future expiry time.
type SubscriptionDeferralInfo struct {
// DesiredExpiryTimeMillis: The desired next expiry time to assign to
// the subscription, in milliseconds since the Epoch. The given time
// must be later/greater than the current expiry time for the
// subscription.
DesiredExpiryTimeMillis int64 `json:"desiredExpiryTimeMillis,omitempty,string"`
// ExpectedExpiryTimeMillis: The expected expiry time for the
// subscription. If the current expiry time for the subscription is not
// the value specified here, the deferral will not occur.
ExpectedExpiryTimeMillis int64 `json:"expectedExpiryTimeMillis,omitempty,string"`
// ForceSendFields is a list of field names (e.g.
// "DesiredExpiryTimeMillis") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DesiredExpiryTimeMillis")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *SubscriptionDeferralInfo) MarshalJSON() ([]byte, error) {
type NoMethod SubscriptionDeferralInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SubscriptionPriceChange: Contains the price change information for a
// subscription that can be used to control the user journey for the
// price change in the app. This can be in the form of seeking
// confirmation from the user or tailoring the experience for a
// successful conversion.
type SubscriptionPriceChange struct {
// NewPrice: The new price the subscription will renew with if the price
// change is accepted by the user.
NewPrice *Price `json:"newPrice,omitempty"`
// State: The current state of the price change. Possible values are:
//
// - Outstanding: State for a pending price change waiting for the user
// to agree. In this state, you can optionally seek confirmation from
// the user using the In-App API.
// - Accepted: State for an accepted price change that the subscription
// will renew with unless it's canceled. The price change takes effect
// on a future date when the subscription renews. Note that the change
// might not occur when the subscription is renewed next.
State int64 `json:"state,omitempty"`
// ForceSendFields is a list of field names (e.g. "NewPrice") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NewPrice") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SubscriptionPriceChange) MarshalJSON() ([]byte, error) {
type NoMethod SubscriptionPriceChange
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SubscriptionPurchase: A SubscriptionPurchase resource indicates the
// status of a user's subscription purchase.
type SubscriptionPurchase struct {
// AutoRenewing: Whether the subscription will automatically be renewed
// when it reaches its current expiry time.
AutoRenewing bool `json:"autoRenewing,omitempty"`
// CancelReason: The reason why a subscription was canceled or is not
// auto-renewing. Possible values are:
// - User canceled the subscription
// - Subscription was canceled by the system, for example because of a
// billing problem
// - Subscription was replaced with a new subscription
// - Subscription was canceled by the developer
CancelReason *int64 `json:"cancelReason,omitempty"`
// CancelSurveyResult: Information provided by the user when they
// complete the subscription cancellation flow (cancellation reason
// survey).
CancelSurveyResult *SubscriptionCancelSurveyResult `json:"cancelSurveyResult,omitempty"`
// CountryCode: ISO 3166-1 alpha-2 billing country/region code of the
// user at the time the subscription was granted.
CountryCode string `json:"countryCode,omitempty"`
// DeveloperPayload: A developer-specified string that contains
// supplemental information about an order.
DeveloperPayload string `json:"developerPayload,omitempty"`
// EmailAddress: The email address of the user when the subscription was
// purchased. Only present for purchases made with 'Subscribe with
// Google'.
EmailAddress string `json:"emailAddress,omitempty"`
// ExpiryTimeMillis: Time at which the subscription will expire, in
// milliseconds since the Epoch.
ExpiryTimeMillis int64 `json:"expiryTimeMillis,omitempty,string"`
// FamilyName: The family name of the user when the subscription was
// purchased. Only present for purchases made with 'Subscribe with
// Google'.
FamilyName string `json:"familyName,omitempty"`
// GivenName: The given name of the user when the subscription was
// purchased. Only present for purchases made with 'Subscribe with
// Google'.
GivenName string `json:"givenName,omitempty"`
// Kind: This kind represents a subscriptionPurchase object in the
// androidpublisher service.
Kind string `json:"kind,omitempty"`
// LinkedPurchaseToken: The purchase token of the originating purchase
// if this subscription is one of the following:
// - Re-signup of a canceled but non-lapsed subscription
// - Upgrade/downgrade from a previous subscription For example,
// suppose a user originally signs up and you receive purchase token X,
// then the user cancels and goes through the resignup flow (before
// their subscription lapses) and you receive purchase token Y, and
// finally the user upgrades their subscription and you receive purchase
// token Z. If you call this API with purchase token Z, this field will
// be set to Y. If you call this API with purchase token Y, this field
// will be set to X. If you call this API with purchase token X, this
// field will not be set.
LinkedPurchaseToken string `json:"linkedPurchaseToken,omitempty"`
// OrderId: The order id of the latest recurring order associated with
// the purchase of the subscription.
OrderId string `json:"orderId,omitempty"`
// PaymentState: The payment state of the subscription. Possible values
// are:
// - Payment pending
// - Payment received
// - Free trial
// - Pending deferred upgrade/downgrade
PaymentState *int64 `json:"paymentState,omitempty"`
// PriceAmountMicros: Price of the subscription, not including tax.
// Price is expressed in micro-units, where 1,000,000 micro-units
// represents one unit of the currency. For example, if the subscription
// price is €1.99, price_amount_micros is 1990000.
PriceAmountMicros int64 `json:"priceAmountMicros,omitempty,string"`
// PriceChange: The latest price change information available. This is
// present only when there is an upcoming price change for the
// subscription yet to be applied.
//
// Once the subscription renews with the new price or the subscription
// is canceled, no price change information will be returned.
PriceChange *SubscriptionPriceChange `json:"priceChange,omitempty"`
// PriceCurrencyCode: ISO 4217 currency code for the subscription price.
// For example, if the price is specified in British pounds sterling,
// price_currency_code is "GBP".
PriceCurrencyCode string `json:"priceCurrencyCode,omitempty"`
// ProfileId: The profile id of the user when the subscription was
// purchased. Only present for purchases made with 'Subscribe with
// Google'.
ProfileId string `json:"profileId,omitempty"`
// ProfileName: The profile name of the user when the subscription was
// purchased. Only present for purchases made with 'Subscribe with
// Google'.
ProfileName string `json:"profileName,omitempty"`
// PurchaseType: The type of purchase of the subscription. This field is
// only set if this purchase was not made using the standard in-app
// billing flow. Possible values are:
// - Test (i.e. purchased from a license testing account)
PurchaseType *int64 `json:"purchaseType,omitempty"`
// StartTimeMillis: Time at which the subscription was granted, in
// milliseconds since the Epoch.
StartTimeMillis int64 `json:"startTimeMillis,omitempty,string"`
// UserCancellationTimeMillis: The time at which the subscription was
// canceled by the user, in milliseconds since the epoch. Only present
// if cancelReason is 0.
UserCancellationTimeMillis int64 `json:"userCancellationTimeMillis,omitempty,string"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AutoRenewing") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AutoRenewing") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SubscriptionPurchase) MarshalJSON() ([]byte, error) {
type NoMethod SubscriptionPurchase
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type SubscriptionPurchasesDeferRequest struct {
// DeferralInfo: The information about the new desired expiry time for
// the subscription.
DeferralInfo *SubscriptionDeferralInfo `json:"deferralInfo,omitempty"`
// ForceSendFields is a list of field names (e.g. "DeferralInfo") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DeferralInfo") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SubscriptionPurchasesDeferRequest) MarshalJSON() ([]byte, error) {
type NoMethod SubscriptionPurchasesDeferRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type SubscriptionPurchasesDeferResponse struct {
// NewExpiryTimeMillis: The new expiry time for the subscription in
// milliseconds since the Epoch.
NewExpiryTimeMillis int64 `json:"newExpiryTimeMillis,omitempty,string"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NewExpiryTimeMillis")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NewExpiryTimeMillis") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *SubscriptionPurchasesDeferResponse) MarshalJSON() ([]byte, error) {
type NoMethod SubscriptionPurchasesDeferResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Testers struct {
GoogleGroups []string `json:"googleGroups,omitempty"`
GooglePlusCommunities []string `json:"googlePlusCommunities,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "GoogleGroups") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "GoogleGroups") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Testers) MarshalJSON() ([]byte, error) {
type NoMethod Testers
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Timestamp struct {
Nanos int64 `json:"nanos,omitempty"`
Seconds int64 `json:"seconds,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Nanos") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Nanos") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Timestamp) MarshalJSON() ([]byte, error) {
type NoMethod Timestamp
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type TokenPagination struct {
NextPageToken string `json:"nextPageToken,omitempty"`
PreviousPageToken string `json:"previousPageToken,omitempty"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TokenPagination) MarshalJSON() ([]byte, error) {
type NoMethod TokenPagination
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Track struct {
// Track: Identifier for this track.
Track string `json:"track,omitempty"`
UserFraction float64 `json:"userFraction,omitempty"`
// VersionCodes: Version codes to make active on this track. Note that
// this list should contain all versions you wish to be active,
// including those you wish to retain from previous releases.
VersionCodes []int64 `json:"versionCodes,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Track") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Track") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Track) MarshalJSON() ([]byte, error) {
type NoMethod Track
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *Track) UnmarshalJSON(data []byte) error {
type NoMethod Track
var s1 struct {
UserFraction gensupport.JSONFloat64 `json:"userFraction"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.UserFraction = float64(s1.UserFraction)
return nil
}
type TracksListResponse struct {
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "androidpublisher#tracksListResponse".
Kind string `json:"kind,omitempty"`
Tracks []*Track `json:"tracks,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TracksListResponse) MarshalJSON() ([]byte, error) {
type NoMethod TracksListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type UserComment struct {
// AndroidOsVersion: Integer Android SDK version of the user's device at
// the time the review was written, e.g. 23 is Marshmallow. May be
// absent.
AndroidOsVersion int64 `json:"androidOsVersion,omitempty"`
// AppVersionCode: Integer version code of the app as installed at the
// time the review was written. May be absent.
AppVersionCode int64 `json:"appVersionCode,omitempty"`
// AppVersionName: String version name of the app as installed at the
// time the review was written. May be absent.
AppVersionName string `json:"appVersionName,omitempty"`
// Device: Codename for the reviewer's device, e.g. klte, flounder. May
// be absent.
Device string `json:"device,omitempty"`
// DeviceMetadata: Some information about the characteristics of the
// user's device
DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"`
// LastModified: The last time at which this comment was updated.
LastModified *Timestamp `json:"lastModified,omitempty"`
// OriginalText: Untranslated text of the review, in the case where the
// review has been translated. If the review has not been translated
// this is left blank.
OriginalText string `json:"originalText,omitempty"`
// ReviewerLanguage: Language code for the reviewer. This is taken from
// the device settings so is not guaranteed to match the language the
// review is written in. May be absent.
ReviewerLanguage string `json:"reviewerLanguage,omitempty"`
// StarRating: The star rating associated with the review, from 1 to 5.
StarRating int64 `json:"starRating,omitempty"`
// Text: The content of the comment, i.e. review body. In some cases
// users have been able to write a review with separate title and body;
// in those cases the title and body are concatenated and separated by a
// tab character.
Text string `json:"text,omitempty"`
// ThumbsDownCount: Number of users who have given this review a thumbs
// down
ThumbsDownCount int64 `json:"thumbsDownCount,omitempty"`
// ThumbsUpCount: Number of users who have given this review a thumbs up
ThumbsUpCount int64 `json:"thumbsUpCount,omitempty"`
// ForceSendFields is a list of field names (e.g. "AndroidOsVersion") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AndroidOsVersion") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *UserComment) MarshalJSON() ([]byte, error) {
type NoMethod UserComment
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// VoidedPurchase: A VoidedPurchase resource indicates a purchase that
// was either canceled/refunded/charged-back.
type VoidedPurchase struct {
// Kind: This kind represents a voided purchase object in the
// androidpublisher service.
Kind string `json:"kind,omitempty"`
// PurchaseTimeMillis: The time at which the purchase was made, in
// milliseconds since the epoch (Jan 1, 1970).
PurchaseTimeMillis int64 `json:"purchaseTimeMillis,omitempty,string"`
// PurchaseToken: The token that was generated when a purchase was made.
// This uniquely identifies a purchase.
PurchaseToken string `json:"purchaseToken,omitempty"`
// VoidedTimeMillis: The time at which the purchase was
// canceled/refunded/charged-back, in milliseconds since the epoch (Jan
// 1, 1970).
VoidedTimeMillis int64 `json:"voidedTimeMillis,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *VoidedPurchase) MarshalJSON() ([]byte, error) {
type NoMethod VoidedPurchase
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type VoidedPurchasesListResponse struct {
PageInfo *PageInfo `json:"pageInfo,omitempty"`
TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
VoidedPurchases []*VoidedPurchase `json:"voidedPurchases,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "PageInfo") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "PageInfo") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *VoidedPurchasesListResponse) MarshalJSON() ([]byte, error) {
type NoMethod VoidedPurchasesListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// method id "androidpublisher.edits.commit":
type EditsCommitCall struct {
s *Service
packageNameid string
editId string
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Commit: Commits/applies the changes made in this edit back to the
// app.
func (r *EditsService) Commit(packageNameid string, editId string) *EditsCommitCall {
c := &EditsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.packageNameid = packageNameid
c.editId = editId
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *EditsCommitCall) Fields(s ...googleapi.Field) *EditsCommitCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *EditsCommitCall) Context(ctx context.Context) *EditsCommitCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *EditsCommitCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *EditsCommitCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}:commit")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"packageName": c.packageNameid,
"editId": c.editId,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "androidpublisher.edits.commit" call.
// Exactly one of *AppEdit or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *AppEdit.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified
// was returned.
func (c *EditsCommitCall) Do(opts ...googleapi.CallOption) (*AppEdit, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &AppEdit{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Commits/applies the changes made in this edit back to the app.",
// "httpMethod": "POST",
// "id": "androidpublisher.edits.commit",
// "parameterOrder": [
// "packageName",
// "editId"
// ],
// "parameters": {
// "editId": {
// "description": "Unique identifier for this edit.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "packageName": {
// "description": "Unique identifier for the Android app that is being updated; for example, \"com.spiffygame\".",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{packageName}/edits/{editId}:commit",
// "response": {
// "$ref": "AppEdit"
// },
// "scopes": [
// "https://www.googleapis.com/auth/androidpublisher"
// ]
// }
}
// method id "androidpublisher.edits.delete":
type EditsDeleteCall struct {
s *Service
packageNameid string
editId string
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Delete: Deletes an edit for an app. Creating a new edit will
// automatically delete any of your previous edits so this method need
// only be called if you want to preemptively abandon an edit.
func (r *EditsService) Delete(packageNameid string, editId string) *EditsDeleteCall {
c := &EditsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.packageNameid = packageNameid
c.editId = editId
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *EditsDeleteCall) Fields(s ...googleapi.Field) *EditsDeleteCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *EditsDeleteCall) Context(ctx context.Context) *EditsDeleteCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *EditsDeleteCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *EditsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("DELETE", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"packageName": c.packageNameid,
"editId": c.editId,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "androidpublisher.edits.delete" call.
func (c *EditsDeleteCall) Do(opts ...googleapi.CallOption) error {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if err != nil {
return err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return err
}
return nil
// {
// "description": "Deletes an edit for an app. Creating a new edit will automatically delete any of your previous edits so this method need only be called if you want to preemptively abandon an edit.",
// "httpMethod": "DELETE",
// "id": "androidpublisher.edits.delete",
// "parameterOrder": [
// "packageName",
// "editId"
// ],
// "parameters": {
// "editId": {
// "description": "Unique identifier for this edit.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "packageName": {
// "description": "Unique identifier for the Android app that is being updated; for example, \"com.spiffygame\".",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{packageName}/edits/{editId}",
// "scopes": [
// "https://www.googleapis.com/auth/androidpublisher"
// ]
// }
}
// method id "androidpublisher.edits.get":
type EditsGetCall struct {
s *Service
packageNameid string
editId string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Get: Returns information about the edit specified. Calls will fail if
// the edit is no long active (e.g. has been deleted, superseded or
// expired).
func (r *EditsService) Get(packageNameid string, editId string) *EditsGetCall {
c := &EditsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.packageNameid = packageNameid
c.editId = editId
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *EditsGetCall) Fields(s ...googleapi.Field) *EditsGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *EditsGetCall) IfNoneMatch(entityTag string) *EditsGetCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *EditsGetCall) Context(ctx context.Context) *EditsGetCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *EditsGetCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *EditsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"packageName": c.packageNameid,
"editId": c.editId,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "androidpublisher.edits.get" call.
// Exactly one of *AppEdit or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *AppEdit.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified
// was returned.
func (c *EditsGetCall) Do(opts ...googleapi.CallOption) (*AppEdit, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &AppEdit{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Returns information about the edit specified. Calls will fail if the edit is no long active (e.g. has been deleted, superseded or expired).",
// "httpMethod": "GET",
// "id": "androidpublisher.edits.get",
// "parameterOrder": [
// "packageName",
// "editId"
// ],
// "parameters": {
// "editId": {
// "description": "Unique identifier for this edit.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "packageName": {
// "description": "Unique identifier for the Android app that is being updated; for example, \"com.spiffygame\".",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{packageName}/edits/{editId}",
// "response": {
// "$ref": "AppEdit"
// },
// "scopes": [
// "https://www.googleapis.com/auth/androidpublisher"
// ]
// }
}
// method id "androidpublisher.edits.insert":
type EditsInsertCall struct {
s *Service
packageNameid string
appedit *AppEdit
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Insert: Creates a new edit for an app, populated with the app's
// current state.
func (r *EditsService) Insert(packageNameid string, appedit *AppEdit) *EditsInsertCall {
c := &EditsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.packageNameid = packageNameid
c.appedit = appedit
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *EditsInsertCall) Fields(s ...googleapi.Field) *EditsInsertCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *EditsInsertCall) Context(ctx context.Context) *EditsInsertCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *EditsInsertCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *EditsInsertCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.appedit)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"packageName": c.packageNameid,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "androidpublisher.edits.insert" call.
// Exactly one of *AppEdit or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *AppEdit.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified
// was returned.
func (c *EditsInsertCall) Do(opts ...googleapi.CallOption) (*AppEdit, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &AppEdit{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Creates a new edit for an app, populated with the app's current state.",
// "httpMethod": "POST",
// "id": "androidpublisher.edits.insert",
// "parameterOrder": [
// "packageName"
// ],
// "parameters": {
// "packageName": {
// "description": "Unique identifier for the Android app that is being updated; for example, \"com.spiffygame\".",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{packageName}/edits",
// "request": {
// "$ref": "AppEdit"
// },
// "response": {
// "$ref": "AppEdit"
// },
// "scopes": [
// "https://www.googleapis.com/auth/androidpublisher"
// ]
// }
}
// method id "androidpublisher.edits.validate":
type EditsValidateCall struct {
s *Service
packageNameid string
editId string
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Validate: Checks that the edit can be successfully committed. The
// edit's changes are not applied to the live app.
func (r *EditsService) Validate(packageNameid string, editId string) *EditsValidateCall {
c := &EditsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.packageNameid = packageNameid
c.editId = editId
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *EditsValidateCall) Fields(s ...googleapi.Field) *EditsValidateCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *EditsValidateCall) Context(ctx context.Context) *EditsValidateCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *EditsValidateCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *EditsValidateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}:validate")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"packageName": c.packageNameid,
"editId": c.editId,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "androidpublisher.edits.validate" call.
// Exactly one of *AppEdit or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *AppEdit.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified
// was returned.
func (c *EditsValidateCall) Do(opts ...googleapi.CallOption) (*AppEdit, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &AppEdit{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Checks that the edit can be successfully committed. The edit's changes are not applied to the live app.",
// "httpMethod": "POST",
// "id": "androidpublisher.edits.validate",
// "parameterOrder": [
// "packageName",
// "editId"
// ],
// "parameters": {
// "editId": {
// "description": "Unique identifier for this edit.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "packageName": {
// "description": "Unique identifier for the Android app that is being updated; for example, \"com.spiffygame\".",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{packageName}/edits/{editId}:validate",
// "response": {
// "$ref": "AppEdit"
// },
// "scopes": [
// "https://www.googleapis.com/auth/androidpublisher"
// ]
// }
}
// method id "androidpublisher.edits.apklistings.delete":
type EditsApklistingsDeleteCall struct {
s *Service
packageNameid string
editId string
apkVersionCode int64
language string
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Delete: Deletes the APK-specific localized listing for a specified
// APK and language code.
func (r *EditsApklistingsService) Delete(packageNameid string, editId string, apkVersionCode int64, language string) *EditsApklistingsDeleteCall {
c := &EditsApklistingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.packageNameid = packageNameid
c.editId = editId
c.apkVersionCode = apkVersionCode
c.language = language
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *EditsApklistingsDeleteCall) Fields(s ...googleapi.Field) *EditsApklistingsDeleteCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *EditsApklistingsDeleteCall) Context(ctx context.Context) *EditsApklistingsDeleteCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *EditsApklistingsDeleteCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *EditsApklistingsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/apks/{apkVersionCode}/listings/{language}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("DELETE", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"packageName": c.packageNameid,
"editId": c.editId,
"apkVersionCode": strconv.FormatInt(c.apkVersionCode, 10),
"language": c.language,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "androidpublisher.edits.apklistings.delete" call.
func (c *EditsApklistingsDeleteCall) Do(opts ...googleapi.CallOption) error {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if err != nil {
return err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return err
}
return nil
// {
// "description": "Deletes the APK-specific localized listing for a specified APK and language code.",
// "httpMethod": "DELETE",
// "id": "androidpublisher.edits.apklistings.delete",
// "parameterOrder": [
// "packageName",
// "editId",
// "apkVersionCode",
// "language"
// ],
// "parameters": {
// "apkVersionCode": {
// "description": "The APK version code whose APK-specific listings should be read or modified.",
// "format": "int32",
// "location": "path",
// "required": true,
// "type": "integer"
// },
// "editId": {
// "description": "Unique identifier for this edit.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "language": {
// "description": "The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass \"de-AT\".",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "packageName": {
// "description": "Unique identifier for the Android app that is being updated; for example, \"com.spiffygame\".",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{packageName}/edits/{editId}/apks/{apkVersionCode}/listings/{language}",
// "scopes": [
// "https://www.googleapis.com/auth/androidpublisher"
// ]
// }
}
// method id "androidpublisher.edits.apklistings.deleteall":
type EditsApklistingsDeleteallCall struct {
s *Service
packageNameid string
editId string
apkVersionCode int64
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Deleteall: Deletes all the APK-specific localized listings for a
// specified APK.
func (r *EditsApklistingsService) Deleteall(packageNameid string, editId string, apkVersionCode int64) *EditsApklistingsDeleteallCall {
c := &EditsApklistingsDeleteallCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.packageNameid = packageNameid
c.editId = editId
c.apkVersionCode = apkVersionCode
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *EditsApklistingsDeleteallCall) Fields(s ...googleapi.Field) *EditsApklistingsDeleteallCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *EditsApklistingsDeleteallCall) Context(ctx context.Context) *EditsApklistingsDeleteallCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *EditsApklistingsDeleteallCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *EditsApklistingsDeleteallCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/apks/{apkVersionCode}/listings")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("DELETE", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"packageName": c.packageNameid,
"editId": c.editId,
"apkVersionCode": strconv.FormatInt(c.apkVersionCode, 10),
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "androidpublisher.edits.apklistings.deleteall" call.
func (c *EditsApklistingsDeleteallCall) Do(opts ...googleapi.CallOption) error {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if err != nil {
return err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return err
}
return nil
// {
// "description": "Deletes all the APK-specific localized listings for a specified APK.",
// "httpMethod": "DELETE",
// "id": "androidpublisher.edits.apklistings.deleteall",
// "parameterOrder": [
// "packageName",
// "editId",
// "apkVersionCode"
// ],
// "parameters": {
// "apkVersionCode": {
// "description": "The APK version code whose APK-specific listings should be read or modified.",
// "format": "int32",
// "location": "path",
// "required": true,
// "type": "integer"
// },
// "editId": {
// "description": "Unique identifier for this edit.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "packageName": {
// "description": "Unique identifier for the Android app that is being updated; for example, \"com.spiffygame\".",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{packageName}/edits/{editId}/apks/{apkVersionCode}/listings",
// "scopes": [
// "https://www.googleapis.com/auth/androidpublisher"
// ]
// }
}
// method id "androidpublisher.edits.apklistings.get":
type EditsApklistingsGetCall struct {
s *Service
packageNameid string
editId string
apkVersionCode int64
language string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Get: Fetches the APK-specific localized listing for a specified APK
// and language code.
func (r *EditsApklistingsService) Get(packageNameid string, editId string, apkVersionCode int64, language string) *EditsApklistingsGetCall {
c := &EditsApklistingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.packageNameid = packageNameid
c.editId = editId
c.apkVersionCode = apkVersionCode
c.language = language
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *EditsApklistingsGetCall) Fields(s ...googleapi.Field) *EditsApklistingsGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *EditsApklistingsGetCall) IfNoneMatch(entityTag string) *EditsApklistingsGetCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *EditsApklistingsGetCall) Context(ctx context.Context) *EditsApklistingsGetCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *EditsApklistingsGetCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *EditsApklistingsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/apks/{apkVersionCode}/listings/{language}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"packageName": c.packageNameid,
"editId": c.editId,
"apkVersionCode": strconv.FormatInt(c.apkVersionCode, 10),
"language": c.language,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "androidpublisher.edits.apklistings.get" call.
// Exactly one of *ApkListing or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *ApkListing.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *EditsApklistingsGetCall) Do(opts ...googleapi.CallOption) (*ApkListing, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &ApkListing{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Fetches the APK-specific localized listing for a specified APK and language code.",
// "httpMethod": "GET",
// "id": "androidpublisher.edits.apklistings.get",
// "parameterOrder": [
// "packageName",
// "editId",
// "apkVersionCode",
// "language"
// ],
// "parameters": {
// "apkVersionCode": {
// "description": "The APK version code whose APK-specific listings should be read or modified.",
// "format": "int32",
// "location": "path",
// "required": true,
// "type": "integer"
// },
// "editId": {
// "description": "Unique identifier for this edit.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "language": {
// "description": "The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass \"de-AT\".",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "packageName": {
// "description": "Unique identifier for the Android app that is being updated; for example, \"com.spiffygame\".",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{packageName}/edits/{editId}/apks/{apkVersionCode}/listings/{language}",
// "response": {
// "$ref": "ApkListing"
// },
// "scopes": [
// "https://www.googleapis.com/auth/androidpublisher"
// ]
// }
}
// method id "androidpublisher.edits.apklistings.list":
type EditsApklistingsListCall struct {
s *Service
packageNameid string
editId string
apkVersionCode int64
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// List: Lists all the APK-specific localized listings for a specified
// APK.
func (r *EditsApklistingsService) List(packageNameid string, editId string, apkVersionCode int64) *EditsApklistingsListCall {
c := &EditsApklistingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.packageNameid = packageNameid
c.editId = editId
c.apkVersionCode = apkVersionCode
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *EditsApklistingsListCall) Fields(s ...googleapi.Field) *EditsApklistingsListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *EditsApklistingsListCall) IfNoneMatch(entityTag string) *EditsApklistingsListCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *EditsApklistingsListCall) Context(ctx context.Context) *EditsApklistingsListCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *EditsApklistingsListCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *EditsApklistingsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/apks/{apkVersionCode}/listings")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"packageName": c.packageNameid,
"editId": c.editId,
"apkVersionCode": strconv.FormatInt(c.apkVersionCode, 10),
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "androidpublisher.edits.apklistings.list" call.
// Exactly one of *ApkListingsListResponse or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
// *ApkListingsListResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
func (c *EditsApklistingsListCall) Do(opts ...googleapi.CallOption) (*ApkListingsListResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {