类 GSDataType

    • 字段详细资料

    • 构造器详细资料

      • GSDataType

        public GSDataType()
      • GSDataType

        public GSDataType​(Object o)
    • 方法详细资料

      • setActualInstance

        public void setActualInstance​(Object instance)
        Set the instance that matches the oneOf child schema, check the instance parameter is valid against the oneOf child schemas: PrimitiveType, StringType, TemporalType It could be an instance of the 'oneOf' schemas.
        覆盖:
        setActualInstance 在类中 AbstractOpenApiSchema
        参数:
        instance - the actual instance of the schema/object
      • getActualInstance

        public Object getActualInstance()
        Get the actual instance, which can be the following: PrimitiveType, StringType, TemporalType
        覆盖:
        getActualInstance 在类中 AbstractOpenApiSchema
        返回:
        The actual instance (PrimitiveType, StringType, TemporalType)
      • getPrimitiveType

        public PrimitiveType getPrimitiveType()
                                       throws ClassCastException
        Get the actual instance of `PrimitiveType`. If the actual instance is not `PrimitiveType`, the ClassCastException will be thrown.
        返回:
        The actual instance of `PrimitiveType`
        抛出:
        ClassCastException - if the instance is not `PrimitiveType`
      • getStringType

        public StringType getStringType()
                                 throws ClassCastException
        Get the actual instance of `StringType`. If the actual instance is not `StringType`, the ClassCastException will be thrown.
        返回:
        The actual instance of `StringType`
        抛出:
        ClassCastException - if the instance is not `StringType`
      • getTemporalType

        public TemporalType getTemporalType()
                                     throws ClassCastException
        Get the actual instance of `TemporalType`. If the actual instance is not `TemporalType`, the ClassCastException will be thrown.
        返回:
        The actual instance of `TemporalType`
        抛出:
        ClassCastException - if the instance is not `TemporalType`
      • validateJsonElement

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

        public static GSDataType fromJson​(String jsonString)
                                   throws IOException
        Create an instance of GSDataType given an JSON string
        参数:
        jsonString - JSON string
        返回:
        An instance of GSDataType
        抛出:
        IOException - if the JSON string is invalid with respect to GSDataType
      • toJson

        public String toJson()
        Convert an instance of GSDataType to an JSON string
        返回:
        JSON string