DataType.java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
package com.azure.search.documents.models;
import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
* Defines values for DataType.
*/
public final class DataType extends ExpandableStringEnum<DataType> {
/**
* Static value Edm.String for DataType.
*/
public static final DataType EDM_STRING = fromString("Edm.String");
/**
* Static value Edm.Int32 for DataType.
*/
public static final DataType EDM_INT32 = fromString("Edm.Int32");
/**
* Static value Edm.Int64 for DataType.
*/
public static final DataType EDM_INT64 = fromString("Edm.Int64");
/**
* Static value Edm.Double for DataType.
*/
public static final DataType EDM_DOUBLE = fromString("Edm.Double");
/**
* Static value Edm.Boolean for DataType.
*/
public static final DataType EDM_BOOLEAN = fromString("Edm.Boolean");
/**
* Static value Edm.DateTimeOffset for DataType.
*/
public static final DataType EDM_DATE_TIME_OFFSET = fromString("Edm.DateTimeOffset");
/**
* Static value Edm.GeographyPoint for DataType.
*/
public static final DataType EDM_GEOGRAPHY_POINT = fromString("Edm.GeographyPoint");
/**
* Static value Edm.ComplexType for DataType.
*/
public static final DataType EDM_COMPLEX_TYPE = fromString("Edm.ComplexType");
/**
* Returns a collection of a specific DataType
* @param dataType the corresponding DataType
* @return a Collection of the corresponding DataType
*/
@JsonCreator
public static DataType collection(DataType dataType) {
return fromString(String.format("Collection(%s)", dataType.toString()));
}
/**
* Creates or finds a DataType from its string representation.
*
* @param name a name to look for.
* @return the corresponding DataType.
*/
@JsonCreator
public static DataType fromString(String name) {
return fromString(name, DataType.class);
}
/**
* @return known DataType values.
*/
public static Collection<DataType> values() {
return values(DataType.class);
}
}