Class FeedPricesDiscountsInner


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               comments="Generator version: 7.4.0")
    public class FeedPricesDiscountsInner
    extends AbstractOpenApiSchema
    • Constructor Detail

      • FeedPricesDiscountsInner

        public FeedPricesDiscountsInner()
    • Method Detail

      • setActualInstance

        public void setActualInstance​(Object instance)
        Set the instance that matches the anyOf child schema, check the instance parameter is valid against the anyOf child schemas: DiscountsFinalPrice, DiscountsPercentage

        It could be an instance of the 'anyOf' schemas.

        Overrides:
        setActualInstance in class AbstractOpenApiSchema
        Parameters:
        instance - the actual instance of the schema/object
      • getActualInstance

        public Object getActualInstance()
        Get the actual instance, which can be the following: DiscountsFinalPrice, DiscountsPercentage
        Overrides:
        getActualInstance in class AbstractOpenApiSchema
        Returns:
        The actual instance (DiscountsFinalPrice, DiscountsPercentage)
      • getDiscountsFinalPrice

        public DiscountsFinalPrice getDiscountsFinalPrice()
                                                   throws ClassCastException
        Get the actual instance of `DiscountsFinalPrice`. If the actual instance is not `DiscountsFinalPrice`, the ClassCastException will be thrown.
        Returns:
        The actual instance of `DiscountsFinalPrice`
        Throws:
        ClassCastException - if the instance is not `DiscountsFinalPrice`
      • getDiscountsPercentage

        public DiscountsPercentage getDiscountsPercentage()
                                                   throws ClassCastException
        Get the actual instance of `DiscountsPercentage`. If the actual instance is not `DiscountsPercentage`, the ClassCastException will be thrown.
        Returns:
        The actual instance of `DiscountsPercentage`
        Throws:
        ClassCastException - if the instance is not `DiscountsPercentage`
      • validateJsonElement

        public static void validateJsonElement​(com.google.gson.JsonElement jsonElement)
                                        throws IOException
        Validates the JSON Element and throws an exception if issues found
        Parameters:
        jsonElement - JSON Element
        Throws:
        IOException - if the JSON Element is invalid with respect to FeedPricesDiscountsInner
      • fromJson

        public static FeedPricesDiscountsInner fromJson​(String jsonString)
                                                 throws IOException
        Create an instance of FeedPricesDiscountsInner given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of FeedPricesDiscountsInner
        Throws:
        IOException - if the JSON string is invalid with respect to FeedPricesDiscountsInner
      • toJson

        public String toJson()
        Convert an instance of FeedPricesDiscountsInner to an JSON string
        Returns:
        JSON string