Class: Google::Apis::CloudbuildV1::GitFileSource

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

Overview

GitFileSource describes a file within a (possibly remote) code repository.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GitFileSource

Returns a new instance of GitFileSource.



1225
1226
1227
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 1225

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

Instance Attribute Details

#pathString

The path of the file, with the repo root as the root of the path. Corresponds to the JSON property path

Returns:

  • (String)


1202
1203
1204
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 1202

def path
  @path
end

#repo_typeString

See RepoType above. Corresponds to the JSON property repoType

Returns:

  • (String)


1207
1208
1209
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 1207

def repo_type
  @repo_type
end

#revisionString

The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/ resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path. Corresponds to the JSON property revision

Returns:

  • (String)


1216
1217
1218
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 1216

def revision
  @revision
end

#uriString

The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path. Corresponds to the JSON property uri

Returns:

  • (String)


1223
1224
1225
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 1223

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1230
1231
1232
1233
1234
1235
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 1230

def update!(**args)
  @path = args[:path] if args.key?(:path)
  @repo_type = args[:repo_type] if args.key?(:repo_type)
  @revision = args[:revision] if args.key?(:revision)
  @uri = args[:uri] if args.key?(:uri)
end