# Cloud Source Repositories API . projects

## Instance Methods

Returns the repos Resource.

Close httplib2 connections.

Returns the Cloud Source Repositories configuration of the project.

Updates the Cloud Source Repositories configuration of the project.

### Method Details

`close()`

    Close httplib2 connections.

`getConfig(name, x__xgafv=None)`

    Returns the Cloud Source Repositories configuration of the project.

    Args:
      name: string, The name of the requested project. Values are of the form `projects/`. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Cloud Source Repositories configuration of a project.
        "name": "A String", # The name of the project. Values are of the form `projects/`.
        "pubsubConfigs": { # How this project publishes a change in the repositories through Cloud Pub/Sub. Keyed by the topic names.
          "a_key": { # Configuration to publish a Cloud Pub/Sub message.
            "messageFormat": "A String", # The format of the Cloud Pub/Sub messages.
            "serviceAccountEmail": "A String", # Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
            "topic": "A String", # A topic of Cloud Pub/Sub. Values are of the form `projects//topics/`. The project needs to be the same project as this config is in.
          },
        },
        "enablePrivateKeyCheck": True or False, # Reject a Git push that contains a private key.
      }

`updateConfig(name, body=None, x__xgafv=None)`

    Updates the Cloud Source Repositories configuration of the project.

    Args:
      name: string, The name of the requested project. Values are of the form `projects/`. (required)
      body: object, The request body.
        The object takes the form of:

    { # Request for UpdateProjectConfig.
        "projectConfig": { # Cloud Source Repositories configuration of a project. # The new configuration for the project.
          "name": "A String", # The name of the project. Values are of the form `projects/`.
          "pubsubConfigs": { # How this project publishes a change in the repositories through Cloud Pub/Sub. Keyed by the topic names.
            "a_key": { # Configuration to publish a Cloud Pub/Sub message.
              "messageFormat": "A String", # The format of the Cloud Pub/Sub messages.
              "serviceAccountEmail": "A String", # Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
              "topic": "A String", # A topic of Cloud Pub/Sub. Values are of the form `projects//topics/`. The project needs to be the same project as this config is in.
            },
          },
          "enablePrivateKeyCheck": True or False, # Reject a Git push that contains a private key.
        },
        "updateMask": "A String", # A FieldMask specifying which fields of the project_config to modify. Only the fields in the mask will be modified. If no mask is provided, this request is no-op.
      }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Cloud Source Repositories configuration of a project.
        "name": "A String", # The name of the project. Values are of the form `projects/`.
        "pubsubConfigs": { # How this project publishes a change in the repositories through Cloud Pub/Sub. Keyed by the topic names.
          "a_key": { # Configuration to publish a Cloud Pub/Sub message.
            "messageFormat": "A String", # The format of the Cloud Pub/Sub messages.
            "serviceAccountEmail": "A String", # Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
            "topic": "A String", # A topic of Cloud Pub/Sub. Values are of the form `projects//topics/`. The project needs to be the same project as this config is in.
          },
        },
        "enablePrivateKeyCheck": True or False, # Reject a Git push that contains a private key.
      }