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

software.amazon.awssdk.services.migrationhubrefactorspaces.model.CreateServiceResponse Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Migration Hub Refactor Spaces module holds the client classes that are used for communicating with Migration Hub Refactor Spaces.

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

import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
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.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
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 CreateServiceResponse extends MigrationHubRefactorSpacesResponse implements
        ToCopyableBuilder {
    private static final SdkField APPLICATION_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ApplicationId").getter(getter(CreateServiceResponse::applicationId))
            .setter(setter(Builder::applicationId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ApplicationId").build()).build();

    private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Arn")
            .getter(getter(CreateServiceResponse::arn)).setter(setter(Builder::arn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Arn").build()).build();

    private static final SdkField CREATED_BY_ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("CreatedByAccountId").getter(getter(CreateServiceResponse::createdByAccountId))
            .setter(setter(Builder::createdByAccountId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedByAccountId").build())
            .build();

    private static final SdkField CREATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("CreatedTime").getter(getter(CreateServiceResponse::createdTime)).setter(setter(Builder::createdTime))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedTime").build()).build();

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

    private static final SdkField ENDPOINT_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("EndpointType").getter(getter(CreateServiceResponse::endpointTypeAsString))
            .setter(setter(Builder::endpointType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointType").build()).build();

    private static final SdkField ENVIRONMENT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("EnvironmentId").getter(getter(CreateServiceResponse::environmentId))
            .setter(setter(Builder::environmentId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnvironmentId").build()).build();

    private static final SdkField LAMBDA_ENDPOINT_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("LambdaEndpoint")
            .getter(getter(CreateServiceResponse::lambdaEndpoint)).setter(setter(Builder::lambdaEndpoint))
            .constructor(LambdaEndpointInput::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LambdaEndpoint").build()).build();

    private static final SdkField LAST_UPDATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("LastUpdatedTime").getter(getter(CreateServiceResponse::lastUpdatedTime))
            .setter(setter(Builder::lastUpdatedTime))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastUpdatedTime").build()).build();

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

    private static final SdkField OWNER_ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("OwnerAccountId").getter(getter(CreateServiceResponse::ownerAccountId))
            .setter(setter(Builder::ownerAccountId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OwnerAccountId").build()).build();

    private static final SdkField SERVICE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ServiceId").getter(getter(CreateServiceResponse::serviceId)).setter(setter(Builder::serviceId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceId").build()).build();

    private static final SdkField STATE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("State")
            .getter(getter(CreateServiceResponse::stateAsString)).setter(setter(Builder::state))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("State").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("Tags")
            .getter(getter(CreateServiceResponse::tags))
            .setter(setter(Builder::tags))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
                    MapTrait.builder()
                            .keyLocationName("key")
                            .valueLocationName("value")
                            .valueFieldInfo(
                                    SdkField. builder(MarshallingType.STRING)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("value").build()).build()).build()).build();

    private static final SdkField URL_ENDPOINT_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("UrlEndpoint")
            .getter(getter(CreateServiceResponse::urlEndpoint)).setter(setter(Builder::urlEndpoint))
            .constructor(UrlEndpointInput::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UrlEndpoint").build()).build();

    private static final SdkField VPC_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("VpcId")
            .getter(getter(CreateServiceResponse::vpcId)).setter(setter(Builder::vpcId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcId").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(APPLICATION_ID_FIELD,
            ARN_FIELD, CREATED_BY_ACCOUNT_ID_FIELD, CREATED_TIME_FIELD, DESCRIPTION_FIELD, ENDPOINT_TYPE_FIELD,
            ENVIRONMENT_ID_FIELD, LAMBDA_ENDPOINT_FIELD, LAST_UPDATED_TIME_FIELD, NAME_FIELD, OWNER_ACCOUNT_ID_FIELD,
            SERVICE_ID_FIELD, STATE_FIELD, TAGS_FIELD, URL_ENDPOINT_FIELD, VPC_ID_FIELD));

    private static final Map> SDK_NAME_TO_FIELD = Collections
            .unmodifiableMap(new HashMap>() {
                {
                    put("ApplicationId", APPLICATION_ID_FIELD);
                    put("Arn", ARN_FIELD);
                    put("CreatedByAccountId", CREATED_BY_ACCOUNT_ID_FIELD);
                    put("CreatedTime", CREATED_TIME_FIELD);
                    put("Description", DESCRIPTION_FIELD);
                    put("EndpointType", ENDPOINT_TYPE_FIELD);
                    put("EnvironmentId", ENVIRONMENT_ID_FIELD);
                    put("LambdaEndpoint", LAMBDA_ENDPOINT_FIELD);
                    put("LastUpdatedTime", LAST_UPDATED_TIME_FIELD);
                    put("Name", NAME_FIELD);
                    put("OwnerAccountId", OWNER_ACCOUNT_ID_FIELD);
                    put("ServiceId", SERVICE_ID_FIELD);
                    put("State", STATE_FIELD);
                    put("Tags", TAGS_FIELD);
                    put("UrlEndpoint", URL_ENDPOINT_FIELD);
                    put("VpcId", VPC_ID_FIELD);
                }
            });

    private final String applicationId;

    private final String arn;

    private final String createdByAccountId;

    private final Instant createdTime;

    private final String description;

    private final String endpointType;

    private final String environmentId;

    private final LambdaEndpointInput lambdaEndpoint;

    private final Instant lastUpdatedTime;

    private final String name;

    private final String ownerAccountId;

    private final String serviceId;

    private final String state;

    private final Map tags;

    private final UrlEndpointInput urlEndpoint;

    private final String vpcId;

    private CreateServiceResponse(BuilderImpl builder) {
        super(builder);
        this.applicationId = builder.applicationId;
        this.arn = builder.arn;
        this.createdByAccountId = builder.createdByAccountId;
        this.createdTime = builder.createdTime;
        this.description = builder.description;
        this.endpointType = builder.endpointType;
        this.environmentId = builder.environmentId;
        this.lambdaEndpoint = builder.lambdaEndpoint;
        this.lastUpdatedTime = builder.lastUpdatedTime;
        this.name = builder.name;
        this.ownerAccountId = builder.ownerAccountId;
        this.serviceId = builder.serviceId;
        this.state = builder.state;
        this.tags = builder.tags;
        this.urlEndpoint = builder.urlEndpoint;
        this.vpcId = builder.vpcId;
    }

    /**
     * 

* The ID of the application that the created service belongs to. *

* * @return The ID of the application that the created service belongs to. */ public final String applicationId() { return applicationId; } /** *

* The Amazon Resource Name (ARN) of the service. *

* * @return The Amazon Resource Name (ARN) of the service. */ public final String arn() { return arn; } /** *

* The Amazon Web Services account ID of the service creator. *

* * @return The Amazon Web Services account ID of the service creator. */ public final String createdByAccountId() { return createdByAccountId; } /** *

* A timestamp that indicates when the service is created. *

* * @return A timestamp that indicates when the service is created. */ public final Instant createdTime() { return createdTime; } /** *

* The description of the created service. *

* * @return The description of the created service. */ public final String description() { return description; } /** *

* The endpoint type of the service. *

*

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

* * @return The endpoint type of the service. * @see ServiceEndpointType */ public final ServiceEndpointType endpointType() { return ServiceEndpointType.fromValue(endpointType); } /** *

* The endpoint type of the service. *

*

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

* * @return The endpoint type of the service. * @see ServiceEndpointType */ public final String endpointTypeAsString() { return endpointType; } /** *

* The unique identifier of the environment. *

* * @return The unique identifier of the environment. */ public final String environmentId() { return environmentId; } /** *

* The configuration for the Lambda endpoint type. *

* * @return The configuration for the Lambda endpoint type. */ public final LambdaEndpointInput lambdaEndpoint() { return lambdaEndpoint; } /** *

* A timestamp that indicates when the service was last updated. *

* * @return A timestamp that indicates when the service was last updated. */ public final Instant lastUpdatedTime() { return lastUpdatedTime; } /** *

* The name of the service. *

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

* The Amazon Web Services account ID of the service owner. *

* * @return The Amazon Web Services account ID of the service owner. */ public final String ownerAccountId() { return ownerAccountId; } /** *

* The unique identifier of the service. *

* * @return The unique identifier of the service. */ public final String serviceId() { return serviceId; } /** *

* The current state of the service. *

*

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

* * @return The current state of the service. * @see ServiceState */ public final ServiceState state() { return ServiceState.fromValue(state); } /** *

* The current state of the service. *

*

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

* * @return The current state of the service. * @see ServiceState */ public final String stateAsString() { return state; } /** * For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructMap); } /** *

* The tags assigned to the created service. A tag is a label that you assign to an Amazon Web Services resource. * Each tag consists of a key-value pair.. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

* * @return The tags assigned to the created service. A tag is a label that you assign to an Amazon Web Services * resource. Each tag consists of a key-value pair.. */ public final Map tags() { return tags; } /** *

* The configuration for the URL endpoint type. *

* * @return The configuration for the URL endpoint type. */ public final UrlEndpointInput urlEndpoint() { return urlEndpoint; } /** *

* The ID of the VPC. *

* * @return The ID of the VPC. */ public final String vpcId() { return vpcId; } @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(applicationId()); hashCode = 31 * hashCode + Objects.hashCode(arn()); hashCode = 31 * hashCode + Objects.hashCode(createdByAccountId()); hashCode = 31 * hashCode + Objects.hashCode(createdTime()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(endpointTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(environmentId()); hashCode = 31 * hashCode + Objects.hashCode(lambdaEndpoint()); hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedTime()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(ownerAccountId()); hashCode = 31 * hashCode + Objects.hashCode(serviceId()); hashCode = 31 * hashCode + Objects.hashCode(stateAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(urlEndpoint()); hashCode = 31 * hashCode + Objects.hashCode(vpcId()); 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 CreateServiceResponse)) { return false; } CreateServiceResponse other = (CreateServiceResponse) obj; return Objects.equals(applicationId(), other.applicationId()) && Objects.equals(arn(), other.arn()) && Objects.equals(createdByAccountId(), other.createdByAccountId()) && Objects.equals(createdTime(), other.createdTime()) && Objects.equals(description(), other.description()) && Objects.equals(endpointTypeAsString(), other.endpointTypeAsString()) && Objects.equals(environmentId(), other.environmentId()) && Objects.equals(lambdaEndpoint(), other.lambdaEndpoint()) && Objects.equals(lastUpdatedTime(), other.lastUpdatedTime()) && Objects.equals(name(), other.name()) && Objects.equals(ownerAccountId(), other.ownerAccountId()) && Objects.equals(serviceId(), other.serviceId()) && Objects.equals(stateAsString(), other.stateAsString()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(urlEndpoint(), other.urlEndpoint()) && Objects.equals(vpcId(), other.vpcId()); } /** * 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("CreateServiceResponse").add("ApplicationId", applicationId()).add("Arn", arn()) .add("CreatedByAccountId", createdByAccountId()).add("CreatedTime", createdTime()) .add("Description", description()).add("EndpointType", endpointTypeAsString()) .add("EnvironmentId", environmentId()).add("LambdaEndpoint", lambdaEndpoint()) .add("LastUpdatedTime", lastUpdatedTime()).add("Name", name()).add("OwnerAccountId", ownerAccountId()) .add("ServiceId", serviceId()).add("State", stateAsString()) .add("Tags", tags() == null ? null : "*** Sensitive Data Redacted ***").add("UrlEndpoint", urlEndpoint()) .add("VpcId", vpcId()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ApplicationId": return Optional.ofNullable(clazz.cast(applicationId())); case "Arn": return Optional.ofNullable(clazz.cast(arn())); case "CreatedByAccountId": return Optional.ofNullable(clazz.cast(createdByAccountId())); case "CreatedTime": return Optional.ofNullable(clazz.cast(createdTime())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "EndpointType": return Optional.ofNullable(clazz.cast(endpointTypeAsString())); case "EnvironmentId": return Optional.ofNullable(clazz.cast(environmentId())); case "LambdaEndpoint": return Optional.ofNullable(clazz.cast(lambdaEndpoint())); case "LastUpdatedTime": return Optional.ofNullable(clazz.cast(lastUpdatedTime())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "OwnerAccountId": return Optional.ofNullable(clazz.cast(ownerAccountId())); case "ServiceId": return Optional.ofNullable(clazz.cast(serviceId())); case "State": return Optional.ofNullable(clazz.cast(stateAsString())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "UrlEndpoint": return Optional.ofNullable(clazz.cast(urlEndpoint())); case "VpcId": return Optional.ofNullable(clazz.cast(vpcId())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((CreateServiceResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends MigrationHubRefactorSpacesResponse.Builder, SdkPojo, CopyableBuilder { /** *

* The ID of the application that the created service belongs to. *

* * @param applicationId * The ID of the application that the created service belongs to. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applicationId(String applicationId); /** *

* The Amazon Resource Name (ARN) of the service. *

* * @param arn * The Amazon Resource Name (ARN) of the service. * @return Returns a reference to this object so that method calls can be chained together. */ Builder arn(String arn); /** *

* The Amazon Web Services account ID of the service creator. *

* * @param createdByAccountId * The Amazon Web Services account ID of the service creator. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdByAccountId(String createdByAccountId); /** *

* A timestamp that indicates when the service is created. *

* * @param createdTime * A timestamp that indicates when the service is created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdTime(Instant createdTime); /** *

* The description of the created service. *

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

* The endpoint type of the service. *

* * @param endpointType * The endpoint type of the service. * @see ServiceEndpointType * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceEndpointType */ Builder endpointType(String endpointType); /** *

* The endpoint type of the service. *

* * @param endpointType * The endpoint type of the service. * @see ServiceEndpointType * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceEndpointType */ Builder endpointType(ServiceEndpointType endpointType); /** *

* The unique identifier of the environment. *

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

* The configuration for the Lambda endpoint type. *

* * @param lambdaEndpoint * The configuration for the Lambda endpoint type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lambdaEndpoint(LambdaEndpointInput lambdaEndpoint); /** *

* The configuration for the Lambda endpoint type. *

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

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

* A timestamp that indicates when the service was last updated. *

* * @param lastUpdatedTime * A timestamp that indicates when the service was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastUpdatedTime(Instant lastUpdatedTime); /** *

* The name of the service. *

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

* The Amazon Web Services account ID of the service owner. *

* * @param ownerAccountId * The Amazon Web Services account ID of the service owner. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ownerAccountId(String ownerAccountId); /** *

* The unique identifier of the service. *

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

* The current state of the service. *

* * @param state * The current state of the service. * @see ServiceState * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceState */ Builder state(String state); /** *

* The current state of the service. *

* * @param state * The current state of the service. * @see ServiceState * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceState */ Builder state(ServiceState state); /** *

* The tags assigned to the created service. A tag is a label that you assign to an Amazon Web Services * resource. Each tag consists of a key-value pair.. *

* * @param tags * The tags assigned to the created service. A tag is a label that you assign to an Amazon Web Services * resource. Each tag consists of a key-value pair.. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Map tags); /** *

* The configuration for the URL endpoint type. *

* * @param urlEndpoint * The configuration for the URL endpoint type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder urlEndpoint(UrlEndpointInput urlEndpoint); /** *

* The configuration for the URL endpoint type. *

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

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

* The ID of the VPC. *

* * @param vpcId * The ID of the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcId(String vpcId); } static final class BuilderImpl extends MigrationHubRefactorSpacesResponse.BuilderImpl implements Builder { private String applicationId; private String arn; private String createdByAccountId; private Instant createdTime; private String description; private String endpointType; private String environmentId; private LambdaEndpointInput lambdaEndpoint; private Instant lastUpdatedTime; private String name; private String ownerAccountId; private String serviceId; private String state; private Map tags = DefaultSdkAutoConstructMap.getInstance(); private UrlEndpointInput urlEndpoint; private String vpcId; private BuilderImpl() { } private BuilderImpl(CreateServiceResponse model) { super(model); applicationId(model.applicationId); arn(model.arn); createdByAccountId(model.createdByAccountId); createdTime(model.createdTime); description(model.description); endpointType(model.endpointType); environmentId(model.environmentId); lambdaEndpoint(model.lambdaEndpoint); lastUpdatedTime(model.lastUpdatedTime); name(model.name); ownerAccountId(model.ownerAccountId); serviceId(model.serviceId); state(model.state); tags(model.tags); urlEndpoint(model.urlEndpoint); vpcId(model.vpcId); } public final String getApplicationId() { return applicationId; } public final void setApplicationId(String applicationId) { this.applicationId = applicationId; } @Override public final Builder applicationId(String applicationId) { this.applicationId = applicationId; return this; } public final String getArn() { return arn; } public final void setArn(String arn) { this.arn = arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final String getCreatedByAccountId() { return createdByAccountId; } public final void setCreatedByAccountId(String createdByAccountId) { this.createdByAccountId = createdByAccountId; } @Override public final Builder createdByAccountId(String createdByAccountId) { this.createdByAccountId = createdByAccountId; return this; } public final Instant getCreatedTime() { return createdTime; } public final void setCreatedTime(Instant createdTime) { this.createdTime = createdTime; } @Override public final Builder createdTime(Instant createdTime) { this.createdTime = createdTime; 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 getEndpointType() { return endpointType; } public final void setEndpointType(String endpointType) { this.endpointType = endpointType; } @Override public final Builder endpointType(String endpointType) { this.endpointType = endpointType; return this; } @Override public final Builder endpointType(ServiceEndpointType endpointType) { this.endpointType(endpointType == null ? null : endpointType.toString()); return this; } public final String getEnvironmentId() { return environmentId; } public final void setEnvironmentId(String environmentId) { this.environmentId = environmentId; } @Override public final Builder environmentId(String environmentId) { this.environmentId = environmentId; return this; } public final LambdaEndpointInput.Builder getLambdaEndpoint() { return lambdaEndpoint != null ? lambdaEndpoint.toBuilder() : null; } public final void setLambdaEndpoint(LambdaEndpointInput.BuilderImpl lambdaEndpoint) { this.lambdaEndpoint = lambdaEndpoint != null ? lambdaEndpoint.build() : null; } @Override public final Builder lambdaEndpoint(LambdaEndpointInput lambdaEndpoint) { this.lambdaEndpoint = lambdaEndpoint; return this; } public final Instant getLastUpdatedTime() { return lastUpdatedTime; } public final void setLastUpdatedTime(Instant lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } @Override public final Builder lastUpdatedTime(Instant lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; 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 getOwnerAccountId() { return ownerAccountId; } public final void setOwnerAccountId(String ownerAccountId) { this.ownerAccountId = ownerAccountId; } @Override public final Builder ownerAccountId(String ownerAccountId) { this.ownerAccountId = ownerAccountId; return this; } public final String getServiceId() { return serviceId; } public final void setServiceId(String serviceId) { this.serviceId = serviceId; } @Override public final Builder serviceId(String serviceId) { this.serviceId = serviceId; return this; } public final String getState() { return state; } public final void setState(String state) { this.state = state; } @Override public final Builder state(String state) { this.state = state; return this; } @Override public final Builder state(ServiceState state) { this.state(state == null ? null : state.toString()); return this; } public final Map getTags() { if (tags instanceof SdkAutoConstructMap) { return null; } return tags; } public final void setTags(Map tags) { this.tags = TagMapCopier.copy(tags); } @Override public final Builder tags(Map tags) { this.tags = TagMapCopier.copy(tags); return this; } public final UrlEndpointInput.Builder getUrlEndpoint() { return urlEndpoint != null ? urlEndpoint.toBuilder() : null; } public final void setUrlEndpoint(UrlEndpointInput.BuilderImpl urlEndpoint) { this.urlEndpoint = urlEndpoint != null ? urlEndpoint.build() : null; } @Override public final Builder urlEndpoint(UrlEndpointInput urlEndpoint) { this.urlEndpoint = urlEndpoint; return this; } public final String getVpcId() { return vpcId; } public final void setVpcId(String vpcId) { this.vpcId = vpcId; } @Override public final Builder vpcId(String vpcId) { this.vpcId = vpcId; return this; } @Override public CreateServiceResponse build() { return new CreateServiceResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy