Class: Google::Apis::RunV2::GoogleCloudRunV2SourceFile

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

Overview

Source file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2SourceFile

Returns a new instance of GoogleCloudRunV2SourceFile.



3434
3435
3436
# File 'lib/google/apis/run_v2/classes.rb', line 3434

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

Instance Attribute Details

#contentString

Required. Input only. Represents the exact, literal, and complete source code of the file. Placeholders like ... or comments such as # [rest of code] should NEVER be used as omission. Every character in this field will be built into the final container. Any omission will result in a broken application. Corresponds to the JSON property content

Returns:

  • (String)


3423
3424
3425
# File 'lib/google/apis/run_v2/classes.rb', line 3423

def content
  @content
end

#filenameString

Required. Input only. The file name for the source code. e.g., "index.js" or "node_modules/dependency.js". The filename must be less than 255 characters and cannot contain .., ./, //, or end with a /. Cloud Run will place the files in the container subdirectories, please use relative path to access the file. Corresponds to the JSON property filename

Returns:

  • (String)


3432
3433
3434
# File 'lib/google/apis/run_v2/classes.rb', line 3432

def filename
  @filename
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3439
3440
3441
3442
# File 'lib/google/apis/run_v2/classes.rb', line 3439

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