#
# Licensed to Elasticsearch under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

#
# Painless definition file. This defines the hierarchy of classes,
# what methods and fields they have, etc.
#

#### Classes

class ZoneOffsetTransition -> java.time.zone.ZoneOffsetTransition extends Comparable,Object {
  int compareTo(ZoneOffsetTransition)
  LocalDateTime getDateTimeAfter()
  LocalDateTime getDateTimeBefore()
  Duration getDuration()
  Instant getInstant()
  ZoneOffset getOffsetAfter()
  ZoneOffset getOffsetBefore()
  boolean isGap()
  boolean isOverlap()
  boolean isValidOffset(ZoneOffset)
  ZoneOffsetTransition of(LocalDateTime,ZoneOffset,ZoneOffset)
  long toEpochSecond()
}

class ZoneOffsetTransitionRule -> java.time.zone.ZoneOffsetTransitionRule extends Object {
  ZoneOffsetTransition createTransition(int)
  int getDayOfMonthIndicator()
  DayOfWeek getDayOfWeek()
  LocalTime getLocalTime()
  Month getMonth()
  ZoneOffset getOffsetAfter()
  ZoneOffset getOffsetBefore()
  ZoneOffset getStandardOffset()
  ZoneOffsetTransitionRule.TimeDefinition getTimeDefinition()
  boolean isMidnightEndOfDay()
  ZoneOffsetTransitionRule of(Month,int,DayOfWeek,LocalTime,boolean,ZoneOffsetTransitionRule.TimeDefinition,ZoneOffset,ZoneOffset,ZoneOffset)
}

class ZoneRules -> java.time.zone.ZoneRules extends Object {
  Duration getDaylightSavings(Instant)
  ZoneOffset getOffset(Instant)
  ZoneOffset getStandardOffset(Instant)
  ZoneOffsetTransition getTransition(LocalDateTime)
  List getTransitionRules()
  List getTransitions()
  List getValidOffsets(LocalDateTime)
  boolean isDaylightSavings(Instant)
  boolean isFixedOffset()
  boolean isValidOffset(LocalDateTime,ZoneOffset)
  ZoneOffsetTransition nextTransition(Instant)
  ZoneRules of(ZoneOffset)
  ZoneRules of(ZoneOffset,ZoneOffset,List,List,List)
  ZoneOffsetTransition previousTransition(Instant)
}

class ZoneRulesProvider -> java.time.zone.ZoneRulesProvider extends Object {
  Set getAvailableZoneIds()
  ZoneRules getRules(String,boolean)
  NavigableMap getVersions(String)
}

#### Enums

class ZoneOffsetTransitionRule.TimeDefinition -> java.time.zone.ZoneOffsetTransitionRule$TimeDefinition extends Enum,Comparable,Object {
  ZoneOffsetTransitionRule.TimeDefinition STANDARD
  ZoneOffsetTransitionRule.TimeDefinition UTC
  ZoneOffsetTransitionRule.TimeDefinition WALL
  LocalDateTime createDateTime(LocalDateTime,ZoneOffset,ZoneOffset)
  ZoneOffsetTransitionRule.TimeDefinition valueOf(String)
  ZoneOffsetTransitionRule.TimeDefinition[] values()
}

#### Exceptions

class ZoneRulesException -> java.time.zone.ZoneRulesException extends DateTimeException,RuntimeException,Exception,Object {
  ZoneRulesException <init>(String)
}
