...

Source file src/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze.pb.go

Documentation: cloud.google.com/go/monitoring/apiv3/v2/monitoringpb

     1  // Copyright 2023 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Code generated by protoc-gen-go. DO NOT EDIT.
    16  // versions:
    17  // 	protoc-gen-go v1.33.0
    18  // 	protoc        v4.25.3
    19  // source: google/monitoring/v3/snooze.proto
    20  
    21  package monitoringpb
    22  
    23  import (
    24  	reflect "reflect"
    25  	sync "sync"
    26  
    27  	_ "google.golang.org/genproto/googleapis/api/annotations"
    28  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    29  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    30  )
    31  
    32  const (
    33  	// Verify that this generated code is sufficiently up-to-date.
    34  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    35  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    36  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    37  )
    38  
    39  // A `Snooze` will prevent any alerts from being opened, and close any that
    40  // are already open. The `Snooze` will work on alerts that match the
    41  // criteria defined in the `Snooze`. The `Snooze` will be active from
    42  // `interval.start_time` through `interval.end_time`.
    43  type Snooze struct {
    44  	state         protoimpl.MessageState
    45  	sizeCache     protoimpl.SizeCache
    46  	unknownFields protoimpl.UnknownFields
    47  
    48  	// Required. The name of the `Snooze`. The format is:
    49  	//
    50  	//	projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID]
    51  	//
    52  	// The ID of the `Snooze` will be generated by the system.
    53  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    54  	// Required. This defines the criteria for applying the `Snooze`. See
    55  	// `Criteria` for more information.
    56  	Criteria *Snooze_Criteria `protobuf:"bytes,3,opt,name=criteria,proto3" json:"criteria,omitempty"`
    57  	// Required. The `Snooze` will be active from `interval.start_time` through
    58  	// `interval.end_time`.
    59  	// `interval.start_time` cannot be in the past. There is a 15 second clock
    60  	// skew to account for the time it takes for a request to reach the API from
    61  	// the UI.
    62  	Interval *TimeInterval `protobuf:"bytes,4,opt,name=interval,proto3" json:"interval,omitempty"`
    63  	// Required. A display name for the `Snooze`. This can be, at most, 512
    64  	// unicode characters.
    65  	DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
    66  }
    67  
    68  func (x *Snooze) Reset() {
    69  	*x = Snooze{}
    70  	if protoimpl.UnsafeEnabled {
    71  		mi := &file_google_monitoring_v3_snooze_proto_msgTypes[0]
    72  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    73  		ms.StoreMessageInfo(mi)
    74  	}
    75  }
    76  
    77  func (x *Snooze) String() string {
    78  	return protoimpl.X.MessageStringOf(x)
    79  }
    80  
    81  func (*Snooze) ProtoMessage() {}
    82  
    83  func (x *Snooze) ProtoReflect() protoreflect.Message {
    84  	mi := &file_google_monitoring_v3_snooze_proto_msgTypes[0]
    85  	if protoimpl.UnsafeEnabled && x != nil {
    86  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    87  		if ms.LoadMessageInfo() == nil {
    88  			ms.StoreMessageInfo(mi)
    89  		}
    90  		return ms
    91  	}
    92  	return mi.MessageOf(x)
    93  }
    94  
    95  // Deprecated: Use Snooze.ProtoReflect.Descriptor instead.
    96  func (*Snooze) Descriptor() ([]byte, []int) {
    97  	return file_google_monitoring_v3_snooze_proto_rawDescGZIP(), []int{0}
    98  }
    99  
   100  func (x *Snooze) GetName() string {
   101  	if x != nil {
   102  		return x.Name
   103  	}
   104  	return ""
   105  }
   106  
   107  func (x *Snooze) GetCriteria() *Snooze_Criteria {
   108  	if x != nil {
   109  		return x.Criteria
   110  	}
   111  	return nil
   112  }
   113  
   114  func (x *Snooze) GetInterval() *TimeInterval {
   115  	if x != nil {
   116  		return x.Interval
   117  	}
   118  	return nil
   119  }
   120  
   121  func (x *Snooze) GetDisplayName() string {
   122  	if x != nil {
   123  		return x.DisplayName
   124  	}
   125  	return ""
   126  }
   127  
   128  // Criteria specific to the `AlertPolicy`s that this `Snooze` applies to. The
   129  // `Snooze` will suppress alerts that come from one of the `AlertPolicy`s
   130  // whose names are supplied.
   131  type Snooze_Criteria struct {
   132  	state         protoimpl.MessageState
   133  	sizeCache     protoimpl.SizeCache
   134  	unknownFields protoimpl.UnknownFields
   135  
   136  	// The specific `AlertPolicy` names for the alert that should be snoozed.
   137  	// The format is:
   138  	//
   139  	//	projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]
   140  	//
   141  	// There is a limit of 16 policies per snooze. This limit is checked during
   142  	// snooze creation.
   143  	Policies []string `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"`
   144  }
   145  
   146  func (x *Snooze_Criteria) Reset() {
   147  	*x = Snooze_Criteria{}
   148  	if protoimpl.UnsafeEnabled {
   149  		mi := &file_google_monitoring_v3_snooze_proto_msgTypes[1]
   150  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   151  		ms.StoreMessageInfo(mi)
   152  	}
   153  }
   154  
   155  func (x *Snooze_Criteria) String() string {
   156  	return protoimpl.X.MessageStringOf(x)
   157  }
   158  
   159  func (*Snooze_Criteria) ProtoMessage() {}
   160  
   161  func (x *Snooze_Criteria) ProtoReflect() protoreflect.Message {
   162  	mi := &file_google_monitoring_v3_snooze_proto_msgTypes[1]
   163  	if protoimpl.UnsafeEnabled && x != nil {
   164  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   165  		if ms.LoadMessageInfo() == nil {
   166  			ms.StoreMessageInfo(mi)
   167  		}
   168  		return ms
   169  	}
   170  	return mi.MessageOf(x)
   171  }
   172  
   173  // Deprecated: Use Snooze_Criteria.ProtoReflect.Descriptor instead.
   174  func (*Snooze_Criteria) Descriptor() ([]byte, []int) {
   175  	return file_google_monitoring_v3_snooze_proto_rawDescGZIP(), []int{0, 0}
   176  }
   177  
   178  func (x *Snooze_Criteria) GetPolicies() []string {
   179  	if x != nil {
   180  		return x.Policies
   181  	}
   182  	return nil
   183  }
   184  
   185  var File_google_monitoring_v3_snooze_proto protoreflect.FileDescriptor
   186  
   187  var file_google_monitoring_v3_snooze_proto_rawDesc = []byte{
   188  	0x0a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72,
   189  	0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x6e, 0x6f, 0x6f, 0x7a, 0x65, 0x2e, 0x70, 0x72,
   190  	0x6f, 0x74, 0x6f, 0x12, 0x14, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69,
   191  	0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
   192  	0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61,
   193  	0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67,
   194  	0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e,
   195  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x6f,
   196  	0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,
   197  	0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x02, 0x0a, 0x06, 0x53, 0x6e, 0x6f,
   198  	0x6f, 0x7a, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
   199  	0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x08,
   200  	0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25,
   201  	0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69,
   202  	0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6e, 0x6f, 0x6f, 0x7a, 0x65, 0x2e, 0x43, 0x72, 0x69,
   203  	0x74, 0x65, 0x72, 0x69, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x63, 0x72, 0x69, 0x74,
   204  	0x65, 0x72, 0x69, 0x61, 0x12, 0x43, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
   205  	0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
   206  	0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x69,
   207  	0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
   208  	0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73,
   209  	0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42,
   210  	0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d,
   211  	0x65, 0x1a, 0x52, 0x0a, 0x08, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x46, 0x0a,
   212  	0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42,
   213  	0x2a, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67,
   214  	0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
   215  	0x41, 0x6c, 0x65, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c,
   216  	0x69, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x4a, 0xea, 0x41, 0x47, 0x0a, 0x20, 0x6d, 0x6f, 0x6e, 0x69,
   217  	0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69,
   218  	0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x6e, 0x6f, 0x6f, 0x7a, 0x65, 0x12, 0x23, 0x70, 0x72,
   219  	0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d,
   220  	0x2f, 0x73, 0x6e, 0x6f, 0x6f, 0x7a, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x6e, 0x6f, 0x6f, 0x7a, 0x65,
   221  	0x7d, 0x42, 0xc6, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
   222  	0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x0b,
   223  	0x53, 0x6e, 0x6f, 0x6f, 0x7a, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x63,
   224  	0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
   225  	0x67, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x70,
   226  	0x69, 0x76, 0x33, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e,
   227  	0x67, 0x70, 0x62, 0x3b, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x70, 0x62,
   228  	0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e,
   229  	0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x1a,
   230  	0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4d, 0x6f, 0x6e,
   231  	0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x33, 0xea, 0x02, 0x1d, 0x47, 0x6f, 0x6f,
   232  	0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x6e, 0x69,
   233  	0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
   234  	0x6f, 0x33,
   235  }
   236  
   237  var (
   238  	file_google_monitoring_v3_snooze_proto_rawDescOnce sync.Once
   239  	file_google_monitoring_v3_snooze_proto_rawDescData = file_google_monitoring_v3_snooze_proto_rawDesc
   240  )
   241  
   242  func file_google_monitoring_v3_snooze_proto_rawDescGZIP() []byte {
   243  	file_google_monitoring_v3_snooze_proto_rawDescOnce.Do(func() {
   244  		file_google_monitoring_v3_snooze_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_monitoring_v3_snooze_proto_rawDescData)
   245  	})
   246  	return file_google_monitoring_v3_snooze_proto_rawDescData
   247  }
   248  
   249  var file_google_monitoring_v3_snooze_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   250  var file_google_monitoring_v3_snooze_proto_goTypes = []interface{}{
   251  	(*Snooze)(nil),          // 0: google.monitoring.v3.Snooze
   252  	(*Snooze_Criteria)(nil), // 1: google.monitoring.v3.Snooze.Criteria
   253  	(*TimeInterval)(nil),    // 2: google.monitoring.v3.TimeInterval
   254  }
   255  var file_google_monitoring_v3_snooze_proto_depIdxs = []int32{
   256  	1, // 0: google.monitoring.v3.Snooze.criteria:type_name -> google.monitoring.v3.Snooze.Criteria
   257  	2, // 1: google.monitoring.v3.Snooze.interval:type_name -> google.monitoring.v3.TimeInterval
   258  	2, // [2:2] is the sub-list for method output_type
   259  	2, // [2:2] is the sub-list for method input_type
   260  	2, // [2:2] is the sub-list for extension type_name
   261  	2, // [2:2] is the sub-list for extension extendee
   262  	0, // [0:2] is the sub-list for field type_name
   263  }
   264  
   265  func init() { file_google_monitoring_v3_snooze_proto_init() }
   266  func file_google_monitoring_v3_snooze_proto_init() {
   267  	if File_google_monitoring_v3_snooze_proto != nil {
   268  		return
   269  	}
   270  	file_google_monitoring_v3_common_proto_init()
   271  	if !protoimpl.UnsafeEnabled {
   272  		file_google_monitoring_v3_snooze_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   273  			switch v := v.(*Snooze); i {
   274  			case 0:
   275  				return &v.state
   276  			case 1:
   277  				return &v.sizeCache
   278  			case 2:
   279  				return &v.unknownFields
   280  			default:
   281  				return nil
   282  			}
   283  		}
   284  		file_google_monitoring_v3_snooze_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   285  			switch v := v.(*Snooze_Criteria); i {
   286  			case 0:
   287  				return &v.state
   288  			case 1:
   289  				return &v.sizeCache
   290  			case 2:
   291  				return &v.unknownFields
   292  			default:
   293  				return nil
   294  			}
   295  		}
   296  	}
   297  	type x struct{}
   298  	out := protoimpl.TypeBuilder{
   299  		File: protoimpl.DescBuilder{
   300  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   301  			RawDescriptor: file_google_monitoring_v3_snooze_proto_rawDesc,
   302  			NumEnums:      0,
   303  			NumMessages:   2,
   304  			NumExtensions: 0,
   305  			NumServices:   0,
   306  		},
   307  		GoTypes:           file_google_monitoring_v3_snooze_proto_goTypes,
   308  		DependencyIndexes: file_google_monitoring_v3_snooze_proto_depIdxs,
   309  		MessageInfos:      file_google_monitoring_v3_snooze_proto_msgTypes,
   310  	}.Build()
   311  	File_google_monitoring_v3_snooze_proto = out.File
   312  	file_google_monitoring_v3_snooze_proto_rawDesc = nil
   313  	file_google_monitoring_v3_snooze_proto_goTypes = nil
   314  	file_google_monitoring_v3_snooze_proto_depIdxs = nil
   315  }
   316  

View as plain text