Skip to content

Commit

Permalink
feat: Added support for auto-close configurations (#7527)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 410253233

Source-Link: googleapis/googleapis@11e309d

Source-Link: googleapis/googleapis-gen@b4f3403
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuTW9uaXRvcmluZy5WMy8uT3dsQm90LnlhbWwiLCJoIjoiYjRmMzQwM2EyOGNjOTljOWM3Y2Y0Y2QyZWZjYTEwNWYyNzlhM2IwZiJ9
  • Loading branch information
gcf-owl-bot[bot] committed Nov 16, 2021
1 parent 92ae20c commit b8a8fbd
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static partial class AlertReflection {
"L3YzL2NvbW1vbi5wcm90bxoqZ29vZ2xlL21vbml0b3JpbmcvdjMvbXV0YXRp",
"b25fcmVjb3JkLnByb3RvGh5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJv",
"dG8aHmdvb2dsZS9wcm90b2J1Zi93cmFwcGVycy5wcm90bxoXZ29vZ2xlL3Jw",
"Yy9zdGF0dXMucHJvdG8itBcKC0FsZXJ0UG9saWN5EgwKBG5hbWUYASABKAkS",
"Yy9zdGF0dXMucHJvdG8i4xcKC0FsZXJ0UG9saWN5EgwKBG5hbWUYASABKAkS",
"FAoMZGlzcGxheV9uYW1lGAIgASgJEkYKDWRvY3VtZW50YXRpb24YDSABKAsy",
"Ly5nb29nbGUubW9uaXRvcmluZy52My5BbGVydFBvbGljeS5Eb2N1bWVudGF0",
"aW9uEkYKC3VzZXJfbGFiZWxzGBAgAygLMjEuZ29vZ2xlLm1vbml0b3Jpbmcu",
Expand Down Expand Up @@ -84,24 +84,25 @@ public static partial class AlertReflection {
"aXRpb259ElBvcmdhbml6YXRpb25zL3tvcmdhbml6YXRpb259L2FsZXJ0UG9s",
"aWNpZXMve2FsZXJ0X3BvbGljeX0vY29uZ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W",
"M8oCGkdvb2dsZVxDbG91ZFxNb25pdG9yaW5nXFYz6gIdR29vZ2xlOjpDbG91",
"ZDo6TW9uaXRvcmluZzo6VjNiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Monitoring.V3.CommonReflection.Descriptor, global::Google.Cloud.Monitoring.V3.MutationRecordReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, global::Google.Rpc.StatusReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
Expand All @@ -111,7 +112,7 @@ public static partial class AlertReflection {
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.Condition.Types.MetricAbsence), global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.Condition.Types.MetricAbsence.Parser, new[]{ "Filter", "Aggregations", "Duration", "Trigger" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.Condition.Types.LogMatch), global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.Condition.Types.LogMatch.Parser, new[]{ "Filter", "LabelExtractors" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.Condition.Types.MonitoringQueryLanguageCondition), global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.Condition.Types.MonitoringQueryLanguageCondition.Parser, new[]{ "Query", "Duration", "Trigger" }, null, null, null, null)}),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.AlertStrategy), global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.AlertStrategy.Parser, new[]{ "NotificationRateLimit" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.AlertStrategy.Types.NotificationRateLimit), global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.AlertStrategy.Types.NotificationRateLimit.Parser, new[]{ "Period" }, null, null, null, null)}),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.AlertStrategy), global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.AlertStrategy.Parser, new[]{ "NotificationRateLimit", "AutoClose" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.AlertStrategy.Types.NotificationRateLimit), global::Google.Cloud.Monitoring.V3.AlertPolicy.Types.AlertStrategy.Types.NotificationRateLimit.Parser, new[]{ "Period" }, null, null, null, null)}),
null, })
}));
}
Expand Down Expand Up @@ -3359,6 +3360,7 @@ public sealed partial class AlertStrategy : pb::IMessage<AlertStrategy>
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public AlertStrategy(AlertStrategy other) : this() {
notificationRateLimit_ = other.notificationRateLimit_ != null ? other.notificationRateLimit_.Clone() : null;
autoClose_ = other.autoClose_ != null ? other.autoClose_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

Expand All @@ -3385,6 +3387,22 @@ public sealed partial class AlertStrategy : pb::IMessage<AlertStrategy>
}
}

/// <summary>Field number for the "auto_close" field.</summary>
public const int AutoCloseFieldNumber = 3;
private global::Google.Protobuf.WellKnownTypes.Duration autoClose_;
/// <summary>
/// If an alert policy that was active has no data for this long, any open
/// incidents will close
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Protobuf.WellKnownTypes.Duration AutoClose {
get { return autoClose_; }
set {
autoClose_ = value;
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
Expand All @@ -3401,6 +3419,7 @@ public sealed partial class AlertStrategy : pb::IMessage<AlertStrategy>
return true;
}
if (!object.Equals(NotificationRateLimit, other.NotificationRateLimit)) return false;
if (!object.Equals(AutoClose, other.AutoClose)) return false;
return Equals(_unknownFields, other._unknownFields);
}

Expand All @@ -3409,6 +3428,7 @@ public sealed partial class AlertStrategy : pb::IMessage<AlertStrategy>
public override int GetHashCode() {
int hash = 1;
if (notificationRateLimit_ != null) hash ^= NotificationRateLimit.GetHashCode();
if (autoClose_ != null) hash ^= AutoClose.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
Expand All @@ -3431,6 +3451,10 @@ public sealed partial class AlertStrategy : pb::IMessage<AlertStrategy>
output.WriteRawTag(10);
output.WriteMessage(NotificationRateLimit);
}
if (autoClose_ != null) {
output.WriteRawTag(26);
output.WriteMessage(AutoClose);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
Expand All @@ -3445,6 +3469,10 @@ public sealed partial class AlertStrategy : pb::IMessage<AlertStrategy>
output.WriteRawTag(10);
output.WriteMessage(NotificationRateLimit);
}
if (autoClose_ != null) {
output.WriteRawTag(26);
output.WriteMessage(AutoClose);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
Expand All @@ -3458,6 +3486,9 @@ public sealed partial class AlertStrategy : pb::IMessage<AlertStrategy>
if (notificationRateLimit_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(NotificationRateLimit);
}
if (autoClose_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(AutoClose);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
Expand All @@ -3476,6 +3507,12 @@ public sealed partial class AlertStrategy : pb::IMessage<AlertStrategy>
}
NotificationRateLimit.MergeFrom(other.NotificationRateLimit);
}
if (other.autoClose_ != null) {
if (autoClose_ == null) {
AutoClose = new global::Google.Protobuf.WellKnownTypes.Duration();
}
AutoClose.MergeFrom(other.AutoClose);
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

Expand All @@ -3498,6 +3535,13 @@ public sealed partial class AlertStrategy : pb::IMessage<AlertStrategy>
input.ReadMessage(NotificationRateLimit);
break;
}
case 26: {
if (autoClose_ == null) {
AutoClose = new global::Google.Protobuf.WellKnownTypes.Duration();
}
input.ReadMessage(AutoClose);
break;
}
}
}
#endif
Expand All @@ -3520,6 +3564,13 @@ public sealed partial class AlertStrategy : pb::IMessage<AlertStrategy>
input.ReadMessage(NotificationRateLimit);
break;
}
case 26: {
if (autoClose_ == null) {
AutoClose = new global::Google.Protobuf.WellKnownTypes.Duration();
}
input.ReadMessage(AutoClose);
break;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ public enum ValueOneofCase {
/// of the previous interval.
///
/// * For `CUMULATIVE` metrics, the start time and end time must specify a
/// a non-zero interval, with subsequent points specifying the same
/// non-zero interval, with subsequent points specifying the same
/// start time and increasing end times, until an event resets the
/// cumulative value to zero and sets a new start time for the following
/// points. The new start time must be at least a millisecond after the
Expand Down

0 comments on commit b8a8fbd

Please sign in to comment.