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

io.sphere.sdk.extensions.AWSLambdaDestinationBuilder Maven / Gradle / Ivy

There is a newer version: 2.16.0
Show newest version
package io.sphere.sdk.extensions;

import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.Builder;
import io.sphere.sdk.subscriptions.AwsCredentials;
import java.lang.String;
import javax.annotation.Generated;

/**
 * Builder for {@link AWSLambdaDestination}.
 */
@Generated(
    value = "io.sphere.sdk.annotations.processors.generators.HasBuilderGenerator",
    comments = "Generated from: io.sphere.sdk.extensions.AWSLambdaDestination"
)
public final class AWSLambdaDestinationBuilder extends Base implements Builder {
  private String arn;

  private AwsCredentials awsCredentials;

  AWSLambdaDestinationBuilder() {
  }

  AWSLambdaDestinationBuilder(final String arn, final AwsCredentials awsCredentials) {
    this.arn = arn;
    this.awsCredentials = awsCredentials;
  }

  /**
   * Sets the {@code arn} property of this builder.
   *
   * @param arn the value for {@link AWSLambdaDestination#getArn()}
   * @return this builder
   */
  public AWSLambdaDestinationBuilder arn(final String arn) {
    this.arn = arn;
    return this;
  }

  /**
   * Sets the {@code awsCredentials} property of this builder.
   *
   * @param awsCredentials the value for {@link AWSLambdaDestination#getAwsCredentials()}
   * @return this builder
   */
  public AWSLambdaDestinationBuilder awsCredentials(final AwsCredentials awsCredentials) {
    this.awsCredentials = awsCredentials;
    return this;
  }

  /**
   * Creates a new instance of {@code AWSLambdaDestination} with the values of this builder.
   *
   * @return the instance
   */
  public AWSLambdaDestination build() {
    return new AWSLambdaDestinationImpl(arn, awsCredentials);
  }

  /**
   * Creates a new object initialized with the given values.
   *
   * @param arn initial value for the {@link AWSLambdaDestination#getArn()} property
   * @param awsCredentials initial value for the {@link AWSLambdaDestination#getAwsCredentials()} property
   * @return new object initialized with the given values
   */
  public static AWSLambdaDestinationBuilder of(final String arn,
      final AwsCredentials awsCredentials) {
    return new AWSLambdaDestinationBuilder(arn, awsCredentials);
  }

  /**
   * Creates a new object initialized with the fields of the template parameter.
   *
   * @param template the template
   * @return a new object initialized from the template
   */
  public static AWSLambdaDestinationBuilder of(final AWSLambdaDestination template) {
    return new AWSLambdaDestinationBuilder(template.getArn(), template.getAwsCredentials());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy