Class: Google::Apis::ContaineranalysisV1alpha1::Resource

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

Overview

Resource is an entity that can have metadata. E.g., a Docker image.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Resource

Returns a new instance of Resource.



3409
3410
3411
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 3409

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

Instance Attribute Details

#content_hashGoogle::Apis::ContaineranalysisV1alpha1::HashProp

Container message for hash values. Corresponds to the JSON property contentHash



3396
3397
3398
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 3396

def content_hash
  @content_hash
end

#nameString

The name of the resource. E.g., the name of a Docker image - "Debian". Corresponds to the JSON property name

Returns:

  • (String)


3401
3402
3403
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 3401

def name
  @name
end

#uriString

The unique URI of the resource. E.g., "https://gcr.io/project/image@sha256:foo" for a Docker image. Corresponds to the JSON property uri

Returns:

  • (String)


3407
3408
3409
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 3407

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3414
3415
3416
3417
3418
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 3414

def update!(**args)
  @content_hash = args[:content_hash] if args.key?(:content_hash)
  @name = args[:name] if args.key?(:name)
  @uri = args[:uri] if args.key?(:uri)
end