Class: Google::Apis::ArtifactregistryV1::CleanupPolicy

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

Artifact policy configuration for repository cleanup policies.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CleanupPolicy

Returns a new instance of CleanupPolicy.



355
356
357
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 355

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

Instance Attribute Details

#actionString

Policy action. Corresponds to the JSON property action

Returns:

  • (String)


335
336
337
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 335

def action
  @action
end

#conditionGoogle::Apis::ArtifactregistryV1::CleanupPolicyCondition

CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. If multiple entries are set, all must be satisfied for the condition to be satisfied. Corresponds to the JSON property condition



342
343
344
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 342

def condition
  @condition
end

#idString

The user-provided ID of the cleanup policy. Corresponds to the JSON property id

Returns:

  • (String)


347
348
349
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 347

def id
  @id
end

#most_recent_versionsGoogle::Apis::ArtifactregistryV1::CleanupPolicyMostRecentVersions

CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy for retaining a minimum number of versions. Corresponds to the JSON property mostRecentVersions



353
354
355
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 353

def most_recent_versions
  @most_recent_versions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



360
361
362
363
364
365
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 360

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @condition = args[:condition] if args.key?(:condition)
  @id = args[:id] if args.key?(:id)
  @most_recent_versions = args[:most_recent_versions] if args.key?(:most_recent_versions)
end