software.amazon.awssdk.services.codebuild.model.ProjectArtifacts Maven / Gradle / Ivy
Show all versions of codebuild Show documentation
/*
* 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 extends Builder> 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