# Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'date' require 'google/apis/core/base_service' require 'google/apis/core/json_representation' require 'google/apis/core/hashable' require 'google/apis/errors' module Google module Apis module MonitoringV1 # A set of (label, value) pairs which were dropped during aggregation, attached # to google.api.Distribution.Exemplars in google.api.Distribution values during # aggregation.These values are used in combination with the label values that # remain on the aggregated Distribution timeseries to construct the full label # set for the exemplar values. The resulting full label set may be used to # identify the specific task/job/instance (for example) which may be # contributing to a long-tail, while allowing the storage savings of only # storing aggregated distribution values for a large group.Note that there are # no guarantees on ordering of the labels from exemplar-to-exemplar and from # distribution-to-distribution in the same stream, and there may be duplicates. # It is up to clients to resolve any ambiguities. class DroppedLabels include Google::Apis::Core::Hashable # Map from label to its value, for all labels dropped in any aggregation. # Corresponds to the JSON property `label` # @return [Hash] attr_accessor :label def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @label = args[:label] if args.key?(:label) end end # A single field of a message type. class Field include Google::Apis::Core::Hashable # The field cardinality. # Corresponds to the JSON property `cardinality` # @return [String] attr_accessor :cardinality # The string value of the default value of this field. Proto2 syntax only. # Corresponds to the JSON property `defaultValue` # @return [String] attr_accessor :default_value # The field JSON name. # Corresponds to the JSON property `jsonName` # @return [String] attr_accessor :json_name # The field type. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The field name. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name # The field number. # Corresponds to the JSON property `number` # @return [Fixnum] attr_accessor :number # The index of the field type in Type.oneofs, for message or enumeration types. # The first type has index 1; zero means the type is not in the list. # Corresponds to the JSON property `oneofIndex` # @return [Fixnum] attr_accessor :oneof_index # The protocol buffer options. # Corresponds to the JSON property `options` # @return [Array] attr_accessor :options # Whether to use alternative packed wire representation. # Corresponds to the JSON property `packed` # @return [Boolean] attr_accessor :packed alias_method :packed?, :packed # The field type URL, without the scheme, for message or enumeration types. # Example: "type.googleapis.com/google.protobuf.Timestamp". # Corresponds to the JSON property `typeUrl` # @return [String] attr_accessor :type_url def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @cardinality = args[:cardinality] if args.key?(:cardinality) @default_value = args[:default_value] if args.key?(:default_value) @json_name = args[:json_name] if args.key?(:json_name) @kind = args[:kind] if args.key?(:kind) @name = args[:name] if args.key?(:name) @number = args[:number] if args.key?(:number) @oneof_index = args[:oneof_index] if args.key?(:oneof_index) @options = args[:options] if args.key?(:options) @packed = args[:packed] if args.key?(:packed) @type_url = args[:type_url] if args.key?(:type_url) end end # A protocol buffer option, which can be attached to a message, field, # enumeration, etc. class Option include Google::Apis::Core::Hashable # The option's name. For protobuf built-in options (options defined in # descriptor.proto), this is the short name. For example, "map_entry". For # custom options, it should be the fully-qualified name. For example, "google. # api.http". # Corresponds to the JSON property `name` # @return [String] attr_accessor :name # The option's value packed in an Any message. If the value is a primitive, the # corresponding wrapper type defined in google/protobuf/wrappers.proto should be # used. If the value is an enum, it should be stored as an int32 value using the # google.protobuf.Int32Value type. # Corresponds to the JSON property `value` # @return [Hash] attr_accessor :value def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @name = args[:name] if args.key?(:name) @value = args[:value] if args.key?(:value) end end # SourceContext represents information about the source of a protobuf element, # like the file in which it is defined. class SourceContext include Google::Apis::Core::Hashable # The path-qualified name of the .proto file that contained the associated # protobuf element. For example: "google/protobuf/source_context.proto". # Corresponds to the JSON property `fileName` # @return [String] attr_accessor :file_name def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @file_name = args[:file_name] if args.key?(:file_name) end end # The context of a span, attached to google.api.Distribution.Exemplars in google. # api.Distribution values during aggregation.It contains the name of a span with # format: projects/PROJECT_ID/traces/TRACE_ID/spans/SPAN_ID class SpanContext include Google::Apis::Core::Hashable # The resource name of the span in the following format: # projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] # TRACE_ID is a unique identifier for a trace within a project; it is a 32- # character hexadecimal encoding of a 16-byte array.SPAN_ID is a unique # identifier for a span within a trace; it is a 16-character hexadecimal # encoding of an 8-byte array. # Corresponds to the JSON property `spanName` # @return [String] attr_accessor :span_name def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @span_name = args[:span_name] if args.key?(:span_name) end end # A protocol buffer message type. class Type include Google::Apis::Core::Hashable # The list of fields. # Corresponds to the JSON property `fields` # @return [Array] attr_accessor :fields # The fully qualified message name. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name # The list of types appearing in oneof definitions in this type. # Corresponds to the JSON property `oneofs` # @return [Array] attr_accessor :oneofs # The protocol buffer options. # Corresponds to the JSON property `options` # @return [Array] attr_accessor :options # SourceContext represents information about the source of a protobuf element, # like the file in which it is defined. # Corresponds to the JSON property `sourceContext` # @return [Google::Apis::MonitoringV1::SourceContext] attr_accessor :source_context # The source syntax. # Corresponds to the JSON property `syntax` # @return [String] attr_accessor :syntax def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @fields = args[:fields] if args.key?(:fields) @name = args[:name] if args.key?(:name) @oneofs = args[:oneofs] if args.key?(:oneofs) @options = args[:options] if args.key?(:options) @source_context = args[:source_context] if args.key?(:source_context) @syntax = args[:syntax] if args.key?(:syntax) end end end end end