Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 7 additions & 20 deletions src/Nest/XPack/Slm/SnapshotLifecyclePolicyMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,17 @@ public class SnapshotLifecyclePolicyMetadata
{
/// <summary>
/// The modified date.
/// Returned only when Human is set to <c>true</c> on the request
/// </summary>
[DataMember(Name = "modified_date")]
public DateTimeOffset? ModifiedDate { get; internal set; }

/// <summary>
/// The modified date in milliseconds
/// </summary>
[DataMember(Name = "modified_date_millis")]
public long ModifiedDateInMilliseconds { get; internal set; }
[JsonFormatter(typeof(DateTimeOffsetEpochMillisecondsFormatter))]
public DateTimeOffset ModifiedDate { get; internal set; }

/// <summary>
/// The next execution date.
/// Returned only when Human is set to <c>true</c> on the request
/// </summary>
[DataMember(Name = "next_execution")]
public DateTimeOffset? NextExecution { get; internal set; }

/// <summary>
/// The next execution date in milliseconds
/// </summary>
[DataMember(Name = "next_execution_millis")]
public long NextExecutionInMilliseconds { get; internal set; }
[JsonFormatter(typeof(DateTimeOffsetEpochMillisecondsFormatter))]
public DateTimeOffset NextExecution { get; internal set; }

/// <summary>
/// The snapshot lifecycle policy
Expand All @@ -51,7 +39,7 @@ public class SnapshotLifecyclePolicyMetadata
/// If a snapshot is currently in progress this will return information about the snapshot.
/// </summary>
[DataMember(Name = "in_progress")]
public LifecycleSnapshotInProgress InProgress { get; internal set; }
public SnapshotLifecycleInProgress InProgress { get; internal set; }

/// <summary>
/// Information about the last time the policy successfully initiated a snapshot.
Expand Down Expand Up @@ -80,13 +68,13 @@ public class SnapshotLifecycleInvocationRecord
/// If a snapshot is in progress when calling the Get Snapshot Lifecycle metadata
/// this will hold some minimal information about the in flight snapshot
/// </summary>
public class LifecycleSnapshotInProgress
public class SnapshotLifecycleInProgress
{
/// <summary> The name of the snapshot currently being taken </summary>
[DataMember(Name = "name")]
public string Name { get; internal set; }

/// <summary> The UUI of the snapshot currently being taken </summary>
/// <summary> The UUID of the snapshot currently being taken </summary>
[DataMember(Name = "uuid")]
public string UUID { get; internal set; }

Expand All @@ -98,6 +86,5 @@ public class LifecycleSnapshotInProgress
[DataMember(Name = "start_time_millis")]
[JsonFormatter(typeof(DateTimeOffsetEpochMillisecondsFormatter))]
public DateTimeOffset StartTime { get; internal set; }

}
}
2 changes: 0 additions & 2 deletions src/Tests/Tests/XPack/Slm/SlmApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ [I] public async Task GetSnapshotLifecycleResponse() => await Assert<GetSnapshot

metadata.Version.Should().Be(1);
metadata.ModifiedDate.Should().BeAfter(DateTimeOffset.MinValue);
metadata.ModifiedDateInMilliseconds.Should().BeGreaterThan(0);
metadata.NextExecution.Should().BeAfter(DateTimeOffset.MinValue);
metadata.NextExecutionInMilliseconds.Should().BeGreaterThan(0);
metadata.Policy.Name.Should().Be(v);
metadata.Policy.Repository.Should().Be(v);
metadata.Policy.Schedule.Should().BeEquivalentTo(new CronExpression("0 0 0 1 1 ? *"));
Expand Down