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.



522
523
524
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 522

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

Instance Attribute Details

#annotationsHash<String,String>

Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts. Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


464
465
466
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 464

def annotations
  @annotations
end

#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)


472
473
474
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 472

def contents
  @contents
end

#create_timeString

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

Returns:

  • (String)


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

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)


483
484
485
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 483

def hash_prop
  @hash_prop
end

#labelsHash<String,String>

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with "registry.googleapis.com/" and cannot be changed. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


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

def labels
  @labels
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)


504
505
506
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 504

def mime_type
  @mime_type
end

#nameString

Resource name. Corresponds to the JSON property name

Returns:

  • (String)


509
510
511
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 509

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)


515
516
517
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 515

def size_bytes
  @size_bytes
end

#update_timeString

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

Returns:

  • (String)


520
521
522
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 520

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



527
528
529
530
531
532
533
534
535
536
537
# File 'lib/google/apis/apigeeregistry_v1/classes.rb', line 527

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @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)
  @labels = args[:labels] if args.key?(:labels)
  @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