Class: Google::Apis::OndemandscanningV1beta1::Version

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

Overview

Version contains structured information about the version of a package.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Version

Returns a new instance of Version.



2523
2524
2525
# File 'lib/google/apis/ondemandscanning_v1beta1/classes.rb', line 2523

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

Instance Attribute Details

#epochFixnum

Used to correct mistakes in the version numbering scheme. Corresponds to the JSON property epoch

Returns:

  • (Fixnum)


2489
2490
2491
# File 'lib/google/apis/ondemandscanning_v1beta1/classes.rb', line 2489

def epoch
  @epoch
end

#full_nameString

Human readable version string. This string is of the form :- and is only set when kind is NORMAL. Corresponds to the JSON property fullName

Returns:

  • (String)


2495
2496
2497
# File 'lib/google/apis/ondemandscanning_v1beta1/classes.rb', line 2495

def full_name
  @full_name
end

#inclusiveBoolean Also known as: inclusive?

Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. Corresponds to the JSON property inclusive

Returns:

  • (Boolean)


2505
2506
2507
# File 'lib/google/apis/ondemandscanning_v1beta1/classes.rb', line 2505

def inclusive
  @inclusive
end

#kindString

Required. Distinguishes between sentinel MIN/MAX versions and normal versions. Corresponds to the JSON property kind

Returns:

  • (String)


2511
2512
2513
# File 'lib/google/apis/ondemandscanning_v1beta1/classes.rb', line 2511

def kind
  @kind
end

#nameString

Required only when version kind is NORMAL. The main part of the version name. Corresponds to the JSON property name

Returns:

  • (String)


2516
2517
2518
# File 'lib/google/apis/ondemandscanning_v1beta1/classes.rb', line 2516

def name
  @name
end

#revisionString

The iteration of the package build from the above version. Corresponds to the JSON property revision

Returns:

  • (String)


2521
2522
2523
# File 'lib/google/apis/ondemandscanning_v1beta1/classes.rb', line 2521

def revision
  @revision
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2528
2529
2530
2531
2532
2533
2534
2535
# File 'lib/google/apis/ondemandscanning_v1beta1/classes.rb', line 2528

def update!(**args)
  @epoch = args[:epoch] if args.key?(:epoch)
  @full_name = args[:full_name] if args.key?(:full_name)
  @inclusive = args[:inclusive] if args.key?(:inclusive)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @revision = args[:revision] if args.key?(:revision)
end