Class: Google::Apis::RunV1::ResourceRequirements

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

Overview

ResourceRequirements describes the compute resource requirements.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResourceRequirements

Returns a new instance of ResourceRequirements.



2790
2791
2792
# File 'lib/google/apis/run_v1/classes.rb', line 2790

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

Instance Attribute Details

#limitsHash<String,String>

Limits describes the maximum amount of compute resources allowed. Only 'cpu' and 'memory' keys are supported. * For supported 'cpu' values, go to https:// cloud.google.com/run/docs/configuring/cpu. * For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits Corresponds to the JSON property limits

Returns:

  • (Hash<String,String>)


2778
2779
2780
# File 'lib/google/apis/run_v1/classes.rb', line 2778

def limits
  @limits
end

#requestsHash<String,String>

Requests describes the minimum amount of compute resources required. Only cpu and memory are supported. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. * For supported 'cpu' values, go to https:// cloud.google.com/run/docs/configuring/cpu. * For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits Corresponds to the JSON property requests

Returns:

  • (Hash<String,String>)


2788
2789
2790
# File 'lib/google/apis/run_v1/classes.rb', line 2788

def requests
  @requests
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2795
2796
2797
2798
# File 'lib/google/apis/run_v1/classes.rb', line 2795

def update!(**args)
  @limits = args[:limits] if args.key?(:limits)
  @requests = args[:requests] if args.key?(:requests)
end