export class Api extends ApiPromise {
  static async create(options: ApiOptions = {}): Promise<Api> {
    const api = new Api(options);
    return withTimeout(
      new Promise((resolve, reject) => {
        const rejectError = err => {
          // Disconnect provider if API initialization fails
          api.disconnect();

          reject(new Error('Connection fail'));
        };

        api.isReady.then(res => {
          //  Remove error listener if API initialization success.
          (api as any)._eventemitter.removeListener('error', rejectError);
          resolve((res as unknown) as Api);
        }, reject);

        api.once('error', rejectError);
      }),
      getTimeout(options)
    );
  }

  get tx(): SubmittableExtrinsics<'promise'> {
    return super.tx as SubmittableExtrinsics<'promise'>;
  }

  get derive(): Derives<'promise'> {
    return super.derive as Derives<'promise'>;
  }

  /**
   * Attestation CRML extention
   */
  get attestation(): Attestation {
    // `injectPlugins` will override this getter.
    throw new Error('Attestation plugin has not been injected.');
  }

  /**
   * Generic Asset CRML extention
   */
  get genericAsset(): GenericAsset {
    // `injectPlugins` will override this getter.
    throw new Error('Generic Asset plugin has not been injected.');
  }

  /**
   * Cennzx Spot CRML extention
   */
  get cennzxSpot(): CennzxSpot {
    // `injectPlugins` will override this getter.
    throw new Error('Cennzx Spot plugin has not been injected.');
  }

  constructor(_options: ApiOptions = {}) {
    const options = {..._options};

    if (typeof options.provider === 'string') {
      options.provider = getProvider(options.provider);
    }
    options.metadata = Object.assign(staticMetadata, options.metadata);
    options.types = {...options.types, ...Types};
    options.derives = mergeDeriveOptions(derives, options.derives);
    options.rpc = {...(rpc as any), ...options.rpc};

    super(options as ApiOptionsBase);

    /// TODO: will reintroduce plugins later
    // let plugins: IPlugin[] = options.plugins || [];
    // try {
    //     plugins = mergePlugins(plugins, getPlugins());
    //     injectOption(options, plugins);
    // } catch (e) {
    //     logger.error('plugin loading failed');
    // }

    // if (plugins) {
    //     injectPlugins(this, plugins);
    // }
  }
}


static async create(options: ApiOptions = {}): Promise<Api> {
    const api = new Api(options);
    return withTimeout(
      new Promise((resolve, reject) => {
        const rejectError = err => {
          // Disconnect provider if API initialization fails
          api.disconnect();

          reject(new Error('Connection fail'));
        };

        api.isReady.then(res => {
          //  Remove error listener if API initialization success.
          (api as any)._eventemitter.removeListener('error', rejectError);
          resolve((res as unknown) as Api);
        }, reject);

        api.once('error', rejectError);
      }),
      getTimeout(options)
    );
  }


export default function contains(
  str: string,
  elem: string,
  options: ContainsOptions = defaultContainsOptions,
) {
  merge(options, defaultContainsOptions);
  return options.ignoreCase
    ? str.toLowerCase().indexOf(elem.toLowerCase()) >= 0
    : str.indexOf(elem) >= 0;
}


interface ContainsOptions {
  ignoreCase: boolean;
}


() => {
  const darkTheme = boolean("darkMode", false);
  const lumos = boolean("Lumos Theme", false);
  const href = text("href", "http://google.com");
  const tag = select("HTML Tag", linkTag, "");
  const disabled = boolean("Disabled", false);
  const inline = boolean("Link Inline", false);
  const target = text("Target", "_self");
  const color = select("Link color", linkColor, "blue")

  return html`
    <md-theme class="theme-toggle" id="link" ?darkTheme=${darkTheme} ?lumos=${lumos}>
      <md-link
        .href=${href}
        .tag=${tag as any}
        .target="${target}"
        .color="${color}"
        ?disabled=${disabled}
        ?inline=${inline}>Default Link</md-link>
    </md-theme>
  `;
}


() => {
  return openapiToGraphql
    .createGraphQlSchema(oas)
    .then(({ schema, report }) => {
      createdSchema = schema
    })
}


({ schema, report }) => {
      createdSchema = schema
    }


() => {
  let oasGetCount = 0
  for (let path in oas.paths) {
    for (let method in oas.paths[path]) {
      if (method === 'get') oasGetCount++
    }
  }
  const gqlTypes = Object.keys(
    createdSchema._typeMap.Query.getFields().viewerAnyAuth.type.getFields()
  ).length
  expect(gqlTypes).toEqual(oasGetCount)
}


export interface IStcTabData {
    select: () => void;
    unselect: () => void;
    name: string;
}


export interface IStcTabHeaderData extends IStcTabData {
    id: string;
}


export interface IStcTabContentData extends IStcTabData { }


export interface StcTabs {
    tabsHeader: IStcTabHeaderData[];
    tabsContent: IStcTabContentData[];
    tabGroup: any;
}


export interface ITabGroup {
    header: IStcTabHeaderData;
    content: IStcTabContentData;
}


export class CopyProductCommand extends $Command<
  CopyProductCommandInput,
  CopyProductCommandOutput,
  ServiceCatalogClientResolvedConfig
> {
  // Start section: command_properties
  // End section: command_properties

  constructor(readonly input: CopyProductCommandInput) {
    // Start section: command_constructor
    super();
    // End section: command_constructor
  }

  resolveMiddleware(
    clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
    configuration: ServiceCatalogClientResolvedConfig,
    options?: __HttpHandlerOptions
  ): Handler<CopyProductCommandInput, CopyProductCommandOutput> {
    this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

    const stack = clientStack.concat(this.middlewareStack);

    const { logger } = configuration;
    const handlerExecutionContext: HandlerExecutionContext = {
      logger,
      inputFilterSensitiveLog: CopyProductInput.filterSensitiveLog,
      outputFilterSensitiveLog: CopyProductOutput.filterSensitiveLog,
    };
    const { requestHandler } = configuration;
    return stack.resolve(
      (request: FinalizeHandlerArguments<any>) =>
        requestHandler.handle(request.request as __HttpRequest, options || {}),
      handlerExecutionContext
    );
  }

  private serialize(input: CopyProductCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
    return serializeAws_json1_1CopyProductCommand(input, context);
  }

  private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CopyProductCommandOutput> {
    return deserializeAws_json1_1CopyProductCommand(output, context);
  }

  // Start section: command_body_extra
  // End section: command_body_extra
}


export type CopyProductCommandInput = CopyProductInput;


export type CopyProductCommandOutput = CopyProductOutput & __MetadataBearer;


resolveMiddleware(
    clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
    configuration: ServiceCatalogClientResolvedConfig,
    options?: __HttpHandlerOptions
  ): Handler<CopyProductCommandInput, CopyProductCommandOutput> {
    this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

    const stack = clientStack.concat(this.middlewareStack);

    const { logger } = configuration;
    const handlerExecutionContext: HandlerExecutionContext = {
      logger,
      inputFilterSensitiveLog: CopyProductInput.filterSensitiveLog,
      outputFilterSensitiveLog: CopyProductOutput.filterSensitiveLog,
    };
    const { requestHandler } = configuration;
    return stack.resolve(
      (request: FinalizeHandlerArguments<any>) =>
        requestHandler.handle(request.request as __HttpRequest, options || {}),
      handlerExecutionContext
    );
  }


private serialize(input: CopyProductCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
    return serializeAws_json1_1CopyProductCommand(input, context);
  }


private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CopyProductCommandOutput> {
    return deserializeAws_json1_1CopyProductCommand(output, context);
  }


/**
   * Google Play Developer API
   *
   * Accesses Android application developers' Google Play accounts.
   *
   * @example
   * const {google} = require('googleapis');
   * const androidpublisher = google.androidpublisher('v3');
   *
   * @namespace androidpublisher
   * @type {Function}
   * @version v3
   * @variation v3
   * @param {object=} options Options for Androidpublisher
   */
export class Androidpublisher {
    context: APIRequestContext;
    edits: Resource$Edits;
    inappproducts: Resource$Inappproducts;
    orders: Resource$Orders;
    purchases: Resource$Purchases;
    reviews: Resource$Reviews;

    constructor(options: GlobalOptions, google?: GoogleConfigurable) {
      this.context = {_options: options || {}, google};

      this.edits = new Resource$Edits(this.context);
      this.inappproducts = new Resource$Inappproducts(this.context);
      this.orders = new Resource$Orders(this.context);
      this.purchases = new Resource$Purchases(this.context);
      this.reviews = new Resource$Reviews(this.context);
    }
  }


export class Resource$Edits$Bundles {
    context: APIRequestContext;
    constructor(context: APIRequestContext) {
      this.context = context;
    }

    /**
     * androidpublisher.edits.bundles.list
     * @alias androidpublisher.edits.bundles.list
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.editId Unique identifier for this edit.
     * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    list(params?: Params$Resource$Edits$Bundles$List, options?: MethodOptions):
        GaxiosPromise<Schema$BundlesListResponse>;
    list(
        params: Params$Resource$Edits$Bundles$List,
        options: MethodOptions|BodyResponseCallback<Schema$BundlesListResponse>,
        callback: BodyResponseCallback<Schema$BundlesListResponse>): void;
    list(
        params: Params$Resource$Edits$Bundles$List,
        callback: BodyResponseCallback<Schema$BundlesListResponse>): void;
    list(callback: BodyResponseCallback<Schema$BundlesListResponse>): void;
    list(
        paramsOrCallback?: Params$Resource$Edits$Bundles$List|
        BodyResponseCallback<Schema$BundlesListResponse>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$BundlesListResponse>,
        callback?: BodyResponseCallback<Schema$BundlesListResponse>):
        void|GaxiosPromise<Schema$BundlesListResponse> {
      let params =
          (paramsOrCallback || {}) as Params$Resource$Edits$Bundles$List;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Edits$Bundles$List;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/androidpublisher/v3/applications/{packageName}/edits/{editId}/bundles')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'GET'
            },
            options),
        params,
        requiredParams: ['packageName', 'editId'],
        pathParams: ['editId', 'packageName'],
        context: this.context
      };
      if (callback) {
        createAPIRequest<Schema$BundlesListResponse>(parameters, callback);
      } else {
        return createAPIRequest<Schema$BundlesListResponse>(parameters);
      }
    }

    /**
     * androidpublisher.edits.bundles.upload
     * @desc Uploads a new Android App Bundle to this edit. If you are using the
     * Google API client libraries, please increase the timeout of the http
     * request before calling this endpoint (a timeout of 2 minutes is
     * recommended). See:
     * https://developers.google.com/api-client-library/java/google-api-java-client/errors
     * for an example in java.
     * @alias androidpublisher.edits.bundles.upload
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {boolean=} params.ackBundleInstallationWarning Must be set to true if the bundle installation may trigger a warning on user devices (for example, if installation size may be over a threshold, typically 100 MB).
     * @param {string} params.editId Unique identifier for this edit.
     * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
     * @param {object} params.media Media object
     * @param {string} params.media.mimeType Media mime-type
     * @param {string|object} params.media.body Media body contents
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    upload(
        params?: Params$Resource$Edits$Bundles$Upload,
        options?: MethodOptions): GaxiosPromise<Schema$Bundle>;
    upload(
        params: Params$Resource$Edits$Bundles$Upload,
        options: MethodOptions|BodyResponseCallback<Schema$Bundle>,
        callback: BodyResponseCallback<Schema$Bundle>): void;
    upload(
        params: Params$Resource$Edits$Bundles$Upload,
        callback: BodyResponseCallback<Schema$Bundle>): void;
    upload(callback: BodyResponseCallback<Schema$Bundle>): void;
    upload(
        paramsOrCallback?: Params$Resource$Edits$Bundles$Upload|
        BodyResponseCallback<Schema$Bundle>,
        optionsOrCallback?: MethodOptions|BodyResponseCallback<Schema$Bundle>,
        callback?: BodyResponseCallback<Schema$Bundle>):
        void|GaxiosPromise<Schema$Bundle> {
      let params =
          (paramsOrCallback || {}) as Params$Resource$Edits$Bundles$Upload;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Edits$Bundles$Upload;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/androidpublisher/v3/applications/{packageName}/edits/{editId}/bundles')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'POST'
            },
            options),
        params,
        mediaUrl:
            (rootUrl +
             '/upload/androidpublisher/v3/applications/{packageName}/edits/{editId}/bundles')
                .replace(/([^:]\/)\/+/g, '$1'),
        requiredParams: ['packageName', 'editId'],
        pathParams: ['editId', 'packageName'],
        context: this.context
      };
      if (callback) {
        createAPIRequest<Schema$Bundle>(parameters, callback);
      } else {
        return createAPIRequest<Schema$Bundle>(parameters);
      }
    }
  }


export class Resource$Edits$Deobfuscationfiles {
    context: APIRequestContext;
    constructor(context: APIRequestContext) {
      this.context = context;
    }

    /**
     * androidpublisher.edits.deobfuscationfiles.upload
     * @desc Uploads the deobfuscation file of the specified APK. If a
     * deobfuscation file already exists, it will be replaced.
     * @alias androidpublisher.edits.deobfuscationfiles.upload
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {integer} params.apkVersionCode The version code of the APK whose deobfuscation file is being uploaded.
     * @param {string} params.deobfuscationFileType
     * @param {string} params.editId Unique identifier for this edit.
     * @param {string} params.packageName Unique identifier of the Android app for which the deobfuscatiuon files are being uploaded; for example, "com.spiffygame".
     * @param {object} params.media Media object
     * @param {string} params.media.mimeType Media mime-type
     * @param {string|object} params.media.body Media body contents
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    upload(
        params?: Params$Resource$Edits$Deobfuscationfiles$Upload,
        options?: MethodOptions):
        GaxiosPromise<Schema$DeobfuscationFilesUploadResponse>;
    upload(
        params: Params$Resource$Edits$Deobfuscationfiles$Upload,
        options: MethodOptions|
        BodyResponseCallback<Schema$DeobfuscationFilesUploadResponse>,
        callback:
            BodyResponseCallback<Schema$DeobfuscationFilesUploadResponse>):
        void;
    upload(
        params: Params$Resource$Edits$Deobfuscationfiles$Upload,
        callback:
            BodyResponseCallback<Schema$DeobfuscationFilesUploadResponse>):
        void;
    upload(callback:
               BodyResponseCallback<Schema$DeobfuscationFilesUploadResponse>):
        void;
    upload(
        paramsOrCallback?: Params$Resource$Edits$Deobfuscationfiles$Upload|
        BodyResponseCallback<Schema$DeobfuscationFilesUploadResponse>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$DeobfuscationFilesUploadResponse>,
        callback?:
            BodyResponseCallback<Schema$DeobfuscationFilesUploadResponse>):
        void|GaxiosPromise<Schema$DeobfuscationFilesUploadResponse> {
      let params = (paramsOrCallback || {}) as
          Params$Resource$Edits$Deobfuscationfiles$Upload;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Edits$Deobfuscationfiles$Upload;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/deobfuscationFiles/{deobfuscationFileType}')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'POST'
            },
            options),
        params,
        mediaUrl:
            (rootUrl +
             '/upload/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/deobfuscationFiles/{deobfuscationFileType}')
                .replace(/([^:]\/)\/+/g, '$1'),
        requiredParams: [
          'packageName', 'editId', 'apkVersionCode', 'deobfuscationFileType'
        ],
        pathParams: [
          'apkVersionCode', 'deobfuscationFileType', 'editId', 'packageName'
        ],
        context: this.context
      };
      if (callback) {
        createAPIRequest<Schema$DeobfuscationFilesUploadResponse>(
            parameters, callback);
      } else {
        return createAPIRequest<Schema$DeobfuscationFilesUploadResponse>(
            parameters);
      }
    }
  }


export class Resource$Orders {
    context: APIRequestContext;
    constructor(context: APIRequestContext) {
      this.context = context;
    }

    /**
     * androidpublisher.orders.refund
     * @desc Refund a user's subscription or in-app purchase order.
     * @alias androidpublisher.orders.refund
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.orderId The order ID provided to the user when the subscription or in-app order was purchased.
     * @param {string} params.packageName The package name of the application for which this subscription or in-app item was purchased (for example, 'com.some.thing').
     * @param {boolean=} params.revoke Whether to revoke the purchased item. If set to true, access to the subscription or in-app item will be terminated immediately. If the item is a recurring subscription, all future payments will also be terminated. Consumed in-app items need to be handled by developer's app. (optional)
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    refund(params?: Params$Resource$Orders$Refund, options?: MethodOptions):
        GaxiosPromise<void>;
    refund(
        params: Params$Resource$Orders$Refund,
        options: MethodOptions|BodyResponseCallback<void>,
        callback: BodyResponseCallback<void>): void;
    refund(
        params: Params$Resource$Orders$Refund,
        callback: BodyResponseCallback<void>): void;
    refund(callback: BodyResponseCallback<void>): void;
    refund(
        paramsOrCallback?: Params$Resource$Orders$Refund|
        BodyResponseCallback<void>,
        optionsOrCallback?: MethodOptions|BodyResponseCallback<void>,
        callback?: BodyResponseCallback<void>): void|GaxiosPromise<void> {
      let params = (paramsOrCallback || {}) as Params$Resource$Orders$Refund;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Orders$Refund;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/androidpublisher/v3/applications/{packageName}/orders/{orderId}:refund')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'POST'
            },
            options),
        params,
        requiredParams: ['packageName', 'orderId'],
        pathParams: ['orderId', 'packageName'],
        context: this.context
      };
      if (callback) {
        createAPIRequest<void>(parameters, callback);
      } else {
        return createAPIRequest<void>(parameters);
      }
    }
  }


export class Resource$Purchases {
    context: APIRequestContext;
    products: Resource$Purchases$Products;
    subscriptions: Resource$Purchases$Subscriptions;
    voidedpurchases: Resource$Purchases$Voidedpurchases;
    constructor(context: APIRequestContext) {
      this.context = context;
      this.products = new Resource$Purchases$Products(this.context);
      this.subscriptions = new Resource$Purchases$Subscriptions(this.context);
      this.voidedpurchases =
          new Resource$Purchases$Voidedpurchases(this.context);
    }
  }


export class Resource$Purchases$Products {
    context: APIRequestContext;
    constructor(context: APIRequestContext) {
      this.context = context;
    }

    /**
     * androidpublisher.purchases.products.get
     * @desc Checks the purchase and consumption status of an inapp item.
     * @alias androidpublisher.purchases.products.get
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.packageName The package name of the application the inapp product was sold in (for example, 'com.some.thing').
     * @param {string} params.productId The inapp product SKU (for example, 'com.some.thing.inapp1').
     * @param {string} params.token The token provided to the user's device when the inapp product was purchased.
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    get(params?: Params$Resource$Purchases$Products$Get,
        options?: MethodOptions): GaxiosPromise<Schema$ProductPurchase>;
    get(params: Params$Resource$Purchases$Products$Get,
        options: MethodOptions|BodyResponseCallback<Schema$ProductPurchase>,
        callback: BodyResponseCallback<Schema$ProductPurchase>): void;
    get(params: Params$Resource$Purchases$Products$Get,
        callback: BodyResponseCallback<Schema$ProductPurchase>): void;
    get(callback: BodyResponseCallback<Schema$ProductPurchase>): void;
    get(paramsOrCallback?: Params$Resource$Purchases$Products$Get|
        BodyResponseCallback<Schema$ProductPurchase>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$ProductPurchase>,
        callback?: BodyResponseCallback<Schema$ProductPurchase>):
        void|GaxiosPromise<Schema$ProductPurchase> {
      let params =
          (paramsOrCallback || {}) as Params$Resource$Purchases$Products$Get;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Purchases$Products$Get;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'GET'
            },
            options),
        params,
        requiredParams: ['packageName', 'productId', 'token'],
        pathParams: ['packageName', 'productId', 'token'],
        context: this.context
      };
      if (callback) {
        createAPIRequest<Schema$ProductPurchase>(parameters, callback);
      } else {
        return createAPIRequest<Schema$ProductPurchase>(parameters);
      }
    }
  }


export class Resource$Purchases$Voidedpurchases {
    context: APIRequestContext;
    constructor(context: APIRequestContext) {
      this.context = context;
    }

    /**
     * androidpublisher.purchases.voidedpurchases.list
     * @desc Lists the purchases that were canceled, refunded or charged-back.
     * @alias androidpublisher.purchases.voidedpurchases.list
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string=} params.endTime The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.
     * @param {integer=} params.maxResults
     * @param {string} params.packageName The package name of the application for which voided purchases need to be returned (for example, 'com.some.thing').
     * @param {integer=} params.startIndex
     * @param {string=} params.startTime The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.
     * @param {string=} params.token
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    list(
        params?: Params$Resource$Purchases$Voidedpurchases$List,
        options?: MethodOptions):
        GaxiosPromise<Schema$VoidedPurchasesListResponse>;
    list(
        params: Params$Resource$Purchases$Voidedpurchases$List,
        options: MethodOptions|
        BodyResponseCallback<Schema$VoidedPurchasesListResponse>,
        callback: BodyResponseCallback<Schema$VoidedPurchasesListResponse>):
        void;
    list(
        params: Params$Resource$Purchases$Voidedpurchases$List,
        callback: BodyResponseCallback<Schema$VoidedPurchasesListResponse>):
        void;
    list(callback: BodyResponseCallback<Schema$VoidedPurchasesListResponse>):
        void;
    list(
        paramsOrCallback?: Params$Resource$Purchases$Voidedpurchases$List|
        BodyResponseCallback<Schema$VoidedPurchasesListResponse>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$VoidedPurchasesListResponse>,
        callback?: BodyResponseCallback<Schema$VoidedPurchasesListResponse>):
        void|GaxiosPromise<Schema$VoidedPurchasesListResponse> {
      let params = (paramsOrCallback || {}) as
          Params$Resource$Purchases$Voidedpurchases$List;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Purchases$Voidedpurchases$List;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/androidpublisher/v3/applications/{packageName}/purchases/voidedpurchases')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'GET'
            },
            options),
        params,
        requiredParams: ['packageName'],
        pathParams: ['packageName'],
        context: this.context
      };
      if (callback) {
        createAPIRequest<Schema$VoidedPurchasesListResponse>(
            parameters, callback);
      } else {
        return createAPIRequest<Schema$VoidedPurchasesListResponse>(parameters);
      }
    }
  }


export interface Options extends GlobalOptions {
    version: 'v3';
  }


interface StandardParameters {
    /**
     * Data format for the response.
     */
    alt?: string;
    /**
     * Selector specifying which fields to include in a partial response.
     */
    fields?: string;
    /**
     * API key. Your API key identifies your project and provides you with API
     * access, quota, and reports. Required unless you provide an OAuth 2.0
     * token.
     */
    key?: string;
    /**
     * OAuth 2.0 token for the current user.
     */
    oauth_token?: string;
    /**
     * Returns response with indentations and line breaks.
     */
    prettyPrint?: boolean;
    /**
     * An opaque string that represents a user for quota purposes. Must not
     * exceed 40 characters.
     */
    quotaUser?: string;
    /**
     * Deprecated. Please use quotaUser instead.
     */
    userIp?: string;
  }


export interface Schema$Apk {
    /**
     * Information about the binary payload of this APK.
     */
    binary?: Schema$ApkBinary;
    /**
     * The version code of the APK, as specified in the APK's manifest file.
     */
    versionCode?: number;
  }


/**
   * Represents the binary payload of an APK.
   */
export interface Schema$ApkBinary {
    /**
     * A sha1 hash of the APK payload, encoded as a hex string and matching the
     * output of the sha1sum command.
     */
    sha1?: string;
    /**
     * A sha256 hash of the APK payload, encoded as a hex string and matching
     * the output of the sha256sum command.
     */
    sha256?: string;
  }


export interface Schema$ApksAddExternallyHostedRequest {
    /**
     * The definition of the externally-hosted APK and where it is located.
     */
    externallyHostedApk?: Schema$ExternallyHostedApk;
  }


export interface Schema$ApksAddExternallyHostedResponse {
    /**
     * The definition of the externally-hosted APK and where it is located.
     */
    externallyHostedApk?: Schema$ExternallyHostedApk;
  }


export interface Schema$ApksListResponse {
    apks?: Schema$Apk[];
    /**
     * Identifies what kind of resource this is. Value: the fixed string
     * "androidpublisher#apksListResponse".
     */
    kind?: string;
  }


export interface Schema$AppDetails {
    /**
     * The user-visible support email for this app.
     */
    contactEmail?: string;
    /**
     * The user-visible support telephone number for this app.
     */
    contactPhone?: string;
    /**
     * The user-visible website for this app.
     */
    contactWebsite?: string;
    /**
     * Default language code, in BCP 47 format (eg "en-US").
     */
    defaultLanguage?: string;
  }


/**
   * Represents an edit of an app. An edit allows clients to make multiple
   * changes before committing them in one operation.
   */
export interface Schema$AppEdit {
    /**
     * 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;
    /**
     * The ID of the edit that can be used in subsequent API calls.
     */
    id?: string;
  }


export interface Schema$Bundle {
    /**
     * A sha1 hash of the upload payload, encoded as a hex string and matching
     * the output of the sha1sum command.
     */
    sha1?: string;
    /**
     * A sha256 hash of the upload payload, encoded as a hex string and matching
     * the output of the sha256sum command.
     */
    sha256?: string;
    /**
     * The version code of the Android App Bundle. As specified in the Android
     * App Bundle's base module APK manifest file.
     */
    versionCode?: number;
  }


export interface Schema$BundlesListResponse {
    bundles?: Schema$Bundle[];
    /**
     * Identifies what kind of resource this is. Value: the fixed string
     * "androidpublisher#bundlesListResponse".
     */
    kind?: string;
  }


export interface Schema$Comment {
    /**
     * A comment from a developer.
     */
    developerComment?: Schema$DeveloperComment;
    /**
     * A comment from a user.
     */
    userComment?: Schema$UserComment;
  }


/**
   * Represents a deobfuscation file.
   */
export interface Schema$DeobfuscationFile {
    /**
     * The type of the deobfuscation file.
     */
    symbolType?: string;
  }


export interface Schema$DeobfuscationFilesUploadResponse {
    deobfuscationFile?: Schema$DeobfuscationFile;
  }


export interface Schema$DeveloperComment {
    /**
     * The last time at which this comment was updated.
     */
    lastModified?: Schema$Timestamp;
    /**
     * The content of the comment, i.e. reply body.
     */
    text?: string;
  }


export interface Schema$DeviceMetadata {
    /**
     * Device CPU make e.g. "Qualcomm"
     */
    cpuMake?: string;
    /**
     * Device CPU model e.g. "MSM8974"
     */
    cpuModel?: string;
    /**
     * Device class (e.g. tablet)
     */
    deviceClass?: string;
    /**
     * OpenGL version
     */
    glEsVersion?: number;
    /**
     * Device manufacturer (e.g. Motorola)
     */
    manufacturer?: string;
    /**
     * Comma separated list of native platforms (e.g. "arm",
     * "arm7")
     */
    nativePlatform?: string;
    /**
     * Device model name (e.g. Droid)
     */
    productName?: string;
    /**
     * Device RAM in Megabytes e.g. "2048"
     */
    ramMb?: number;
    /**
     * Screen density in DPI
     */
    screenDensityDpi?: number;
    /**
     * Screen height in pixels
     */
    screenHeightPx?: number;
    /**
     * Screen width in pixels
     */
    screenWidthPx?: number;
  }


export interface Schema$ExpansionFile {
    /**
     * 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?: string;
    /**
     * If set this APK's Expansion File references another APK's
     * Expansion File. The file_size field will not be set.
     */
    referencesVersion?: number;
  }


export interface Schema$ExpansionFilesUploadResponse {
    expansionFile?: Schema$ExpansionFile;
  }


/**
   * 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
   */
export interface Schema$ExternallyHostedApk {
    /**
     * The application label.
     */
    applicationLabel?: string;
    /**
     * 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[];
    /**
     * The URL at which the APK is hosted. This must be an https URL.
     */
    externallyHostedUrl?: string;
    /**
     * The SHA1 checksum of this APK, represented as a base64 encoded byte
     * array.
     */
    fileSha1Base64?: string;
    /**
     * The SHA256 checksum of this APK, represented as a base64 encoded byte
     * array.
     */
    fileSha256Base64?: string;
    /**
     * The file size in bytes of this APK.
     */
    fileSize?: string;
    /**
     * The icon image from the APK, as a base64 encoded byte array.
     */
    iconBase64?: string;
    /**
     * The maximum SDK supported by this APK (optional).
     */
    maximumSdk?: number;
    /**
     * The minimum SDK targeted by this APK.
     */
    minimumSdk?: number;
    /**
     * The native code environments supported by this APK (optional).
     */
    nativeCodes?: string[];
    /**
     * The package name.
     */
    packageName?: string;
    /**
     * The features required by this APK (optional).
     */
    usesFeatures?: string[];
    /**
     * The permissions requested by this APK.
     */
    usesPermissions?: Schema$ExternallyHostedApkUsesPermission[];
    /**
     * The version code of this APK.
     */
    versionCode?: number;
    /**
     * The version name of this APK.
     */
    versionName?: string;
  }


/**
   * A permission used by this APK.
   */
export interface Schema$ExternallyHostedApkUsesPermission {
    /**
     * Optionally, the maximum SDK version for which the permission is required.
     */
    maxSdkVersion?: number;
    /**
     * The name of the permission requested.
     */
    name?: string;
  }


export interface Schema$Image {
    /**
     * A unique id representing this image.
     */
    id?: string;
    /**
     * A sha1 hash of the image that was uploaded.
     */
    sha1?: string;
    /**
     * A URL that will serve a preview of the image.
     */
    url?: string;
  }


export interface Schema$ImagesDeleteAllResponse {
    deleted?: Schema$Image[];
  }


export interface Schema$ImagesListResponse {
    images?: Schema$Image[];
  }


export interface Schema$ImagesUploadResponse {
    image?: Schema$Image;
  }


export interface Schema$InAppProduct {
    /**
     * The default language of the localized data, as defined by BCP 47. e.g.
     * "en-US", "en-GB".
     */
    defaultLanguage?: string;
    /**
     * Default price cannot be zero. In-app products can never be free. Default
     * price is always in the developer's Checkout merchant currency.
     */
    defaultPrice?: Schema$Price;
    /**
     * 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;
    /**
     * List of localized title and description data.
     */
    listings?: {[key: string]: Schema$InAppProductListing;};
    /**
     * The package name of the parent app.
     */
    packageName?: string;
    /**
     * Prices per buyer region. None of these prices should be zero. In-app
     * products can never be free.
     */
    prices?: {[key: string]: Schema$Price;};
    /**
     * Purchase type enum value. Unmodifiable after creation.
     */
    purchaseType?: string;
    /**
     * Definition of a season for a seasonal subscription. Can be defined only
     * for yearly subscriptions.
     */
    season?: Schema$Season;
    /**
     * The stock-keeping-unit (SKU) of the product, unique within an app.
     */
    sku?: string;
    status?: string;
    /**
     * 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;
    /**
     * 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;
  }


export interface Schema$InAppProductListing {
    description?: string;
    title?: string;
  }


export interface Schema$InappproductsListResponse {
    inappproduct?: Schema$InAppProduct[];
    /**
     * Identifies what kind of resource this is. Value: the fixed string
     * "androidpublisher#inappproductsListResponse".
     */
    kind?: string;
    pageInfo?: Schema$PageInfo;
    tokenPagination?: Schema$TokenPagination;
  }


export interface Schema$Listing {
    /**
     * Full description of the app; this may be up to 4000 characters in length.
     */
    fullDescription?: string;
    /**
     * Language localization code (for example, "de-AT" for Austrian
     * German).
     */
    language?: string;
    /**
     * Short description of the app (previously known as promo text); this may
     * be up to 80 characters in length.
     */
    shortDescription?: string;
    /**
     * App's localized title.
     */
    title?: string;
    /**
     * URL of a promotional YouTube video for the app.
     */
    video?: string;
  }


export interface Schema$ListingsListResponse {
    /**
     * Identifies what kind of resource this is. Value: the fixed string
     * "androidpublisher#listingsListResponse".
     */
    kind?: string;
    listings?: Schema$Listing[];
  }


export interface Schema$LocalizedText {
    /**
     * The language code, in BCP 47 format (eg "en-US").
     */
    language?: string;
    /**
     * The text in the given `language`.
     */
    text?: string;
  }


export interface Schema$MonthDay {
    /**
     * Day of a month, value in [1, 31] range. Valid range depends on the
     * specified month.
     */
    day?: number;
    /**
     * Month of a year. e.g. 1 = JAN, 2 = FEB etc.
     */
    month?: number;
  }


export interface Schema$PageInfo {
    resultPerPage?: number;
    startIndex?: number;
    totalResults?: number;
  }


export interface Schema$Price {
    /**
     * 3 letter Currency code, as defined by ISO 4217.
     */
    currency?: string;
    /**
     * The price in millionths of the currency base unit represented as a
     * string.
     */
    priceMicros?: string;
  }


/**
   * A ProductPurchase resource indicates the status of a user's inapp
   * product purchase.
   */
export interface Schema$ProductPurchase {
    /**
     * The consumption state of the inapp product. Possible values are:   - Yet
     * to be consumed  - Consumed
     */
    consumptionState?: number;
    /**
     * A developer-specified string that contains supplemental information about
     * an order.
     */
    developerPayload?: string;
    /**
     * This kind represents an inappPurchase object in the androidpublisher
     * service.
     */
    kind?: string;
    /**
     * The order id associated with the purchase of the inapp product.
     */
    orderId?: string;
    /**
     * The purchase state of the order. Possible values are:   - Purchased  -
     * Canceled
     */
    purchaseState?: number;
    /**
     * The time the product was purchased, in milliseconds since the epoch (Jan
     * 1, 1970).
     */
    purchaseTimeMillis?: string;
    /**
     * 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)  - Rewarded (i.e. from watching
     * a video ad instead of paying)
     */
    purchaseType?: number;
  }


export interface Schema$Prorate {
    /**
     * 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?: Schema$Price;
    /**
     * Defines the first day on which the price takes effect.
     */
    start?: Schema$MonthDay;
  }


export interface Schema$Review {
    /**
     * The name of the user who wrote the review.
     */
    authorName?: string;
    /**
     * A repeated field containing comments for the review.
     */
    comments?: Schema$Comment[];
    /**
     * Unique identifier for this review.
     */
    reviewId?: string;
  }


export interface Schema$ReviewReplyResult {
    /**
     * The time at which the reply took effect.
     */
    lastEdited?: Schema$Timestamp;
    /**
     * The reply text that was applied.
     */
    replyText?: string;
  }


export interface Schema$ReviewsListResponse {
    pageInfo?: Schema$PageInfo;
    reviews?: Schema$Review[];
    tokenPagination?: Schema$TokenPagination;
  }


export interface Schema$ReviewsReplyRequest {
    /**
     * The text to set as the reply. Replies of more than approximately 350
     * characters will be rejected. HTML tags will be stripped.
     */
    replyText?: string;
  }


export interface Schema$ReviewsReplyResponse {
    result?: Schema$ReviewReplyResult;
  }


export interface Schema$Season {
    /**
     * Inclusive end date of the recurrence period.
     */
    end?: Schema$MonthDay;
    /**
     * 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?: Schema$Prorate[];
    /**
     * Inclusive start date of the recurrence period.
     */
    start?: Schema$MonthDay;
  }


/**
   * Information provided by the user when they complete the subscription
   * cancellation flow (cancellation reason survey).
   */
export interface Schema$SubscriptionCancelSurveyResult {
    /**
     * 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?: number;
    /**
     * The customized input cancel reason from the user. Only present when
     * cancelReason is 0.
     */
    userInputCancelReason?: string;
  }


/**
   * A SubscriptionDeferralInfo contains the data needed to defer a subscription
   * purchase to a future expiry time.
   */
export interface Schema$SubscriptionDeferralInfo {
    /**
     * 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?: string;
    /**
     * 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?: string;
  }


/**
   * 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.
   */
export interface Schema$SubscriptionPriceChange {
    /**
     * The new price the subscription will renew with if the price change is
     * accepted by the user.
     */
    newPrice?: Schema$Price;
    /**
     * 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?: number;
  }


/**
   * A SubscriptionPurchase resource indicates the status of a user's
   * subscription purchase.
   */
export interface Schema$SubscriptionPurchase {
    /**
     * Whether the subscription will automatically be renewed when it reaches
     * its current expiry time.
     */
    autoRenewing?: boolean;
    /**
     * Time at which the subscription will be automatically resumed, in
     * milliseconds since the Epoch. Only present if the user has requested to
     * pause the subscription.
     */
    autoResumeTimeMillis?: string;
    /**
     * 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?: number;
    /**
     * Information provided by the user when they complete the subscription
     * cancellation flow (cancellation reason survey).
     */
    cancelSurveyResult?: Schema$SubscriptionCancelSurveyResult;
    /**
     * ISO 3166-1 alpha-2 billing country/region code of the user at the time
     * the subscription was granted.
     */
    countryCode?: string;
    /**
     * A developer-specified string that contains supplemental information about
     * an order.
     */
    developerPayload?: string;
    /**
     * The email address of the user when the subscription was purchased. Only
     * present for purchases made with 'Subscribe with Google'.
     */
    emailAddress?: string;
    /**
     * Time at which the subscription will expire, in milliseconds since the
     * Epoch.
     */
    expiryTimeMillis?: string;
    /**
     * The family name of the user when the subscription was purchased. Only
     * present for purchases made with 'Subscribe with Google'.
     */
    familyName?: string;
    /**
     * The given name of the user when the subscription was purchased. Only
     * present for purchases made with 'Subscribe with Google'.
     */
    givenName?: string;
    /**
     * This kind represents a subscriptionPurchase object in the
     * androidpublisher service.
     */
    kind?: string;
    /**
     * 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;
    /**
     * The order id of the latest recurring order associated with the purchase
     * of the subscription.
     */
    orderId?: string;
    /**
     * The payment state of the subscription. Possible values are:   - Payment
     * pending  - Payment received  - Free trial  - Pending deferred
     * upgrade/downgrade
     */
    paymentState?: number;
    /**
     * 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?: string;
    /**
     * 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?: Schema$SubscriptionPriceChange;
    /**
     * 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;
    /**
     * The profile id of the user when the subscription was purchased. Only
     * present for purchases made with 'Subscribe with Google'.
     */
    profileId?: string;
    /**
     * The profile name of the user when the subscription was purchased. Only
     * present for purchases made with 'Subscribe with Google'.
     */
    profileName?: string;
    /**
     * 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?: number;
    /**
     * Time at which the subscription was granted, in milliseconds since the
     * Epoch.
     */
    startTimeMillis?: string;
    /**
     * The time at which the subscription was canceled by the user, in
     * milliseconds since the epoch. Only present if cancelReason is 0.
     */
    userCancellationTimeMillis?: string;
  }


export interface Schema$SubscriptionPurchasesDeferRequest {
    /**
     * The information about the new desired expiry time for the subscription.
     */
    deferralInfo?: Schema$SubscriptionDeferralInfo;
  }


export interface Schema$SubscriptionPurchasesDeferResponse {
    /**
     * The new expiry time for the subscription in milliseconds since the Epoch.
     */
    newExpiryTimeMillis?: string;
  }


export interface Schema$Testers {
    googleGroups?: string[];
    googlePlusCommunities?: string[];
  }


export interface Schema$Timestamp {
    nanos?: number;
    seconds?: string;
  }


export interface Schema$TokenPagination {
    nextPageToken?: string;
    previousPageToken?: string;
  }


export interface Schema$Track {
    /**
     * A list of all active releases in this track during a read request. On an
     * update request, it represents desired changes.
     */
    releases?: Schema$TrackRelease[];
    /**
     * Identifier for this track.
     */
    track?: string;
  }


export interface Schema$TrackRelease {
    /**
     * The release name, used to identify this release in the Play Console UI.
     * Not required to be unique. This is optional, if not set it will be
     * generated from the version_name in the APKs.
     */
    name?: string;
    /**
     * The description of what is new in the app in this release.
     */
    releaseNotes?: Schema$LocalizedText[];
    /**
     * The desired status of this release.
     */
    status?: string;
    /**
     * Fraction of users who are eligible to receive the release. 0 <
     * fraction < 1. To be set, release status must be "inProgress"
     * or "halted".
     */
    userFraction?: number;
    /**
     * A list of all version codes of APKs that will be exposed to the users of
     * this track when this release is rolled out. Note that this list should
     * contain all versions you wish to be active, including those you wish to
     * retain from previous releases.
     */
    versionCodes?: string[];
  }


export interface Schema$TracksListResponse {
    /**
     * Identifies what kind of resource this is. Value: the fixed string
     * "androidpublisher#tracksListResponse".
     */
    kind?: string;
    tracks?: Schema$Track[];
  }


export interface Schema$UserComment {
    /**
     * 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?: number;
    /**
     * Integer version code of the app as installed at the time the review was
     * written. May be absent.
     */
    appVersionCode?: number;
    /**
     * String version name of the app as installed at the time the review was
     * written. May be absent.
     */
    appVersionName?: string;
    /**
     * Codename for the reviewer's device, e.g. klte, flounder. May be
     * absent.
     */
    device?: string;
    /**
     * Some information about the characteristics of the user's device
     */
    deviceMetadata?: Schema$DeviceMetadata;
    /**
     * The last time at which this comment was updated.
     */
    lastModified?: Schema$Timestamp;
    /**
     * 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;
    /**
     * 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;
    /**
     * The star rating associated with the review, from 1 to 5.
     */
    starRating?: number;
    /**
     * 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;
    /**
     * Number of users who have given this review a thumbs down
     */
    thumbsDownCount?: number;
    /**
     * Number of users who have given this review a thumbs up
     */
    thumbsUpCount?: number;
  }


/**
   * A VoidedPurchase resource indicates a purchase that was either
   * canceled/refunded/charged-back.
   */
export interface Schema$VoidedPurchase {
    /**
     * This kind represents a voided purchase object in the androidpublisher
     * service.
     */
    kind?: string;
    /**
     * The time at which the purchase was made, in milliseconds since the epoch
     * (Jan 1, 1970).
     */
    purchaseTimeMillis?: string;
    /**
     * The token that was generated when a purchase was made. This uniquely
     * identifies a purchase.
     */
    purchaseToken?: string;
    /**
     * The time at which the purchase was canceled/refunded/charged-back, in
     * milliseconds since the epoch (Jan 1, 1970).
     */
    voidedTimeMillis?: string;
  }


export interface Schema$VoidedPurchasesListResponse {
    pageInfo?: Schema$PageInfo;
    tokenPagination?: Schema$TokenPagination;
    voidedPurchases?: Schema$VoidedPurchase[];
  }


export interface Params$Resource$Edits$Commit extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Delete extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Get extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Insert extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$AppEdit;
  }


export interface Params$Resource$Edits$Validate extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Apks$Addexternallyhosted extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$ApksAddExternallyHostedRequest;
  }


export interface Params$Resource$Edits$Apks$List extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Apks$Upload extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Media metadata
     */
    media?: {
      /**
       * Media mime-type
       */
      mimeType?: string;

      /**
       * Media body contents
       */
      body?: any;
    };
  }


export interface Params$Resource$Edits$Bundles$List extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Bundles$Upload extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Must be set to true if the bundle installation may trigger a warning on
     * user devices (for example, if installation size may be over a threshold,
     * typically 100 MB).
     */
    ackBundleInstallationWarning?: boolean;
    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Media metadata
     */
    media?: {
      /**
       * Media mime-type
       */
      mimeType?: string;

      /**
       * Media body contents
       */
      body?: any;
    };
  }


export interface Params$Resource$Edits$Deobfuscationfiles$Upload extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The version code of the APK whose deobfuscation file is being uploaded.
     */
    apkVersionCode?: number;
    /**
     *
     */
    deobfuscationFileType?: string;
    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier of the Android app for which the deobfuscatiuon files
     * are being uploaded; for example, "com.spiffygame".
     */
    packageName?: string;

    /**
     * Media metadata
     */
    media?: {
      /**
       * Media mime-type
       */
      mimeType?: string;

      /**
       * Media body contents
       */
      body?: any;
    };
  }


export interface Params$Resource$Edits$Details$Get extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Details$Patch extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$AppDetails;
  }


export interface Params$Resource$Edits$Details$Update extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$AppDetails;
  }


export interface Params$Resource$Edits$Expansionfiles$Get extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The version code of the APK whose Expansion File configuration is being
     * read or modified.
     */
    apkVersionCode?: number;
    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     *
     */
    expansionFileType?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Expansionfiles$Patch extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The version code of the APK whose Expansion File configuration is being
     * read or modified.
     */
    apkVersionCode?: number;
    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     *
     */
    expansionFileType?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$ExpansionFile;
  }


export interface Params$Resource$Edits$Expansionfiles$Update extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The version code of the APK whose Expansion File configuration is being
     * read or modified.
     */
    apkVersionCode?: number;
    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     *
     */
    expansionFileType?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$ExpansionFile;
  }


export interface Params$Resource$Edits$Expansionfiles$Upload extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The version code of the APK whose Expansion File configuration is being
     * read or modified.
     */
    apkVersionCode?: number;
    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     *
     */
    expansionFileType?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Media metadata
     */
    media?: {
      /**
       * Media mime-type
       */
      mimeType?: string;

      /**
       * Media body contents
       */
      body?: any;
    };
  }


export interface Params$Resource$Edits$Images$Delete extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier an image within the set of images attached to this
     * edit.
     */
    imageId?: string;
    /**
     *
     */
    imageType?: string;
    /**
     * The language code (a BCP-47 language tag) of the localized listing whose
     * images are to read or modified. For example, to select Austrian German,
     * pass "de-AT".
     */
    language?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Images$Deleteall extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     *
     */
    imageType?: string;
    /**
     * The language code (a BCP-47 language tag) of the localized listing whose
     * images are to read or modified. For example, to select Austrian German,
     * pass "de-AT".
     */
    language?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Images$List extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     *
     */
    imageType?: string;
    /**
     * The language code (a BCP-47 language tag) of the localized listing whose
     * images are to read or modified. For example, to select Austrian German,
     * pass "de-AT".
     */
    language?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Images$Upload extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     *
     */
    imageType?: string;
    /**
     * The language code (a BCP-47 language tag) of the localized listing whose
     * images are to read or modified. For example, to select Austrian German,
     * pass "de-AT".
     */
    language?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Media metadata
     */
    media?: {
      /**
       * Media mime-type
       */
      mimeType?: string;

      /**
       * Media body contents
       */
      body?: any;
    };
  }


export interface Params$Resource$Edits$Listings$Delete extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * The language code (a BCP-47 language tag) of the localized listing to
     * read or modify. For example, to select Austrian German, pass "de-AT".
     */
    language?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Listings$Deleteall extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Listings$Get extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * The language code (a BCP-47 language tag) of the localized listing to
     * read or modify. For example, to select Austrian German, pass "de-AT".
     */
    language?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Listings$List extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Listings$Patch extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * The language code (a BCP-47 language tag) of the localized listing to
     * read or modify. For example, to select Austrian German, pass "de-AT".
     */
    language?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$Listing;
  }


export interface Params$Resource$Edits$Listings$Update extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * The language code (a BCP-47 language tag) of the localized listing to
     * read or modify. For example, to select Austrian German, pass "de-AT".
     */
    language?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$Listing;
  }


export interface Params$Resource$Edits$Testers$Get extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
    /**
     * The track to read or modify. Acceptable values are: "alpha", "beta",
     * "production", "rollout" or "internal".
     */
    track?: string;
  }


export interface Params$Resource$Edits$Testers$Patch extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
    /**
     * The track to read or modify. Acceptable values are: "alpha", "beta",
     * "production", "rollout" or "internal".
     */
    track?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$Testers;
  }


export interface Params$Resource$Edits$Testers$Update extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
    /**
     * The track to read or modify. Acceptable values are: "alpha", "beta",
     * "production", "rollout" or "internal".
     */
    track?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$Testers;
  }


export interface Params$Resource$Edits$Tracks$Get extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
    /**
     * The track to read or modify.
     */
    track?: string;
  }


export interface Params$Resource$Edits$Tracks$List extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
  }


export interface Params$Resource$Edits$Tracks$Patch extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
    /**
     * The track to read or modify.
     */
    track?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$Track;
  }


export interface Params$Resource$Edits$Tracks$Update extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for this edit.
     */
    editId?: string;
    /**
     * Unique identifier for the Android app that is being updated; for example,
     * "com.spiffygame".
     */
    packageName?: string;
    /**
     * The track to read or modify.
     */
    track?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$Track;
  }


export interface Params$Resource$Inappproducts$Delete extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for the Android app with the in-app product; for
     * example, "com.spiffygame".
     */
    packageName?: string;
    /**
     * Unique identifier for the in-app product.
     */
    sku?: string;
  }


export interface Params$Resource$Inappproducts$Get extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     *
     */
    packageName?: string;
    /**
     * Unique identifier for the in-app product.
     */
    sku?: string;
  }


export interface Params$Resource$Inappproducts$Insert extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * If true the prices for all regions targeted by the parent app that don't
     * have a price specified for this in-app product will be auto converted to
     * the target currency based on the default price. Defaults to false.
     */
    autoConvertMissingPrices?: boolean;
    /**
     * Unique identifier for the Android app; for example, "com.spiffygame".
     */
    packageName?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$InAppProduct;
  }


export interface Params$Resource$Inappproducts$List extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     *
     */
    maxResults?: number;
    /**
     * Unique identifier for the Android app with in-app products; for example,
     * "com.spiffygame".
     */
    packageName?: string;
    /**
     *
     */
    startIndex?: number;
    /**
     *
     */
    token?: string;
  }


export interface Params$Resource$Inappproducts$Patch extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * If true the prices for all regions targeted by the parent app that don't
     * have a price specified for this in-app product will be auto converted to
     * the target currency based on the default price. Defaults to false.
     */
    autoConvertMissingPrices?: boolean;
    /**
     * Unique identifier for the Android app with the in-app product; for
     * example, "com.spiffygame".
     */
    packageName?: string;
    /**
     * Unique identifier for the in-app product.
     */
    sku?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$InAppProduct;
  }


export interface Params$Resource$Inappproducts$Update extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * If true the prices for all regions targeted by the parent app that don't
     * have a price specified for this in-app product will be auto converted to
     * the target currency based on the default price. Defaults to false.
     */
    autoConvertMissingPrices?: boolean;
    /**
     * Unique identifier for the Android app with the in-app product; for
     * example, "com.spiffygame".
     */
    packageName?: string;
    /**
     * Unique identifier for the in-app product.
     */
    sku?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$InAppProduct;
  }


export interface Params$Resource$Orders$Refund extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The order ID provided to the user when the subscription or in-app order
     * was purchased.
     */
    orderId?: string;
    /**
     * The package name of the application for which this subscription or in-app
     * item was purchased (for example, 'com.some.thing').
     */
    packageName?: string;
    /**
     * Whether to revoke the purchased item. If set to true, access to the
     * subscription or in-app item will be terminated immediately. If the item
     * is a recurring subscription, all future payments will also be terminated.
     * Consumed in-app items need to be handled by developer's app. (optional)
     */
    revoke?: boolean;
  }


export interface Params$Resource$Purchases$Products$Get extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The package name of the application the inapp product was sold in (for
     * example, 'com.some.thing').
     */
    packageName?: string;
    /**
     * The inapp product SKU (for example, 'com.some.thing.inapp1').
     */
    productId?: string;
    /**
     * The token provided to the user's device when the inapp product was
     * purchased.
     */
    token?: string;
  }


export interface Params$Resource$Purchases$Subscriptions$Cancel extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The package name of the application for which this subscription was
     * purchased (for example, 'com.some.thing').
     */
    packageName?: string;
    /**
     * The purchased subscription ID (for example, 'monthly001').
     */
    subscriptionId?: string;
    /**
     * The token provided to the user's device when the subscription was
     * purchased.
     */
    token?: string;
  }


export interface Params$Resource$Purchases$Subscriptions$Defer extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The package name of the application for which this subscription was
     * purchased (for example, 'com.some.thing').
     */
    packageName?: string;
    /**
     * The purchased subscription ID (for example, 'monthly001').
     */
    subscriptionId?: string;
    /**
     * The token provided to the user's device when the subscription was
     * purchased.
     */
    token?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$SubscriptionPurchasesDeferRequest;
  }


export interface Params$Resource$Purchases$Subscriptions$Get extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The package name of the application for which this subscription was
     * purchased (for example, 'com.some.thing').
     */
    packageName?: string;
    /**
     * The purchased subscription ID (for example, 'monthly001').
     */
    subscriptionId?: string;
    /**
     * The token provided to the user's device when the subscription was
     * purchased.
     */
    token?: string;
  }


export interface Params$Resource$Purchases$Subscriptions$Refund extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The package name of the application for which this subscription was
     * purchased (for example, 'com.some.thing').
     */
    packageName?: string;
    /**
     * The purchased subscription ID (for example, 'monthly001').
     */
    subscriptionId?: string;
    /**
     * The token provided to the user's device when the subscription was
     * purchased.
     */
    token?: string;
  }


export interface Params$Resource$Purchases$Subscriptions$Revoke extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The package name of the application for which this subscription was
     * purchased (for example, 'com.some.thing').
     */
    packageName?: string;
    /**
     * The purchased subscription ID (for example, 'monthly001').
     */
    subscriptionId?: string;
    /**
     * The token provided to the user's device when the subscription was
     * purchased.
     */
    token?: string;
  }


export interface Params$Resource$Purchases$Voidedpurchases$List extends
      StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The time, in milliseconds since the Epoch, of the newest voided in-app
     * product purchase that you want to see in the response. The value of this
     * parameter cannot be greater than the current time and is ignored if a
     * pagination token is set. Default value is current time. Note: This filter
     * is applied on the time at which the record is seen as voided by our
     * systems and not the actual voided time returned in the response.
     */
    endTime?: string;
    /**
     *
     */
    maxResults?: number;
    /**
     * The package name of the application for which voided purchases need to be
     * returned (for example, 'com.some.thing').
     */
    packageName?: string;
    /**
     *
     */
    startIndex?: number;
    /**
     * The time, in milliseconds since the Epoch, of the oldest voided in-app
     * product purchase that you want to see in the response. The value of this
     * parameter cannot be older than 30 days and is ignored if a pagination
     * token is set. Default value is current time minus 30 days. Note: This
     * filter is applied on the time at which the record is seen as voided by
     * our systems and not the actual voided time returned in the response.
     */
    startTime?: string;
    /**
     *
     */
    token?: string;
  }


export interface Params$Resource$Reviews$Get extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for the Android app for which we want reviews; for
     * example, "com.spiffygame".
     */
    packageName?: string;
    /**
     *
     */
    reviewId?: string;
    /**
     *
     */
    translationLanguage?: string;
  }


export interface Params$Resource$Reviews$List extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     *
     */
    maxResults?: number;
    /**
     * Unique identifier for the Android app for which we want reviews; for
     * example, "com.spiffygame".
     */
    packageName?: string;
    /**
     *
     */
    startIndex?: number;
    /**
     *
     */
    token?: string;
    /**
     *
     */
    translationLanguage?: string;
  }


export interface Params$Resource$Reviews$Reply extends StandardParameters {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Unique identifier for the Android app for which we want reviews; for
     * example, "com.spiffygame".
     */
    packageName?: string;
    /**
     *
     */
    reviewId?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$ReviewsReplyRequest;
  }


/**
     * androidpublisher.edits.commit
     * @desc Commits/applies the changes made in this edit back to the app.
     * @alias androidpublisher.edits.commit
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.editId Unique identifier for this edit.
     * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
commit(params?: Params$Resource$Edits$Commit, options?: MethodOptions):
        GaxiosPromise<Schema$AppEdit>;


commit(
        params: Params$Resource$Edits$Commit,
        options: MethodOptions|BodyResponseCallback<Schema$AppEdit>,
        callback: BodyResponseCallback<Schema$AppEdit>): void;


commit(
        params: Params$Resource$Edits$Commit,
        callback: BodyResponseCallback<Schema$AppEdit>): void;


commit(callback: BodyResponseCallback<Schema$AppEdit>): void;


commit(
        paramsOrCallback?: Params$Resource$Edits$Commit|
        BodyResponseCallback<Schema$AppEdit>,
        optionsOrCallback?: MethodOptions|BodyResponseCallback<Schema$AppEdit>,
        callback?: BodyResponseCallback<Schema$AppEdit>):
        void|GaxiosPromise<Schema$AppEdit> {
      let params = (paramsOrCallback || {}) as Params$Resource$Edits$Commit;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Edits$Commit;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/androidpublisher/v3/applications/{packageName}/edits/{editId}:commit')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'POST'
            },
            options),
        params,
        requiredParams: ['packageName', 'editId'],
        pathParams: ['editId', 'packageName'],
        context: this.context
      };
      if (callback) {
        createAPIRequest<Schema$AppEdit>(parameters, callback);
      } else {
        return createAPIRequest<Schema$AppEdit>(parameters);
      }
    }


/**
     * androidpublisher.edits.delete
     * @desc 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.
     * @alias androidpublisher.edits.delete
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.editId Unique identifier for this edit.
     * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
delete(params?: Params$Resource$Edits$Delete, options?: MethodOptions):
        GaxiosPromise<void>;


delete(
        params: Params$Resource$Edits$Delete,
        options: MethodOptions|BodyResponseCallback<void>,
        callback: BodyResponseCallback<void>): void;


delete(
        params: Params$Resource$Edits$Delete,
        callback: BodyResponseCallback<void>): void;


delete(
        paramsOrCallback?: Params$Resource$Edits$Delete|
        BodyResponseCallback<void>,
        optionsOrCallback?: MethodOptions|BodyResponseCallback<void>,
        callback?: BodyResponseCallback<void>): void|GaxiosPromise<void> {
      let params = (paramsOrCallback || {}) as Params$Resource$Edits$Delete;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Edits$Delete;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/androidpublisher/v3/applications/{packageName}/edits/{editId}')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'DELETE'
            },
            options),
        params,
        requiredParams: ['packageName', 'editId'],
        pathParams: ['editId', 'packageName'],
        context: this.context
      };
      if (callback) {
        createAPIRequest<void>(parameters, callback);
      } else {
        return createAPIRequest<void>(parameters);
      }
    }


/**
     * androidpublisher.edits.get
     * @desc Returns information about the edit specified. Calls will fail if
     * the edit is no long active (e.g. has been deleted, superseded or
     * expired).
     * @alias androidpublisher.edits.get
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.editId Unique identifier for this edit.
     * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
get(params?: Params$Resource$Edits$Get,
        options?: MethodOptions): GaxiosPromise<Schema$AppEdit>;


get(params: Params$Resource$Edits$Get,
        options: MethodOptions|BodyResponseCallback<Schema$AppEdit>,
        callback: BodyResponseCallback<Schema$AppEdit>): void;


get(params: Params$Resource$Edits$Get,
        callback: BodyResponseCallback<Schema$AppEdit>): void;


get(callback: BodyResponseCallback<Schema$AppEdit>): void;