Class: Google::Apis::RunV1alpha1::ResourceRequirements

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/run_v1alpha1/classes.rb,
lib/google/apis/run_v1alpha1/representations.rb,
lib/google/apis/run_v1alpha1/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.



3714
3715
3716
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 3714

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

Instance Attribute Details

#limitsHash<String,String>

Limits describes the maximum amount of compute resources allowed. The values of the map is string form of the 'quantity' k8s type: https://github.com/ kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/ resource/quantity.go Corresponds to the JSON property limits

Returns:

  • (Hash<String,String>)


3684
3685
3686
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 3684

def limits
  @limits
end

#limits_in_mapHash<String,Google::Apis::RunV1alpha1::Quantity>

Limits describes the maximum amount of compute resources allowed. This is a temporary field created to migrate away from the map limits field. This is done to become compliant with k8s style API. This field is deprecated in favor of limits field. Corresponds to the JSON property limitsInMap

Returns:



3692
3693
3694
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 3692

def limits_in_map
  @limits_in_map
end

#requestsHash<String,String>

Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. The values of the map is string form of the 'quantity' k8s type: https://github.com/ kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/ resource/quantity.go Corresponds to the JSON property requests

Returns:

  • (Hash<String,String>)


3702
3703
3704
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 3702

def requests
  @requests
end

#requests_in_mapHash<String,Google::Apis::RunV1alpha1::Quantity>

Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. This is a temporary field created to migrate away from the map requests field. This is done to become compliant with k8s style API. This field is deprecated in favor of requests field. Corresponds to the JSON property requestsInMap

Returns:



3712
3713
3714
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 3712

def requests_in_map
  @requests_in_map
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3719
3720
3721
3722
3723
3724
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 3719

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