Example usage for com.amazonaws.services.devicefarm.model ScheduleRunConfiguration setBillingMethod

List of usage examples for com.amazonaws.services.devicefarm.model ScheduleRunConfiguration setBillingMethod

Introduction

In this page you can find the example usage for com.amazonaws.services.devicefarm.model ScheduleRunConfiguration setBillingMethod.

Prototype


public void setBillingMethod(BillingMethod billingMethod) 

Source Link

Document

Specifies the billing method for a test run: metered or unmetered.

Usage

From source file:org.jenkinsci.plugins.awsdevicefarm.AWSDeviceFarmRecorder.java

License:Open Source License

private ScheduleRunConfiguration getScheduleRunConfiguration(Boolean isRunUnmetered, Boolean deviceLocation,
        Boolean radioDetails, String locale) {
    ScheduleRunConfiguration configuration = new ScheduleRunConfiguration();
    if (isRunUnmetered != null && isRunUnmetered) {
        configuration.setBillingMethod(BillingMethod.UNMETERED);
    } else {/*from  ww w .  j av a  2  s  .c  o m*/
        configuration.setBillingMethod(BillingMethod.METERED);
    }

    // set a bunch of other default values as Device Farm expect these
    configuration.setAuxiliaryApps(new ArrayList<String>());
    configuration.setExtraDataPackageArn(null);
    configuration.setLocale(locale);

    Location location = getScheduleRunConfigurationLocation(deviceLocation);
    configuration.setLocation(location);

    Radios radio = getScheduleRunConfigurationRadio(radioDetails);
    configuration.setRadios(radio);

    return configuration;
}