Class: Google::Apis::ArtifactregistryV1::CleanupPolicyMostRecentVersions

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

Overview

CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy for retaining a minimum number of versions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CleanupPolicyMostRecentVersions

Returns a new instance of CleanupPolicyMostRecentVersions.



435
436
437
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 435

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

Instance Attribute Details

#keep_countFixnum

Minimum number of versions to keep. Corresponds to the JSON property keepCount

Returns:

  • (Fixnum)


428
429
430
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 428

def keep_count
  @keep_count
end

#package_name_prefixesArray<String>

List of package name prefixes that will apply this rule. Corresponds to the JSON property packageNamePrefixes

Returns:

  • (Array<String>)


433
434
435
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 433

def package_name_prefixes
  @package_name_prefixes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



440
441
442
443
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 440

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