# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
#     ***     AUTO GENERATED CODE    ***    AUTO GENERATED CODE     ***
#
# ----------------------------------------------------------------------------
#
#     This file is automatically generated by Magic Modules and manual
#     changes will be clobbered when the file is regenerated.
#
#     Please read more about how to change this file in README.md and
#     CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
require 'google/logging/property/metric_metric_descriptor_labels'
module GoogleInSpec
  module Logging
    module Property
      class MetricMetricDescriptor
        attr_reader :unit

        attr_reader :value_type

        attr_reader :metric_kind

        attr_reader :labels

        attr_reader :display_name

        attr_reader :type

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @unit = args['unit']
          @value_type = args['valueType']
          @metric_kind = args['metricKind']
          @labels = GoogleInSpec::Logging::Property::MetricMetricDescriptorLabelsArray.parse(args['labels'], to_s)
          @display_name = args['displayName']
          @type = args['type']
        end

        def to_s
          "#{@parent_identifier} MetricMetricDescriptor"
        end
      end
    end
  end
end
