All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.devicefarm.model.GetDevicePoolCompatibilityRequest Maven / Gradle / Ivy

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.devicefarm.model;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents a request to the get device pool compatibility operation. *

*/ @Generated("software.amazon.awssdk:codegen") public final class GetDevicePoolCompatibilityRequest extends DeviceFarmRequest implements ToCopyableBuilder { private static final SdkField DEVICE_POOL_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(GetDevicePoolCompatibilityRequest::devicePoolArn)).setter(setter(Builder::devicePoolArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("devicePoolArn").build()).build(); private static final SdkField APP_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(GetDevicePoolCompatibilityRequest::appArn)).setter(setter(Builder::appArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("appArn").build()).build(); private static final SdkField TEST_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(GetDevicePoolCompatibilityRequest::testTypeAsString)).setter(setter(Builder::testType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("testType").build()).build(); private static final SdkField TEST_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .getter(getter(GetDevicePoolCompatibilityRequest::test)).setter(setter(Builder::test)) .constructor(ScheduleRunTest::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("test").build()).build(); private static final SdkField CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .getter(getter(GetDevicePoolCompatibilityRequest::configuration)).setter(setter(Builder::configuration)) .constructor(ScheduleRunConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("configuration").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DEVICE_POOL_ARN_FIELD, APP_ARN_FIELD, TEST_TYPE_FIELD, TEST_FIELD, CONFIGURATION_FIELD)); private final String devicePoolArn; private final String appArn; private final String testType; private final ScheduleRunTest test; private final ScheduleRunConfiguration configuration; private GetDevicePoolCompatibilityRequest(BuilderImpl builder) { super(builder); this.devicePoolArn = builder.devicePoolArn; this.appArn = builder.appArn; this.testType = builder.testType; this.test = builder.test; this.configuration = builder.configuration; } /** *

* The device pool's ARN. *

* * @return The device pool's ARN. */ public String devicePoolArn() { return devicePoolArn; } /** *

* The ARN of the app that is associated with the specified device pool. *

* * @return The ARN of the app that is associated with the specified device pool. */ public String appArn() { return appArn; } /** *

* The test type for the specified device pool. *

*

* Allowed values include the following: *

*
    *
  • *

    * BUILTIN_FUZZ. *

    *
  • *
  • *

    * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android app, interacting with it and capturing * screenshots at the same time. *

    *
  • *
  • *

    * APPIUM_JAVA_JUNIT. *

    *
  • *
  • *

    * APPIUM_JAVA_TESTNG. *

    *
  • *
  • *

    * APPIUM_PYTHON. *

    *
  • *
  • *

    * APPIUM_NODE. *

    *
  • *
  • *

    * APPIUM_RUBY. *

    *
  • *
  • *

    * APPIUM_WEB_JAVA_JUNIT. *

    *
  • *
  • *

    * APPIUM_WEB_JAVA_TESTNG. *

    *
  • *
  • *

    * APPIUM_WEB_PYTHON. *

    *
  • *
  • *

    * APPIUM_WEB_NODE. *

    *
  • *
  • *

    * APPIUM_WEB_RUBY. *

    *
  • *
  • *

    * CALABASH. *

    *
  • *
  • *

    * INSTRUMENTATION. *

    *
  • *
  • *

    * UIAUTOMATION. *

    *
  • *
  • *

    * UIAUTOMATOR. *

    *
  • *
  • *

    * XCTEST. *

    *
  • *
  • *

    * XCTEST_UI. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, {@link #testType} will * return {@link TestType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #testTypeAsString}. *

* * @return The test type for the specified device pool.

*

* Allowed values include the following: *

*
    *
  • *

    * BUILTIN_FUZZ. *

    *
  • *
  • *

    * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android app, interacting with it and * capturing screenshots at the same time. *

    *
  • *
  • *

    * APPIUM_JAVA_JUNIT. *

    *
  • *
  • *

    * APPIUM_JAVA_TESTNG. *

    *
  • *
  • *

    * APPIUM_PYTHON. *

    *
  • *
  • *

    * APPIUM_NODE. *

    *
  • *
  • *

    * APPIUM_RUBY. *

    *
  • *
  • *

    * APPIUM_WEB_JAVA_JUNIT. *

    *
  • *
  • *

    * APPIUM_WEB_JAVA_TESTNG. *

    *
  • *
  • *

    * APPIUM_WEB_PYTHON. *

    *
  • *
  • *

    * APPIUM_WEB_NODE. *

    *
  • *
  • *

    * APPIUM_WEB_RUBY. *

    *
  • *
  • *

    * CALABASH. *

    *
  • *
  • *

    * INSTRUMENTATION. *

    *
  • *
  • *

    * UIAUTOMATION. *

    *
  • *
  • *

    * UIAUTOMATOR. *

    *
  • *
  • *

    * XCTEST. *

    *
  • *
  • *

    * XCTEST_UI. *

    *
  • * @see TestType */ public TestType testType() { return TestType.fromValue(testType); } /** *

    * The test type for the specified device pool. *

    *

    * Allowed values include the following: *

    *
      *
    • *

      * BUILTIN_FUZZ. *

      *
    • *
    • *

      * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android app, interacting with it and capturing * screenshots at the same time. *

      *
    • *
    • *

      * APPIUM_JAVA_JUNIT. *

      *
    • *
    • *

      * APPIUM_JAVA_TESTNG. *

      *
    • *
    • *

      * APPIUM_PYTHON. *

      *
    • *
    • *

      * APPIUM_NODE. *

      *
    • *
    • *

      * APPIUM_RUBY. *

      *
    • *
    • *

      * APPIUM_WEB_JAVA_JUNIT. *

      *
    • *
    • *

      * APPIUM_WEB_JAVA_TESTNG. *

      *
    • *
    • *

      * APPIUM_WEB_PYTHON. *

      *
    • *
    • *

      * APPIUM_WEB_NODE. *

      *
    • *
    • *

      * APPIUM_WEB_RUBY. *

      *
    • *
    • *

      * CALABASH. *

      *
    • *
    • *

      * INSTRUMENTATION. *

      *
    • *
    • *

      * UIAUTOMATION. *

      *
    • *
    • *

      * UIAUTOMATOR. *

      *
    • *
    • *

      * XCTEST. *

      *
    • *
    • *

      * XCTEST_UI. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #testType} will * return {@link TestType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #testTypeAsString}. *

    * * @return The test type for the specified device pool.

    *

    * Allowed values include the following: *

    *
      *
    • *

      * BUILTIN_FUZZ. *

      *
    • *
    • *

      * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android app, interacting with it and * capturing screenshots at the same time. *

      *
    • *
    • *

      * APPIUM_JAVA_JUNIT. *

      *
    • *
    • *

      * APPIUM_JAVA_TESTNG. *

      *
    • *
    • *

      * APPIUM_PYTHON. *

      *
    • *
    • *

      * APPIUM_NODE. *

      *
    • *
    • *

      * APPIUM_RUBY. *

      *
    • *
    • *

      * APPIUM_WEB_JAVA_JUNIT. *

      *
    • *
    • *

      * APPIUM_WEB_JAVA_TESTNG. *

      *
    • *
    • *

      * APPIUM_WEB_PYTHON. *

      *
    • *
    • *

      * APPIUM_WEB_NODE. *

      *
    • *
    • *

      * APPIUM_WEB_RUBY. *

      *
    • *
    • *

      * CALABASH. *

      *
    • *
    • *

      * INSTRUMENTATION. *

      *
    • *
    • *

      * UIAUTOMATION. *

      *
    • *
    • *

      * UIAUTOMATOR. *

      *
    • *
    • *

      * XCTEST. *

      *
    • *
    • *

      * XCTEST_UI. *

      *
    • * @see TestType */ public String testTypeAsString() { return testType; } /** *

      * Information about the uploaded test to be run against the device pool. *

      * * @return Information about the uploaded test to be run against the device pool. */ public ScheduleRunTest test() { return test; } /** *

      * An object that contains information about the settings for a run. *

      * * @return An object that contains information about the settings for a run. */ public ScheduleRunConfiguration configuration() { return configuration; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(devicePoolArn()); hashCode = 31 * hashCode + Objects.hashCode(appArn()); hashCode = 31 * hashCode + Objects.hashCode(testTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(test()); hashCode = 31 * hashCode + Objects.hashCode(configuration()); return hashCode; } @Override public boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetDevicePoolCompatibilityRequest)) { return false; } GetDevicePoolCompatibilityRequest other = (GetDevicePoolCompatibilityRequest) obj; return Objects.equals(devicePoolArn(), other.devicePoolArn()) && Objects.equals(appArn(), other.appArn()) && Objects.equals(testTypeAsString(), other.testTypeAsString()) && Objects.equals(test(), other.test()) && Objects.equals(configuration(), other.configuration()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("GetDevicePoolCompatibilityRequest").add("DevicePoolArn", devicePoolArn()) .add("AppArn", appArn()).add("TestType", testTypeAsString()).add("Test", test()) .add("Configuration", configuration()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "devicePoolArn": return Optional.ofNullable(clazz.cast(devicePoolArn())); case "appArn": return Optional.ofNullable(clazz.cast(appArn())); case "testType": return Optional.ofNullable(clazz.cast(testTypeAsString())); case "test": return Optional.ofNullable(clazz.cast(test())); case "configuration": return Optional.ofNullable(clazz.cast(configuration())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((GetDevicePoolCompatibilityRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends DeviceFarmRequest.Builder, SdkPojo, CopyableBuilder { /** *

      * The device pool's ARN. *

      * * @param devicePoolArn * The device pool's ARN. * @return Returns a reference to this object so that method calls can be chained together. */ Builder devicePoolArn(String devicePoolArn); /** *

      * The ARN of the app that is associated with the specified device pool. *

      * * @param appArn * The ARN of the app that is associated with the specified device pool. * @return Returns a reference to this object so that method calls can be chained together. */ Builder appArn(String appArn); /** *

      * The test type for the specified device pool. *

      *

      * Allowed values include the following: *

      *
        *
      • *

        * BUILTIN_FUZZ. *

        *
      • *
      • *

        * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android app, interacting with it and * capturing screenshots at the same time. *

        *
      • *
      • *

        * APPIUM_JAVA_JUNIT. *

        *
      • *
      • *

        * APPIUM_JAVA_TESTNG. *

        *
      • *
      • *

        * APPIUM_PYTHON. *

        *
      • *
      • *

        * APPIUM_NODE. *

        *
      • *
      • *

        * APPIUM_RUBY. *

        *
      • *
      • *

        * APPIUM_WEB_JAVA_JUNIT. *

        *
      • *
      • *

        * APPIUM_WEB_JAVA_TESTNG. *

        *
      • *
      • *

        * APPIUM_WEB_PYTHON. *

        *
      • *
      • *

        * APPIUM_WEB_NODE. *

        *
      • *
      • *

        * APPIUM_WEB_RUBY. *

        *
      • *
      • *

        * CALABASH. *

        *
      • *
      • *

        * INSTRUMENTATION. *

        *
      • *
      • *

        * UIAUTOMATION. *

        *
      • *
      • *

        * UIAUTOMATOR. *

        *
      • *
      • *

        * XCTEST. *

        *
      • *
      • *

        * XCTEST_UI. *

        *
      • *
      * * @param testType * The test type for the specified device pool.

      *

      * Allowed values include the following: *

      *
        *
      • *

        * BUILTIN_FUZZ. *

        *
      • *
      • *

        * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android app, interacting with it and * capturing screenshots at the same time. *

        *
      • *
      • *

        * APPIUM_JAVA_JUNIT. *

        *
      • *
      • *

        * APPIUM_JAVA_TESTNG. *

        *
      • *
      • *

        * APPIUM_PYTHON. *

        *
      • *
      • *

        * APPIUM_NODE. *

        *
      • *
      • *

        * APPIUM_RUBY. *

        *
      • *
      • *

        * APPIUM_WEB_JAVA_JUNIT. *

        *
      • *
      • *

        * APPIUM_WEB_JAVA_TESTNG. *

        *
      • *
      • *

        * APPIUM_WEB_PYTHON. *

        *
      • *
      • *

        * APPIUM_WEB_NODE. *

        *
      • *
      • *

        * APPIUM_WEB_RUBY. *

        *
      • *
      • *

        * CALABASH. *

        *
      • *
      • *

        * INSTRUMENTATION. *

        *
      • *
      • *

        * UIAUTOMATION. *

        *
      • *
      • *

        * UIAUTOMATOR. *

        *
      • *
      • *

        * XCTEST. *

        *
      • *
      • *

        * XCTEST_UI. *

        *
      • * @see TestType * @return Returns a reference to this object so that method calls can be chained together. * @see TestType */ Builder testType(String testType); /** *

        * The test type for the specified device pool. *

        *

        * Allowed values include the following: *

        *
          *
        • *

          * BUILTIN_FUZZ. *

          *
        • *
        • *

          * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android app, interacting with it and * capturing screenshots at the same time. *

          *
        • *
        • *

          * APPIUM_JAVA_JUNIT. *

          *
        • *
        • *

          * APPIUM_JAVA_TESTNG. *

          *
        • *
        • *

          * APPIUM_PYTHON. *

          *
        • *
        • *

          * APPIUM_NODE. *

          *
        • *
        • *

          * APPIUM_RUBY. *

          *
        • *
        • *

          * APPIUM_WEB_JAVA_JUNIT. *

          *
        • *
        • *

          * APPIUM_WEB_JAVA_TESTNG. *

          *
        • *
        • *

          * APPIUM_WEB_PYTHON. *

          *
        • *
        • *

          * APPIUM_WEB_NODE. *

          *
        • *
        • *

          * APPIUM_WEB_RUBY. *

          *
        • *
        • *

          * CALABASH. *

          *
        • *
        • *

          * INSTRUMENTATION. *

          *
        • *
        • *

          * UIAUTOMATION. *

          *
        • *
        • *

          * UIAUTOMATOR. *

          *
        • *
        • *

          * XCTEST. *

          *
        • *
        • *

          * XCTEST_UI. *

          *
        • *
        * * @param testType * The test type for the specified device pool.

        *

        * Allowed values include the following: *

        *
          *
        • *

          * BUILTIN_FUZZ. *

          *
        • *
        • *

          * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android app, interacting with it and * capturing screenshots at the same time. *

          *
        • *
        • *

          * APPIUM_JAVA_JUNIT. *

          *
        • *
        • *

          * APPIUM_JAVA_TESTNG. *

          *
        • *
        • *

          * APPIUM_PYTHON. *

          *
        • *
        • *

          * APPIUM_NODE. *

          *
        • *
        • *

          * APPIUM_RUBY. *

          *
        • *
        • *

          * APPIUM_WEB_JAVA_JUNIT. *

          *
        • *
        • *

          * APPIUM_WEB_JAVA_TESTNG. *

          *
        • *
        • *

          * APPIUM_WEB_PYTHON. *

          *
        • *
        • *

          * APPIUM_WEB_NODE. *

          *
        • *
        • *

          * APPIUM_WEB_RUBY. *

          *
        • *
        • *

          * CALABASH. *

          *
        • *
        • *

          * INSTRUMENTATION. *

          *
        • *
        • *

          * UIAUTOMATION. *

          *
        • *
        • *

          * UIAUTOMATOR. *

          *
        • *
        • *

          * XCTEST. *

          *
        • *
        • *

          * XCTEST_UI. *

          *
        • * @see TestType * @return Returns a reference to this object so that method calls can be chained together. * @see TestType */ Builder testType(TestType testType); /** *

          * Information about the uploaded test to be run against the device pool. *

          * * @param test * Information about the uploaded test to be run against the device pool. * @return Returns a reference to this object so that method calls can be chained together. */ Builder test(ScheduleRunTest test); /** *

          * Information about the uploaded test to be run against the device pool. *

          * This is a convenience that creates an instance of the {@link ScheduleRunTest.Builder} avoiding the need to * create one manually via {@link ScheduleRunTest#builder()}. * * When the {@link Consumer} completes, {@link ScheduleRunTest.Builder#build()} is called immediately and its * result is passed to {@link #test(ScheduleRunTest)}. * * @param test * a consumer that will call methods on {@link ScheduleRunTest.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #test(ScheduleRunTest) */ default Builder test(Consumer test) { return test(ScheduleRunTest.builder().applyMutation(test).build()); } /** *

          * An object that contains information about the settings for a run. *

          * * @param configuration * An object that contains information about the settings for a run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder configuration(ScheduleRunConfiguration configuration); /** *

          * An object that contains information about the settings for a run. *

          * This is a convenience that creates an instance of the {@link ScheduleRunConfiguration.Builder} avoiding the * need to create one manually via {@link ScheduleRunConfiguration#builder()}. * * When the {@link Consumer} completes, {@link ScheduleRunConfiguration.Builder#build()} is called immediately * and its result is passed to {@link #configuration(ScheduleRunConfiguration)}. * * @param configuration * a consumer that will call methods on {@link ScheduleRunConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #configuration(ScheduleRunConfiguration) */ default Builder configuration(Consumer configuration) { return configuration(ScheduleRunConfiguration.builder().applyMutation(configuration).build()); } @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends DeviceFarmRequest.BuilderImpl implements Builder { private String devicePoolArn; private String appArn; private String testType; private ScheduleRunTest test; private ScheduleRunConfiguration configuration; private BuilderImpl() { } private BuilderImpl(GetDevicePoolCompatibilityRequest model) { super(model); devicePoolArn(model.devicePoolArn); appArn(model.appArn); testType(model.testType); test(model.test); configuration(model.configuration); } public final String getDevicePoolArn() { return devicePoolArn; } @Override public final Builder devicePoolArn(String devicePoolArn) { this.devicePoolArn = devicePoolArn; return this; } public final void setDevicePoolArn(String devicePoolArn) { this.devicePoolArn = devicePoolArn; } public final String getAppArn() { return appArn; } @Override public final Builder appArn(String appArn) { this.appArn = appArn; return this; } public final void setAppArn(String appArn) { this.appArn = appArn; } public final String getTestType() { return testType; } @Override public final Builder testType(String testType) { this.testType = testType; return this; } @Override public final Builder testType(TestType testType) { this.testType(testType == null ? null : testType.toString()); return this; } public final void setTestType(String testType) { this.testType = testType; } public final ScheduleRunTest.Builder getTest() { return test != null ? test.toBuilder() : null; } @Override public final Builder test(ScheduleRunTest test) { this.test = test; return this; } public final void setTest(ScheduleRunTest.BuilderImpl test) { this.test = test != null ? test.build() : null; } public final ScheduleRunConfiguration.Builder getConfiguration() { return configuration != null ? configuration.toBuilder() : null; } @Override public final Builder configuration(ScheduleRunConfiguration configuration) { this.configuration = configuration; return this; } public final void setConfiguration(ScheduleRunConfiguration.BuilderImpl configuration) { this.configuration = configuration != null ? configuration.build() : null; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public GetDevicePoolCompatibilityRequest build() { return new GetDevicePoolCompatibilityRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy