Class: Google::Apis::SourcerepoV1::MirrorConfig

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

Configuration to automatically mirror a repository from another hosting service, for example GitHub or Bitbucket.

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) ⇒ MirrorConfig

Returns a new instance of MirrorConfig.



358
359
360
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 358

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

Instance Attribute Details

#deploy_key_idString

ID of the SSH deploy key at the other hosting service. Removing this key from the other service would deauthorize Google Cloud Source Repositories from mirroring. Corresponds to the JSON property deployKeyId

Returns:

  • (String)


343
344
345
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 343

def deploy_key_id
  @deploy_key_id
end

#urlString

URL of the main repository at the other hosting service. Corresponds to the JSON property url

Returns:

  • (String)


348
349
350
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 348

def url
  @url
end

#webhook_idString

ID of the webhook listening to updates to trigger mirroring. Removing this webhook from the other hosting service will stop Google Cloud Source Repositories from receiving notifications, and thereby disabling mirroring. Corresponds to the JSON property webhookId

Returns:

  • (String)


356
357
358
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 356

def webhook_id
  @webhook_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



363
364
365
366
367
# File 'generated/google/apis/sourcerepo_v1/classes.rb', line 363

def update!(**args)
  @deploy_key_id = args[:deploy_key_id] if args.key?(:deploy_key_id)
  @url = args[:url] if args.key?(:url)
  @webhook_id = args[:webhook_id] if args.key?(:webhook_id)
end