Skip to content

Commit

Permalink
added schedled time for training (#148)
Browse files Browse the repository at this point in the history
* added schedled time for training

* generated libraries
  • Loading branch information
anton-cornak authored Jun 27, 2022
1 parent 6936171 commit b4e0706
Show file tree
Hide file tree
Showing 9 changed files with 440 additions and 47 deletions.
50 changes: 44 additions & 6 deletions gen/csharp/Asgt/V2/Type/Training.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@ static TrainingReflection() {
string.Concat(
"Chthc2d0L3YyL3R5cGUvdHJhaW5pbmcucHJvdG8SDGFzZ3QudjIudHlwZRoX",
"YXNndC90eXBlL2RhdGFzZXQucHJvdG8aH2dvb2dsZS9wcm90b2J1Zi90aW1l",
"c3RhbXAucHJvdG8i2gEKCFRyYWluaW5nEi4KCmNyZWF0ZWRfYXQYASABKAsy",
"c3RhbXAucHJvdG8ijQIKCFRyYWluaW5nEi4KCmNyZWF0ZWRfYXQYASABKAsy",
"Gi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEg4KBnN0YXR1cxgCIAEoCRIX",
"Cg90cmFpbmluZ19zdGF0dXMYAyABKAkSHwoXdHJhaW5pbmdfc3RhdHVzX21l",
"c3NhZ2UYBCABKAkSLwoLZmluaXNoX3RpbWUYBSABKAsyGi5nb29nbGUucHJv",
"dG9idWYuVGltZXN0YW1wEiMKB2RhdGFzZXQYBiABKAsyEi5hc2d0LnR5cGUu",
"RGF0YXNldEI7WjlnaXRodWIuY29tL2UtY29ub21pYy92bWxhcGlzL2dlbi9n",
"by9hc2d0L3YyL3R5cGU7YXNndHR5cGViBnByb3RvMw=="));
"RGF0YXNldBIxCg1zY2hlZHVsZV90aW1lGAcgASgLMhouZ29vZ2xlLnByb3Rv",
"YnVmLlRpbWVzdGFtcEI7WjlnaXRodWIuY29tL2UtY29ub21pYy92bWxhcGlz",
"L2dlbi9nby9hc2d0L3YyL3R5cGU7YXNndHR5cGViBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Asgt.Type.DatasetReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Asgt.V2.Type.Training), global::Asgt.V2.Type.Training.Parser, new[]{ "CreatedAt", "Status", "TrainingStatus", "TrainingStatusMessage", "FinishTime", "Dataset" }, null, null, null, null)
new pbr::GeneratedClrTypeInfo(typeof(global::Asgt.V2.Type.Training), global::Asgt.V2.Type.Training.Parser, new[]{ "CreatedAt", "Status", "TrainingStatus", "TrainingStatusMessage", "FinishTime", "Dataset", "ScheduleTime" }, null, null, null, null)
}));
}
#endregion
Expand Down Expand Up @@ -74,6 +75,7 @@ public Training(Training other) : this() {
trainingStatusMessage_ = other.trainingStatusMessage_;
finishTime_ = other.finishTime_ != null ? other.finishTime_.Clone() : null;
dataset_ = other.dataset_ != null ? other.dataset_.Clone() : null;
scheduleTime_ = other.scheduleTime_ != null ? other.scheduleTime_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

Expand Down Expand Up @@ -113,9 +115,9 @@ public string Status {
/// <summary>
/// Status of the training.
/// SCHEDULED - Training is scheduled to be run in a specific time. This
/// could be in between 1 minute or 6 hours depending on how recently the dataset
/// could be in between 1 minute or 24 hours depending on how recently the dataset
/// was created
/// PENDING - The training is ready to be picked up a worker.
/// PENDING - The training is ready to be picked up by a worker.
/// RUNNING - The training is currently running.
/// DONE - The training has completed successfully.
/// FAILED - The training failed due to an error. See training status for
Expand Down Expand Up @@ -171,6 +173,20 @@ public string TrainingStatusMessage {
}
}

/// <summary>Field number for the "schedule_time" field.</summary>
public const int ScheduleTimeFieldNumber = 7;
private global::Google.Protobuf.WellKnownTypes.Timestamp scheduleTime_;
/// <summary>
/// Specifies when the training is scheduled.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Timestamp ScheduleTime {
get { return scheduleTime_; }
set {
scheduleTime_ = value;
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Training);
Expand All @@ -190,6 +206,7 @@ public bool Equals(Training other) {
if (TrainingStatusMessage != other.TrainingStatusMessage) return false;
if (!object.Equals(FinishTime, other.FinishTime)) return false;
if (!object.Equals(Dataset, other.Dataset)) return false;
if (!object.Equals(ScheduleTime, other.ScheduleTime)) return false;
return Equals(_unknownFields, other._unknownFields);
}

Expand All @@ -202,6 +219,7 @@ public override int GetHashCode() {
if (TrainingStatusMessage.Length != 0) hash ^= TrainingStatusMessage.GetHashCode();
if (finishTime_ != null) hash ^= FinishTime.GetHashCode();
if (dataset_ != null) hash ^= Dataset.GetHashCode();
if (scheduleTime_ != null) hash ^= ScheduleTime.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
Expand Down Expand Up @@ -239,6 +257,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(50);
output.WriteMessage(Dataset);
}
if (scheduleTime_ != null) {
output.WriteRawTag(58);
output.WriteMessage(ScheduleTime);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
Expand All @@ -265,6 +287,9 @@ public int CalculateSize() {
if (dataset_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Dataset);
}
if (scheduleTime_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(ScheduleTime);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
Expand Down Expand Up @@ -303,6 +328,12 @@ public void MergeFrom(Training other) {
}
Dataset.MergeFrom(other.Dataset);
}
if (other.scheduleTime_ != null) {
if (scheduleTime_ == null) {
ScheduleTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
}
ScheduleTime.MergeFrom(other.ScheduleTime);
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

Expand Down Expand Up @@ -347,6 +378,13 @@ public void MergeFrom(pb::CodedInputStream input) {
input.ReadMessage(Dataset);
break;
}
case 58: {
if (scheduleTime_ == null) {
ScheduleTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
}
input.ReadMessage(ScheduleTime);
break;
}
}
}
}
Expand Down
Binary file modified gen/descriptor.bin
Binary file not shown.
40 changes: 27 additions & 13 deletions gen/go/asgt/v2/type/training.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions gen/go/asgt/v2/type/training.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b4e0706

Please sign in to comment.