Class: Google::Apis::RunV1::Revision

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

Revision is an immutable snapshot of code and configuration. A revision references a container image. Revisions are created by updates to a Configuration. See also: https://github.com/knative/serving/blob/main/docs/ spec/overview.md#revision

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Revision

Returns a new instance of Revision.



2564
2565
2566
# File 'lib/google/apis/run_v1/classes.rb', line 2564

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

Instance Attribute Details

#api_versionString

The API version for this call such as "serving.knative.dev/v1". Corresponds to the JSON property apiVersion

Returns:

  • (String)


2540
2541
2542
# File 'lib/google/apis/run_v1/classes.rb', line 2540

def api_version
  @api_version
end

#kindString

The kind of this resource, in this case "Revision". Corresponds to the JSON property kind

Returns:

  • (String)


2545
2546
2547
# File 'lib/google/apis/run_v1/classes.rb', line 2545

def kind
  @kind
end

#metadataGoogle::Apis::RunV1::ObjectMeta

k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. Corresponds to the JSON property metadata



2551
2552
2553
# File 'lib/google/apis/run_v1/classes.rb', line 2551

def 
  @metadata
end

#specGoogle::Apis::RunV1::RevisionSpec

RevisionSpec holds the desired state of the Revision (from the client). Corresponds to the JSON property spec



2556
2557
2558
# File 'lib/google/apis/run_v1/classes.rb', line 2556

def spec
  @spec
end

#statusGoogle::Apis::RunV1::RevisionStatus

RevisionStatus communicates the observed state of the Revision (from the controller). Corresponds to the JSON property status



2562
2563
2564
# File 'lib/google/apis/run_v1/classes.rb', line 2562

def status
  @status
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2569
2570
2571
2572
2573
2574
2575
# File 'lib/google/apis/run_v1/classes.rb', line 2569

def update!(**args)
  @api_version = args[:api_version] if args.key?(:api_version)
  @kind = args[:kind] if args.key?(:kind)
  @metadata = args[:metadata] if args.key?(:metadata)
  @spec = args[:spec] if args.key?(:spec)
  @status = args[:status] if args.key?(:status)
end