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

software.amazon.awssdk.services.arczonalshift.model.GetManagedResourceResponse Maven / Gradle / Ivy

Go to download

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

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

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
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 java.util.stream.Collectors;
import java.util.stream.Stream;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
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 GetManagedResourceResponse extends ArcZonalShiftResponse implements
        ToCopyableBuilder {
    private static final SdkField> APPLIED_WEIGHTS_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("appliedWeights")
            .getter(getter(GetManagedResourceResponse::appliedWeights))
            .setter(setter(Builder::appliedWeights))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("appliedWeights").build(),
                    MapTrait.builder()
                            .keyLocationName("key")
                            .valueLocationName("value")
                            .valueFieldInfo(
                                    SdkField. builder(MarshallingType.FLOAT)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("value").build()).build()).build()).build();

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

    private static final SdkField> AUTOSHIFTS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("autoshifts")
            .getter(getter(GetManagedResourceResponse::autoshifts))
            .setter(setter(Builder::autoshifts))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("autoshifts").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(AutoshiftInResource::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

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

    private static final SdkField PRACTICE_RUN_CONFIGURATION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("practiceRunConfiguration")
            .getter(getter(GetManagedResourceResponse::practiceRunConfiguration))
            .setter(setter(Builder::practiceRunConfiguration)).constructor(PracticeRunConfiguration::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("practiceRunConfiguration").build())
            .build();

    private static final SdkField ZONAL_AUTOSHIFT_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("zonalAutoshiftStatus").getter(getter(GetManagedResourceResponse::zonalAutoshiftStatusAsString))
            .setter(setter(Builder::zonalAutoshiftStatus))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("zonalAutoshiftStatus").build())
            .build();

    private static final SdkField> ZONAL_SHIFTS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("zonalShifts")
            .getter(getter(GetManagedResourceResponse::zonalShifts))
            .setter(setter(Builder::zonalShifts))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("zonalShifts").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(ZonalShiftInResource::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(APPLIED_WEIGHTS_FIELD,
            ARN_FIELD, AUTOSHIFTS_FIELD, NAME_FIELD, PRACTICE_RUN_CONFIGURATION_FIELD, ZONAL_AUTOSHIFT_STATUS_FIELD,
            ZONAL_SHIFTS_FIELD));

    private final Map appliedWeights;

    private final String arn;

    private final List autoshifts;

    private final String name;

    private final PracticeRunConfiguration practiceRunConfiguration;

    private final String zonalAutoshiftStatus;

    private final List zonalShifts;

    private GetManagedResourceResponse(BuilderImpl builder) {
        super(builder);
        this.appliedWeights = builder.appliedWeights;
        this.arn = builder.arn;
        this.autoshifts = builder.autoshifts;
        this.name = builder.name;
        this.practiceRunConfiguration = builder.practiceRunConfiguration;
        this.zonalAutoshiftStatus = builder.zonalAutoshiftStatus;
        this.zonalShifts = builder.zonalShifts;
    }

    /**
     * For responses, this returns true if the service returned a value for the AppliedWeights 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 hasAppliedWeights() {
        return appliedWeights != null && !(appliedWeights instanceof SdkAutoConstructMap);
    }

    /**
     * 

* A collection of key-value pairs that indicate whether resources are active in Availability Zones or not. The key * name is the Availability Zone where the resource is deployed. The value is 1 or 0. *

*

* 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 #hasAppliedWeights} method. *

* * @return A collection of key-value pairs that indicate whether resources are active in Availability Zones or not. * The key name is the Availability Zone where the resource is deployed. The value is 1 or 0. */ public final Map appliedWeights() { return appliedWeights; } /** *

* The Amazon Resource Name (ARN) for the resource. *

* * @return The Amazon Resource Name (ARN) for the resource. */ public final String arn() { return arn; } /** * For responses, this returns true if the service returned a value for the Autoshifts 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 hasAutoshifts() { return autoshifts != null && !(autoshifts instanceof SdkAutoConstructList); } /** *

* An array of the autoshifts that are active for the resource. *

*

* 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 #hasAutoshifts} method. *

* * @return An array of the autoshifts that are active for the resource. */ public final List autoshifts() { return autoshifts; } /** *

* The name of the resource. *

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

* The practice run configuration for zonal autoshift that's associated with the resource. *

* * @return The practice run configuration for zonal autoshift that's associated with the resource. */ public final PracticeRunConfiguration practiceRunConfiguration() { return practiceRunConfiguration; } /** *

* The status for zonal autoshift for a resource. When the autoshift status is ENABLED, Amazon Web * Services shifts traffic for a resource away from an Availability Zone, on your behalf, when Amazon Web Services * determines that there's an issue in the Availability Zone that could potentially affect customers. *

*

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

* * @return The status for zonal autoshift for a resource. When the autoshift status is ENABLED, Amazon * Web Services shifts traffic for a resource away from an Availability Zone, on your behalf, when Amazon * Web Services determines that there's an issue in the Availability Zone that could potentially affect * customers. * @see ZonalAutoshiftStatus */ public final ZonalAutoshiftStatus zonalAutoshiftStatus() { return ZonalAutoshiftStatus.fromValue(zonalAutoshiftStatus); } /** *

* The status for zonal autoshift for a resource. When the autoshift status is ENABLED, Amazon Web * Services shifts traffic for a resource away from an Availability Zone, on your behalf, when Amazon Web Services * determines that there's an issue in the Availability Zone that could potentially affect customers. *

*

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

* * @return The status for zonal autoshift for a resource. When the autoshift status is ENABLED, Amazon * Web Services shifts traffic for a resource away from an Availability Zone, on your behalf, when Amazon * Web Services determines that there's an issue in the Availability Zone that could potentially affect * customers. * @see ZonalAutoshiftStatus */ public final String zonalAutoshiftStatusAsString() { return zonalAutoshiftStatus; } /** * For responses, this returns true if the service returned a value for the ZonalShifts 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 hasZonalShifts() { return zonalShifts != null && !(zonalShifts instanceof SdkAutoConstructList); } /** *

* The zonal shifts that are currently active for a resource. *

*

* 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 #hasZonalShifts} method. *

* * @return The zonal shifts that are currently active for a resource. */ public final List zonalShifts() { return zonalShifts; } @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(hasAppliedWeights() ? appliedWeights() : null); hashCode = 31 * hashCode + Objects.hashCode(arn()); hashCode = 31 * hashCode + Objects.hashCode(hasAutoshifts() ? autoshifts() : null); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(practiceRunConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(zonalAutoshiftStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasZonalShifts() ? zonalShifts() : null); 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 GetManagedResourceResponse)) { return false; } GetManagedResourceResponse other = (GetManagedResourceResponse) obj; return hasAppliedWeights() == other.hasAppliedWeights() && Objects.equals(appliedWeights(), other.appliedWeights()) && Objects.equals(arn(), other.arn()) && hasAutoshifts() == other.hasAutoshifts() && Objects.equals(autoshifts(), other.autoshifts()) && Objects.equals(name(), other.name()) && Objects.equals(practiceRunConfiguration(), other.practiceRunConfiguration()) && Objects.equals(zonalAutoshiftStatusAsString(), other.zonalAutoshiftStatusAsString()) && hasZonalShifts() == other.hasZonalShifts() && Objects.equals(zonalShifts(), other.zonalShifts()); } /** * 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("GetManagedResourceResponse") .add("AppliedWeights", hasAppliedWeights() ? appliedWeights() : null).add("Arn", arn()) .add("Autoshifts", hasAutoshifts() ? autoshifts() : null).add("Name", name()) .add("PracticeRunConfiguration", practiceRunConfiguration()) .add("ZonalAutoshiftStatus", zonalAutoshiftStatusAsString()) .add("ZonalShifts", hasZonalShifts() ? zonalShifts() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "appliedWeights": return Optional.ofNullable(clazz.cast(appliedWeights())); case "arn": return Optional.ofNullable(clazz.cast(arn())); case "autoshifts": return Optional.ofNullable(clazz.cast(autoshifts())); case "name": return Optional.ofNullable(clazz.cast(name())); case "practiceRunConfiguration": return Optional.ofNullable(clazz.cast(practiceRunConfiguration())); case "zonalAutoshiftStatus": return Optional.ofNullable(clazz.cast(zonalAutoshiftStatusAsString())); case "zonalShifts": return Optional.ofNullable(clazz.cast(zonalShifts())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((GetManagedResourceResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends ArcZonalShiftResponse.Builder, SdkPojo, CopyableBuilder { /** *

* A collection of key-value pairs that indicate whether resources are active in Availability Zones or not. The * key name is the Availability Zone where the resource is deployed. The value is 1 or 0. *

* * @param appliedWeights * A collection of key-value pairs that indicate whether resources are active in Availability Zones or * not. The key name is the Availability Zone where the resource is deployed. The value is 1 or 0. * @return Returns a reference to this object so that method calls can be chained together. */ Builder appliedWeights(Map appliedWeights); /** *

* The Amazon Resource Name (ARN) for the resource. *

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

* An array of the autoshifts that are active for the resource. *

* * @param autoshifts * An array of the autoshifts that are active for the resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoshifts(Collection autoshifts); /** *

* An array of the autoshifts that are active for the resource. *

* * @param autoshifts * An array of the autoshifts that are active for the resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoshifts(AutoshiftInResource... autoshifts); /** *

* An array of the autoshifts that are active for the resource. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.arczonalshift.model.AutoshiftInResource.Builder} avoiding the need to * create one manually via * {@link software.amazon.awssdk.services.arczonalshift.model.AutoshiftInResource#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.arczonalshift.model.AutoshiftInResource.Builder#build()} is called * immediately and its result is passed to {@link #autoshifts(List)}. * * @param autoshifts * a consumer that will call methods on * {@link software.amazon.awssdk.services.arczonalshift.model.AutoshiftInResource.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #autoshifts(java.util.Collection) */ Builder autoshifts(Consumer... autoshifts); /** *

* The name of the resource. *

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

* The practice run configuration for zonal autoshift that's associated with the resource. *

* * @param practiceRunConfiguration * The practice run configuration for zonal autoshift that's associated with the resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder practiceRunConfiguration(PracticeRunConfiguration practiceRunConfiguration); /** *

* The practice run configuration for zonal autoshift that's associated with the resource. *

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

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

* The status for zonal autoshift for a resource. When the autoshift status is ENABLED, Amazon Web * Services shifts traffic for a resource away from an Availability Zone, on your behalf, when Amazon Web * Services determines that there's an issue in the Availability Zone that could potentially affect customers. *

* * @param zonalAutoshiftStatus * The status for zonal autoshift for a resource. When the autoshift status is ENABLED, * Amazon Web Services shifts traffic for a resource away from an Availability Zone, on your behalf, when * Amazon Web Services determines that there's an issue in the Availability Zone that could potentially * affect customers. * @see ZonalAutoshiftStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ZonalAutoshiftStatus */ Builder zonalAutoshiftStatus(String zonalAutoshiftStatus); /** *

* The status for zonal autoshift for a resource. When the autoshift status is ENABLED, Amazon Web * Services shifts traffic for a resource away from an Availability Zone, on your behalf, when Amazon Web * Services determines that there's an issue in the Availability Zone that could potentially affect customers. *

* * @param zonalAutoshiftStatus * The status for zonal autoshift for a resource. When the autoshift status is ENABLED, * Amazon Web Services shifts traffic for a resource away from an Availability Zone, on your behalf, when * Amazon Web Services determines that there's an issue in the Availability Zone that could potentially * affect customers. * @see ZonalAutoshiftStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ZonalAutoshiftStatus */ Builder zonalAutoshiftStatus(ZonalAutoshiftStatus zonalAutoshiftStatus); /** *

* The zonal shifts that are currently active for a resource. *

* * @param zonalShifts * The zonal shifts that are currently active for a resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder zonalShifts(Collection zonalShifts); /** *

* The zonal shifts that are currently active for a resource. *

* * @param zonalShifts * The zonal shifts that are currently active for a resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder zonalShifts(ZonalShiftInResource... zonalShifts); /** *

* The zonal shifts that are currently active for a resource. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.arczonalshift.model.ZonalShiftInResource.Builder} avoiding the need to * create one manually via * {@link software.amazon.awssdk.services.arczonalshift.model.ZonalShiftInResource#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.arczonalshift.model.ZonalShiftInResource.Builder#build()} is called * immediately and its result is passed to {@link #zonalShifts(List)}. * * @param zonalShifts * a consumer that will call methods on * {@link software.amazon.awssdk.services.arczonalshift.model.ZonalShiftInResource.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #zonalShifts(java.util.Collection) */ Builder zonalShifts(Consumer... zonalShifts); } static final class BuilderImpl extends ArcZonalShiftResponse.BuilderImpl implements Builder { private Map appliedWeights = DefaultSdkAutoConstructMap.getInstance(); private String arn; private List autoshifts = DefaultSdkAutoConstructList.getInstance(); private String name; private PracticeRunConfiguration practiceRunConfiguration; private String zonalAutoshiftStatus; private List zonalShifts = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(GetManagedResourceResponse model) { super(model); appliedWeights(model.appliedWeights); arn(model.arn); autoshifts(model.autoshifts); name(model.name); practiceRunConfiguration(model.practiceRunConfiguration); zonalAutoshiftStatus(model.zonalAutoshiftStatus); zonalShifts(model.zonalShifts); } public final Map getAppliedWeights() { if (appliedWeights instanceof SdkAutoConstructMap) { return null; } return appliedWeights; } public final void setAppliedWeights(Map appliedWeights) { this.appliedWeights = AppliedWeightsCopier.copy(appliedWeights); } @Override public final Builder appliedWeights(Map appliedWeights) { this.appliedWeights = AppliedWeightsCopier.copy(appliedWeights); 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 List getAutoshifts() { List result = AutoshiftsInResourceCopier.copyToBuilder(this.autoshifts); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setAutoshifts(Collection autoshifts) { this.autoshifts = AutoshiftsInResourceCopier.copyFromBuilder(autoshifts); } @Override public final Builder autoshifts(Collection autoshifts) { this.autoshifts = AutoshiftsInResourceCopier.copy(autoshifts); return this; } @Override @SafeVarargs public final Builder autoshifts(AutoshiftInResource... autoshifts) { autoshifts(Arrays.asList(autoshifts)); return this; } @Override @SafeVarargs public final Builder autoshifts(Consumer... autoshifts) { autoshifts(Stream.of(autoshifts).map(c -> AutoshiftInResource.builder().applyMutation(c).build()) .collect(Collectors.toList())); 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 PracticeRunConfiguration.Builder getPracticeRunConfiguration() { return practiceRunConfiguration != null ? practiceRunConfiguration.toBuilder() : null; } public final void setPracticeRunConfiguration(PracticeRunConfiguration.BuilderImpl practiceRunConfiguration) { this.practiceRunConfiguration = practiceRunConfiguration != null ? practiceRunConfiguration.build() : null; } @Override public final Builder practiceRunConfiguration(PracticeRunConfiguration practiceRunConfiguration) { this.practiceRunConfiguration = practiceRunConfiguration; return this; } public final String getZonalAutoshiftStatus() { return zonalAutoshiftStatus; } public final void setZonalAutoshiftStatus(String zonalAutoshiftStatus) { this.zonalAutoshiftStatus = zonalAutoshiftStatus; } @Override public final Builder zonalAutoshiftStatus(String zonalAutoshiftStatus) { this.zonalAutoshiftStatus = zonalAutoshiftStatus; return this; } @Override public final Builder zonalAutoshiftStatus(ZonalAutoshiftStatus zonalAutoshiftStatus) { this.zonalAutoshiftStatus(zonalAutoshiftStatus == null ? null : zonalAutoshiftStatus.toString()); return this; } public final List getZonalShifts() { List result = ZonalShiftsInResourceCopier.copyToBuilder(this.zonalShifts); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setZonalShifts(Collection zonalShifts) { this.zonalShifts = ZonalShiftsInResourceCopier.copyFromBuilder(zonalShifts); } @Override public final Builder zonalShifts(Collection zonalShifts) { this.zonalShifts = ZonalShiftsInResourceCopier.copy(zonalShifts); return this; } @Override @SafeVarargs public final Builder zonalShifts(ZonalShiftInResource... zonalShifts) { zonalShifts(Arrays.asList(zonalShifts)); return this; } @Override @SafeVarargs public final Builder zonalShifts(Consumer... zonalShifts) { zonalShifts(Stream.of(zonalShifts).map(c -> ZonalShiftInResource.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } @Override public GetManagedResourceResponse build() { return new GetManagedResourceResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy