Class: Google::Apis::ArtifactregistryV1::DockerImage

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

DockerImage represents a docker artifact. The following fields are returned as untyped metadata in the Version resource, using camelcase keys (i.e. metadata. imageSizeBytes): * imageSizeBytes * mediaType * buildTime

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DockerImage

Returns a new instance of DockerImage.



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

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

Instance Attribute Details

#build_timeString

The time this image was built. This field is returned as the 'metadata. buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor. Corresponds to the JSON property buildTime

Returns:

  • (String)


184
185
186
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 184

def build_time
  @build_time
end

#image_size_bytesFixnum

Calculated size of the image. This field is returned as the 'metadata. imageSizeBytes' field in the Version resource. Corresponds to the JSON property imageSizeBytes

Returns:

  • (Fixnum)


190
191
192
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 190

def image_size_bytes
  @image_size_bytes
end

#media_typeString

Media type of this image, e.g. "application/vnd.docker.distribution.manifest. v2+json". This field is returned as the 'metadata.mediaType' field in the Version resource. Corresponds to the JSON property mediaType

Returns:

  • (String)


197
198
199
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 197

def media_type
  @media_type
end

#nameString

Required. registry_location, project_id, repository_name and image id forms a unique image name:projects//locations//repository//dockerImages/. For example, "projects/test-project/locations/us-west4/repositories/test-repo/ dockerImages/ nginx@sha256: e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", where "us- west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "nginx@sha256: e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" is the image' s digest. Corresponds to the JSON property name

Returns:

  • (String)


210
211
212
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 210

def name
  @name
end

#tagsArray<String>

Tags attached to this image. Corresponds to the JSON property tags

Returns:

  • (Array<String>)


215
216
217
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 215

def tags
  @tags
end

#update_timeString

Output only. The time when the docker image was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


220
221
222
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 220

def update_time
  @update_time
end

#upload_timeString

Time the image was uploaded. Corresponds to the JSON property uploadTime

Returns:

  • (String)


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

def upload_time
  @upload_time
end

#uriString

Required. URL to access the image. Example: us-west4-docker.pkg.dev/test- project/test-repo/nginx@sha256: e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf Corresponds to the JSON property uri

Returns:

  • (String)


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

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



239
240
241
242
243
244
245
246
247
248
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 239

def update!(**args)
  @build_time = args[:build_time] if args.key?(:build_time)
  @image_size_bytes = args[:image_size_bytes] if args.key?(:image_size_bytes)
  @media_type = args[:media_type] if args.key?(:media_type)
  @name = args[:name] if args.key?(:name)
  @tags = args[:tags] if args.key?(:tags)
  @update_time = args[:update_time] if args.key?(:update_time)
  @upload_time = args[:upload_time] if args.key?(:upload_time)
  @uri = args[:uri] if args.key?(:uri)
end