Class: Google::Apis::ApigeeregistryV1::Artifact

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/apigeeregistry_v1/classes.rb,
lib/google/apis/apigeeregistry_v1/representations.rb,
lib/google/apis/apigeeregistry_v1/representations.rb

Overview

Artifacts of resources. Artifacts are unique (single-value) per resource and are used to store metadata that is too large or numerous to be stored directly on the resource. Since artifacts are stored separately from parent resources, they should generally be used for metadata that is needed infrequently, i.e., not for display in primary views of the resource but perhaps displayed or downloaded upon request. The ListArtifacts method allows artifacts to be quickly enumerated and checked for presence without downloading their ( potentially-large) contents.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Artifact

Returns a new instance of Artifact.



494
495
496
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 494

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

Instance Attribute Details

#contentsString

Input only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents. Corresponds to the JSON property contents NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


456
457
458
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 456

def contents
  @contents
end

#create_timeString

Output only. Creation timestamp. Corresponds to the JSON property createTime

Returns:

  • (String)


461
462
463
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 461

def create_time
  @create_time
end

#hash_propString

Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact. Corresponds to the JSON property hash

Returns:

  • (String)


467
468
469
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 467

def hash_prop
  @hash_prop
end

#mime_typeString

A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported ( indicated with "+gzip"). Corresponds to the JSON property mimeType

Returns:

  • (String)


476
477
478
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 476

def mime_type
  @mime_type
end

#nameString

Resource name. Corresponds to the JSON property name

Returns:

  • (String)


481
482
483
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 481

def name
  @name
end

#size_bytesFixnum

Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact. Corresponds to the JSON property sizeBytes

Returns:

  • (Fixnum)


487
488
489
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 487

def size_bytes
  @size_bytes
end

#update_timeString

Output only. Last update timestamp. Corresponds to the JSON property updateTime

Returns:

  • (String)


492
493
494
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 492

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



499
500
501
502
503
504
505
506
507
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 499

def update!(**args)
  @contents = args[:contents] if args.key?(:contents)
  @create_time = args[:create_time] if args.key?(:create_time)
  @hash_prop = args[:hash_prop] if args.key?(:hash_prop)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
  @name = args[:name] if args.key?(:name)
  @size_bytes = args[:size_bytes] if args.key?(:size_bytes)
  @update_time = args[:update_time] if args.key?(:update_time)
end