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.



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

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)


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

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>)


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

def package_name_prefixes
  @package_name_prefixes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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