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.



226
227
228
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 226

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

Instance Attribute Details

#actionString

Policy action. Corresponds to the JSON property action

Returns:

  • (String)


206
207
208
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 206

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



213
214
215
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 213

def condition
  @condition
end

#idString

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

Returns:

  • (String)


218
219
220
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 218

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



224
225
226
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 224

def most_recent_versions
  @most_recent_versions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



231
232
233
234
235
236
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 231

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