Class: Google::Apis::SourcerepoV1::Repo

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

Overview

A repository (or repo) is a Git repository storing versioned source content.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Repo

Returns a new instance of Repo



214
215
216
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 214

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

Instance Attribute Details

#mirror_configGoogle::Apis::SourcerepoV1::MirrorConfig

Configuration to automatically mirror a repository from another hosting service, for example GitHub or BitBucket. Corresponds to the JSON property mirrorConfig



196
197
198
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 196

def mirror_config
  @mirror_config
end

#nameString

Resource name of the repository, of the form projects/<project>/repos/<repo>. Corresponds to the JSON property name

Returns:

  • (String)


212
213
214
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 212

def name
  @name
end

#sizeFixnum

The size in bytes of the repo. Corresponds to the JSON property size

Returns:

  • (Fixnum)


206
207
208
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 206

def size
  @size
end

#urlString

URL to clone the repository from Google Cloud Source Repositories. Corresponds to the JSON property url

Returns:

  • (String)


201
202
203
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 201

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



219
220
221
222
223
224
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 219

def update!(**args)
  @mirror_config = args[:mirror_config] if args.key?(:mirror_config)
  @url = args[:url] if args.key?(:url)
  @size = args[:size] if args.key?(:size)
  @name = args[:name] if args.key?(:name)
end