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

software.amazon.awssdk.services.codebuild.model.ProjectArtifacts 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.

There is a newer version: 2.28.4
Show 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.List;
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 build output artifacts for the build project. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ProjectArtifacts implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField TYPE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("type") .getter(getter(ProjectArtifacts::typeAsString)).setter(setter(Builder::type)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("type").build()).build(); private static final SdkField LOCATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("location").getter(getter(ProjectArtifacts::location)).setter(setter(Builder::location)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("location").build()).build(); private static final SdkField PATH_FIELD = SdkField. builder(MarshallingType.STRING).memberName("path") .getter(getter(ProjectArtifacts::path)).setter(setter(Builder::path)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("path").build()).build(); private static final SdkField NAMESPACE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("namespaceType").getter(getter(ProjectArtifacts::namespaceTypeAsString)) .setter(setter(Builder::namespaceType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("namespaceType").build()).build(); private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name") .getter(getter(ProjectArtifacts::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build(); private static final SdkField PACKAGING_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("packaging").getter(getter(ProjectArtifacts::packagingAsString)).setter(setter(Builder::packaging)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("packaging").build()).build(); private static final SdkField OVERRIDE_ARTIFACT_NAME_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("overrideArtifactName").getter(getter(ProjectArtifacts::overrideArtifactName)) .setter(setter(Builder::overrideArtifactName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("overrideArtifactName").build()) .build(); private static final SdkField ENCRYPTION_DISABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("encryptionDisabled").getter(getter(ProjectArtifacts::encryptionDisabled)) .setter(setter(Builder::encryptionDisabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("encryptionDisabled").build()) .build(); private static final SdkField ARTIFACT_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("artifactIdentifier").getter(getter(ProjectArtifacts::artifactIdentifier)) .setter(setter(Builder::artifactIdentifier)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("artifactIdentifier").build()) .build(); private static final SdkField BUCKET_OWNER_ACCESS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("bucketOwnerAccess").getter(getter(ProjectArtifacts::bucketOwnerAccessAsString)) .setter(setter(Builder::bucketOwnerAccess)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("bucketOwnerAccess").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TYPE_FIELD, LOCATION_FIELD, PATH_FIELD, NAMESPACE_TYPE_FIELD, NAME_FIELD, PACKAGING_FIELD, OVERRIDE_ARTIFACT_NAME_FIELD, ENCRYPTION_DISABLED_FIELD, ARTIFACT_IDENTIFIER_FIELD, BUCKET_OWNER_ACCESS_FIELD)); private static final long serialVersionUID = 1L; private final String type; private final String location; private final String path; private final String namespaceType; private final String name; private final String packaging; private final Boolean overrideArtifactName; private final Boolean encryptionDisabled; private final String artifactIdentifier; private final String bucketOwnerAccess; private ProjectArtifacts(BuilderImpl builder) { this.type = builder.type; this.location = builder.location; this.path = builder.path; this.namespaceType = builder.namespaceType; this.name = builder.name; this.packaging = builder.packaging; this.overrideArtifactName = builder.overrideArtifactName; this.encryptionDisabled = builder.encryptionDisabled; this.artifactIdentifier = builder.artifactIdentifier; this.bucketOwnerAccess = builder.bucketOwnerAccess; } /** *

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

*
    *
  • *

    * CODEPIPELINE: The build project has build output generated through CodePipeline. *

    * *

    * The CODEPIPELINE type is not supported for secondaryArtifacts. *

    *
  • *
  • *

    * NO_ARTIFACTS: The build project does not produce any build output. *

    *
  • *
  • *

    * S3: The build project stores build output in Amazon S3. *

    *
  • *
*

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

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

*
    *
  • *

    * CODEPIPELINE: The build project has build output generated through CodePipeline. *

    * *

    * The CODEPIPELINE type is not supported for secondaryArtifacts. *

    *
  • *
  • *

    * NO_ARTIFACTS: The build project does not produce any build output. *

    *
  • *
  • *

    * S3: The build project stores build output in Amazon S3. *

    *
  • * @see ArtifactsType */ public final ArtifactsType type() { return ArtifactsType.fromValue(type); } /** *

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

    *
      *
    • *

      * CODEPIPELINE: The build project has build output generated through CodePipeline. *

      * *

      * The CODEPIPELINE type is not supported for secondaryArtifacts. *

      *
    • *
    • *

      * NO_ARTIFACTS: The build project does not produce any build output. *

      *
    • *
    • *

      * S3: The build project stores build output in Amazon S3. *

      *
    • *
    *

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

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

    *
      *
    • *

      * CODEPIPELINE: The build project has build output generated through CodePipeline. *

      * *

      * The CODEPIPELINE type is not supported for secondaryArtifacts. *

      *
    • *
    • *

      * NO_ARTIFACTS: The build project does not produce any build output. *

      *
    • *
    • *

      * S3: The build project stores build output in Amazon S3. *

      *
    • * @see ArtifactsType */ public final String typeAsString() { return type; } /** *

      * Information about the build output artifact location: *

      *
        *
      • *

        * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is * because CodePipeline manages its build output locations instead of CodeBuild. *

        *
      • *
      • *

        * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build * output is produced. *

        *
      • *
      • *

        * If type is set to S3, this is the name of the output bucket. *

        *
      • *
      * * @return Information about the build output artifact location:

      *
        *
      • *

        * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. * This is because CodePipeline manages its build output locations instead of CodeBuild. *

        *
      • *
      • *

        * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

        *
      • *
      • *

        * If type is set to S3, this is the name of the output bucket. *

        *
      • */ public final String location() { return location; } /** *

        * Along with namespaceType and name, the pattern that CodeBuild uses to name and store * the output artifact: *

        *
          *
        • *

          * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is * because CodePipeline manages its build output names instead of CodeBuild. *

          *
        • *
        • *

          * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build * output is produced. *

          *
        • *
        • *

          * If type is set to S3, this is the path to the output artifact. If path is * not specified, path is not used. *

          *
        • *
        *

        * For example, if path is set to MyArtifacts, namespaceType is set to * NONE, and name is set to MyArtifact.zip, the output artifact is stored in * the output bucket at MyArtifacts/MyArtifact.zip. *

        * * @return Along with namespaceType and name, the pattern that CodeBuild uses to name and * store the output artifact:

        *
          *
        • *

          * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. * This is because CodePipeline manages its build output names instead of CodeBuild. *

          *
        • *
        • *

          * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

          *
        • *
        • *

          * If type is set to S3, this is the path to the output artifact. If * path is not specified, path is not used. *

          *
        • *
        *

        * For example, if path is set to MyArtifacts, namespaceType is set * to NONE, and name is set to MyArtifact.zip, the output artifact is * stored in the output bucket at MyArtifacts/MyArtifact.zip. */ public final String path() { return path; } /** *

        * Along with path and name, the pattern that CodeBuild uses to determine the name and * location to store the output artifact: *

        *
          *
        • *

          * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is * because CodePipeline manages its build output names instead of CodeBuild. *

          *
        • *
        • *

          * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build * output is produced. *

          *
        • *
        • *

          * If type is set to S3, valid values include: *

          *
            *
          • *

            * BUILD_ID: Include the build ID in the location of the build output artifact. *

            *
          • *
          • *

            * NONE: Do not include the build ID. This is the default if namespaceType is not * specified. *

            *
          • *
          *
        • *
        *

        * For example, if path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to MyArtifact.zip, the output artifact is stored * in MyArtifacts/<build-ID>/MyArtifact.zip. *

        *

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

        * * @return Along with path and name, the pattern that CodeBuild uses to determine the name * and location to store the output artifact:

        *
          *
        • *

          * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. * This is because CodePipeline manages its build output names instead of CodeBuild. *

          *
        • *
        • *

          * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

          *
        • *
        • *

          * If type is set to S3, valid values include: *

          *
            *
          • *

            * BUILD_ID: Include the build ID in the location of the build output artifact. *

            *
          • *
          • *

            * NONE: Do not include the build ID. This is the default if namespaceType is not * specified. *

            *
          • *
          *
        • *
        *

        * For example, if path is set to MyArtifacts, namespaceType is set * to BUILD_ID, and name is set to MyArtifact.zip, the output * artifact is stored in MyArtifacts/<build-ID>/MyArtifact.zip. * @see ArtifactNamespace */ public final ArtifactNamespace namespaceType() { return ArtifactNamespace.fromValue(namespaceType); } /** *

        * Along with path and name, the pattern that CodeBuild uses to determine the name and * location to store the output artifact: *

        *
          *
        • *

          * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is * because CodePipeline manages its build output names instead of CodeBuild. *

          *
        • *
        • *

          * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build * output is produced. *

          *
        • *
        • *

          * If type is set to S3, valid values include: *

          *
            *
          • *

            * BUILD_ID: Include the build ID in the location of the build output artifact. *

            *
          • *
          • *

            * NONE: Do not include the build ID. This is the default if namespaceType is not * specified. *

            *
          • *
          *
        • *
        *

        * For example, if path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to MyArtifact.zip, the output artifact is stored * in MyArtifacts/<build-ID>/MyArtifact.zip. *

        *

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

        * * @return Along with path and name, the pattern that CodeBuild uses to determine the name * and location to store the output artifact:

        *
          *
        • *

          * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. * This is because CodePipeline manages its build output names instead of CodeBuild. *

          *
        • *
        • *

          * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

          *
        • *
        • *

          * If type is set to S3, valid values include: *

          *
            *
          • *

            * BUILD_ID: Include the build ID in the location of the build output artifact. *

            *
          • *
          • *

            * NONE: Do not include the build ID. This is the default if namespaceType is not * specified. *

            *
          • *
          *
        • *
        *

        * For example, if path is set to MyArtifacts, namespaceType is set * to BUILD_ID, and name is set to MyArtifact.zip, the output * artifact is stored in MyArtifacts/<build-ID>/MyArtifact.zip. * @see ArtifactNamespace */ public final String namespaceTypeAsString() { return namespaceType; } /** *

        * Along with path and namespaceType, the pattern that CodeBuild uses to name and store * the output artifact: *

        *
          *
        • *

          * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is * because CodePipeline manages its build output names instead of CodeBuild. *

          *
        • *
        • *

          * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build * output is produced. *

          *
        • *
        • *

          * If type is set to S3, this is the name of the output artifact object. If you set the * name to be a forward slash ("/"), the artifact is stored in the root of the output bucket. *

          *
        • *
        *

        * For example: *

        *
          *
        • *

          * If path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to MyArtifact.zip, then the output artifact is * stored in MyArtifacts/<build-ID>/MyArtifact.zip. *

          *
        • *
        • *

          * If path is empty, namespaceType is set to NONE, and name is * set to "/", the output artifact is stored in the root of the output bucket. *

          *
        • *
        • *

          * If path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to "/", the output artifact is stored in * MyArtifacts/<build-ID>. *

          *
        • *
        * * @return Along with path and namespaceType, the pattern that CodeBuild uses to name and * store the output artifact:

        *
          *
        • *

          * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. * This is because CodePipeline manages its build output names instead of CodeBuild. *

          *
        • *
        • *

          * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

          *
        • *
        • *

          * If type is set to S3, this is the name of the output artifact object. If you * set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket. *

          *
        • *
        *

        * For example: *

        *
          *
        • *

          * If path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to MyArtifact.zip, then the output * artifact is stored in MyArtifacts/<build-ID>/MyArtifact.zip. *

          *
        • *
        • *

          * If path is empty, namespaceType is set to NONE, and * name is set to "/", the output artifact is stored in the root of the output * bucket. *

          *
        • *
        • *

          * If path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to "/", the output artifact is stored in * MyArtifacts/<build-ID>. *

          *
        • */ public final String name() { return name; } /** *

          * The type of build output artifact to create: *

          *
            *
          • *

            * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is * because CodePipeline manages its build output artifacts instead of CodeBuild. *

            *
          • *
          • *

            * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build * output is produced. *

            *
          • *
          • *

            * If type is set to S3, valid values include: *

            *
              *
            • *

              * NONE: CodeBuild creates in the output bucket a folder that contains the build output. This is the * default if packaging is not specified. *

              *
            • *
            • *

              * ZIP: CodeBuild creates in the output bucket a ZIP file that contains the build output. *

              *
            • *
            *
          • *
          *

          * If the service returns an enum value that is not available in the current SDK version, {@link #packaging} will * return {@link ArtifactPackaging#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:

          *
            *
          • *

            * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. * This is because CodePipeline manages its build output artifacts instead of CodeBuild. *

            *
          • *
          • *

            * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

            *
          • *
          • *

            * If type is set to S3, valid values include: *

            *
              *
            • *

              * NONE: CodeBuild creates in the output bucket a folder that contains the build output. This * is the default if packaging is not specified. *

              *
            • *
            • *

              * ZIP: CodeBuild creates in the output bucket a ZIP file that contains the build output. *

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

            * The type of build output artifact to create: *

            *
              *
            • *

              * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is * because CodePipeline manages its build output artifacts instead of CodeBuild. *

              *
            • *
            • *

              * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build * output is produced. *

              *
            • *
            • *

              * If type is set to S3, valid values include: *

              *
                *
              • *

                * NONE: CodeBuild creates in the output bucket a folder that contains the build output. This is the * default if packaging is not specified. *

                *
              • *
              • *

                * ZIP: CodeBuild creates in the output bucket a ZIP file that contains the build output. *

                *
              • *
              *
            • *
            *

            * If the service returns an enum value that is not available in the current SDK version, {@link #packaging} will * return {@link ArtifactPackaging#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:

            *
              *
            • *

              * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. * This is because CodePipeline manages its build output artifacts instead of CodeBuild. *

              *
            • *
            • *

              * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

              *
            • *
            • *

              * If type is set to S3, valid values include: *

              *
                *
              • *

                * NONE: CodeBuild creates in the output bucket a folder that contains the build output. This * is the default if packaging is not specified. *

                *
              • *
              • *

                * ZIP: CodeBuild creates in the output bucket a ZIP file that contains the build output. *

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

              * If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a * buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a * date and time to your artifact name so that it is always unique. *

              * * @return If this flag is set, a name specified in the buildspec file overrides the artifact name. The name * specified in a buildspec file is calculated at build time and uses the Shell Command Language. For * example, you can append a date and time to your artifact name so that it is always unique. */ public final Boolean overrideArtifactName() { return overrideArtifactName; } /** *

              * Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type * is Amazon S3. If this is set with another artifacts type, an invalidInputException is thrown. *

              * * @return Set to true if you do not want your output artifacts encrypted. This option is valid only if your * artifacts type is Amazon S3. If this is set with another artifacts type, an invalidInputException is * thrown. */ public final Boolean encryptionDisabled() { return encryptionDisabled; } /** *

              * An identifier for this artifact definition. *

              * * @return An identifier for this artifact definition. */ public final String artifactIdentifier() { return artifactIdentifier; } /** * Returns the value of the BucketOwnerAccess property for this object. *

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

              * * @return The value of the BucketOwnerAccess property for this object. * @see BucketOwnerAccess */ public final BucketOwnerAccess bucketOwnerAccess() { return BucketOwnerAccess.fromValue(bucketOwnerAccess); } /** * Returns the value of the BucketOwnerAccess property for this object. *

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

              * * @return The value of the BucketOwnerAccess property for this object. * @see BucketOwnerAccess */ public final String bucketOwnerAccessAsString() { return bucketOwnerAccess; } @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(typeAsString()); hashCode = 31 * hashCode + Objects.hashCode(location()); hashCode = 31 * hashCode + Objects.hashCode(path()); hashCode = 31 * hashCode + Objects.hashCode(namespaceTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(packagingAsString()); hashCode = 31 * hashCode + Objects.hashCode(overrideArtifactName()); hashCode = 31 * hashCode + Objects.hashCode(encryptionDisabled()); hashCode = 31 * hashCode + Objects.hashCode(artifactIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(bucketOwnerAccessAsString()); 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 ProjectArtifacts)) { return false; } ProjectArtifacts other = (ProjectArtifacts) obj; return Objects.equals(typeAsString(), other.typeAsString()) && Objects.equals(location(), other.location()) && Objects.equals(path(), other.path()) && Objects.equals(namespaceTypeAsString(), other.namespaceTypeAsString()) && Objects.equals(name(), other.name()) && Objects.equals(packagingAsString(), other.packagingAsString()) && Objects.equals(overrideArtifactName(), other.overrideArtifactName()) && Objects.equals(encryptionDisabled(), other.encryptionDisabled()) && Objects.equals(artifactIdentifier(), other.artifactIdentifier()) && Objects.equals(bucketOwnerAccessAsString(), other.bucketOwnerAccessAsString()); } /** * 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("ProjectArtifacts").add("Type", typeAsString()).add("Location", location()).add("Path", path()) .add("NamespaceType", namespaceTypeAsString()).add("Name", name()).add("Packaging", packagingAsString()) .add("OverrideArtifactName", overrideArtifactName()).add("EncryptionDisabled", encryptionDisabled()) .add("ArtifactIdentifier", artifactIdentifier()).add("BucketOwnerAccess", bucketOwnerAccessAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "type": return Optional.ofNullable(clazz.cast(typeAsString())); case "location": return Optional.ofNullable(clazz.cast(location())); case "path": return Optional.ofNullable(clazz.cast(path())); case "namespaceType": return Optional.ofNullable(clazz.cast(namespaceTypeAsString())); case "name": return Optional.ofNullable(clazz.cast(name())); case "packaging": return Optional.ofNullable(clazz.cast(packagingAsString())); case "overrideArtifactName": return Optional.ofNullable(clazz.cast(overrideArtifactName())); case "encryptionDisabled": return Optional.ofNullable(clazz.cast(encryptionDisabled())); case "artifactIdentifier": return Optional.ofNullable(clazz.cast(artifactIdentifier())); case "bucketOwnerAccess": return Optional.ofNullable(clazz.cast(bucketOwnerAccessAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ProjectArtifacts) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

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

              *
                *
              • *

                * CODEPIPELINE: The build project has build output generated through CodePipeline. *

                * *

                * The CODEPIPELINE type is not supported for secondaryArtifacts. *

                *
              • *
              • *

                * NO_ARTIFACTS: The build project does not produce any build output. *

                *
              • *
              • *

                * S3: The build project stores build output in Amazon S3. *

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

              *
                *
              • *

                * CODEPIPELINE: The build project has build output generated through CodePipeline. *

                * *

                * The CODEPIPELINE type is not supported for secondaryArtifacts. *

                *
              • *
              • *

                * NO_ARTIFACTS: The build project does not produce any build output. *

                *
              • *
              • *

                * S3: The build project stores build output in Amazon S3. *

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

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

                *
                  *
                • *

                  * CODEPIPELINE: The build project has build output generated through CodePipeline. *

                  * *

                  * The CODEPIPELINE type is not supported for secondaryArtifacts. *

                  *
                • *
                • *

                  * NO_ARTIFACTS: The build project does not produce any build output. *

                  *
                • *
                • *

                  * S3: The build project stores build output in Amazon S3. *

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

                *
                  *
                • *

                  * CODEPIPELINE: The build project has build output generated through CodePipeline. *

                  * *

                  * The CODEPIPELINE type is not supported for secondaryArtifacts. *

                  *
                • *
                • *

                  * NO_ARTIFACTS: The build project does not produce any build output. *

                  *
                • *
                • *

                  * S3: The build project stores build output in Amazon S3. *

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

                  * Information about the build output artifact location: *

                  *
                    *
                  • *

                    * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This * is because CodePipeline manages its build output locations instead of CodeBuild. *

                    *
                  • *
                  • *

                    * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

                    *
                  • *
                  • *

                    * If type is set to S3, this is the name of the output bucket. *

                    *
                  • *
                  * * @param location * Information about the build output artifact location:

                  *
                    *
                  • *

                    * If type is set to CODEPIPELINE, CodePipeline ignores this value if * specified. This is because CodePipeline manages its build output locations instead of CodeBuild. *

                    *
                  • *
                  • *

                    * If type is set to NO_ARTIFACTS, this value is ignored if specified, because * no build output is produced. *

                    *
                  • *
                  • *

                    * If type is set to S3, this is the name of the output bucket. *

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

                    * Along with namespaceType and name, the pattern that CodeBuild uses to name and * store the output artifact: *

                    *
                      *
                    • *

                      * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This * is because CodePipeline manages its build output names instead of CodeBuild. *

                      *
                    • *
                    • *

                      * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

                      *
                    • *
                    • *

                      * If type is set to S3, this is the path to the output artifact. If path * is not specified, path is not used. *

                      *
                    • *
                    *

                    * For example, if path is set to MyArtifacts, namespaceType is set to * NONE, and name is set to MyArtifact.zip, the output artifact is stored * in the output bucket at MyArtifacts/MyArtifact.zip. *

                    * * @param path * Along with namespaceType and name, the pattern that CodeBuild uses to name * and store the output artifact:

                    *
                      *
                    • *

                      * If type is set to CODEPIPELINE, CodePipeline ignores this value if * specified. This is because CodePipeline manages its build output names instead of CodeBuild. *

                      *
                    • *
                    • *

                      * If type is set to NO_ARTIFACTS, this value is ignored if specified, because * no build output is produced. *

                      *
                    • *
                    • *

                      * If type is set to S3, this is the path to the output artifact. If * path is not specified, path is not used. *

                      *
                    • *
                    *

                    * For example, if path is set to MyArtifacts, namespaceType is * set to NONE, and name is set to MyArtifact.zip, the output * artifact is stored in the output bucket at MyArtifacts/MyArtifact.zip. * @return Returns a reference to this object so that method calls can be chained together. */ Builder path(String path); /** *

                    * Along with path and name, the pattern that CodeBuild uses to determine the name and * location to store the output artifact: *

                    *
                      *
                    • *

                      * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This * is because CodePipeline manages its build output names instead of CodeBuild. *

                      *
                    • *
                    • *

                      * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

                      *
                    • *
                    • *

                      * If type is set to S3, valid values include: *

                      *
                        *
                      • *

                        * BUILD_ID: Include the build ID in the location of the build output artifact. *

                        *
                      • *
                      • *

                        * NONE: Do not include the build ID. This is the default if namespaceType is not * specified. *

                        *
                      • *
                      *
                    • *
                    *

                    * For example, if path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to MyArtifact.zip, the output artifact is * stored in MyArtifacts/<build-ID>/MyArtifact.zip. *

                    * * @param namespaceType * Along with path and name, the pattern that CodeBuild uses to determine the * name and location to store the output artifact:

                    *
                      *
                    • *

                      * If type is set to CODEPIPELINE, CodePipeline ignores this value if * specified. This is because CodePipeline manages its build output names instead of CodeBuild. *

                      *
                    • *
                    • *

                      * If type is set to NO_ARTIFACTS, this value is ignored if specified, because * no build output is produced. *

                      *
                    • *
                    • *

                      * If type is set to S3, valid values include: *

                      *
                        *
                      • *

                        * BUILD_ID: Include the build ID in the location of the build output artifact. *

                        *
                      • *
                      • *

                        * NONE: Do not include the build ID. This is the default if namespaceType is * not specified. *

                        *
                      • *
                      *
                    • *
                    *

                    * For example, if path is set to MyArtifacts, namespaceType is * set to BUILD_ID, and name is set to MyArtifact.zip, the output * artifact is stored in MyArtifacts/<build-ID>/MyArtifact.zip. * @see ArtifactNamespace * @return Returns a reference to this object so that method calls can be chained together. * @see ArtifactNamespace */ Builder namespaceType(String namespaceType); /** *

                    * Along with path and name, the pattern that CodeBuild uses to determine the name and * location to store the output artifact: *

                    *
                      *
                    • *

                      * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This * is because CodePipeline manages its build output names instead of CodeBuild. *

                      *
                    • *
                    • *

                      * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

                      *
                    • *
                    • *

                      * If type is set to S3, valid values include: *

                      *
                        *
                      • *

                        * BUILD_ID: Include the build ID in the location of the build output artifact. *

                        *
                      • *
                      • *

                        * NONE: Do not include the build ID. This is the default if namespaceType is not * specified. *

                        *
                      • *
                      *
                    • *
                    *

                    * For example, if path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to MyArtifact.zip, the output artifact is * stored in MyArtifacts/<build-ID>/MyArtifact.zip. *

                    * * @param namespaceType * Along with path and name, the pattern that CodeBuild uses to determine the * name and location to store the output artifact:

                    *
                      *
                    • *

                      * If type is set to CODEPIPELINE, CodePipeline ignores this value if * specified. This is because CodePipeline manages its build output names instead of CodeBuild. *

                      *
                    • *
                    • *

                      * If type is set to NO_ARTIFACTS, this value is ignored if specified, because * no build output is produced. *

                      *
                    • *
                    • *

                      * If type is set to S3, valid values include: *

                      *
                        *
                      • *

                        * BUILD_ID: Include the build ID in the location of the build output artifact. *

                        *
                      • *
                      • *

                        * NONE: Do not include the build ID. This is the default if namespaceType is * not specified. *

                        *
                      • *
                      *
                    • *
                    *

                    * For example, if path is set to MyArtifacts, namespaceType is * set to BUILD_ID, and name is set to MyArtifact.zip, the output * artifact is stored in MyArtifacts/<build-ID>/MyArtifact.zip. * @see ArtifactNamespace * @return Returns a reference to this object so that method calls can be chained together. * @see ArtifactNamespace */ Builder namespaceType(ArtifactNamespace namespaceType); /** *

                    * Along with path and namespaceType, the pattern that CodeBuild uses to name and * store the output artifact: *

                    *
                      *
                    • *

                      * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This * is because CodePipeline manages its build output names instead of CodeBuild. *

                      *
                    • *
                    • *

                      * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

                      *
                    • *
                    • *

                      * If type is set to S3, this is the name of the output artifact object. If you set * the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket. *

                      *
                    • *
                    *

                    * For example: *

                    *
                      *
                    • *

                      * If path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to MyArtifact.zip, then the output artifact * is stored in MyArtifacts/<build-ID>/MyArtifact.zip. *

                      *
                    • *
                    • *

                      * If path is empty, namespaceType is set to NONE, and name * is set to "/", the output artifact is stored in the root of the output bucket. *

                      *
                    • *
                    • *

                      * If path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to "/", the output artifact is stored in * MyArtifacts/<build-ID>. *

                      *
                    • *
                    * * @param name * Along with path and namespaceType, the pattern that CodeBuild uses to name * and store the output artifact:

                    *
                      *
                    • *

                      * If type is set to CODEPIPELINE, CodePipeline ignores this value if * specified. This is because CodePipeline manages its build output names instead of CodeBuild. *

                      *
                    • *
                    • *

                      * If type is set to NO_ARTIFACTS, this value is ignored if specified, because * no build output is produced. *

                      *
                    • *
                    • *

                      * If type is set to S3, this is the name of the output artifact object. If you * set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket. *

                      *
                    • *
                    *

                    * For example: *

                    *
                      *
                    • *

                      * If path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to MyArtifact.zip, then the output * artifact is stored in MyArtifacts/<build-ID>/MyArtifact.zip. *

                      *
                    • *
                    • *

                      * If path is empty, namespaceType is set to NONE, and * name is set to "/", the output artifact is stored in the root of the output * bucket. *

                      *
                    • *
                    • *

                      * If path is set to MyArtifacts, namespaceType is set to * BUILD_ID, and name is set to "/", the output artifact is stored * in MyArtifacts/<build-ID>. *

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

                      * The type of build output artifact to create: *

                      *
                        *
                      • *

                        * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This * is because CodePipeline manages its build output artifacts instead of CodeBuild. *

                        *
                      • *
                      • *

                        * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

                        *
                      • *
                      • *

                        * If type is set to S3, valid values include: *

                        *
                          *
                        • *

                          * NONE: CodeBuild creates in the output bucket a folder that contains the build output. This is * the default if packaging is not specified. *

                          *
                        • *
                        • *

                          * ZIP: CodeBuild creates in the output bucket a ZIP file that contains the build output. *

                          *
                        • *
                        *
                      • *
                      * * @param packaging * The type of build output artifact to create:

                      *
                        *
                      • *

                        * If type is set to CODEPIPELINE, CodePipeline ignores this value if * specified. This is because CodePipeline manages its build output artifacts instead of CodeBuild. *

                        *
                      • *
                      • *

                        * If type is set to NO_ARTIFACTS, this value is ignored if specified, because * no build output is produced. *

                        *
                      • *
                      • *

                        * If type is set to S3, valid values include: *

                        *
                          *
                        • *

                          * NONE: CodeBuild creates in the output bucket a folder that contains the build output. * This is the default if packaging is not specified. *

                          *
                        • *
                        • *

                          * ZIP: CodeBuild creates in the output bucket a ZIP file that contains the build output. *

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

                        * The type of build output artifact to create: *

                        *
                          *
                        • *

                          * If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This * is because CodePipeline manages its build output artifacts instead of CodeBuild. *

                          *
                        • *
                        • *

                          * If type is set to NO_ARTIFACTS, this value is ignored if specified, because no * build output is produced. *

                          *
                        • *
                        • *

                          * If type is set to S3, valid values include: *

                          *
                            *
                          • *

                            * NONE: CodeBuild creates in the output bucket a folder that contains the build output. This is * the default if packaging is not specified. *

                            *
                          • *
                          • *

                            * ZIP: CodeBuild creates in the output bucket a ZIP file that contains the build output. *

                            *
                          • *
                          *
                        • *
                        * * @param packaging * The type of build output artifact to create:

                        *
                          *
                        • *

                          * If type is set to CODEPIPELINE, CodePipeline ignores this value if * specified. This is because CodePipeline manages its build output artifacts instead of CodeBuild. *

                          *
                        • *
                        • *

                          * If type is set to NO_ARTIFACTS, this value is ignored if specified, because * no build output is produced. *

                          *
                        • *
                        • *

                          * If type is set to S3, valid values include: *

                          *
                            *
                          • *

                            * NONE: CodeBuild creates in the output bucket a folder that contains the build output. * This is the default if packaging is not specified. *

                            *
                          • *
                          • *

                            * ZIP: CodeBuild creates in the output bucket a ZIP file that contains the build output. *

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

                          * If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified * in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can * append a date and time to your artifact name so that it is always unique. *

                          * * @param overrideArtifactName * If this flag is set, a name specified in the buildspec file overrides the artifact name. The name * specified in a buildspec file is calculated at build time and uses the Shell Command Language. For * example, you can append a date and time to your artifact name so that it is always unique. * @return Returns a reference to this object so that method calls can be chained together. */ Builder overrideArtifactName(Boolean overrideArtifactName); /** *

                          * Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts * type is Amazon S3. If this is set with another artifacts type, an invalidInputException is thrown. *

                          * * @param encryptionDisabled * Set to true if you do not want your output artifacts encrypted. This option is valid only if your * artifacts type is Amazon S3. If this is set with another artifacts type, an invalidInputException is * thrown. * @return Returns a reference to this object so that method calls can be chained together. */ Builder encryptionDisabled(Boolean encryptionDisabled); /** *

                          * An identifier for this artifact definition. *

                          * * @param artifactIdentifier * An identifier for this artifact definition. * @return Returns a reference to this object so that method calls can be chained together. */ Builder artifactIdentifier(String artifactIdentifier); /** * Sets the value of the BucketOwnerAccess property for this object. * * @param bucketOwnerAccess * The new value for the BucketOwnerAccess property for this object. * @see BucketOwnerAccess * @return Returns a reference to this object so that method calls can be chained together. * @see BucketOwnerAccess */ Builder bucketOwnerAccess(String bucketOwnerAccess); /** * Sets the value of the BucketOwnerAccess property for this object. * * @param bucketOwnerAccess * The new value for the BucketOwnerAccess property for this object. * @see BucketOwnerAccess * @return Returns a reference to this object so that method calls can be chained together. * @see BucketOwnerAccess */ Builder bucketOwnerAccess(BucketOwnerAccess bucketOwnerAccess); } static final class BuilderImpl implements Builder { private String type; private String location; private String path; private String namespaceType; private String name; private String packaging; private Boolean overrideArtifactName; private Boolean encryptionDisabled; private String artifactIdentifier; private String bucketOwnerAccess; private BuilderImpl() { } private BuilderImpl(ProjectArtifacts model) { type(model.type); location(model.location); path(model.path); namespaceType(model.namespaceType); name(model.name); packaging(model.packaging); overrideArtifactName(model.overrideArtifactName); encryptionDisabled(model.encryptionDisabled); artifactIdentifier(model.artifactIdentifier); bucketOwnerAccess(model.bucketOwnerAccess); } public final String getType() { return type; } public final void setType(String type) { this.type = type; } @Override public final Builder type(String type) { this.type = type; return this; } @Override public final Builder type(ArtifactsType type) { this.type(type == null ? null : type.toString()); return this; } public final String getLocation() { return location; } public final void setLocation(String location) { this.location = location; } @Override public final Builder location(String location) { this.location = location; 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 getNamespaceType() { return namespaceType; } public final void setNamespaceType(String namespaceType) { this.namespaceType = namespaceType; } @Override public final Builder namespaceType(String namespaceType) { this.namespaceType = namespaceType; return this; } @Override public final Builder namespaceType(ArtifactNamespace namespaceType) { this.namespaceType(namespaceType == null ? null : namespaceType.toString()); return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; 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(ArtifactPackaging packaging) { this.packaging(packaging == null ? null : packaging.toString()); return this; } public final Boolean getOverrideArtifactName() { return overrideArtifactName; } public final void setOverrideArtifactName(Boolean overrideArtifactName) { this.overrideArtifactName = overrideArtifactName; } @Override public final Builder overrideArtifactName(Boolean overrideArtifactName) { this.overrideArtifactName = overrideArtifactName; 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; } public final String getArtifactIdentifier() { return artifactIdentifier; } public final void setArtifactIdentifier(String artifactIdentifier) { this.artifactIdentifier = artifactIdentifier; } @Override public final Builder artifactIdentifier(String artifactIdentifier) { this.artifactIdentifier = artifactIdentifier; return this; } public final String getBucketOwnerAccess() { return bucketOwnerAccess; } public final void setBucketOwnerAccess(String bucketOwnerAccess) { this.bucketOwnerAccess = bucketOwnerAccess; } @Override public final Builder bucketOwnerAccess(String bucketOwnerAccess) { this.bucketOwnerAccess = bucketOwnerAccess; return this; } @Override public final Builder bucketOwnerAccess(BucketOwnerAccess bucketOwnerAccess) { this.bucketOwnerAccess(bucketOwnerAccess == null ? null : bucketOwnerAccess.toString()); return this; } @Override public ProjectArtifacts build() { return new ProjectArtifacts(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy