Class: Google::Apis::ArtifactregistryV1::UploadGenericArtifactRequest

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

The request to upload a generic artifact. The created GenericArtifact will have the resource name parent/genericArtifacts/package_id:version_id. The created file will have the resource name parent/files/package_id:version_id: filename.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UploadGenericArtifactRequest

Returns a new instance of UploadGenericArtifactRequest.



2641
2642
2643
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 2641

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

Instance Attribute Details

#filenameString

The name of the file of the generic artifact to be uploaded. E.g. example- file.zip The filename is limited to letters, numbers, and url safe characters, i.e. [a-zA-Z0-9-_.~@]. Corresponds to the JSON property filename

Returns:

  • (String)


2622
2623
2624
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 2622

def filename
  @filename
end

#package_idString

The ID of the package of the generic artifact. If the package does not exist, a new package will be created. The package_id should start and end with a letter or number, only contain letters, numbers, hyphens, underscores, and periods, and not exceed 256 characters. Corresponds to the JSON property packageId

Returns:

  • (String)


2630
2631
2632
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 2630

def package_id
  @package_id
end

#version_idString

The ID of the version of the generic artifact. If the version does not exist, a new version will be created. The version_id must start and end with a letter or number, can only contain lowercase letters, numbers, hyphens and periods, i. e. [a-z0-9-.] and cannot exceed a total of 128 characters. Creating a version called latest is not allowed. Corresponds to the JSON property versionId

Returns:

  • (String)


2639
2640
2641
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 2639

def version_id
  @version_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2646
2647
2648
2649
2650
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 2646

def update!(**args)
  @filename = args[:filename] if args.key?(:filename)
  @package_id = args[:package_id] if args.key?(:package_id)
  @version_id = args[:version_id] if args.key?(:version_id)
end