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

Constructor Details

#initialize(**args) ⇒ Repo

Returns a new instance of Repo.



556
557
558
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 556

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



530
531
532
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 530

def mirror_config
  @mirror_config
end

#nameString

Resource name of the repository, of the form projects//repos/. The repo name may contain slashes. eg, projects/myproject/repos/name/with/slash Corresponds to the JSON property name

Returns:

  • (String)


536
537
538
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 536

def name
  @name
end

#pubsub_configsHash<String,Google::Apis::SourcerepoV1::PubsubConfig>

How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names. Corresponds to the JSON property pubsubConfigs



542
543
544
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 542

def pubsub_configs
  @pubsub_configs
end

#sizeFixnum

The disk usage of the repo, in bytes. Read-only field. Size is only returned by GetRepo. Corresponds to the JSON property size

Returns:

  • (Fixnum)


548
549
550
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 548

def size
  @size
end

#urlString

URL to clone the repository from Google Cloud Source Repositories. Read-only field. Corresponds to the JSON property url

Returns:

  • (String)


554
555
556
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 554

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



561
562
563
564
565
566
567
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 561

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