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

software.amazon.awssdk.services.codebuild.model.S3ReportExportConfig Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Code Build module holds the client classes that are used for communicating with AWS Code Build.

The newest version!
/*
 * 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.codebuild.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
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;

/**
 * 

* Information about the S3 bucket where the raw data of a report are exported. *

*/ @Generated("software.amazon.awssdk:codegen") public final class S3ReportExportConfig implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField BUCKET_FIELD = SdkField. builder(MarshallingType.STRING).memberName("bucket") .getter(getter(S3ReportExportConfig::bucket)).setter(setter(Builder::bucket)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("bucket").build()).build(); private static final SdkField BUCKET_OWNER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("bucketOwner").getter(getter(S3ReportExportConfig::bucketOwner)).setter(setter(Builder::bucketOwner)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("bucketOwner").build()).build(); private static final SdkField PATH_FIELD = SdkField. builder(MarshallingType.STRING).memberName("path") .getter(getter(S3ReportExportConfig::path)).setter(setter(Builder::path)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("path").build()).build(); private static final SdkField PACKAGING_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("packaging").getter(getter(S3ReportExportConfig::packagingAsString)).setter(setter(Builder::packaging)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("packaging").build()).build(); private static final SdkField ENCRYPTION_KEY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("encryptionKey").getter(getter(S3ReportExportConfig::encryptionKey)) .setter(setter(Builder::encryptionKey)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("encryptionKey").build()).build(); private static final SdkField ENCRYPTION_DISABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("encryptionDisabled").getter(getter(S3ReportExportConfig::encryptionDisabled)) .setter(setter(Builder::encryptionDisabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("encryptionDisabled").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BUCKET_FIELD, BUCKET_OWNER_FIELD, PATH_FIELD, PACKAGING_FIELD, ENCRYPTION_KEY_FIELD, ENCRYPTION_DISABLED_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final String bucket; private final String bucketOwner; private final String path; private final String packaging; private final String encryptionKey; private final Boolean encryptionDisabled; private S3ReportExportConfig(BuilderImpl builder) { this.bucket = builder.bucket; this.bucketOwner = builder.bucketOwner; this.path = builder.path; this.packaging = builder.packaging; this.encryptionKey = builder.encryptionKey; this.encryptionDisabled = builder.encryptionDisabled; } /** *

* The name of the S3 bucket where the raw data of a report are exported. *

* * @return The name of the S3 bucket where the raw data of a report are exported. */ public final String bucket() { return bucket; } /** *

* The Amazon Web Services account identifier of the owner of the Amazon S3 bucket. This allows report data to be * exported to an Amazon S3 bucket that is owned by an account other than the account running the build. *

* * @return The Amazon Web Services account identifier of the owner of the Amazon S3 bucket. This allows report data * to be exported to an Amazon S3 bucket that is owned by an account other than the account running the * build. */ public final String bucketOwner() { return bucketOwner; } /** *

* The path to the exported report's raw data results. *

* * @return The path to the exported report's raw data results. */ public final String path() { return path; } /** *

* The type of build output artifact to create. Valid values include: *

*
    *
  • *

    * NONE: CodeBuild creates the raw data in the output bucket. This is the default if packaging is not * specified. *

    *
  • *
  • *

    * ZIP: CodeBuild creates a ZIP file with the raw data in the output bucket. *

    *
  • *
*

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

* * @return The type of build output artifact to create. Valid values include:

*
    *
  • *

    * NONE: CodeBuild creates the raw data in the output bucket. This is the default if packaging * is not specified. *

    *
  • *
  • *

    * ZIP: CodeBuild creates a ZIP file with the raw data in the output bucket. *

    *
  • * @see ReportPackagingType */ public final ReportPackagingType packaging() { return ReportPackagingType.fromValue(packaging); } /** *

    * The type of build output artifact to create. Valid values include: *

    *
      *
    • *

      * NONE: CodeBuild creates the raw data in the output bucket. This is the default if packaging is not * specified. *

      *
    • *
    • *

      * ZIP: CodeBuild creates a ZIP file with the raw data in the output bucket. *

      *
    • *
    *

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

    * * @return The type of build output artifact to create. Valid values include:

    *
      *
    • *

      * NONE: CodeBuild creates the raw data in the output bucket. This is the default if packaging * is not specified. *

      *
    • *
    • *

      * ZIP: CodeBuild creates a ZIP file with the raw data in the output bucket. *

      *
    • * @see ReportPackagingType */ public final String packagingAsString() { return packaging; } /** *

      * The encryption key for the report's encrypted raw data. *

      * * @return The encryption key for the report's encrypted raw data. */ public final String encryptionKey() { return encryptionKey; } /** *

      * A boolean value that specifies if the results of a report are encrypted. *

      * * @return A boolean value that specifies if the results of a report are encrypted. */ public final Boolean encryptionDisabled() { return encryptionDisabled; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(bucket()); hashCode = 31 * hashCode + Objects.hashCode(bucketOwner()); hashCode = 31 * hashCode + Objects.hashCode(path()); hashCode = 31 * hashCode + Objects.hashCode(packagingAsString()); hashCode = 31 * hashCode + Objects.hashCode(encryptionKey()); hashCode = 31 * hashCode + Objects.hashCode(encryptionDisabled()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof S3ReportExportConfig)) { return false; } S3ReportExportConfig other = (S3ReportExportConfig) obj; return Objects.equals(bucket(), other.bucket()) && Objects.equals(bucketOwner(), other.bucketOwner()) && Objects.equals(path(), other.path()) && Objects.equals(packagingAsString(), other.packagingAsString()) && Objects.equals(encryptionKey(), other.encryptionKey()) && Objects.equals(encryptionDisabled(), other.encryptionDisabled()); } /** * 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 final String toString() { return ToString.builder("S3ReportExportConfig").add("Bucket", bucket()).add("BucketOwner", bucketOwner()) .add("Path", path()).add("Packaging", packagingAsString()).add("EncryptionKey", encryptionKey()) .add("EncryptionDisabled", encryptionDisabled()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "bucket": return Optional.ofNullable(clazz.cast(bucket())); case "bucketOwner": return Optional.ofNullable(clazz.cast(bucketOwner())); case "path": return Optional.ofNullable(clazz.cast(path())); case "packaging": return Optional.ofNullable(clazz.cast(packagingAsString())); case "encryptionKey": return Optional.ofNullable(clazz.cast(encryptionKey())); case "encryptionDisabled": return Optional.ofNullable(clazz.cast(encryptionDisabled())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("bucket", BUCKET_FIELD); map.put("bucketOwner", BUCKET_OWNER_FIELD); map.put("path", PATH_FIELD); map.put("packaging", PACKAGING_FIELD); map.put("encryptionKey", ENCRYPTION_KEY_FIELD); map.put("encryptionDisabled", ENCRYPTION_DISABLED_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((S3ReportExportConfig) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

      * The name of the S3 bucket where the raw data of a report are exported. *

      * * @param bucket * The name of the S3 bucket where the raw data of a report are exported. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bucket(String bucket); /** *

      * The Amazon Web Services account identifier of the owner of the Amazon S3 bucket. This allows report data to * be exported to an Amazon S3 bucket that is owned by an account other than the account running the build. *

      * * @param bucketOwner * The Amazon Web Services account identifier of the owner of the Amazon S3 bucket. This allows report * data to be exported to an Amazon S3 bucket that is owned by an account other than the account running * the build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bucketOwner(String bucketOwner); /** *

      * The path to the exported report's raw data results. *

      * * @param path * The path to the exported report's raw data results. * @return Returns a reference to this object so that method calls can be chained together. */ Builder path(String path); /** *

      * The type of build output artifact to create. Valid values include: *

      *
        *
      • *

        * NONE: CodeBuild creates the raw data in the output bucket. This is the default if packaging is * not specified. *

        *
      • *
      • *

        * ZIP: CodeBuild creates a ZIP file with the raw data in the output bucket. *

        *
      • *
      * * @param packaging * The type of build output artifact to create. Valid values include:

      *
        *
      • *

        * NONE: CodeBuild creates the raw data in the output bucket. This is the default if * packaging is not specified. *

        *
      • *
      • *

        * ZIP: CodeBuild creates a ZIP file with the raw data in the output bucket. *

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

        * The type of build output artifact to create. Valid values include: *

        *
          *
        • *

          * NONE: CodeBuild creates the raw data in the output bucket. This is the default if packaging is * not specified. *

          *
        • *
        • *

          * ZIP: CodeBuild creates a ZIP file with the raw data in the output bucket. *

          *
        • *
        * * @param packaging * The type of build output artifact to create. Valid values include:

        *
          *
        • *

          * NONE: CodeBuild creates the raw data in the output bucket. This is the default if * packaging is not specified. *

          *
        • *
        • *

          * ZIP: CodeBuild creates a ZIP file with the raw data in the output bucket. *

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

          * The encryption key for the report's encrypted raw data. *

          * * @param encryptionKey * The encryption key for the report's encrypted raw data. * @return Returns a reference to this object so that method calls can be chained together. */ Builder encryptionKey(String encryptionKey); /** *

          * A boolean value that specifies if the results of a report are encrypted. *

          * * @param encryptionDisabled * A boolean value that specifies if the results of a report are encrypted. * @return Returns a reference to this object so that method calls can be chained together. */ Builder encryptionDisabled(Boolean encryptionDisabled); } static final class BuilderImpl implements Builder { private String bucket; private String bucketOwner; private String path; private String packaging; private String encryptionKey; private Boolean encryptionDisabled; private BuilderImpl() { } private BuilderImpl(S3ReportExportConfig model) { bucket(model.bucket); bucketOwner(model.bucketOwner); path(model.path); packaging(model.packaging); encryptionKey(model.encryptionKey); encryptionDisabled(model.encryptionDisabled); } public final String getBucket() { return bucket; } public final void setBucket(String bucket) { this.bucket = bucket; } @Override public final Builder bucket(String bucket) { this.bucket = bucket; return this; } public final String getBucketOwner() { return bucketOwner; } public final void setBucketOwner(String bucketOwner) { this.bucketOwner = bucketOwner; } @Override public final Builder bucketOwner(String bucketOwner) { this.bucketOwner = bucketOwner; return this; } public final String getPath() { return path; } public final void setPath(String path) { this.path = path; } @Override public final Builder path(String path) { this.path = path; return this; } public final String getPackaging() { return packaging; } public final void setPackaging(String packaging) { this.packaging = packaging; } @Override public final Builder packaging(String packaging) { this.packaging = packaging; return this; } @Override public final Builder packaging(ReportPackagingType packaging) { this.packaging(packaging == null ? null : packaging.toString()); return this; } public final String getEncryptionKey() { return encryptionKey; } public final void setEncryptionKey(String encryptionKey) { this.encryptionKey = encryptionKey; } @Override public final Builder encryptionKey(String encryptionKey) { this.encryptionKey = encryptionKey; return this; } public final Boolean getEncryptionDisabled() { return encryptionDisabled; } public final void setEncryptionDisabled(Boolean encryptionDisabled) { this.encryptionDisabled = encryptionDisabled; } @Override public final Builder encryptionDisabled(Boolean encryptionDisabled) { this.encryptionDisabled = encryptionDisabled; return this; } @Override public S3ReportExportConfig build() { return new S3ReportExportConfig(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy