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

software.amazon.awssdk.services.costexplorer.model.CurrentInstance Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Cost Explorer module holds the client classes that are used for communicating with AWS Cost Explorer Service

There is a newer version: 2.28.4
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.costexplorer.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
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 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.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Context about the current instance. *

*/ @Generated("software.amazon.awssdk:codegen") public final class CurrentInstance implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField RESOURCE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ResourceId").getter(getter(CurrentInstance::resourceId)).setter(setter(Builder::resourceId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceId").build()).build(); private static final SdkField INSTANCE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("InstanceName").getter(getter(CurrentInstance::instanceName)).setter(setter(Builder::instanceName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceName").build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Tags") .getter(getter(CurrentInstance::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(TagValues::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField RESOURCE_DETAILS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ResourceDetails") .getter(getter(CurrentInstance::resourceDetails)).setter(setter(Builder::resourceDetails)) .constructor(ResourceDetails::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceDetails").build()).build(); private static final SdkField RESOURCE_UTILIZATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ResourceUtilization") .getter(getter(CurrentInstance::resourceUtilization)).setter(setter(Builder::resourceUtilization)) .constructor(ResourceUtilization::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceUtilization").build()) .build(); private static final SdkField RESERVATION_COVERED_HOURS_IN_LOOKBACK_PERIOD_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("ReservationCoveredHoursInLookbackPeriod") .getter(getter(CurrentInstance::reservationCoveredHoursInLookbackPeriod)) .setter(setter(Builder::reservationCoveredHoursInLookbackPeriod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("ReservationCoveredHoursInLookbackPeriod").build()).build(); private static final SdkField SAVINGS_PLANS_COVERED_HOURS_IN_LOOKBACK_PERIOD_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("SavingsPlansCoveredHoursInLookbackPeriod") .getter(getter(CurrentInstance::savingsPlansCoveredHoursInLookbackPeriod)) .setter(setter(Builder::savingsPlansCoveredHoursInLookbackPeriod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("SavingsPlansCoveredHoursInLookbackPeriod").build()).build(); private static final SdkField ON_DEMAND_HOURS_IN_LOOKBACK_PERIOD_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("OnDemandHoursInLookbackPeriod") .getter(getter(CurrentInstance::onDemandHoursInLookbackPeriod)) .setter(setter(Builder::onDemandHoursInLookbackPeriod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OnDemandHoursInLookbackPeriod") .build()).build(); private static final SdkField TOTAL_RUNNING_HOURS_IN_LOOKBACK_PERIOD_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("TotalRunningHoursInLookbackPeriod") .getter(getter(CurrentInstance::totalRunningHoursInLookbackPeriod)) .setter(setter(Builder::totalRunningHoursInLookbackPeriod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TotalRunningHoursInLookbackPeriod") .build()).build(); private static final SdkField MONTHLY_COST_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("MonthlyCost").getter(getter(CurrentInstance::monthlyCost)).setter(setter(Builder::monthlyCost)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MonthlyCost").build()).build(); private static final SdkField CURRENCY_CODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CurrencyCode").getter(getter(CurrentInstance::currencyCode)).setter(setter(Builder::currencyCode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CurrencyCode").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(RESOURCE_ID_FIELD, INSTANCE_NAME_FIELD, TAGS_FIELD, RESOURCE_DETAILS_FIELD, RESOURCE_UTILIZATION_FIELD, RESERVATION_COVERED_HOURS_IN_LOOKBACK_PERIOD_FIELD, SAVINGS_PLANS_COVERED_HOURS_IN_LOOKBACK_PERIOD_FIELD, ON_DEMAND_HOURS_IN_LOOKBACK_PERIOD_FIELD, TOTAL_RUNNING_HOURS_IN_LOOKBACK_PERIOD_FIELD, MONTHLY_COST_FIELD, CURRENCY_CODE_FIELD)); private static final long serialVersionUID = 1L; private final String resourceId; private final String instanceName; private final List tags; private final ResourceDetails resourceDetails; private final ResourceUtilization resourceUtilization; private final String reservationCoveredHoursInLookbackPeriod; private final String savingsPlansCoveredHoursInLookbackPeriod; private final String onDemandHoursInLookbackPeriod; private final String totalRunningHoursInLookbackPeriod; private final String monthlyCost; private final String currencyCode; private CurrentInstance(BuilderImpl builder) { this.resourceId = builder.resourceId; this.instanceName = builder.instanceName; this.tags = builder.tags; this.resourceDetails = builder.resourceDetails; this.resourceUtilization = builder.resourceUtilization; this.reservationCoveredHoursInLookbackPeriod = builder.reservationCoveredHoursInLookbackPeriod; this.savingsPlansCoveredHoursInLookbackPeriod = builder.savingsPlansCoveredHoursInLookbackPeriod; this.onDemandHoursInLookbackPeriod = builder.onDemandHoursInLookbackPeriod; this.totalRunningHoursInLookbackPeriod = builder.totalRunningHoursInLookbackPeriod; this.monthlyCost = builder.monthlyCost; this.currencyCode = builder.currencyCode; } /** *

* Resource ID of the current instance. *

* * @return Resource ID of the current instance. */ public final String resourceId() { return resourceId; } /** *

* The name that you given an instance. This field shows as blank if you haven't given the instance a name. *

* * @return The name that you given an instance. This field shows as blank if you haven't given the instance a name. */ public final String instanceName() { return instanceName; } /** * 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 SdkAutoConstructList); } /** *

* Cost allocation resource tags that are applied to the instance. *

*

* 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 Cost allocation resource tags that are applied to the instance. */ public final List tags() { return tags; } /** *

* Details about the resource and utilization. *

* * @return Details about the resource and utilization. */ public final ResourceDetails resourceDetails() { return resourceDetails; } /** *

* Utilization information of the current instance during the lookback period. *

* * @return Utilization information of the current instance during the lookback period. */ public final ResourceUtilization resourceUtilization() { return resourceUtilization; } /** *

* The number of hours during the lookback period that's covered by reservations. *

* * @return The number of hours during the lookback period that's covered by reservations. */ public final String reservationCoveredHoursInLookbackPeriod() { return reservationCoveredHoursInLookbackPeriod; } /** *

* The number of hours during the lookback period that's covered by Savings Plans. *

* * @return The number of hours during the lookback period that's covered by Savings Plans. */ public final String savingsPlansCoveredHoursInLookbackPeriod() { return savingsPlansCoveredHoursInLookbackPeriod; } /** *

* The number of hours during the lookback period that's billed at On-Demand rates. *

* * @return The number of hours during the lookback period that's billed at On-Demand rates. */ public final String onDemandHoursInLookbackPeriod() { return onDemandHoursInLookbackPeriod; } /** *

* The total number of hours that the instance ran during the lookback period. *

* * @return The total number of hours that the instance ran during the lookback period. */ public final String totalRunningHoursInLookbackPeriod() { return totalRunningHoursInLookbackPeriod; } /** *

* The current On-Demand cost of operating this instance on a monthly basis. *

* * @return The current On-Demand cost of operating this instance on a monthly basis. */ public final String monthlyCost() { return monthlyCost; } /** *

* The currency code that Amazon Web Services used to calculate the costs for this instance. *

* * @return The currency code that Amazon Web Services used to calculate the costs for this instance. */ public final String currencyCode() { return currencyCode; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(resourceId()); hashCode = 31 * hashCode + Objects.hashCode(instanceName()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(resourceDetails()); hashCode = 31 * hashCode + Objects.hashCode(resourceUtilization()); hashCode = 31 * hashCode + Objects.hashCode(reservationCoveredHoursInLookbackPeriod()); hashCode = 31 * hashCode + Objects.hashCode(savingsPlansCoveredHoursInLookbackPeriod()); hashCode = 31 * hashCode + Objects.hashCode(onDemandHoursInLookbackPeriod()); hashCode = 31 * hashCode + Objects.hashCode(totalRunningHoursInLookbackPeriod()); hashCode = 31 * hashCode + Objects.hashCode(monthlyCost()); hashCode = 31 * hashCode + Objects.hashCode(currencyCode()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CurrentInstance)) { return false; } CurrentInstance other = (CurrentInstance) obj; return Objects.equals(resourceId(), other.resourceId()) && Objects.equals(instanceName(), other.instanceName()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(resourceDetails(), other.resourceDetails()) && Objects.equals(resourceUtilization(), other.resourceUtilization()) && Objects.equals(reservationCoveredHoursInLookbackPeriod(), other.reservationCoveredHoursInLookbackPeriod()) && Objects.equals(savingsPlansCoveredHoursInLookbackPeriod(), other.savingsPlansCoveredHoursInLookbackPeriod()) && Objects.equals(onDemandHoursInLookbackPeriod(), other.onDemandHoursInLookbackPeriod()) && Objects.equals(totalRunningHoursInLookbackPeriod(), other.totalRunningHoursInLookbackPeriod()) && Objects.equals(monthlyCost(), other.monthlyCost()) && Objects.equals(currencyCode(), other.currencyCode()); } /** * 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("CurrentInstance").add("ResourceId", resourceId()).add("InstanceName", instanceName()) .add("Tags", hasTags() ? tags() : null).add("ResourceDetails", resourceDetails()) .add("ResourceUtilization", resourceUtilization()) .add("ReservationCoveredHoursInLookbackPeriod", reservationCoveredHoursInLookbackPeriod()) .add("SavingsPlansCoveredHoursInLookbackPeriod", savingsPlansCoveredHoursInLookbackPeriod()) .add("OnDemandHoursInLookbackPeriod", onDemandHoursInLookbackPeriod()) .add("TotalRunningHoursInLookbackPeriod", totalRunningHoursInLookbackPeriod()).add("MonthlyCost", monthlyCost()) .add("CurrencyCode", currencyCode()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ResourceId": return Optional.ofNullable(clazz.cast(resourceId())); case "InstanceName": return Optional.ofNullable(clazz.cast(instanceName())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "ResourceDetails": return Optional.ofNullable(clazz.cast(resourceDetails())); case "ResourceUtilization": return Optional.ofNullable(clazz.cast(resourceUtilization())); case "ReservationCoveredHoursInLookbackPeriod": return Optional.ofNullable(clazz.cast(reservationCoveredHoursInLookbackPeriod())); case "SavingsPlansCoveredHoursInLookbackPeriod": return Optional.ofNullable(clazz.cast(savingsPlansCoveredHoursInLookbackPeriod())); case "OnDemandHoursInLookbackPeriod": return Optional.ofNullable(clazz.cast(onDemandHoursInLookbackPeriod())); case "TotalRunningHoursInLookbackPeriod": return Optional.ofNullable(clazz.cast(totalRunningHoursInLookbackPeriod())); case "MonthlyCost": return Optional.ofNullable(clazz.cast(monthlyCost())); case "CurrencyCode": return Optional.ofNullable(clazz.cast(currencyCode())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CurrentInstance) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* Resource ID of the current instance. *

* * @param resourceId * Resource ID of the current instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceId(String resourceId); /** *

* The name that you given an instance. This field shows as blank if you haven't given the instance a name. *

* * @param instanceName * The name that you given an instance. This field shows as blank if you haven't given the instance a * name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceName(String instanceName); /** *

* Cost allocation resource tags that are applied to the instance. *

* * @param tags * Cost allocation resource tags that are applied to the instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* Cost allocation resource tags that are applied to the instance. *

* * @param tags * Cost allocation resource tags that are applied to the instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(TagValues... tags); /** *

* Cost allocation resource tags that are applied to the instance. *

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

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

* Details about the resource and utilization. *

* * @param resourceDetails * Details about the resource and utilization. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceDetails(ResourceDetails resourceDetails); /** *

* Details about the resource and utilization. *

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

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

* Utilization information of the current instance during the lookback period. *

* * @param resourceUtilization * Utilization information of the current instance during the lookback period. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceUtilization(ResourceUtilization resourceUtilization); /** *

* Utilization information of the current instance during the lookback period. *

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

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

* The number of hours during the lookback period that's covered by reservations. *

* * @param reservationCoveredHoursInLookbackPeriod * The number of hours during the lookback period that's covered by reservations. * @return Returns a reference to this object so that method calls can be chained together. */ Builder reservationCoveredHoursInLookbackPeriod(String reservationCoveredHoursInLookbackPeriod); /** *

* The number of hours during the lookback period that's covered by Savings Plans. *

* * @param savingsPlansCoveredHoursInLookbackPeriod * The number of hours during the lookback period that's covered by Savings Plans. * @return Returns a reference to this object so that method calls can be chained together. */ Builder savingsPlansCoveredHoursInLookbackPeriod(String savingsPlansCoveredHoursInLookbackPeriod); /** *

* The number of hours during the lookback period that's billed at On-Demand rates. *

* * @param onDemandHoursInLookbackPeriod * The number of hours during the lookback period that's billed at On-Demand rates. * @return Returns a reference to this object so that method calls can be chained together. */ Builder onDemandHoursInLookbackPeriod(String onDemandHoursInLookbackPeriod); /** *

* The total number of hours that the instance ran during the lookback period. *

* * @param totalRunningHoursInLookbackPeriod * The total number of hours that the instance ran during the lookback period. * @return Returns a reference to this object so that method calls can be chained together. */ Builder totalRunningHoursInLookbackPeriod(String totalRunningHoursInLookbackPeriod); /** *

* The current On-Demand cost of operating this instance on a monthly basis. *

* * @param monthlyCost * The current On-Demand cost of operating this instance on a monthly basis. * @return Returns a reference to this object so that method calls can be chained together. */ Builder monthlyCost(String monthlyCost); /** *

* The currency code that Amazon Web Services used to calculate the costs for this instance. *

* * @param currencyCode * The currency code that Amazon Web Services used to calculate the costs for this instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currencyCode(String currencyCode); } static final class BuilderImpl implements Builder { private String resourceId; private String instanceName; private List tags = DefaultSdkAutoConstructList.getInstance(); private ResourceDetails resourceDetails; private ResourceUtilization resourceUtilization; private String reservationCoveredHoursInLookbackPeriod; private String savingsPlansCoveredHoursInLookbackPeriod; private String onDemandHoursInLookbackPeriod; private String totalRunningHoursInLookbackPeriod; private String monthlyCost; private String currencyCode; private BuilderImpl() { } private BuilderImpl(CurrentInstance model) { resourceId(model.resourceId); instanceName(model.instanceName); tags(model.tags); resourceDetails(model.resourceDetails); resourceUtilization(model.resourceUtilization); reservationCoveredHoursInLookbackPeriod(model.reservationCoveredHoursInLookbackPeriod); savingsPlansCoveredHoursInLookbackPeriod(model.savingsPlansCoveredHoursInLookbackPeriod); onDemandHoursInLookbackPeriod(model.onDemandHoursInLookbackPeriod); totalRunningHoursInLookbackPeriod(model.totalRunningHoursInLookbackPeriod); monthlyCost(model.monthlyCost); currencyCode(model.currencyCode); } public final String getResourceId() { return resourceId; } public final void setResourceId(String resourceId) { this.resourceId = resourceId; } @Override public final Builder resourceId(String resourceId) { this.resourceId = resourceId; return this; } public final String getInstanceName() { return instanceName; } public final void setInstanceName(String instanceName) { this.instanceName = instanceName; } @Override public final Builder instanceName(String instanceName) { this.instanceName = instanceName; return this; } public final List getTags() { List result = TagValuesListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagValuesListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagValuesListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(TagValues... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> TagValues.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final ResourceDetails.Builder getResourceDetails() { return resourceDetails != null ? resourceDetails.toBuilder() : null; } public final void setResourceDetails(ResourceDetails.BuilderImpl resourceDetails) { this.resourceDetails = resourceDetails != null ? resourceDetails.build() : null; } @Override public final Builder resourceDetails(ResourceDetails resourceDetails) { this.resourceDetails = resourceDetails; return this; } public final ResourceUtilization.Builder getResourceUtilization() { return resourceUtilization != null ? resourceUtilization.toBuilder() : null; } public final void setResourceUtilization(ResourceUtilization.BuilderImpl resourceUtilization) { this.resourceUtilization = resourceUtilization != null ? resourceUtilization.build() : null; } @Override public final Builder resourceUtilization(ResourceUtilization resourceUtilization) { this.resourceUtilization = resourceUtilization; return this; } public final String getReservationCoveredHoursInLookbackPeriod() { return reservationCoveredHoursInLookbackPeriod; } public final void setReservationCoveredHoursInLookbackPeriod(String reservationCoveredHoursInLookbackPeriod) { this.reservationCoveredHoursInLookbackPeriod = reservationCoveredHoursInLookbackPeriod; } @Override public final Builder reservationCoveredHoursInLookbackPeriod(String reservationCoveredHoursInLookbackPeriod) { this.reservationCoveredHoursInLookbackPeriod = reservationCoveredHoursInLookbackPeriod; return this; } public final String getSavingsPlansCoveredHoursInLookbackPeriod() { return savingsPlansCoveredHoursInLookbackPeriod; } public final void setSavingsPlansCoveredHoursInLookbackPeriod(String savingsPlansCoveredHoursInLookbackPeriod) { this.savingsPlansCoveredHoursInLookbackPeriod = savingsPlansCoveredHoursInLookbackPeriod; } @Override public final Builder savingsPlansCoveredHoursInLookbackPeriod(String savingsPlansCoveredHoursInLookbackPeriod) { this.savingsPlansCoveredHoursInLookbackPeriod = savingsPlansCoveredHoursInLookbackPeriod; return this; } public final String getOnDemandHoursInLookbackPeriod() { return onDemandHoursInLookbackPeriod; } public final void setOnDemandHoursInLookbackPeriod(String onDemandHoursInLookbackPeriod) { this.onDemandHoursInLookbackPeriod = onDemandHoursInLookbackPeriod; } @Override public final Builder onDemandHoursInLookbackPeriod(String onDemandHoursInLookbackPeriod) { this.onDemandHoursInLookbackPeriod = onDemandHoursInLookbackPeriod; return this; } public final String getTotalRunningHoursInLookbackPeriod() { return totalRunningHoursInLookbackPeriod; } public final void setTotalRunningHoursInLookbackPeriod(String totalRunningHoursInLookbackPeriod) { this.totalRunningHoursInLookbackPeriod = totalRunningHoursInLookbackPeriod; } @Override public final Builder totalRunningHoursInLookbackPeriod(String totalRunningHoursInLookbackPeriod) { this.totalRunningHoursInLookbackPeriod = totalRunningHoursInLookbackPeriod; return this; } public final String getMonthlyCost() { return monthlyCost; } public final void setMonthlyCost(String monthlyCost) { this.monthlyCost = monthlyCost; } @Override public final Builder monthlyCost(String monthlyCost) { this.monthlyCost = monthlyCost; return this; } public final String getCurrencyCode() { return currencyCode; } public final void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } @Override public final Builder currencyCode(String currencyCode) { this.currencyCode = currencyCode; return this; } @Override public CurrentInstance build() { return new CurrentInstance(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy