Class: Google::Apis::ServiceusageV1beta1::ConsumerQuotaMetric

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/serviceusage_v1beta1/classes.rb,
lib/google/apis/serviceusage_v1beta1/representations.rb,
lib/google/apis/serviceusage_v1beta1/representations.rb

Overview

Consumer quota settings for a quota metric.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ConsumerQuotaMetric

Returns a new instance of ConsumerQuotaMetric.



1052
1053
1054
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1052

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#consumer_quota_limitsArray<Google::Apis::ServiceusageV1beta1::ConsumerQuotaLimit>

The consumer quota for each quota limit defined on the metric. Corresponds to the JSON property consumerQuotaLimits



1017
1018
1019
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1017

def consumer_quota_limits
  @consumer_quota_limits
end

#descendant_consumer_quota_limitsArray<Google::Apis::ServiceusageV1beta1::ConsumerQuotaLimit>

The quota limits targeting the descendant containers of the consumer in request. If the consumer in request is of type organizations or folders, the field will list per-project limits in the metric; if the consumer in request is of type project, the field will be empty. The quota_buckets field of each descendant consumer quota limit will not be populated. Corresponds to the JSON property descendantConsumerQuotaLimits



1026
1027
1028
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1026

def descendant_consumer_quota_limits
  @descendant_consumer_quota_limits
end

#display_nameString

The display name of the metric. An example name would be: CPUs Corresponds to the JSON property displayName

Returns:

  • (String)


1031
1032
1033
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1031

def display_name
  @display_name
end

#metricString

The name of the metric. An example name would be: compute.googleapis.com/cpus Corresponds to the JSON property metric

Returns:

  • (String)


1036
1037
1038
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1036

def metric
  @metric
end

#nameString

The resource name of the quota settings on this metric for this consumer. An example name would be: projects/123/services/compute.googleapis.com/ consumerQuotaMetrics/compute.googleapis.com%2Fcpus The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future. Corresponds to the JSON property name

Returns:

  • (String)


1045
1046
1047
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1045

def name
  @name
end

#unitString

The units in which the metric value is reported. Corresponds to the JSON property unit

Returns:

  • (String)


1050
1051
1052
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1050

def unit
  @unit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1057
1058
1059
1060
1061
1062
1063
1064
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1057

def update!(**args)
  @consumer_quota_limits = args[:consumer_quota_limits] if args.key?(:consumer_quota_limits)
  @descendant_consumer_quota_limits = args[:descendant_consumer_quota_limits] if args.key?(:descendant_consumer_quota_limits)
  @display_name = args[:display_name] if args.key?(:display_name)
  @metric = args[:metric] if args.key?(:metric)
  @name = args[:name] if args.key?(:name)
  @unit = args[:unit] if args.key?(:unit)
end