Class: Google::Apis::ArtifactregistryV1::CleanupPolicyCondition

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

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CleanupPolicyCondition

Returns a new instance of CleanupPolicyCondition.



300
301
302
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 300

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

Instance Attribute Details

#newer_thanString

Match versions newer than a duration. Corresponds to the JSON property newerThan

Returns:

  • (String)


268
269
270
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 268

def newer_than
  @newer_than
end

#older_thanString

Match versions older than a duration. Corresponds to the JSON property olderThan

Returns:

  • (String)


273
274
275
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 273

def older_than
  @older_than
end

#package_name_prefixesArray<String>

Match versions by package prefix. Applied on any prefix match. Corresponds to the JSON property packageNamePrefixes

Returns:

  • (Array<String>)


278
279
280
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 278

def package_name_prefixes
  @package_name_prefixes
end

#tag_prefixesArray<String>

Match versions by tag prefix. Applied on any prefix match. Corresponds to the JSON property tagPrefixes

Returns:

  • (Array<String>)


283
284
285
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 283

def tag_prefixes
  @tag_prefixes
end

#tag_stateString

Match versions by tag status. Corresponds to the JSON property tagState

Returns:

  • (String)


288
289
290
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 288

def tag_state
  @tag_state
end

#version_ageString

DEPRECATED: Use older_than. Corresponds to the JSON property versionAge

Returns:

  • (String)


293
294
295
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 293

def version_age
  @version_age
end

#version_name_prefixesArray<String>

Match versions by version name prefix. Applied on any prefix match. Corresponds to the JSON property versionNamePrefixes

Returns:

  • (Array<String>)


298
299
300
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 298

def version_name_prefixes
  @version_name_prefixes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



305
306
307
308
309
310
311
312
313
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 305

def update!(**args)
  @newer_than = args[:newer_than] if args.key?(:newer_than)
  @older_than = args[:older_than] if args.key?(:older_than)
  @package_name_prefixes = args[:package_name_prefixes] if args.key?(:package_name_prefixes)
  @tag_prefixes = args[:tag_prefixes] if args.key?(:tag_prefixes)
  @tag_state = args[:tag_state] if args.key?(:tag_state)
  @version_age = args[:version_age] if args.key?(:version_age)
  @version_name_prefixes = args[:version_name_prefixes] if args.key?(:version_name_prefixes)
end