Class CreditData
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<CreditData.Builder,CreditData>
Detailed information about an Amazon Web Services credit, including its identifier, type, monetary amounts, applicable products, sharing configuration, and current enabled status.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanWhether the owning account has account-level credit sharing turned on.final StringThe Amazon Web Services account ID that owns the credit.The names of Amazon Web Services services this credit applies to.final ApplicationTypeWhen the credit is applied during bill computation.final StringWhen the credit is applied during bill computation.static CreditData.Builderbuilder()final StringThe Amazon Resource Name (ARN) of the Cost Category controlling the credit's sharing scope.final StringThe display configuration for the credit in the Amazon Web Services Billing console.final StringcreditId()The unique identifier for the credit.final CreditSharingTypeThe sharing configuration for the credit.final StringThe sharing configuration for the credit.final CreditStatusWhether the credit participates in billing runs.final StringWhether the credit participates in billing runs.final StringThe type of credit.final StringA human-readable description of the credit.final InstantendDate()The date the credit expires, as Unix epoch seconds.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final AmountThe estimated remaining balance, including in-flight (open) bills that have not yet been finalized.final InstantThe date the credit balance reached zero, as Unix epoch seconds.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the ApplicableProductNames property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the PurchaseTypeApplications property.final booleanFor responses, this returns true if the service returned a value for the ShareableAccounts property.final AmountThe initial amount of the credit when it was issued.Restricts which purchase types this credit applies to.final AmountThe unused balance of the credit.final StringruleName()The rule name within the Cost Category.static Class<? extends CreditData.Builder> The Amazon Web Services account IDs entitled to apply this credit.final InstantThe date the credit becomes valid, as Unix epoch seconds.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
creditId
The unique identifier for the credit.
- Returns:
- The unique identifier for the credit.
-
accountId
The Amazon Web Services account ID that owns the credit.
- Returns:
- The Amazon Web Services account ID that owns the credit.
-
creditType
The type of credit. Examples:
Promotion,Refund,TrueUp.- Returns:
- The type of credit. Examples:
Promotion,Refund,TrueUp.
-
initialAmount
The initial amount of the credit when it was issued.
- Returns:
- The initial amount of the credit when it was issued.
-
remainingAmount
The unused balance of the credit.
- Returns:
- The unused balance of the credit.
-
estimatedAmount
The estimated remaining balance, including in-flight (open) bills that have not yet been finalized.
- Returns:
- The estimated remaining balance, including in-flight (open) bills that have not yet been finalized.
-
hasApplicableProductNames
public final boolean hasApplicableProductNames()For responses, this returns true if the service returned a value for the ApplicableProductNames property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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. -
applicableProductNames
The names of Amazon Web Services services this credit applies to.
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
hasApplicableProductNames()method.- Returns:
- The names of Amazon Web Services services this credit applies to.
-
description
A human-readable description of the credit.
- Returns:
- A human-readable description of the credit.
-
startDate
The date the credit becomes valid, as Unix epoch seconds.
- Returns:
- The date the credit becomes valid, as Unix epoch seconds.
-
endDate
The date the credit expires, as Unix epoch seconds.
- Returns:
- The date the credit expires, as Unix epoch seconds.
-
exhaustDate
The date the credit balance reached zero, as Unix epoch seconds.
- Returns:
- The date the credit balance reached zero, as Unix epoch seconds.
-
applicationType
When the credit is applied during bill computation. Valid values:
BEFORE_CROSS_SERVICE_DISCOUNTS,AFTER_DISCOUNTS.If the service returns an enum value that is not available in the current SDK version,
applicationTypewill returnApplicationType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromapplicationTypeAsString().- Returns:
- When the credit is applied during bill computation. Valid values:
BEFORE_CROSS_SERVICE_DISCOUNTS,AFTER_DISCOUNTS. - See Also:
-
applicationTypeAsString
When the credit is applied during bill computation. Valid values:
BEFORE_CROSS_SERVICE_DISCOUNTS,AFTER_DISCOUNTS.If the service returns an enum value that is not available in the current SDK version,
applicationTypewill returnApplicationType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromapplicationTypeAsString().- Returns:
- When the credit is applied during bill computation. Valid values:
BEFORE_CROSS_SERVICE_DISCOUNTS,AFTER_DISCOUNTS. - See Also:
-
accountHasCreditSharingEnabled
Whether the owning account has account-level credit sharing turned on.
- Returns:
- Whether the owning account has account-level credit sharing turned on.
-
creditConsoleVisibility
The display configuration for the credit in the Amazon Web Services Billing console.
- Returns:
- The display configuration for the credit in the Amazon Web Services Billing console.
-
creditSharingType
The sharing configuration for the credit. Valid values:
DEFAULT,DISABLED,CUSTOM,COST_CATEGORY_RULE.If the service returns an enum value that is not available in the current SDK version,
creditSharingTypewill returnCreditSharingType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcreditSharingTypeAsString().- Returns:
- The sharing configuration for the credit. Valid values:
DEFAULT,DISABLED,CUSTOM,COST_CATEGORY_RULE. - See Also:
-
creditSharingTypeAsString
The sharing configuration for the credit. Valid values:
DEFAULT,DISABLED,CUSTOM,COST_CATEGORY_RULE.If the service returns an enum value that is not available in the current SDK version,
creditSharingTypewill returnCreditSharingType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcreditSharingTypeAsString().- Returns:
- The sharing configuration for the credit. Valid values:
DEFAULT,DISABLED,CUSTOM,COST_CATEGORY_RULE. - See Also:
-
costCategoryArn
The Amazon Resource Name (ARN) of the Cost Category controlling the credit's sharing scope. Present only when
creditSharingTypeisCOST_CATEGORY_RULE.- Returns:
- The Amazon Resource Name (ARN) of the Cost Category controlling the credit's sharing scope. Present only
when
creditSharingTypeisCOST_CATEGORY_RULE.
-
ruleName
The rule name within the Cost Category. Present only when
creditSharingTypeisCOST_CATEGORY_RULE.- Returns:
- The rule name within the Cost Category. Present only when
creditSharingTypeisCOST_CATEGORY_RULE.
-
creditStatus
Whether the credit participates in billing runs. Valid values:
ENABLED,DISABLED.If the service returns an enum value that is not available in the current SDK version,
creditStatuswill returnCreditStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcreditStatusAsString().- Returns:
- Whether the credit participates in billing runs. Valid values:
ENABLED,DISABLED. - See Also:
-
creditStatusAsString
Whether the credit participates in billing runs. Valid values:
ENABLED,DISABLED.If the service returns an enum value that is not available in the current SDK version,
creditStatuswill returnCreditStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcreditStatusAsString().- Returns:
- Whether the credit participates in billing runs. Valid values:
ENABLED,DISABLED. - See Also:
-
hasPurchaseTypeApplications
public final boolean hasPurchaseTypeApplications()For responses, this returns true if the service returned a value for the PurchaseTypeApplications property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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. -
purchaseTypeApplications
Restricts which purchase types this credit applies to. When
nullor omitted, the credit applies to all purchase types.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
hasPurchaseTypeApplications()method.- Returns:
- Restricts which purchase types this credit applies to. When
nullor omitted, the credit applies to all purchase types.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<CreditData.Builder,CreditData> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-