Class OfferTerm

java.lang.Object
software.amazon.awssdk.services.marketplacediscovery.model.OfferTerm
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<OfferTerm.Builder,OfferTerm>

@Generated("software.amazon.awssdk:codegen") public final class OfferTerm extends Object implements SdkPojo, Serializable, ToCopyableBuilder<OfferTerm.Builder,OfferTerm>

A term attached to an offer. Each element contains exactly one term type, such as a pricing term, legal term, or payment schedule term.

See Also:
  • Method Details

    • byolPricingTerm

      public final ByolPricingTerm byolPricingTerm()
      Returns the value of the ByolPricingTerm property for this object.
      Returns:
      The value of the ByolPricingTerm property for this object.
    • configurableUpfrontPricingTerm

      public final ConfigurableUpfrontPricingTerm configurableUpfrontPricingTerm()
      Returns the value of the ConfigurableUpfrontPricingTerm property for this object.
      Returns:
      The value of the ConfigurableUpfrontPricingTerm property for this object.
    • fixedUpfrontPricingTerm

      public final FixedUpfrontPricingTerm fixedUpfrontPricingTerm()
      Returns the value of the FixedUpfrontPricingTerm property for this object.
      Returns:
      The value of the FixedUpfrontPricingTerm property for this object.
    • freeTrialPricingTerm

      public final FreeTrialPricingTerm freeTrialPricingTerm()
      Returns the value of the FreeTrialPricingTerm property for this object.
      Returns:
      The value of the FreeTrialPricingTerm property for this object.
    • legalTerm

      public final LegalTerm legalTerm()
      Returns the value of the LegalTerm property for this object.
      Returns:
      The value of the LegalTerm property for this object.
    • paymentScheduleTerm

      public final PaymentScheduleTerm paymentScheduleTerm()
      Returns the value of the PaymentScheduleTerm property for this object.
      Returns:
      The value of the PaymentScheduleTerm property for this object.
    • recurringPaymentTerm

      public final RecurringPaymentTerm recurringPaymentTerm()
      Returns the value of the RecurringPaymentTerm property for this object.
      Returns:
      The value of the RecurringPaymentTerm property for this object.
    • renewalTerm

      public final RenewalTerm renewalTerm()
      Returns the value of the RenewalTerm property for this object.
      Returns:
      The value of the RenewalTerm property for this object.
    • supportTerm

      public final SupportTerm supportTerm()
      Returns the value of the SupportTerm property for this object.
      Returns:
      The value of the SupportTerm property for this object.
    • usageBasedPricingTerm

      public final UsageBasedPricingTerm usageBasedPricingTerm()
      Returns the value of the UsageBasedPricingTerm property for this object.
      Returns:
      The value of the UsageBasedPricingTerm property for this object.
    • validityTerm

      public final ValidityTerm validityTerm()
      Returns the value of the ValidityTerm property for this object.
      Returns:
      The value of the ValidityTerm property for this object.
    • variablePaymentTerm

      public final VariablePaymentTerm variablePaymentTerm()
      Returns the value of the VariablePaymentTerm property for this object.
      Returns:
      The value of the VariablePaymentTerm property for this object.
    • toBuilder

      public OfferTerm.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<OfferTerm.Builder,OfferTerm>
      Returns:
      a builder for type T
    • builder

      public static OfferTerm.Builder builder()
    • serializableBuilderClass

      public static Class<? extends OfferTerm.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • fromByolPricingTerm

      public static OfferTerm fromByolPricingTerm(ByolPricingTerm byolPricingTerm)
      Create an instance of this class with byolPricingTerm() initialized to the given value. Sets the value of the ByolPricingTerm property for this object.
      Parameters:
      byolPricingTerm - The new value for the ByolPricingTerm property for this object.
    • fromByolPricingTerm

      public static OfferTerm fromByolPricingTerm(Consumer<ByolPricingTerm.Builder> byolPricingTerm)
      Create an instance of this class with byolPricingTerm() initialized to the given value. Sets the value of the ByolPricingTerm property for this object.
      Parameters:
      byolPricingTerm - The new value for the ByolPricingTerm property for this object.
    • fromConfigurableUpfrontPricingTerm

      public static OfferTerm fromConfigurableUpfrontPricingTerm(ConfigurableUpfrontPricingTerm configurableUpfrontPricingTerm)
      Create an instance of this class with configurableUpfrontPricingTerm() initialized to the given value. Sets the value of the ConfigurableUpfrontPricingTerm property for this object.
      Parameters:
      configurableUpfrontPricingTerm - The new value for the ConfigurableUpfrontPricingTerm property for this object.
    • fromConfigurableUpfrontPricingTerm

      public static OfferTerm fromConfigurableUpfrontPricingTerm(Consumer<ConfigurableUpfrontPricingTerm.Builder> configurableUpfrontPricingTerm)
      Create an instance of this class with configurableUpfrontPricingTerm() initialized to the given value. Sets the value of the ConfigurableUpfrontPricingTerm property for this object.
      Parameters:
      configurableUpfrontPricingTerm - The new value for the ConfigurableUpfrontPricingTerm property for this object.
    • fromFixedUpfrontPricingTerm

      public static OfferTerm fromFixedUpfrontPricingTerm(FixedUpfrontPricingTerm fixedUpfrontPricingTerm)
      Create an instance of this class with fixedUpfrontPricingTerm() initialized to the given value. Sets the value of the FixedUpfrontPricingTerm property for this object.
      Parameters:
      fixedUpfrontPricingTerm - The new value for the FixedUpfrontPricingTerm property for this object.
    • fromFixedUpfrontPricingTerm

      public static OfferTerm fromFixedUpfrontPricingTerm(Consumer<FixedUpfrontPricingTerm.Builder> fixedUpfrontPricingTerm)
      Create an instance of this class with fixedUpfrontPricingTerm() initialized to the given value. Sets the value of the FixedUpfrontPricingTerm property for this object.
      Parameters:
      fixedUpfrontPricingTerm - The new value for the FixedUpfrontPricingTerm property for this object.
    • fromFreeTrialPricingTerm

      public static OfferTerm fromFreeTrialPricingTerm(FreeTrialPricingTerm freeTrialPricingTerm)
      Create an instance of this class with freeTrialPricingTerm() initialized to the given value. Sets the value of the FreeTrialPricingTerm property for this object.
      Parameters:
      freeTrialPricingTerm - The new value for the FreeTrialPricingTerm property for this object.
    • fromFreeTrialPricingTerm

      public static OfferTerm fromFreeTrialPricingTerm(Consumer<FreeTrialPricingTerm.Builder> freeTrialPricingTerm)
      Create an instance of this class with freeTrialPricingTerm() initialized to the given value. Sets the value of the FreeTrialPricingTerm property for this object.
      Parameters:
      freeTrialPricingTerm - The new value for the FreeTrialPricingTerm property for this object.
    • fromLegalTerm

      public static OfferTerm fromLegalTerm(LegalTerm legalTerm)
      Create an instance of this class with legalTerm() initialized to the given value. Sets the value of the LegalTerm property for this object.
      Parameters:
      legalTerm - The new value for the LegalTerm property for this object.
    • fromLegalTerm

      public static OfferTerm fromLegalTerm(Consumer<LegalTerm.Builder> legalTerm)
      Create an instance of this class with legalTerm() initialized to the given value. Sets the value of the LegalTerm property for this object.
      Parameters:
      legalTerm - The new value for the LegalTerm property for this object.
    • fromPaymentScheduleTerm

      public static OfferTerm fromPaymentScheduleTerm(PaymentScheduleTerm paymentScheduleTerm)
      Create an instance of this class with paymentScheduleTerm() initialized to the given value. Sets the value of the PaymentScheduleTerm property for this object.
      Parameters:
      paymentScheduleTerm - The new value for the PaymentScheduleTerm property for this object.
    • fromPaymentScheduleTerm

      public static OfferTerm fromPaymentScheduleTerm(Consumer<PaymentScheduleTerm.Builder> paymentScheduleTerm)
      Create an instance of this class with paymentScheduleTerm() initialized to the given value. Sets the value of the PaymentScheduleTerm property for this object.
      Parameters:
      paymentScheduleTerm - The new value for the PaymentScheduleTerm property for this object.
    • fromRecurringPaymentTerm

      public static OfferTerm fromRecurringPaymentTerm(RecurringPaymentTerm recurringPaymentTerm)
      Create an instance of this class with recurringPaymentTerm() initialized to the given value. Sets the value of the RecurringPaymentTerm property for this object.
      Parameters:
      recurringPaymentTerm - The new value for the RecurringPaymentTerm property for this object.
    • fromRecurringPaymentTerm

      public static OfferTerm fromRecurringPaymentTerm(Consumer<RecurringPaymentTerm.Builder> recurringPaymentTerm)
      Create an instance of this class with recurringPaymentTerm() initialized to the given value. Sets the value of the RecurringPaymentTerm property for this object.
      Parameters:
      recurringPaymentTerm - The new value for the RecurringPaymentTerm property for this object.
    • fromRenewalTerm

      public static OfferTerm fromRenewalTerm(RenewalTerm renewalTerm)
      Create an instance of this class with renewalTerm() initialized to the given value. Sets the value of the RenewalTerm property for this object.
      Parameters:
      renewalTerm - The new value for the RenewalTerm property for this object.
    • fromRenewalTerm

      public static OfferTerm fromRenewalTerm(Consumer<RenewalTerm.Builder> renewalTerm)
      Create an instance of this class with renewalTerm() initialized to the given value. Sets the value of the RenewalTerm property for this object.
      Parameters:
      renewalTerm - The new value for the RenewalTerm property for this object.
    • fromSupportTerm

      public static OfferTerm fromSupportTerm(SupportTerm supportTerm)
      Create an instance of this class with supportTerm() initialized to the given value. Sets the value of the SupportTerm property for this object.
      Parameters:
      supportTerm - The new value for the SupportTerm property for this object.
    • fromSupportTerm

      public static OfferTerm fromSupportTerm(Consumer<SupportTerm.Builder> supportTerm)
      Create an instance of this class with supportTerm() initialized to the given value. Sets the value of the SupportTerm property for this object.
      Parameters:
      supportTerm - The new value for the SupportTerm property for this object.
    • fromUsageBasedPricingTerm

      public static OfferTerm fromUsageBasedPricingTerm(UsageBasedPricingTerm usageBasedPricingTerm)
      Create an instance of this class with usageBasedPricingTerm() initialized to the given value. Sets the value of the UsageBasedPricingTerm property for this object.
      Parameters:
      usageBasedPricingTerm - The new value for the UsageBasedPricingTerm property for this object.
    • fromUsageBasedPricingTerm

      public static OfferTerm fromUsageBasedPricingTerm(Consumer<UsageBasedPricingTerm.Builder> usageBasedPricingTerm)
      Create an instance of this class with usageBasedPricingTerm() initialized to the given value. Sets the value of the UsageBasedPricingTerm property for this object.
      Parameters:
      usageBasedPricingTerm - The new value for the UsageBasedPricingTerm property for this object.
    • fromValidityTerm

      public static OfferTerm fromValidityTerm(ValidityTerm validityTerm)
      Create an instance of this class with validityTerm() initialized to the given value. Sets the value of the ValidityTerm property for this object.
      Parameters:
      validityTerm - The new value for the ValidityTerm property for this object.
    • fromValidityTerm

      public static OfferTerm fromValidityTerm(Consumer<ValidityTerm.Builder> validityTerm)
      Create an instance of this class with validityTerm() initialized to the given value. Sets the value of the ValidityTerm property for this object.
      Parameters:
      validityTerm - The new value for the ValidityTerm property for this object.
    • fromVariablePaymentTerm

      public static OfferTerm fromVariablePaymentTerm(VariablePaymentTerm variablePaymentTerm)
      Create an instance of this class with variablePaymentTerm() initialized to the given value. Sets the value of the VariablePaymentTerm property for this object.
      Parameters:
      variablePaymentTerm - The new value for the VariablePaymentTerm property for this object.
    • fromVariablePaymentTerm

      public static OfferTerm fromVariablePaymentTerm(Consumer<VariablePaymentTerm.Builder> variablePaymentTerm)
      Create an instance of this class with variablePaymentTerm() initialized to the given value. Sets the value of the VariablePaymentTerm property for this object.
      Parameters:
      variablePaymentTerm - The new value for the VariablePaymentTerm property for this object.
    • type

      public OfferTerm.Type type()
      Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will be OfferTerm.Type.UNKNOWN_TO_SDK_VERSION if the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will be OfferTerm.Type.UNKNOWN_TO_SDK_VERSION if zero members are set, and null if more than one member is set.
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.