...

Source file src/google.golang.org/genproto/googleapis/api/serviceconfig/monitoring.pb.go

Documentation: google.golang.org/genproto/googleapis/api/serviceconfig

     1  // Copyright 2024 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.26.0
    18  // 	protoc        v4.24.4
    19  // source: google/api/monitoring.proto
    20  
    21  package serviceconfig
    22  
    23  import (
    24  	reflect "reflect"
    25  	sync "sync"
    26  
    27  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    28  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    29  )
    30  
    31  const (
    32  	// Verify that this generated code is sufficiently up-to-date.
    33  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    34  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    35  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    36  )
    37  
    38  // Monitoring configuration of the service.
    39  //
    40  // The example below shows how to configure monitored resources and metrics
    41  // for monitoring. In the example, a monitored resource and two metrics are
    42  // defined. The `library.googleapis.com/book/returned_count` metric is sent
    43  // to both producer and consumer projects, whereas the
    44  // `library.googleapis.com/book/num_overdue` metric is only sent to the
    45  // consumer project.
    46  //
    47  //	monitored_resources:
    48  //	- type: library.googleapis.com/Branch
    49  //	  display_name: "Library Branch"
    50  //	  description: "A branch of a library."
    51  //	  launch_stage: GA
    52  //	  labels:
    53  //	  - key: resource_container
    54  //	    description: "The Cloud container (ie. project id) for the Branch."
    55  //	  - key: location
    56  //	    description: "The location of the library branch."
    57  //	  - key: branch_id
    58  //	    description: "The id of the branch."
    59  //	metrics:
    60  //	- name: library.googleapis.com/book/returned_count
    61  //	  display_name: "Books Returned"
    62  //	  description: "The count of books that have been returned."
    63  //	  launch_stage: GA
    64  //	  metric_kind: DELTA
    65  //	  value_type: INT64
    66  //	  unit: "1"
    67  //	  labels:
    68  //	  - key: customer_id
    69  //	    description: "The id of the customer."
    70  //	- name: library.googleapis.com/book/num_overdue
    71  //	  display_name: "Books Overdue"
    72  //	  description: "The current number of overdue books."
    73  //	  launch_stage: GA
    74  //	  metric_kind: GAUGE
    75  //	  value_type: INT64
    76  //	  unit: "1"
    77  //	  labels:
    78  //	  - key: customer_id
    79  //	    description: "The id of the customer."
    80  //	monitoring:
    81  //	  producer_destinations:
    82  //	  - monitored_resource: library.googleapis.com/Branch
    83  //	    metrics:
    84  //	    - library.googleapis.com/book/returned_count
    85  //	  consumer_destinations:
    86  //	  - monitored_resource: library.googleapis.com/Branch
    87  //	    metrics:
    88  //	    - library.googleapis.com/book/returned_count
    89  //	    - library.googleapis.com/book/num_overdue
    90  type Monitoring struct {
    91  	state         protoimpl.MessageState
    92  	sizeCache     protoimpl.SizeCache
    93  	unknownFields protoimpl.UnknownFields
    94  
    95  	// Monitoring configurations for sending metrics to the producer project.
    96  	// There can be multiple producer destinations. A monitored resource type may
    97  	// appear in multiple monitoring destinations if different aggregations are
    98  	// needed for different sets of metrics associated with that monitored
    99  	// resource type. A monitored resource and metric pair may only be used once
   100  	// in the Monitoring configuration.
   101  	ProducerDestinations []*Monitoring_MonitoringDestination `protobuf:"bytes,1,rep,name=producer_destinations,json=producerDestinations,proto3" json:"producer_destinations,omitempty"`
   102  	// Monitoring configurations for sending metrics to the consumer project.
   103  	// There can be multiple consumer destinations. A monitored resource type may
   104  	// appear in multiple monitoring destinations if different aggregations are
   105  	// needed for different sets of metrics associated with that monitored
   106  	// resource type. A monitored resource and metric pair may only be used once
   107  	// in the Monitoring configuration.
   108  	ConsumerDestinations []*Monitoring_MonitoringDestination `protobuf:"bytes,2,rep,name=consumer_destinations,json=consumerDestinations,proto3" json:"consumer_destinations,omitempty"`
   109  }
   110  
   111  func (x *Monitoring) Reset() {
   112  	*x = Monitoring{}
   113  	if protoimpl.UnsafeEnabled {
   114  		mi := &file_google_api_monitoring_proto_msgTypes[0]
   115  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   116  		ms.StoreMessageInfo(mi)
   117  	}
   118  }
   119  
   120  func (x *Monitoring) String() string {
   121  	return protoimpl.X.MessageStringOf(x)
   122  }
   123  
   124  func (*Monitoring) ProtoMessage() {}
   125  
   126  func (x *Monitoring) ProtoReflect() protoreflect.Message {
   127  	mi := &file_google_api_monitoring_proto_msgTypes[0]
   128  	if protoimpl.UnsafeEnabled && x != nil {
   129  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   130  		if ms.LoadMessageInfo() == nil {
   131  			ms.StoreMessageInfo(mi)
   132  		}
   133  		return ms
   134  	}
   135  	return mi.MessageOf(x)
   136  }
   137  
   138  // Deprecated: Use Monitoring.ProtoReflect.Descriptor instead.
   139  func (*Monitoring) Descriptor() ([]byte, []int) {
   140  	return file_google_api_monitoring_proto_rawDescGZIP(), []int{0}
   141  }
   142  
   143  func (x *Monitoring) GetProducerDestinations() []*Monitoring_MonitoringDestination {
   144  	if x != nil {
   145  		return x.ProducerDestinations
   146  	}
   147  	return nil
   148  }
   149  
   150  func (x *Monitoring) GetConsumerDestinations() []*Monitoring_MonitoringDestination {
   151  	if x != nil {
   152  		return x.ConsumerDestinations
   153  	}
   154  	return nil
   155  }
   156  
   157  // Configuration of a specific monitoring destination (the producer project
   158  // or the consumer project).
   159  type Monitoring_MonitoringDestination struct {
   160  	state         protoimpl.MessageState
   161  	sizeCache     protoimpl.SizeCache
   162  	unknownFields protoimpl.UnknownFields
   163  
   164  	// The monitored resource type. The type must be defined in
   165  	// [Service.monitored_resources][google.api.Service.monitored_resources]
   166  	// section.
   167  	MonitoredResource string `protobuf:"bytes,1,opt,name=monitored_resource,json=monitoredResource,proto3" json:"monitored_resource,omitempty"`
   168  	// Types of the metrics to report to this monitoring destination.
   169  	// Each type must be defined in
   170  	// [Service.metrics][google.api.Service.metrics] section.
   171  	Metrics []string `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
   172  }
   173  
   174  func (x *Monitoring_MonitoringDestination) Reset() {
   175  	*x = Monitoring_MonitoringDestination{}
   176  	if protoimpl.UnsafeEnabled {
   177  		mi := &file_google_api_monitoring_proto_msgTypes[1]
   178  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   179  		ms.StoreMessageInfo(mi)
   180  	}
   181  }
   182  
   183  func (x *Monitoring_MonitoringDestination) String() string {
   184  	return protoimpl.X.MessageStringOf(x)
   185  }
   186  
   187  func (*Monitoring_MonitoringDestination) ProtoMessage() {}
   188  
   189  func (x *Monitoring_MonitoringDestination) ProtoReflect() protoreflect.Message {
   190  	mi := &file_google_api_monitoring_proto_msgTypes[1]
   191  	if protoimpl.UnsafeEnabled && x != nil {
   192  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   193  		if ms.LoadMessageInfo() == nil {
   194  			ms.StoreMessageInfo(mi)
   195  		}
   196  		return ms
   197  	}
   198  	return mi.MessageOf(x)
   199  }
   200  
   201  // Deprecated: Use Monitoring_MonitoringDestination.ProtoReflect.Descriptor instead.
   202  func (*Monitoring_MonitoringDestination) Descriptor() ([]byte, []int) {
   203  	return file_google_api_monitoring_proto_rawDescGZIP(), []int{0, 0}
   204  }
   205  
   206  func (x *Monitoring_MonitoringDestination) GetMonitoredResource() string {
   207  	if x != nil {
   208  		return x.MonitoredResource
   209  	}
   210  	return ""
   211  }
   212  
   213  func (x *Monitoring_MonitoringDestination) GetMetrics() []string {
   214  	if x != nil {
   215  		return x.Metrics
   216  	}
   217  	return nil
   218  }
   219  
   220  var File_google_api_monitoring_proto protoreflect.FileDescriptor
   221  
   222  var file_google_api_monitoring_proto_rawDesc = []byte{
   223  	0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x6f, 0x6e,
   224  	0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67,
   225  	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0xb4, 0x02, 0x0a, 0x0a, 0x4d, 0x6f,
   226  	0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x61, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x64,
   227  	0x75, 0x63, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
   228  	0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
   229  	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e,
   230  	0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e,
   231  	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x44,
   232  	0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x61, 0x0a, 0x15, 0x63,
   233  	0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74,
   234  	0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f,
   235  	0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69,
   236  	0x6e, 0x67, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73,
   237  	0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d,
   238  	0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x60,
   239  	0x0a, 0x15, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74,
   240  	0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x6f, 0x6e, 0x69, 0x74,
   241  	0x6f, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20,
   242  	0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65,
   243  	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63,
   244  	0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
   245  	0x42, 0x71, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
   246  	0x70, 0x69, 0x42, 0x0f, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72,
   247  	0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f,
   248  	0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74,
   249  	0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69,
   250  	0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73,
   251  	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47,
   252  	0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   253  }
   254  
   255  var (
   256  	file_google_api_monitoring_proto_rawDescOnce sync.Once
   257  	file_google_api_monitoring_proto_rawDescData = file_google_api_monitoring_proto_rawDesc
   258  )
   259  
   260  func file_google_api_monitoring_proto_rawDescGZIP() []byte {
   261  	file_google_api_monitoring_proto_rawDescOnce.Do(func() {
   262  		file_google_api_monitoring_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_monitoring_proto_rawDescData)
   263  	})
   264  	return file_google_api_monitoring_proto_rawDescData
   265  }
   266  
   267  var file_google_api_monitoring_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   268  var file_google_api_monitoring_proto_goTypes = []interface{}{
   269  	(*Monitoring)(nil),                       // 0: google.api.Monitoring
   270  	(*Monitoring_MonitoringDestination)(nil), // 1: google.api.Monitoring.MonitoringDestination
   271  }
   272  var file_google_api_monitoring_proto_depIdxs = []int32{
   273  	1, // 0: google.api.Monitoring.producer_destinations:type_name -> google.api.Monitoring.MonitoringDestination
   274  	1, // 1: google.api.Monitoring.consumer_destinations:type_name -> google.api.Monitoring.MonitoringDestination
   275  	2, // [2:2] is the sub-list for method output_type
   276  	2, // [2:2] is the sub-list for method input_type
   277  	2, // [2:2] is the sub-list for extension type_name
   278  	2, // [2:2] is the sub-list for extension extendee
   279  	0, // [0:2] is the sub-list for field type_name
   280  }
   281  
   282  func init() { file_google_api_monitoring_proto_init() }
   283  func file_google_api_monitoring_proto_init() {
   284  	if File_google_api_monitoring_proto != nil {
   285  		return
   286  	}
   287  	if !protoimpl.UnsafeEnabled {
   288  		file_google_api_monitoring_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   289  			switch v := v.(*Monitoring); i {
   290  			case 0:
   291  				return &v.state
   292  			case 1:
   293  				return &v.sizeCache
   294  			case 2:
   295  				return &v.unknownFields
   296  			default:
   297  				return nil
   298  			}
   299  		}
   300  		file_google_api_monitoring_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   301  			switch v := v.(*Monitoring_MonitoringDestination); i {
   302  			case 0:
   303  				return &v.state
   304  			case 1:
   305  				return &v.sizeCache
   306  			case 2:
   307  				return &v.unknownFields
   308  			default:
   309  				return nil
   310  			}
   311  		}
   312  	}
   313  	type x struct{}
   314  	out := protoimpl.TypeBuilder{
   315  		File: protoimpl.DescBuilder{
   316  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   317  			RawDescriptor: file_google_api_monitoring_proto_rawDesc,
   318  			NumEnums:      0,
   319  			NumMessages:   2,
   320  			NumExtensions: 0,
   321  			NumServices:   0,
   322  		},
   323  		GoTypes:           file_google_api_monitoring_proto_goTypes,
   324  		DependencyIndexes: file_google_api_monitoring_proto_depIdxs,
   325  		MessageInfos:      file_google_api_monitoring_proto_msgTypes,
   326  	}.Build()
   327  	File_google_api_monitoring_proto = out.File
   328  	file_google_api_monitoring_proto_rawDesc = nil
   329  	file_google_api_monitoring_proto_goTypes = nil
   330  	file_google_api_monitoring_proto_depIdxs = nil
   331  }
   332  

View as plain text