Package codes.grow.packages.skywalking
Record Class GraphQLDuration
java.lang.Object
java.lang.Record
codes.grow.packages.skywalking.GraphQLDuration
- Record Components:
start- formatted startend- formatted endstep- step
The GraphQL
Duration input: bounds in the OAP time zone, formatted per step (DAY
yyyy-MM-dd, HOUR yyyy-MM-dd HH, MINUTE yyyy-MM-dd HHmm, SECOND yyyy-MM-dd
HHmmss).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA window with defaults applied. -
Constructor Summary
ConstructorsConstructorDescriptionGraphQLDuration(String start, String end, Step step) Creates an instance of aGraphQLDurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.static StringFormats an instant for aDurationfield.final inthashCode()Returns a hash code value for this object.static GraphQLDurationof(GraphQLDuration.Resolved range, int offsetMinutes) Builds the GraphQLDurationfor a resolved window.static intparseTimezone(String tz) Parses an OAP time zone (+0000,-0530,+08:00) into minutes east of UTC; unknown text → 0.start()Returns the value of thestartrecord component.step()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.The GraphQL variable value.
-
Constructor Details
-
Method Details
-
parseTimezone
Parses an OAP time zone (+0000,-0530,+08:00) into minutes east of UTC; unknown text → 0.- Parameters:
tz- time zone text (may be null)- Returns:
- minutes east of UTC
-
format
Formats an instant for aDurationfield.- Parameters:
instant- timestep- stepoffsetMinutes- OAP offset in minutes east of UTC- Returns:
- the formatted time
-
of
Builds the GraphQLDurationfor a resolved window.- Parameters:
range- the windowoffsetMinutes- OAP offset in minutes east of UTC- Returns:
- the duration
-
toVariable
The GraphQL variable value.- Returns:
{start, end, step}
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
step
Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-