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

software.amazon.awssdk.services.proton.model.UpdateEnvironmentRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.28.3
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.proton.model;

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

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class UpdateEnvironmentRequest extends ProtonRequest implements
        ToCopyableBuilder {
    private static final SdkField CODEBUILD_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("codebuildRoleArn").getter(getter(UpdateEnvironmentRequest::codebuildRoleArn))
            .setter(setter(Builder::codebuildRoleArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("codebuildRoleArn").build()).build();

    private static final SdkField COMPONENT_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("componentRoleArn").getter(getter(UpdateEnvironmentRequest::componentRoleArn))
            .setter(setter(Builder::componentRoleArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("componentRoleArn").build()).build();

    private static final SdkField DEPLOYMENT_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("deploymentType").getter(getter(UpdateEnvironmentRequest::deploymentTypeAsString))
            .setter(setter(Builder::deploymentType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("deploymentType").build()).build();

    private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("description").getter(getter(UpdateEnvironmentRequest::description)).setter(setter(Builder::description))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("description").build()).build();

    private static final SdkField ENVIRONMENT_ACCOUNT_CONNECTION_ID_FIELD = SdkField
            . builder(MarshallingType.STRING)
            .memberName("environmentAccountConnectionId")
            .getter(getter(UpdateEnvironmentRequest::environmentAccountConnectionId))
            .setter(setter(Builder::environmentAccountConnectionId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("environmentAccountConnectionId")
                    .build()).build();

    private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
            .getter(getter(UpdateEnvironmentRequest::name)).setter(setter(Builder::name))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();

    private static final SdkField PROTON_SERVICE_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("protonServiceRoleArn").getter(getter(UpdateEnvironmentRequest::protonServiceRoleArn))
            .setter(setter(Builder::protonServiceRoleArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("protonServiceRoleArn").build())
            .build();

    private static final SdkField PROVISIONING_REPOSITORY_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("provisioningRepository")
            .getter(getter(UpdateEnvironmentRequest::provisioningRepository)).setter(setter(Builder::provisioningRepository))
            .constructor(RepositoryBranchInput::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("provisioningRepository").build())
            .build();

    private static final SdkField SPEC_FIELD = SdkField. builder(MarshallingType.STRING).memberName("spec")
            .getter(getter(UpdateEnvironmentRequest::spec)).setter(setter(Builder::spec))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("spec").build()).build();

    private static final SdkField TEMPLATE_MAJOR_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("templateMajorVersion").getter(getter(UpdateEnvironmentRequest::templateMajorVersion))
            .setter(setter(Builder::templateMajorVersion))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("templateMajorVersion").build())
            .build();

    private static final SdkField TEMPLATE_MINOR_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("templateMinorVersion").getter(getter(UpdateEnvironmentRequest::templateMinorVersion))
            .setter(setter(Builder::templateMinorVersion))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("templateMinorVersion").build())
            .build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CODEBUILD_ROLE_ARN_FIELD,
            COMPONENT_ROLE_ARN_FIELD, DEPLOYMENT_TYPE_FIELD, DESCRIPTION_FIELD, ENVIRONMENT_ACCOUNT_CONNECTION_ID_FIELD,
            NAME_FIELD, PROTON_SERVICE_ROLE_ARN_FIELD, PROVISIONING_REPOSITORY_FIELD, SPEC_FIELD, TEMPLATE_MAJOR_VERSION_FIELD,
            TEMPLATE_MINOR_VERSION_FIELD));

    private final String codebuildRoleArn;

    private final String componentRoleArn;

    private final String deploymentType;

    private final String description;

    private final String environmentAccountConnectionId;

    private final String name;

    private final String protonServiceRoleArn;

    private final RepositoryBranchInput provisioningRepository;

    private final String spec;

    private final String templateMajorVersion;

    private final String templateMinorVersion;

    private UpdateEnvironmentRequest(BuilderImpl builder) {
        super(builder);
        this.codebuildRoleArn = builder.codebuildRoleArn;
        this.componentRoleArn = builder.componentRoleArn;
        this.deploymentType = builder.deploymentType;
        this.description = builder.description;
        this.environmentAccountConnectionId = builder.environmentAccountConnectionId;
        this.name = builder.name;
        this.protonServiceRoleArn = builder.protonServiceRoleArn;
        this.provisioningRepository = builder.provisioningRepository;
        this.spec = builder.spec;
        this.templateMajorVersion = builder.templateMajorVersion;
        this.templateMinorVersion = builder.templateMinorVersion;
    }

    /**
     * 

* The Amazon Resource Name (ARN) of the IAM service role that allows Proton to provision infrastructure using * CodeBuild-based provisioning on your behalf. *

* * @return The Amazon Resource Name (ARN) of the IAM service role that allows Proton to provision infrastructure * using CodeBuild-based provisioning on your behalf. */ public final String codebuildRoleArn() { return codebuildRoleArn; } /** *

* The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined * components in this environment. It determines the scope of infrastructure that a component can provision. *

*

* The environment must have a componentRoleArn to allow directly defined components to be associated * with the environment. *

*

* For more information about components, see Proton components in the * Proton User Guide. *

* * @return The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly * defined components in this environment. It determines the scope of infrastructure that a component can * provision.

*

* The environment must have a componentRoleArn to allow directly defined components to be * associated with the environment. *

*

* For more information about components, see Proton components in * the Proton User Guide. */ public final String componentRoleArn() { return componentRoleArn; } /** *

* There are four modes for updating an environment. The deploymentType field defines the mode. *

*
*
*
*

* NONE *

*

* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. *

*
*
*
*

* CURRENT_VERSION *

*

* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested * parameters are updated. Don’t include major or minor version parameters when you use this * deployment-type. *

*
*
*
*

* MINOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of * the current major version in use, by default. You can also specify a different minor version of the current major * version in use. *

*
*
*
*

* MAJOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor * version of the current template, by default. You can also specify a different major version that is higher than * the major version in use and a minor version (optional). *

*
*
*

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

* * @return There are four modes for updating an environment. The deploymentType field defines the * mode.

*
*
*
*

* NONE *

*

* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. *

*
*
*
*

* CURRENT_VERSION *

*

* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested * parameters are updated. Don’t include major or minor version parameters when you use this * deployment-type. *

*
*
*
*

* MINOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) minor * version of the current major version in use, by default. You can also specify a different minor version * of the current major version in use. *

*
*
*
*

* MAJOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) major and * minor version of the current template, by default. You can also specify a different major version that is * higher than the major version in use and a minor version (optional). *

*
* @see DeploymentUpdateType */ public final DeploymentUpdateType deploymentType() { return DeploymentUpdateType.fromValue(deploymentType); } /** *

* There are four modes for updating an environment. The deploymentType field defines the mode. *

*
*
*
*

* NONE *

*

* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. *

*
*
*
*

* CURRENT_VERSION *

*

* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested * parameters are updated. Don’t include major or minor version parameters when you use this * deployment-type. *

*
*
*
*

* MINOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of * the current major version in use, by default. You can also specify a different minor version of the current major * version in use. *

*
*
*
*

* MAJOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor * version of the current template, by default. You can also specify a different major version that is higher than * the major version in use and a minor version (optional). *

*
*
*

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

* * @return There are four modes for updating an environment. The deploymentType field defines the * mode.

*
*
*
*

* NONE *

*

* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. *

*
*
*
*

* CURRENT_VERSION *

*

* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested * parameters are updated. Don’t include major or minor version parameters when you use this * deployment-type. *

*
*
*
*

* MINOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) minor * version of the current major version in use, by default. You can also specify a different minor version * of the current major version in use. *

*
*
*
*

* MAJOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) major and * minor version of the current template, by default. You can also specify a different major version that is * higher than the major version in use and a minor version (optional). *

*
* @see DeploymentUpdateType */ public final String deploymentTypeAsString() { return deploymentType; } /** *

* A description of the environment update. *

* * @return A description of the environment update. */ public final String description() { return description; } /** *

* The ID of the environment account connection. *

*

* You can only update to a new environment account connection if it was created in the same environment account * that the current environment account connection was created in and is associated with the current environment. *

* * @return The ID of the environment account connection.

*

* You can only update to a new environment account connection if it was created in the same environment * account that the current environment account connection was created in and is associated with the current * environment. */ public final String environmentAccountConnectionId() { return environmentAccountConnectionId; } /** *

* The name of the environment to update. *

* * @return The name of the environment to update. */ public final String name() { return name; } /** *

* The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make API calls to other services * your behalf. *

* * @return The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make API calls to other * services your behalf. */ public final String protonServiceRoleArn() { return protonServiceRoleArn; } /** *

* The linked repository that you use to host your rendered infrastructure templates for self-managed provisioning. * A linked repository is a repository that has been registered with Proton. For more information, see * CreateRepository. *

* * @return The linked repository that you use to host your rendered infrastructure templates for self-managed * provisioning. A linked repository is a repository that has been registered with Proton. For more * information, see CreateRepository. */ public final RepositoryBranchInput provisioningRepository() { return provisioningRepository; } /** *

* The formatted specification that defines the update. *

* * @return The formatted specification that defines the update. */ public final String spec() { return spec; } /** *

* The major version of the environment to update. *

* * @return The major version of the environment to update. */ public final String templateMajorVersion() { return templateMajorVersion; } /** *

* The minor version of the environment to update. *

* * @return The minor version of the environment to update. */ public final String templateMinorVersion() { return templateMinorVersion; } @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 + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(codebuildRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(componentRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(deploymentTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(environmentAccountConnectionId()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(protonServiceRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(provisioningRepository()); hashCode = 31 * hashCode + Objects.hashCode(spec()); hashCode = 31 * hashCode + Objects.hashCode(templateMajorVersion()); hashCode = 31 * hashCode + Objects.hashCode(templateMinorVersion()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof UpdateEnvironmentRequest)) { return false; } UpdateEnvironmentRequest other = (UpdateEnvironmentRequest) obj; return Objects.equals(codebuildRoleArn(), other.codebuildRoleArn()) && Objects.equals(componentRoleArn(), other.componentRoleArn()) && Objects.equals(deploymentTypeAsString(), other.deploymentTypeAsString()) && Objects.equals(description(), other.description()) && Objects.equals(environmentAccountConnectionId(), other.environmentAccountConnectionId()) && Objects.equals(name(), other.name()) && Objects.equals(protonServiceRoleArn(), other.protonServiceRoleArn()) && Objects.equals(provisioningRepository(), other.provisioningRepository()) && Objects.equals(spec(), other.spec()) && Objects.equals(templateMajorVersion(), other.templateMajorVersion()) && Objects.equals(templateMinorVersion(), other.templateMinorVersion()); } /** * 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("UpdateEnvironmentRequest").add("CodebuildRoleArn", codebuildRoleArn()) .add("ComponentRoleArn", componentRoleArn()).add("DeploymentType", deploymentTypeAsString()) .add("Description", description() == null ? null : "*** Sensitive Data Redacted ***") .add("EnvironmentAccountConnectionId", environmentAccountConnectionId()).add("Name", name()) .add("ProtonServiceRoleArn", protonServiceRoleArn()).add("ProvisioningRepository", provisioningRepository()) .add("Spec", spec() == null ? null : "*** Sensitive Data Redacted ***") .add("TemplateMajorVersion", templateMajorVersion()).add("TemplateMinorVersion", templateMinorVersion()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "codebuildRoleArn": return Optional.ofNullable(clazz.cast(codebuildRoleArn())); case "componentRoleArn": return Optional.ofNullable(clazz.cast(componentRoleArn())); case "deploymentType": return Optional.ofNullable(clazz.cast(deploymentTypeAsString())); case "description": return Optional.ofNullable(clazz.cast(description())); case "environmentAccountConnectionId": return Optional.ofNullable(clazz.cast(environmentAccountConnectionId())); case "name": return Optional.ofNullable(clazz.cast(name())); case "protonServiceRoleArn": return Optional.ofNullable(clazz.cast(protonServiceRoleArn())); case "provisioningRepository": return Optional.ofNullable(clazz.cast(provisioningRepository())); case "spec": return Optional.ofNullable(clazz.cast(spec())); case "templateMajorVersion": return Optional.ofNullable(clazz.cast(templateMajorVersion())); case "templateMinorVersion": return Optional.ofNullable(clazz.cast(templateMinorVersion())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((UpdateEnvironmentRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends ProtonRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The Amazon Resource Name (ARN) of the IAM service role that allows Proton to provision infrastructure using * CodeBuild-based provisioning on your behalf. *

* * @param codebuildRoleArn * The Amazon Resource Name (ARN) of the IAM service role that allows Proton to provision infrastructure * using CodeBuild-based provisioning on your behalf. * @return Returns a reference to this object so that method calls can be chained together. */ Builder codebuildRoleArn(String codebuildRoleArn); /** *

* The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined * components in this environment. It determines the scope of infrastructure that a component can provision. *

*

* The environment must have a componentRoleArn to allow directly defined components to be * associated with the environment. *

*

* For more information about components, see Proton components in the * Proton User Guide. *

* * @param componentRoleArn * The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly * defined components in this environment. It determines the scope of infrastructure that a component can * provision.

*

* The environment must have a componentRoleArn to allow directly defined components to be * associated with the environment. *

*

* For more information about components, see Proton components in * the Proton User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder componentRoleArn(String componentRoleArn); /** *

* There are four modes for updating an environment. The deploymentType field defines the mode. *

*
*
*
*

* NONE *

*

* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. *

*
*
*
*

* CURRENT_VERSION *

*

* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested * parameters are updated. Don’t include major or minor version parameters when you use this * deployment-type. *

*
*
*
*

* MINOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) minor version * of the current major version in use, by default. You can also specify a different minor version of the * current major version in use. *

*
*
*
*

* MAJOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) major and * minor version of the current template, by default. You can also specify a different major version that is * higher than the major version in use and a minor version (optional). *

*
*
* * @param deploymentType * There are four modes for updating an environment. The deploymentType field defines the * mode.

*
*
*
*

* NONE *

*

* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. *

*
*
*
*

* CURRENT_VERSION *

*

* In this mode, the environment is deployed and updated with the new spec that you provide. Only * requested parameters are updated. Don’t include major or minor version parameters when you use * this deployment-type. *

*
*
*
*

* MINOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) minor * version of the current major version in use, by default. You can also specify a different minor * version of the current major version in use. *

*
*
*
*

* MAJOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) major * and minor version of the current template, by default. You can also specify a different major version * that is higher than the major version in use and a minor version (optional). *

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

* There are four modes for updating an environment. The deploymentType field defines the mode. *

*
*
*
*

* NONE *

*

* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. *

*
*
*
*

* CURRENT_VERSION *

*

* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested * parameters are updated. Don’t include major or minor version parameters when you use this * deployment-type. *

*
*
*
*

* MINOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) minor version * of the current major version in use, by default. You can also specify a different minor version of the * current major version in use. *

*
*
*
*

* MAJOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) major and * minor version of the current template, by default. You can also specify a different major version that is * higher than the major version in use and a minor version (optional). *

*
*
* * @param deploymentType * There are four modes for updating an environment. The deploymentType field defines the * mode.

*
*
*
*

* NONE *

*

* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. *

*
*
*
*

* CURRENT_VERSION *

*

* In this mode, the environment is deployed and updated with the new spec that you provide. Only * requested parameters are updated. Don’t include major or minor version parameters when you use * this deployment-type. *

*
*
*
*

* MINOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) minor * version of the current major version in use, by default. You can also specify a different minor * version of the current major version in use. *

*
*
*
*

* MAJOR_VERSION *

*

* In this mode, the environment is deployed and updated with the published, recommended (latest) major * and minor version of the current template, by default. You can also specify a different major version * that is higher than the major version in use and a minor version (optional). *

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

* A description of the environment update. *

* * @param description * A description of the environment update. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* The ID of the environment account connection. *

*

* You can only update to a new environment account connection if it was created in the same environment account * that the current environment account connection was created in and is associated with the current * environment. *

* * @param environmentAccountConnectionId * The ID of the environment account connection.

*

* You can only update to a new environment account connection if it was created in the same environment * account that the current environment account connection was created in and is associated with the * current environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environmentAccountConnectionId(String environmentAccountConnectionId); /** *

* The name of the environment to update. *

* * @param name * The name of the environment to update. * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

* The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make API calls to other * services your behalf. *

* * @param protonServiceRoleArn * The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make API calls to * other services your behalf. * @return Returns a reference to this object so that method calls can be chained together. */ Builder protonServiceRoleArn(String protonServiceRoleArn); /** *

* The linked repository that you use to host your rendered infrastructure templates for self-managed * provisioning. A linked repository is a repository that has been registered with Proton. For more information, * see CreateRepository. *

* * @param provisioningRepository * The linked repository that you use to host your rendered infrastructure templates for self-managed * provisioning. A linked repository is a repository that has been registered with Proton. For more * information, see CreateRepository. * @return Returns a reference to this object so that method calls can be chained together. */ Builder provisioningRepository(RepositoryBranchInput provisioningRepository); /** *

* The linked repository that you use to host your rendered infrastructure templates for self-managed * provisioning. A linked repository is a repository that has been registered with Proton. For more information, * see CreateRepository. *

* This is a convenience method that creates an instance of the {@link RepositoryBranchInput.Builder} avoiding * the need to create one manually via {@link RepositoryBranchInput#builder()}. * *

* When the {@link Consumer} completes, {@link RepositoryBranchInput.Builder#build()} is called immediately and * its result is passed to {@link #provisioningRepository(RepositoryBranchInput)}. * * @param provisioningRepository * a consumer that will call methods on {@link RepositoryBranchInput.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #provisioningRepository(RepositoryBranchInput) */ default Builder provisioningRepository(Consumer provisioningRepository) { return provisioningRepository(RepositoryBranchInput.builder().applyMutation(provisioningRepository).build()); } /** *

* The formatted specification that defines the update. *

* * @param spec * The formatted specification that defines the update. * @return Returns a reference to this object so that method calls can be chained together. */ Builder spec(String spec); /** *

* The major version of the environment to update. *

* * @param templateMajorVersion * The major version of the environment to update. * @return Returns a reference to this object so that method calls can be chained together. */ Builder templateMajorVersion(String templateMajorVersion); /** *

* The minor version of the environment to update. *

* * @param templateMinorVersion * The minor version of the environment to update. * @return Returns a reference to this object so that method calls can be chained together. */ Builder templateMinorVersion(String templateMinorVersion); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends ProtonRequest.BuilderImpl implements Builder { private String codebuildRoleArn; private String componentRoleArn; private String deploymentType; private String description; private String environmentAccountConnectionId; private String name; private String protonServiceRoleArn; private RepositoryBranchInput provisioningRepository; private String spec; private String templateMajorVersion; private String templateMinorVersion; private BuilderImpl() { } private BuilderImpl(UpdateEnvironmentRequest model) { super(model); codebuildRoleArn(model.codebuildRoleArn); componentRoleArn(model.componentRoleArn); deploymentType(model.deploymentType); description(model.description); environmentAccountConnectionId(model.environmentAccountConnectionId); name(model.name); protonServiceRoleArn(model.protonServiceRoleArn); provisioningRepository(model.provisioningRepository); spec(model.spec); templateMajorVersion(model.templateMajorVersion); templateMinorVersion(model.templateMinorVersion); } public final String getCodebuildRoleArn() { return codebuildRoleArn; } public final void setCodebuildRoleArn(String codebuildRoleArn) { this.codebuildRoleArn = codebuildRoleArn; } @Override public final Builder codebuildRoleArn(String codebuildRoleArn) { this.codebuildRoleArn = codebuildRoleArn; return this; } public final String getComponentRoleArn() { return componentRoleArn; } public final void setComponentRoleArn(String componentRoleArn) { this.componentRoleArn = componentRoleArn; } @Override public final Builder componentRoleArn(String componentRoleArn) { this.componentRoleArn = componentRoleArn; return this; } public final String getDeploymentType() { return deploymentType; } public final void setDeploymentType(String deploymentType) { this.deploymentType = deploymentType; } @Override public final Builder deploymentType(String deploymentType) { this.deploymentType = deploymentType; return this; } @Override public final Builder deploymentType(DeploymentUpdateType deploymentType) { this.deploymentType(deploymentType == null ? null : deploymentType.toString()); return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } public final String getEnvironmentAccountConnectionId() { return environmentAccountConnectionId; } public final void setEnvironmentAccountConnectionId(String environmentAccountConnectionId) { this.environmentAccountConnectionId = environmentAccountConnectionId; } @Override public final Builder environmentAccountConnectionId(String environmentAccountConnectionId) { this.environmentAccountConnectionId = environmentAccountConnectionId; 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 getProtonServiceRoleArn() { return protonServiceRoleArn; } public final void setProtonServiceRoleArn(String protonServiceRoleArn) { this.protonServiceRoleArn = protonServiceRoleArn; } @Override public final Builder protonServiceRoleArn(String protonServiceRoleArn) { this.protonServiceRoleArn = protonServiceRoleArn; return this; } public final RepositoryBranchInput.Builder getProvisioningRepository() { return provisioningRepository != null ? provisioningRepository.toBuilder() : null; } public final void setProvisioningRepository(RepositoryBranchInput.BuilderImpl provisioningRepository) { this.provisioningRepository = provisioningRepository != null ? provisioningRepository.build() : null; } @Override public final Builder provisioningRepository(RepositoryBranchInput provisioningRepository) { this.provisioningRepository = provisioningRepository; return this; } public final String getSpec() { return spec; } public final void setSpec(String spec) { this.spec = spec; } @Override public final Builder spec(String spec) { this.spec = spec; return this; } public final String getTemplateMajorVersion() { return templateMajorVersion; } public final void setTemplateMajorVersion(String templateMajorVersion) { this.templateMajorVersion = templateMajorVersion; } @Override public final Builder templateMajorVersion(String templateMajorVersion) { this.templateMajorVersion = templateMajorVersion; return this; } public final String getTemplateMinorVersion() { return templateMinorVersion; } public final void setTemplateMinorVersion(String templateMinorVersion) { this.templateMinorVersion = templateMinorVersion; } @Override public final Builder templateMinorVersion(String templateMinorVersion) { this.templateMinorVersion = templateMinorVersion; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public UpdateEnvironmentRequest build() { return new UpdateEnvironmentRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy