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.



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

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

Instance Attribute Details

#actionString

Policy action. Corresponds to the JSON property action

Returns:

  • (String)


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

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



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

def condition
  @condition
end

#idString

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

Returns:

  • (String)


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

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



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

def most_recent_versions
  @most_recent_versions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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