toElasticsearchIndexRotationPeriod method

ElasticsearchIndexRotationPeriod toElasticsearchIndexRotationPeriod()

Implementation

ElasticsearchIndexRotationPeriod toElasticsearchIndexRotationPeriod() {
  switch (this) {
    case 'NoRotation':
      return ElasticsearchIndexRotationPeriod.noRotation;
    case 'OneHour':
      return ElasticsearchIndexRotationPeriod.oneHour;
    case 'OneDay':
      return ElasticsearchIndexRotationPeriod.oneDay;
    case 'OneWeek':
      return ElasticsearchIndexRotationPeriod.oneWeek;
    case 'OneMonth':
      return ElasticsearchIndexRotationPeriod.oneMonth;
  }
  throw Exception(
      '$this is not known in enum ElasticsearchIndexRotationPeriod');
}