| // Copyright 2026 Google LLC. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // Code generated file. DO NOT EDIT. |
| |
| // Package developerconnect provides access to the Developer Connect API. |
| // |
| // For product documentation, see: http://cloud.google.com/developer-connect/docs/overview |
| // |
| // # Library status |
| // |
| // These client libraries are officially supported by Google. However, this |
| // library is considered complete and is in maintenance mode. This means |
| // that we will address critical bugs and security issues but will not add |
| // any new features. |
| // |
| // When possible, we recommend using our newer |
| // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) |
| // that are still actively being worked and iterated on. |
| // |
| // # Creating a client |
| // |
| // Usage example: |
| // |
| // import "google.golang.org/api/developerconnect/v1" |
| // ... |
| // ctx := context.Background() |
| // developerconnectService, err := developerconnect.NewService(ctx) |
| // |
| // In this example, Google Application Default Credentials are used for |
| // authentication. For information on how to create and obtain Application |
| // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. |
| // |
| // # Other authentication options |
| // |
| // To use an API key for authentication (note: some APIs do not support API |
| // keys), use [google.golang.org/api/option.WithAPIKey]: |
| // |
| // developerconnectService, err := developerconnect.NewService(ctx, option.WithAPIKey("AIza...")) |
| // |
| // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth |
| // flow, use [google.golang.org/api/option.WithTokenSource]: |
| // |
| // config := &oauth2.Config{...} |
| // // ... |
| // token, err := config.Exchange(ctx, ...) |
| // developerconnectService, err := developerconnect.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) |
| // |
| // See [google.golang.org/api/option.ClientOption] for details on options. |
| package developerconnect // import "google.golang.org/api/developerconnect/v1" |
| |
| import ( |
| "bytes" |
| "context" |
| "encoding/json" |
| "errors" |
| "fmt" |
| "io" |
| "log/slog" |
| "net/http" |
| "net/url" |
| "strconv" |
| "strings" |
| |
| "github.com/googleapis/gax-go/v2/internallog" |
| googleapi "google.golang.org/api/googleapi" |
| internal "google.golang.org/api/internal" |
| gensupport "google.golang.org/api/internal/gensupport" |
| option "google.golang.org/api/option" |
| internaloption "google.golang.org/api/option/internaloption" |
| htransport "google.golang.org/api/transport/http" |
| ) |
| |
| // Always reference these packages, just in case the auto-generated code |
| // below doesn't. |
| var _ = bytes.NewBuffer |
| var _ = strconv.Itoa |
| var _ = fmt.Sprintf |
| var _ = json.NewDecoder |
| var _ = io.Copy |
| var _ = url.Parse |
| var _ = gensupport.MarshalJSON |
| var _ = googleapi.Version |
| var _ = errors.New |
| var _ = strings.Replace |
| var _ = context.Canceled |
| var _ = internaloption.WithDefaultEndpoint |
| var _ = internal.Version |
| var _ = internallog.New |
| |
| const apiId = "developerconnect:v1" |
| const apiName = "developerconnect" |
| const apiVersion = "v1" |
| const basePath = "https://developerconnect.googleapis.com/" |
| const basePathTemplate = "https://developerconnect.UNIVERSE_DOMAIN/" |
| const mtlsBasePath = "https://developerconnect.mtls.googleapis.com/" |
| |
| // OAuth2 scopes used by this API. |
| const ( |
| // See, edit, configure, and delete your Google Cloud data and see the email |
| // address for your Google Account. |
| CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" |
| ) |
| |
| // NewService creates a new Service. |
| func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { |
| scopesOption := internaloption.WithDefaultScopes( |
| "https://www.googleapis.com/auth/cloud-platform", |
| ) |
| // NOTE: prepend, so we don't override user-specified scopes. |
| opts = append([]option.ClientOption{scopesOption}, opts...) |
| opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) |
| opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) |
| opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) |
| opts = append(opts, internaloption.EnableNewAuthLibrary()) |
| client, endpoint, err := htransport.NewClient(ctx, opts...) |
| if err != nil { |
| return nil, err |
| } |
| s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} |
| s.Projects = NewProjectsService(s) |
| if endpoint != "" { |
| s.BasePath = endpoint |
| } |
| return s, nil |
| } |
| |
| // New creates a new Service. It uses the provided http.Client for requests. |
| // |
| // Deprecated: please use NewService instead. |
| // To provide a custom HTTP client, use option.WithHTTPClient. |
| // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. |
| func New(client *http.Client) (*Service, error) { |
| if client == nil { |
| return nil, errors.New("client is nil") |
| } |
| return NewService(context.TODO(), option.WithHTTPClient(client)) |
| } |
| |
| type Service struct { |
| client *http.Client |
| logger *slog.Logger |
| BasePath string // API endpoint base URL |
| UserAgent string // optional additional User-Agent fragment |
| |
| Projects *ProjectsService |
| } |
| |
| func (s *Service) userAgent() string { |
| if s.UserAgent == "" { |
| return googleapi.UserAgent |
| } |
| return googleapi.UserAgent + " " + s.UserAgent |
| } |
| |
| func NewProjectsService(s *Service) *ProjectsService { |
| rs := &ProjectsService{s: s} |
| rs.Locations = NewProjectsLocationsService(s) |
| return rs |
| } |
| |
| type ProjectsService struct { |
| s *Service |
| |
| Locations *ProjectsLocationsService |
| } |
| |
| func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { |
| rs := &ProjectsLocationsService{s: s} |
| rs.AccountConnectors = NewProjectsLocationsAccountConnectorsService(s) |
| rs.Connections = NewProjectsLocationsConnectionsService(s) |
| rs.InsightsConfigs = NewProjectsLocationsInsightsConfigsService(s) |
| rs.Operations = NewProjectsLocationsOperationsService(s) |
| return rs |
| } |
| |
| type ProjectsLocationsService struct { |
| s *Service |
| |
| AccountConnectors *ProjectsLocationsAccountConnectorsService |
| |
| Connections *ProjectsLocationsConnectionsService |
| |
| InsightsConfigs *ProjectsLocationsInsightsConfigsService |
| |
| Operations *ProjectsLocationsOperationsService |
| } |
| |
| func NewProjectsLocationsAccountConnectorsService(s *Service) *ProjectsLocationsAccountConnectorsService { |
| rs := &ProjectsLocationsAccountConnectorsService{s: s} |
| rs.Users = NewProjectsLocationsAccountConnectorsUsersService(s) |
| return rs |
| } |
| |
| type ProjectsLocationsAccountConnectorsService struct { |
| s *Service |
| |
| Users *ProjectsLocationsAccountConnectorsUsersService |
| } |
| |
| func NewProjectsLocationsAccountConnectorsUsersService(s *Service) *ProjectsLocationsAccountConnectorsUsersService { |
| rs := &ProjectsLocationsAccountConnectorsUsersService{s: s} |
| return rs |
| } |
| |
| type ProjectsLocationsAccountConnectorsUsersService struct { |
| s *Service |
| } |
| |
| func NewProjectsLocationsConnectionsService(s *Service) *ProjectsLocationsConnectionsService { |
| rs := &ProjectsLocationsConnectionsService{s: s} |
| rs.GitRepositoryLinks = NewProjectsLocationsConnectionsGitRepositoryLinksService(s) |
| return rs |
| } |
| |
| type ProjectsLocationsConnectionsService struct { |
| s *Service |
| |
| GitRepositoryLinks *ProjectsLocationsConnectionsGitRepositoryLinksService |
| } |
| |
| func NewProjectsLocationsConnectionsGitRepositoryLinksService(s *Service) *ProjectsLocationsConnectionsGitRepositoryLinksService { |
| rs := &ProjectsLocationsConnectionsGitRepositoryLinksService{s: s} |
| return rs |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksService struct { |
| s *Service |
| } |
| |
| func NewProjectsLocationsInsightsConfigsService(s *Service) *ProjectsLocationsInsightsConfigsService { |
| rs := &ProjectsLocationsInsightsConfigsService{s: s} |
| rs.DeploymentEvents = NewProjectsLocationsInsightsConfigsDeploymentEventsService(s) |
| return rs |
| } |
| |
| type ProjectsLocationsInsightsConfigsService struct { |
| s *Service |
| |
| DeploymentEvents *ProjectsLocationsInsightsConfigsDeploymentEventsService |
| } |
| |
| func NewProjectsLocationsInsightsConfigsDeploymentEventsService(s *Service) *ProjectsLocationsInsightsConfigsDeploymentEventsService { |
| rs := &ProjectsLocationsInsightsConfigsDeploymentEventsService{s: s} |
| return rs |
| } |
| |
| type ProjectsLocationsInsightsConfigsDeploymentEventsService struct { |
| s *Service |
| } |
| |
| func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { |
| rs := &ProjectsLocationsOperationsService{s: s} |
| return rs |
| } |
| |
| type ProjectsLocationsOperationsService struct { |
| s *Service |
| } |
| |
| // AccountConnector: AccountConnector encapsulates what a platform |
| // administrator needs to configure for users to connect to the service |
| // providers, which includes, among other fields, the OAuth client ID, client |
| // secret, and authorization and token endpoints. |
| type AccountConnector struct { |
| // Annotations: Optional. Allows users to store small amounts of arbitrary |
| // data. |
| Annotations map[string]string `json:"annotations,omitempty"` |
| // CreateTime: Output only. The timestamp when the accountConnector was |
| // created. |
| CreateTime string `json:"createTime,omitempty"` |
| // Etag: Optional. This checksum is computed by the server based on the value |
| // of other fields, and may be sent on update and delete requests to ensure the |
| // client has an up-to-date value before proceeding. |
| Etag string `json:"etag,omitempty"` |
| // Labels: Optional. Labels as key value pairs |
| Labels map[string]string `json:"labels,omitempty"` |
| // Name: Identifier. The resource name of the accountConnector, in the format |
| // `projects/{project}/locations/{location}/accountConnectors/{account_connector |
| // _id}`. |
| Name string `json:"name,omitempty"` |
| // OauthStartUri: Output only. Start OAuth flow by clicking on this URL. |
| OauthStartUri string `json:"oauthStartUri,omitempty"` |
| // ProviderOauthConfig: Optional. Provider OAuth config. |
| ProviderOauthConfig *ProviderOAuthConfig `json:"providerOauthConfig,omitempty"` |
| // UpdateTime: Output only. The timestamp when the accountConnector was |
| // updated. |
| UpdateTime string `json:"updateTime,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "Annotations") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Annotations") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s AccountConnector) MarshalJSON() ([]byte, error) { |
| type NoMethod AccountConnector |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // AppHubService: AppHubService represents the App Hub Service. |
| type AppHubService struct { |
| // ApphubService: Required. Output only. Immutable. The name of the App Hub |
| // Service. Format: |
| // `projects/{project}/locations/{location}/applications/{application}/services/ |
| // {service}`. |
| ApphubService string `json:"apphubService,omitempty"` |
| // Criticality: Output only. The criticality of the App Hub Service. |
| Criticality string `json:"criticality,omitempty"` |
| // Environment: Output only. The environment of the App Hub Service. |
| Environment string `json:"environment,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "ApphubService") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ApphubService") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s AppHubService) MarshalJSON() ([]byte, error) { |
| type NoMethod AppHubService |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // AppHubWorkload: AppHubWorkload represents the App Hub Workload. |
| type AppHubWorkload struct { |
| // Criticality: Output only. The criticality of the App Hub Workload. |
| Criticality string `json:"criticality,omitempty"` |
| // Environment: Output only. The environment of the App Hub Workload. |
| Environment string `json:"environment,omitempty"` |
| // Workload: Required. Output only. Immutable. The name of the App Hub |
| // Workload. Format: |
| // `projects/{project}/locations/{location}/applications/{application}/workloads |
| // /{workload}`. |
| Workload string `json:"workload,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Criticality") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Criticality") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s AppHubWorkload) MarshalJSON() ([]byte, error) { |
| type NoMethod AppHubWorkload |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ArtifactConfig: The artifact config of the artifact that is deployed. |
| type ArtifactConfig struct { |
| // GoogleArtifactAnalysis: Optional. Set if the artifact metadata is stored in |
| // Artifact analysis. |
| GoogleArtifactAnalysis *GoogleArtifactAnalysis `json:"googleArtifactAnalysis,omitempty"` |
| // GoogleArtifactRegistry: Optional. Set if the artifact is stored in Artifact |
| // registry. |
| GoogleArtifactRegistry *GoogleArtifactRegistry `json:"googleArtifactRegistry,omitempty"` |
| // Uri: Required. Immutable. The URI of the artifact that is deployed. e.g. |
| // `us-docker.pkg.dev/my-project/my-repo/image`. The URI does not include the |
| // tag / digest because it captures a lineage of artifacts. |
| Uri string `json:"uri,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "GoogleArtifactAnalysis") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "GoogleArtifactAnalysis") to |
| // include in API requests with the JSON null value. By default, fields with |
| // empty values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ArtifactConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod ArtifactConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ArtifactDeployment: The ArtifactDeployment resource represents the |
| // deployment of the artifact within the InsightsConfig resource. |
| type ArtifactDeployment struct { |
| // ArtifactAlias: Output only. The artifact alias in the deployment spec, with |
| // Tag/SHA. e.g. us-docker.pkg.dev/my-project/my-repo/image:1.0.0 |
| ArtifactAlias string `json:"artifactAlias,omitempty"` |
| // ArtifactReference: Output only. The artifact that is deployed. |
| ArtifactReference string `json:"artifactReference,omitempty"` |
| // ContainerStatusSummary: Output only. The summary of container status of the |
| // artifact deployment. Format as `ContainerStatusState-Reason : restartCount` |
| // e.g. "Waiting-ImagePullBackOff : 3" |
| ContainerStatusSummary string `json:"containerStatusSummary,omitempty"` |
| // DeployTime: Output only. The time at which the deployment was deployed. |
| DeployTime string `json:"deployTime,omitempty"` |
| // Id: Output only. Unique identifier of `ArtifactDeployment`. |
| Id string `json:"id,omitempty"` |
| // SourceCommitUris: Output only. The source commits at which this artifact was |
| // built. Extracted from provenance. |
| SourceCommitUris []string `json:"sourceCommitUris,omitempty"` |
| // UndeployTime: Output only. The time at which the deployment was undeployed, |
| // all artifacts are considered undeployed once this time is set. |
| UndeployTime string `json:"undeployTime,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "ArtifactAlias") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ArtifactAlias") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ArtifactDeployment) MarshalJSON() ([]byte, error) { |
| type NoMethod ArtifactDeployment |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // BasicAuthentication: Basic authentication with username and password. |
| type BasicAuthentication struct { |
| // PasswordSecretVersion: The password SecretManager secret version to |
| // authenticate as. |
| PasswordSecretVersion string `json:"passwordSecretVersion,omitempty"` |
| // Username: Required. The username to authenticate as. |
| Username string `json:"username,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "PasswordSecretVersion") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "PasswordSecretVersion") to |
| // include in API requests with the JSON null value. By default, fields with |
| // empty values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s BasicAuthentication) MarshalJSON() ([]byte, error) { |
| type NoMethod BasicAuthentication |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // BearerTokenAuthentication: Bearer token authentication with a token. |
| type BearerTokenAuthentication struct { |
| // TokenSecretVersion: Optional. The token SecretManager secret version to |
| // authenticate as. |
| TokenSecretVersion string `json:"tokenSecretVersion,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "TokenSecretVersion") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "TokenSecretVersion") to include |
| // in API requests with the JSON null value. By default, fields with empty |
| // values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s BearerTokenAuthentication) MarshalJSON() ([]byte, error) { |
| type NoMethod BearerTokenAuthentication |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // BitbucketCloudConfig: Configuration for connections to an instance of |
| // Bitbucket Cloud. |
| type BitbucketCloudConfig struct { |
| // AuthorizerCredential: Required. An access token with the minimum |
| // `repository`, `pullrequest` and `webhook` scope access. It can either be a |
| // workspace, project or repository access token. This is needed to create |
| // webhooks. It's recommended to use a system account to generate these |
| // credentials. |
| AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` |
| // ReadAuthorizerCredential: Required. An access token with the minimum |
| // `repository` access. It can either be a workspace, project or repository |
| // access token. It's recommended to use a system account to generate the |
| // credentials. |
| ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` |
| // WebhookSecretSecretVersion: Required. Immutable. SecretManager resource |
| // containing the webhook secret used to verify webhook events, formatted as |
| // `projects/*/secrets/*/versions/*` or |
| // `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are |
| // supported in that location). This is used to validate and create webhooks. |
| WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` |
| // Workspace: Required. The Bitbucket Cloud Workspace ID to be connected to |
| // Google Cloud Platform. |
| Workspace string `json:"workspace,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "AuthorizerCredential") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "AuthorizerCredential") to include |
| // in API requests with the JSON null value. By default, fields with empty |
| // values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s BitbucketCloudConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod BitbucketCloudConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // BitbucketDataCenterConfig: Configuration for connections to an instance of |
| // Bitbucket Data Center. |
| type BitbucketDataCenterConfig struct { |
| // AuthorizerCredential: Required. An http access token with the minimum |
| // `Repository admin` scope access. This is needed to create webhooks. It's |
| // recommended to use a system account to generate these credentials. |
| AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` |
| // HostUri: Required. The URI of the Bitbucket Data Center host this connection |
| // is for. |
| HostUri string `json:"hostUri,omitempty"` |
| // ReadAuthorizerCredential: Required. An http access token with the minimum |
| // `Repository read` access. It's recommended to use a system account to |
| // generate the credentials. |
| ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` |
| // ServerVersion: Output only. Version of the Bitbucket Data Center server |
| // running on the `host_uri`. |
| ServerVersion string `json:"serverVersion,omitempty"` |
| // ServiceDirectoryConfig: Optional. Configuration for using Service Directory |
| // to privately connect to a Bitbucket Data Center instance. This should only |
| // be set if the Bitbucket Data Center is hosted on-premises and not reachable |
| // by public internet. If this field is left empty, calls to the Bitbucket Data |
| // Center will be made over the public internet. |
| ServiceDirectoryConfig *ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` |
| // SslCaCertificate: Optional. SSL certificate authority to trust when making |
| // requests to Bitbucket Data Center. |
| SslCaCertificate string `json:"sslCaCertificate,omitempty"` |
| // WebhookSecretSecretVersion: Required. Immutable. SecretManager resource |
| // containing the webhook secret used to verify webhook events, formatted as |
| // `projects/*/secrets/*/versions/*` or |
| // `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are |
| // supported in that location). This is used to validate webhooks. |
| WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "AuthorizerCredential") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "AuthorizerCredential") to include |
| // in API requests with the JSON null value. By default, fields with empty |
| // values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s BitbucketDataCenterConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod BitbucketDataCenterConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // CancelOperationRequest: The request message for Operations.CancelOperation. |
| type CancelOperationRequest struct { |
| } |
| |
| // Connection: Message describing Connection object |
| type Connection struct { |
| // Annotations: Optional. Allows clients to store small amounts of arbitrary |
| // data. |
| Annotations map[string]string `json:"annotations,omitempty"` |
| // BitbucketCloudConfig: Configuration for connections to an instance of |
| // Bitbucket Clouds. |
| BitbucketCloudConfig *BitbucketCloudConfig `json:"bitbucketCloudConfig,omitempty"` |
| // BitbucketDataCenterConfig: Configuration for connections to an instance of |
| // Bitbucket Data Center. |
| BitbucketDataCenterConfig *BitbucketDataCenterConfig `json:"bitbucketDataCenterConfig,omitempty"` |
| // CreateTime: Output only. [Output only] Create timestamp |
| CreateTime string `json:"createTime,omitempty"` |
| // CryptoKeyConfig: Optional. The crypto key configuration. This field is used |
| // by the Customer-Managed Encryption Keys (CMEK) feature. |
| CryptoKeyConfig *CryptoKeyConfig `json:"cryptoKeyConfig,omitempty"` |
| // DeleteTime: Output only. [Output only] Delete timestamp |
| DeleteTime string `json:"deleteTime,omitempty"` |
| // Disabled: Optional. If disabled is set to true, functionality is disabled |
| // for this connection. Repository based API methods and webhooks processing |
| // for repositories in this connection will be disabled. |
| Disabled bool `json:"disabled,omitempty"` |
| // Etag: Optional. This checksum is computed by the server based on the value |
| // of other fields, and may be sent on update and delete requests to ensure the |
| // client has an up-to-date value before proceeding. |
| Etag string `json:"etag,omitempty"` |
| // GitProxyConfig: Optional. Configuration for the git proxy feature. Enabling |
| // the git proxy allows clients to perform git operations on the repositories |
| // linked in the connection. |
| GitProxyConfig *GitProxyConfig `json:"gitProxyConfig,omitempty"` |
| // GithubConfig: Configuration for connections to github.com. |
| GithubConfig *GitHubConfig `json:"githubConfig,omitempty"` |
| // GithubEnterpriseConfig: Configuration for connections to an instance of |
| // GitHub Enterprise. |
| GithubEnterpriseConfig *GitHubEnterpriseConfig `json:"githubEnterpriseConfig,omitempty"` |
| // GitlabConfig: Configuration for connections to gitlab.com. |
| GitlabConfig *GitLabConfig `json:"gitlabConfig,omitempty"` |
| // GitlabEnterpriseConfig: Configuration for connections to an instance of |
| // GitLab Enterprise. |
| GitlabEnterpriseConfig *GitLabEnterpriseConfig `json:"gitlabEnterpriseConfig,omitempty"` |
| // HttpConfig: Optional. Configuration for connections to an HTTP service |
| // provider. |
| HttpConfig *GenericHTTPEndpointConfig `json:"httpConfig,omitempty"` |
| // InstallationState: Output only. Installation state of the Connection. |
| InstallationState *InstallationState `json:"installationState,omitempty"` |
| // Labels: Optional. Labels as key value pairs |
| Labels map[string]string `json:"labels,omitempty"` |
| // Name: Identifier. The resource name of the connection, in the format |
| // `projects/{project}/locations/{location}/connections/{connection_id}`. |
| Name string `json:"name,omitempty"` |
| // Reconciling: Output only. Set to true when the connection is being set up or |
| // updated in the background. |
| Reconciling bool `json:"reconciling,omitempty"` |
| // SecureSourceManagerInstanceConfig: Configuration for connections to an |
| // instance of Secure Source Manager. |
| SecureSourceManagerInstanceConfig *SecureSourceManagerInstanceConfig `json:"secureSourceManagerInstanceConfig,omitempty"` |
| // Uid: Output only. A system-assigned unique identifier for the Connection. |
| Uid string `json:"uid,omitempty"` |
| // UpdateTime: Output only. [Output only] Update timestamp |
| UpdateTime string `json:"updateTime,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "Annotations") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Annotations") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s Connection) MarshalJSON() ([]byte, error) { |
| type NoMethod Connection |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // CryptoKeyConfig: The crypto key configuration. This field is used by the |
| // Customer-managed encryption keys (CMEK) feature. |
| type CryptoKeyConfig struct { |
| // KeyReference: Required. The name of the key which is used to encrypt/decrypt |
| // customer data. For key in Cloud KMS, the key should be in the format of |
| // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
| KeyReference string `json:"keyReference,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "KeyReference") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "KeyReference") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s CryptoKeyConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod CryptoKeyConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // DeploymentEvent: The DeploymentEvent resource represents the deployment of |
| // the artifact within the InsightsConfig resource. |
| type DeploymentEvent struct { |
| // ArtifactDeployments: Output only. The artifact deployments of the |
| // DeploymentEvent. Each artifact deployment contains the artifact uri and the |
| // runtime configuration uri. For GKE, this would be all the containers images |
| // that are deployed in the pod. |
| ArtifactDeployments []*ArtifactDeployment `json:"artifactDeployments,omitempty"` |
| // CreateTime: Output only. The create time of the DeploymentEvent. |
| CreateTime string `json:"createTime,omitempty"` |
| // DeployTime: Output only. The time at which the DeploymentEvent was deployed. |
| // This would be the min of all ArtifactDeployment deploy_times. |
| DeployTime string `json:"deployTime,omitempty"` |
| // Name: Identifier. The name of the DeploymentEvent. This name is provided by |
| // Developer Connect insights. Format: |
| // projects/{project}/locations/{location}/insightsConfigs/{insights_config}/dep |
| // loymentEvents/{uuid} |
| Name string `json:"name,omitempty"` |
| // RuntimeConfig: Output only. The runtime configurations where the |
| // DeploymentEvent happened. |
| RuntimeConfig *RuntimeConfig `json:"runtimeConfig,omitempty"` |
| // RuntimeDeploymentUri: Output only. The runtime assigned URI of the |
| // DeploymentEvent. For GKE, this is the fully qualified replica set uri. e.g. |
| // container.googleapis.com/projects/{project}/locations/{location}/clusters/{cl |
| // uster}/k8s/namespaces/{namespace}/apps/replicasets/{replica-set-id} For |
| // Cloud Run, this is the revision name. |
| RuntimeDeploymentUri string `json:"runtimeDeploymentUri,omitempty"` |
| // State: Output only. The state of the DeploymentEvent. |
| // |
| // Possible values: |
| // "STATE_UNSPECIFIED" - No state specified. |
| // "STATE_ACTIVE" - The deployment is active in the runtime. |
| // "STATE_INACTIVE" - The deployment is not in the runtime. |
| State string `json:"state,omitempty"` |
| // UndeployTime: Output only. The time at which the DeploymentEvent was |
| // undeployed, all artifacts are considered undeployed once this time is set. |
| // This would be the max of all ArtifactDeployment undeploy_times. If any |
| // ArtifactDeployment is still active (i.e. does not have an undeploy_time), |
| // this field will be empty. |
| UndeployTime string `json:"undeployTime,omitempty"` |
| // UpdateTime: Output only. The update time of the DeploymentEvent. |
| UpdateTime string `json:"updateTime,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "ArtifactDeployments") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ArtifactDeployments") to include |
| // in API requests with the JSON null value. By default, fields with empty |
| // values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s DeploymentEvent) MarshalJSON() ([]byte, error) { |
| type NoMethod DeploymentEvent |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // Empty: A generic empty message that you can re-use to avoid defining |
| // duplicated empty messages in your APIs. A typical example is to use it as |
| // the request or the response type of an API method. For instance: service Foo |
| // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
| type Empty struct { |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| } |
| |
| // ExchangeError: Message for representing an error from exchanging OAuth |
| // tokens. |
| type ExchangeError struct { |
| // Code: https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error |
| Code string `json:"code,omitempty"` |
| // Description: https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - |
| // error_description |
| Description string `json:"description,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Code") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Code") to include in API requests |
| // with the JSON null value. By default, fields with empty values are omitted |
| // from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ExchangeError) MarshalJSON() ([]byte, error) { |
| type NoMethod ExchangeError |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // FetchAccessTokenRequest: Message for fetching an OAuth access token. |
| type FetchAccessTokenRequest struct { |
| } |
| |
| // FetchAccessTokenResponse: Message for responding to getting an OAuth access |
| // token. |
| type FetchAccessTokenResponse struct { |
| // ExchangeError: The error resulted from exchanging OAuth tokens from the |
| // service provider. |
| ExchangeError *ExchangeError `json:"exchangeError,omitempty"` |
| // ExpirationTime: Expiration timestamp. Can be empty if unknown or |
| // non-expiring. |
| ExpirationTime string `json:"expirationTime,omitempty"` |
| // Scopes: The scopes of the access token. |
| Scopes []string `json:"scopes,omitempty"` |
| // Token: The token content. |
| Token string `json:"token,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "ExchangeError") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ExchangeError") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s FetchAccessTokenResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod FetchAccessTokenResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // FetchGitHubInstallationsResponse: Response of fetching github installations. |
| type FetchGitHubInstallationsResponse struct { |
| // Installations: List of installations available to the OAuth user (for |
| // github.com) or all the installations (for GitHub enterprise). |
| Installations []*Installation `json:"installations,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "Installations") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Installations") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s FetchGitHubInstallationsResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod FetchGitHubInstallationsResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // FetchGitRefsResponse: Response for fetching git refs. |
| type FetchGitRefsResponse struct { |
| // NextPageToken: A token identifying a page of results the server should |
| // return. |
| NextPageToken string `json:"nextPageToken,omitempty"` |
| // RefNames: Name of the refs fetched. |
| RefNames []string `json:"refNames,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "NextPageToken") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "NextPageToken") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s FetchGitRefsResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod FetchGitRefsResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // FetchLinkableGitRepositoriesResponse: Response message for |
| // FetchLinkableGitRepositories. |
| type FetchLinkableGitRepositoriesResponse struct { |
| // LinkableGitRepositories: The git repositories that can be linked to the |
| // connection. |
| LinkableGitRepositories []*LinkableGitRepository `json:"linkableGitRepositories,omitempty"` |
| // NextPageToken: A token identifying a page of results the server should |
| // return. |
| NextPageToken string `json:"nextPageToken,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "LinkableGitRepositories") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "LinkableGitRepositories") to |
| // include in API requests with the JSON null value. By default, fields with |
| // empty values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s FetchLinkableGitRepositoriesResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod FetchLinkableGitRepositoriesResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // FetchReadTokenRequest: Message for fetching SCM read token. |
| type FetchReadTokenRequest struct { |
| } |
| |
| // FetchReadTokenResponse: Message for responding to get read token. |
| type FetchReadTokenResponse struct { |
| // ExpirationTime: Expiration timestamp. Can be empty if unknown or |
| // non-expiring. |
| ExpirationTime string `json:"expirationTime,omitempty"` |
| // GitUsername: The git_username to specify when making a git clone with the |
| // token. For example, for GitHub GitRepositoryLinks, this would be |
| // "x-access-token" |
| GitUsername string `json:"gitUsername,omitempty"` |
| // Token: The token content. |
| Token string `json:"token,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "ExpirationTime") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ExpirationTime") to include in |
| // API requests with the JSON null value. By default, fields with empty values |
| // are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s FetchReadTokenResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod FetchReadTokenResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // FetchReadWriteTokenRequest: Message for fetching SCM read/write token. |
| type FetchReadWriteTokenRequest struct { |
| } |
| |
| // FetchReadWriteTokenResponse: Message for responding to get read/write token. |
| type FetchReadWriteTokenResponse struct { |
| // ExpirationTime: Expiration timestamp. Can be empty if unknown or |
| // non-expiring. |
| ExpirationTime string `json:"expirationTime,omitempty"` |
| // GitUsername: The git_username to specify when making a git clone with the |
| // token. For example, for GitHub GitRepositoryLinks, this would be |
| // "x-access-token" |
| GitUsername string `json:"gitUsername,omitempty"` |
| // Token: The token content. |
| Token string `json:"token,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "ExpirationTime") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ExpirationTime") to include in |
| // API requests with the JSON null value. By default, fields with empty values |
| // are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s FetchReadWriteTokenResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod FetchReadWriteTokenResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // FinishOAuthResponse: Message for responding to finishing an OAuth flow. |
| type FinishOAuthResponse struct { |
| // ExchangeError: The error resulted from exchanging OAuth tokens from the |
| // service provider. |
| ExchangeError *ExchangeError `json:"exchangeError,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "ExchangeError") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ExchangeError") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s FinishOAuthResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod FinishOAuthResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GKEWorkload: GKEWorkload represents the Google Kubernetes Engine runtime. |
| type GKEWorkload struct { |
| // Cluster: Required. Immutable. The name of the GKE cluster. Format: |
| // `projects/{project}/locations/{location}/clusters/{cluster}`. |
| Cluster string `json:"cluster,omitempty"` |
| // Deployment: Output only. The name of the GKE deployment. Format: |
| // `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{names |
| // pace}/deployments/{deployment}`. |
| Deployment string `json:"deployment,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Cluster") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GKEWorkload) MarshalJSON() ([]byte, error) { |
| type NoMethod GKEWorkload |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GenericHTTPEndpointConfig: Defines the configuration for connections to an |
| // HTTP service provider. |
| type GenericHTTPEndpointConfig struct { |
| // BasicAuthentication: Optional. Basic authentication with username and |
| // password. |
| BasicAuthentication *BasicAuthentication `json:"basicAuthentication,omitempty"` |
| // BearerTokenAuthentication: Optional. Bearer token authentication with a |
| // token. |
| BearerTokenAuthentication *BearerTokenAuthentication `json:"bearerTokenAuthentication,omitempty"` |
| // HostUri: Required. Immutable. The service provider's https endpoint. |
| HostUri string `json:"hostUri,omitempty"` |
| // ServiceDirectoryConfig: Optional. Configuration for using Service Directory |
| // to privately connect to a HTTP service provider. This should only be set if |
| // the Http service provider is hosted on-premises and not reachable by public |
| // internet. If this field is left empty, calls to the HTTP service provider |
| // will be made over the public internet. |
| ServiceDirectoryConfig *ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` |
| // SslCaCertificate: Optional. The SSL certificate to use for requests to the |
| // HTTP service provider. |
| SslCaCertificate string `json:"sslCaCertificate,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "BasicAuthentication") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "BasicAuthentication") to include |
| // in API requests with the JSON null value. By default, fields with empty |
| // values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GenericHTTPEndpointConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod GenericHTTPEndpointConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GitHubConfig: Configuration for connections to github.com. |
| type GitHubConfig struct { |
| // AppInstallationId: Optional. GitHub App installation id. |
| AppInstallationId int64 `json:"appInstallationId,omitempty,string"` |
| // AuthorizerCredential: Optional. OAuth credential of the account that |
| // authorized the GitHub App. It is recommended to use a robot account instead |
| // of a human user account. The OAuth token must be tied to the GitHub App of |
| // this config. |
| AuthorizerCredential *OAuthCredential `json:"authorizerCredential,omitempty"` |
| // GithubApp: Required. Immutable. The GitHub Application that was installed to |
| // the GitHub user or organization. |
| // |
| // Possible values: |
| // "GIT_HUB_APP_UNSPECIFIED" - GitHub App not specified. |
| // "DEVELOPER_CONNECT" - The Developer Connect GitHub Application. |
| // "FIREBASE" - The Firebase GitHub Application. |
| // "GEMINI_CODE_ASSIST" - The Gemini Code Assist Application. |
| GithubApp string `json:"githubApp,omitempty"` |
| // InstallationUri: Output only. The URI to navigate to in order to manage the |
| // installation associated with this GitHubConfig. |
| InstallationUri string `json:"installationUri,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "AppInstallationId") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "AppInstallationId") to include in |
| // API requests with the JSON null value. By default, fields with empty values |
| // are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GitHubConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod GitHubConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GitHubEnterpriseConfig: Configuration for connections to an instance of |
| // GitHub Enterprise. |
| type GitHubEnterpriseConfig struct { |
| // AppId: Optional. ID of the GitHub App created from the manifest. |
| AppId int64 `json:"appId,omitempty,string"` |
| // AppInstallationId: Optional. ID of the installation of the GitHub App. |
| AppInstallationId int64 `json:"appInstallationId,omitempty,string"` |
| // AppSlug: Output only. The URL-friendly name of the GitHub App. |
| AppSlug string `json:"appSlug,omitempty"` |
| // HostUri: Required. The URI of the GitHub Enterprise host this connection is |
| // for. |
| HostUri string `json:"hostUri,omitempty"` |
| // InstallationUri: Output only. The URI to navigate to in order to manage the |
| // installation associated with this GitHubEnterpriseConfig. |
| InstallationUri string `json:"installationUri,omitempty"` |
| // Organization: Optional. Immutable. GitHub Enterprise organization in which |
| // the GitHub App is created. |
| Organization string `json:"organization,omitempty"` |
| // PrivateKeySecretVersion: Optional. SecretManager resource containing the |
| // private key of the GitHub App, formatted as |
| // `projects/*/secrets/*/versions/*` or |
| // `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are |
| // supported in that location). |
| PrivateKeySecretVersion string `json:"privateKeySecretVersion,omitempty"` |
| // ServerVersion: Output only. GitHub Enterprise version installed at the |
| // host_uri. |
| ServerVersion string `json:"serverVersion,omitempty"` |
| // ServiceDirectoryConfig: Optional. Configuration for using Service Directory |
| // to privately connect to a GitHub Enterprise server. This should only be set |
| // if the GitHub Enterprise server is hosted on-premises and not reachable by |
| // public internet. If this field is left empty, calls to the GitHub Enterprise |
| // server will be made over the public internet. |
| ServiceDirectoryConfig *ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` |
| // SslCaCertificate: Optional. SSL certificate to use for requests to GitHub |
| // Enterprise. |
| SslCaCertificate string `json:"sslCaCertificate,omitempty"` |
| // WebhookSecretSecretVersion: Optional. SecretManager resource containing the |
| // webhook secret of the GitHub App, formatted as |
| // `projects/*/secrets/*/versions/*` or |
| // `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are |
| // supported in that location). |
| WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "AppId") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "AppId") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GitHubEnterpriseConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod GitHubEnterpriseConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GitLabConfig: Configuration for connections to gitlab.com. |
| type GitLabConfig struct { |
| // AuthorizerCredential: Required. A GitLab personal access token with the |
| // minimum `api` scope access and a minimum role of `maintainer`. The GitLab |
| // Projects visible to this Personal Access Token will control which Projects |
| // Developer Connect has access to. |
| AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` |
| // ReadAuthorizerCredential: Required. A GitLab personal access token with the |
| // minimum `read_api` scope access and a minimum role of `reporter`. The GitLab |
| // Projects visible to this Personal Access Token will control which Projects |
| // Developer Connect has access to. |
| ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` |
| // WebhookSecretSecretVersion: Required. Immutable. SecretManager resource |
| // containing the webhook secret of a GitLab project, formatted as |
| // `projects/*/secrets/*/versions/*` or |
| // `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are |
| // supported in that location). This is used to validate webhooks. |
| WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "AuthorizerCredential") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "AuthorizerCredential") to include |
| // in API requests with the JSON null value. By default, fields with empty |
| // values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GitLabConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod GitLabConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GitLabEnterpriseConfig: Configuration for connections to an instance of |
| // GitLab Enterprise. |
| type GitLabEnterpriseConfig struct { |
| // AuthorizerCredential: Required. A GitLab personal access token with the |
| // minimum `api` scope access and a minimum role of `maintainer`. The GitLab |
| // Projects visible to this Personal Access Token will control which Projects |
| // Developer Connect has access to. |
| AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` |
| // HostUri: Required. The URI of the GitLab Enterprise host this connection is |
| // for. |
| HostUri string `json:"hostUri,omitempty"` |
| // ReadAuthorizerCredential: Required. A GitLab personal access token with the |
| // minimum `read_api` scope access and a minimum role of `reporter`. The GitLab |
| // Projects visible to this Personal Access Token will control which Projects |
| // Developer Connect has access to. |
| ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` |
| // ServerVersion: Output only. Version of the GitLab Enterprise server running |
| // on the `host_uri`. |
| ServerVersion string `json:"serverVersion,omitempty"` |
| // ServiceDirectoryConfig: Optional. Configuration for using Service Directory |
| // to privately connect to a GitLab Enterprise instance. This should only be |
| // set if the GitLab Enterprise server is hosted on-premises and not reachable |
| // by public internet. If this field is left empty, calls to the GitLab |
| // Enterprise server will be made over the public internet. |
| ServiceDirectoryConfig *ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` |
| // SslCaCertificate: Optional. SSL Certificate Authority certificate to use for |
| // requests to GitLab Enterprise instance. |
| SslCaCertificate string `json:"sslCaCertificate,omitempty"` |
| // WebhookSecretSecretVersion: Required. Immutable. SecretManager resource |
| // containing the webhook secret of a GitLab project, formatted as |
| // `projects/*/secrets/*/versions/*` or |
| // `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are |
| // supported in that location). This is used to validate webhooks. |
| WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "AuthorizerCredential") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "AuthorizerCredential") to include |
| // in API requests with the JSON null value. By default, fields with empty |
| // values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GitLabEnterpriseConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod GitLabEnterpriseConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GitProxyConfig: The git proxy configuration. |
| type GitProxyConfig struct { |
| // Enabled: Optional. Setting this to true allows the git proxy to be used for |
| // performing git operations on the repositories linked in the connection. |
| Enabled bool `json:"enabled,omitempty"` |
| // HttpProxyBaseUri: Output only. The base URI for the HTTP proxy endpoint. Has |
| // the format `https://{generatedID}-c-h-{shortRegion}.developerconnect.dev` |
| // Populated only when enabled is set to true. This endpoint is used by other |
| // Google services that integrate with Developer Connect. |
| HttpProxyBaseUri string `json:"httpProxyBaseUri,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Enabled") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GitProxyConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod GitProxyConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GitRepositoryLink: Message describing the GitRepositoryLink object |
| type GitRepositoryLink struct { |
| // Annotations: Optional. Allows clients to store small amounts of arbitrary |
| // data. |
| Annotations map[string]string `json:"annotations,omitempty"` |
| // CloneUri: Required. Git Clone URI. |
| CloneUri string `json:"cloneUri,omitempty"` |
| // CreateTime: Output only. [Output only] Create timestamp |
| CreateTime string `json:"createTime,omitempty"` |
| // DeleteTime: Output only. [Output only] Delete timestamp |
| DeleteTime string `json:"deleteTime,omitempty"` |
| // Etag: Optional. This checksum is computed by the server based on the value |
| // of other fields, and may be sent on update and delete requests to ensure the |
| // client has an up-to-date value before proceeding. |
| Etag string `json:"etag,omitempty"` |
| // GitProxyUri: Output only. URI to access the linked repository through the |
| // Git Proxy. This field is only populated if the git proxy is enabled for the |
| // connection. |
| GitProxyUri string `json:"gitProxyUri,omitempty"` |
| // Labels: Optional. Labels as key value pairs |
| Labels map[string]string `json:"labels,omitempty"` |
| // Name: Identifier. Resource name of the repository, in the format |
| // `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. |
| Name string `json:"name,omitempty"` |
| // Reconciling: Output only. Set to true when the connection is being set up or |
| // updated in the background. |
| Reconciling bool `json:"reconciling,omitempty"` |
| // Uid: Output only. A system-assigned unique identifier for the |
| // GitRepositoryLink. |
| Uid string `json:"uid,omitempty"` |
| // UpdateTime: Output only. [Output only] Update timestamp |
| UpdateTime string `json:"updateTime,omitempty"` |
| // WebhookId: Output only. External ID of the webhook created for the |
| // repository. |
| WebhookId string `json:"webhookId,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "Annotations") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Annotations") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GitRepositoryLink) MarshalJSON() ([]byte, error) { |
| type NoMethod GitRepositoryLink |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GoogleArtifactAnalysis: Google Artifact Analysis configurations. |
| type GoogleArtifactAnalysis struct { |
| // ProjectId: Required. The project id of the project where the provenance is |
| // stored. |
| ProjectId string `json:"projectId,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "ProjectId") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ProjectId") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GoogleArtifactAnalysis) MarshalJSON() ([]byte, error) { |
| type NoMethod GoogleArtifactAnalysis |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GoogleArtifactRegistry: Google Artifact Registry configurations. |
| type GoogleArtifactRegistry struct { |
| // ArtifactRegistryPackage: Required. Immutable. The name of the artifact |
| // registry package. |
| ArtifactRegistryPackage string `json:"artifactRegistryPackage,omitempty"` |
| // ProjectId: Required. The host project of Artifact Registry. |
| ProjectId string `json:"projectId,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "ArtifactRegistryPackage") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ArtifactRegistryPackage") to |
| // include in API requests with the JSON null value. By default, fields with |
| // empty values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GoogleArtifactRegistry) MarshalJSON() ([]byte, error) { |
| type NoMethod GoogleArtifactRegistry |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // GoogleCloudRun: GoogleCloudRun represents the Cloud Run runtime. |
| type GoogleCloudRun struct { |
| // ServiceUri: Required. Immutable. The name of the Cloud Run service. Format: |
| // `projects/{project}/locations/{location}/services/{service}`. |
| ServiceUri string `json:"serviceUri,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "ServiceUri") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ServiceUri") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s GoogleCloudRun) MarshalJSON() ([]byte, error) { |
| type NoMethod GoogleCloudRun |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // HttpBody: Message that represents an arbitrary HTTP body. It should only be |
| // used for payload formats that can't be represented as JSON, such as raw |
| // binary or an HTML page. This message can be used both in streaming and |
| // non-streaming API methods in the request as well as the response. It can be |
| // used as a top-level request field, which is convenient if one wants to |
| // extract parameters from either the URL or HTTP template into the request |
| // fields and also want access to the raw HTTP body. Example: message |
| // GetResourceRequest { // A unique request id. string request_id = 1; // The |
| // raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } |
| // service ResourceService { rpc GetResource(GetResourceRequest) returns |
| // (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns |
| // (google.protobuf.Empty); } Example with streaming methods: service |
| // CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream |
| // google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns |
| // (stream google.api.HttpBody); } Use of this type only changes how the |
| // request and response bodies are handled, all other features will continue to |
| // work unchanged. |
| type HttpBody struct { |
| // ContentType: The HTTP Content-Type header value specifying the content type |
| // of the body. |
| ContentType string `json:"contentType,omitempty"` |
| // Data: The HTTP request/response body as raw binary. |
| Data string `json:"data,omitempty"` |
| // Extensions: Application specific response metadata. Must be set in the first |
| // response for streaming APIs. |
| Extensions []googleapi.RawMessage `json:"extensions,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "ContentType") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ContentType") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s HttpBody) MarshalJSON() ([]byte, error) { |
| type NoMethod HttpBody |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // InsightsConfig: The InsightsConfig resource is the core configuration object |
| // to capture events from your Software Development Lifecycle. It acts as the |
| // central hub for managing how Developer Connect understands your application, |
| // its runtime environments, and the artifacts deployed within them. |
| type InsightsConfig struct { |
| // Annotations: Optional. User specified annotations. See |
| // https://google.aip.dev/148#annotations for more details such as format and |
| // size limitations. |
| Annotations map[string]string `json:"annotations,omitempty"` |
| // AppHubApplication: Optional. The name of the App Hub Application. Format: |
| // projects/{project}/locations/{location}/applications/{application} |
| AppHubApplication string `json:"appHubApplication,omitempty"` |
| // ArtifactConfigs: Optional. The artifact configurations of the artifacts that |
| // are deployed. |
| ArtifactConfigs []*ArtifactConfig `json:"artifactConfigs,omitempty"` |
| // CreateTime: Output only. Create timestamp. |
| CreateTime string `json:"createTime,omitempty"` |
| // Errors: Output only. Any errors that occurred while setting up the |
| // InsightsConfig. Each error will be in the format: `field_name: |
| // error_message`, e.g. GetAppHubApplication: Permission denied while getting |
| // App Hub application. Please grant permissions to the P4SA. |
| Errors []*Status `json:"errors,omitempty"` |
| // Labels: Optional. Set of labels associated with an InsightsConfig. |
| Labels map[string]string `json:"labels,omitempty"` |
| // Name: Identifier. The name of the InsightsConfig. Format: |
| // projects/{project}/locations/{location}/insightsConfigs/{insightsConfig} |
| Name string `json:"name,omitempty"` |
| // Projects: Optional. The projects to track with the InsightsConfig. |
| Projects *Projects `json:"projects,omitempty"` |
| // Reconciling: Output only. Reconciling |
| // (https://google.aip.dev/128#reconciliation). Set to true if the current |
| // state of InsightsConfig does not match the user's intended state, and the |
| // service is actively updating the resource to reconcile them. This can happen |
| // due to user-triggered updates or system actions like failover or |
| // maintenance. |
| Reconciling bool `json:"reconciling,omitempty"` |
| // RuntimeConfigs: Output only. The runtime configurations where the |
| // application is deployed. |
| RuntimeConfigs []*RuntimeConfig `json:"runtimeConfigs,omitempty"` |
| // State: Optional. Output only. The state of the InsightsConfig. |
| // |
| // Possible values: |
| // "STATE_UNSPECIFIED" - No state specified. |
| // "PENDING" - The InsightsConfig is pending application discovery/runtime |
| // discovery. |
| // "COMPLETE" - The initial discovery process is complete. |
| // "ERROR" - The InsightsConfig is in an error state. |
| State string `json:"state,omitempty"` |
| // UpdateTime: Output only. Update timestamp. |
| UpdateTime string `json:"updateTime,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "Annotations") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Annotations") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s InsightsConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod InsightsConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // Installation: Represents an installation of the GitHub App. |
| type Installation struct { |
| // Id: ID of the installation in GitHub. |
| Id int64 `json:"id,omitempty,string"` |
| // Name: Name of the GitHub user or organization that owns this installation. |
| Name string `json:"name,omitempty"` |
| // Type: Either "user" or "organization". |
| Type string `json:"type,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Id") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Id") to include in API requests |
| // with the JSON null value. By default, fields with empty values are omitted |
| // from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s Installation) MarshalJSON() ([]byte, error) { |
| type NoMethod Installation |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // InstallationState: Describes stage and necessary actions to be taken by the |
| // user to complete the installation. Used for GitHub and GitHub Enterprise |
| // based connections. |
| type InstallationState struct { |
| // ActionUri: Output only. Link to follow for next action. Empty string if the |
| // installation is already complete. |
| ActionUri string `json:"actionUri,omitempty"` |
| // Message: Output only. Message of what the user should do next to continue |
| // the installation. Empty string if the installation is already complete. |
| Message string `json:"message,omitempty"` |
| // Stage: Output only. Current step of the installation process. |
| // |
| // Possible values: |
| // "STAGE_UNSPECIFIED" - No stage specified. |
| // "PENDING_CREATE_APP" - Only for GitHub Enterprise. An App creation has |
| // been requested. The user needs to confirm the creation in their GitHub |
| // enterprise host. |
| // "PENDING_USER_OAUTH" - User needs to authorize the GitHub (or Enterprise) |
| // App via OAuth. |
| // "PENDING_INSTALL_APP" - User needs to follow the link to install the |
| // GitHub (or Enterprise) App. |
| // "COMPLETE" - Installation process has been completed. |
| Stage string `json:"stage,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "ActionUri") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ActionUri") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s InstallationState) MarshalJSON() ([]byte, error) { |
| type NoMethod InstallationState |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // LinkableGitRepository: LinkableGitRepository represents a git repository |
| // that can be linked to a connection. |
| type LinkableGitRepository struct { |
| // CloneUri: The clone uri of the repository. |
| CloneUri string `json:"cloneUri,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "CloneUri") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "CloneUri") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s LinkableGitRepository) MarshalJSON() ([]byte, error) { |
| type NoMethod LinkableGitRepository |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ListAccountConnectorsResponse: Message for response to listing |
| // AccountConnectors |
| type ListAccountConnectorsResponse struct { |
| // AccountConnectors: The list of AccountConnectors |
| AccountConnectors []*AccountConnector `json:"accountConnectors,omitempty"` |
| // NextPageToken: A token identifying a page of results the server should |
| // return. |
| NextPageToken string `json:"nextPageToken,omitempty"` |
| // Unreachable: Locations that could not be reached. |
| Unreachable []string `json:"unreachable,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "AccountConnectors") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "AccountConnectors") to include in |
| // API requests with the JSON null value. By default, fields with empty values |
| // are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ListAccountConnectorsResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ListAccountConnectorsResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ListConnectionsResponse: Message for response to listing Connections |
| type ListConnectionsResponse struct { |
| // Connections: The list of Connection |
| Connections []*Connection `json:"connections,omitempty"` |
| // NextPageToken: A token identifying a page of results the server should |
| // return. |
| NextPageToken string `json:"nextPageToken,omitempty"` |
| // Unreachable: Locations that could not be reached. |
| Unreachable []string `json:"unreachable,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "Connections") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Connections") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ListConnectionsResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ListConnectionsResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ListDeploymentEventsResponse: Response to listing DeploymentEvents. |
| type ListDeploymentEventsResponse struct { |
| // DeploymentEvents: The list of DeploymentEvents. |
| DeploymentEvents []*DeploymentEvent `json:"deploymentEvents,omitempty"` |
| // NextPageToken: A token, which can be sent as `page_token` to retrieve the |
| // next page. If this field is omitted, there are no subsequent pages. |
| NextPageToken string `json:"nextPageToken,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "DeploymentEvents") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "DeploymentEvents") to include in |
| // API requests with the JSON null value. By default, fields with empty values |
| // are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ListDeploymentEventsResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ListDeploymentEventsResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ListGitRepositoryLinksResponse: Message for response to listing |
| // GitRepositoryLinks |
| type ListGitRepositoryLinksResponse struct { |
| // GitRepositoryLinks: The list of GitRepositoryLinks |
| GitRepositoryLinks []*GitRepositoryLink `json:"gitRepositoryLinks,omitempty"` |
| // NextPageToken: A token identifying a page of results the server should |
| // return. |
| NextPageToken string `json:"nextPageToken,omitempty"` |
| // Unreachable: Locations that could not be reached. |
| Unreachable []string `json:"unreachable,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "GitRepositoryLinks") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "GitRepositoryLinks") to include |
| // in API requests with the JSON null value. By default, fields with empty |
| // values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ListGitRepositoryLinksResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ListGitRepositoryLinksResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ListInsightsConfigsResponse: Request for response to listing |
| // InsightsConfigs. |
| type ListInsightsConfigsResponse struct { |
| // InsightsConfigs: The list of InsightsConfigs. |
| InsightsConfigs []*InsightsConfig `json:"insightsConfigs,omitempty"` |
| // NextPageToken: A token identifying a page of results the server should |
| // return. |
| NextPageToken string `json:"nextPageToken,omitempty"` |
| // Unreachable: Locations that could not be reached. |
| Unreachable []string `json:"unreachable,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "InsightsConfigs") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "InsightsConfigs") to include in |
| // API requests with the JSON null value. By default, fields with empty values |
| // are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ListInsightsConfigsResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ListInsightsConfigsResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ListLocationsResponse: The response message for Locations.ListLocations. |
| type ListLocationsResponse struct { |
| // Locations: A list of locations that matches the specified filter in the |
| // request. |
| Locations []*Location `json:"locations,omitempty"` |
| // NextPageToken: The standard List next-page token. |
| NextPageToken string `json:"nextPageToken,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "Locations") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Locations") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ListLocationsResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ListOperationsResponse: The response message for Operations.ListOperations. |
| type ListOperationsResponse struct { |
| // NextPageToken: The standard List next-page token. |
| NextPageToken string `json:"nextPageToken,omitempty"` |
| // Operations: A list of operations that matches the specified filter in the |
| // request. |
| Operations []*Operation `json:"operations,omitempty"` |
| // Unreachable: Unordered list. Unreachable resources. Populated when the |
| // request sets `ListOperationsRequest.return_partial_success` and reads across |
| // collections. For example, when attempting to list all resources across all |
| // supported locations. |
| Unreachable []string `json:"unreachable,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "NextPageToken") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "NextPageToken") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ListOperationsResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ListUsersResponse: Message for response to listing Users |
| type ListUsersResponse struct { |
| // NextPageToken: A token identifying a page of results the server should |
| // return. |
| NextPageToken string `json:"nextPageToken,omitempty"` |
| // Unreachable: Locations that could not be reached. |
| Unreachable []string `json:"unreachable,omitempty"` |
| // Users: The list of Users |
| Users []*User `json:"users,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "NextPageToken") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "NextPageToken") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ListUsersResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod ListUsersResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // Location: A resource that represents a Google Cloud location. |
| type Location struct { |
| // DisplayName: The friendly name for this location, typically a nearby city |
| // name. For example, "Tokyo". |
| DisplayName string `json:"displayName,omitempty"` |
| // Labels: Cross-service attributes for the location. For example |
| // {"cloud.googleapis.com/region": "us-east1"} |
| Labels map[string]string `json:"labels,omitempty"` |
| // LocationId: The canonical id for this location. For example: "us-east1". |
| LocationId string `json:"locationId,omitempty"` |
| // Metadata: Service-specific metadata. For example the available capacity at |
| // the given location. |
| Metadata googleapi.RawMessage `json:"metadata,omitempty"` |
| // Name: Resource name for the location, which may vary between |
| // implementations. For example: |
| // "projects/example-project/locations/us-east1" |
| Name string `json:"name,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "DisplayName") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "DisplayName") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s Location) MarshalJSON() ([]byte, error) { |
| type NoMethod Location |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // OAuthCredential: Represents an OAuth token of the account that authorized |
| // the Connection, and associated metadata. |
| type OAuthCredential struct { |
| // OauthTokenSecretVersion: Required. A SecretManager resource containing the |
| // OAuth token that authorizes the connection. Format: |
| // `projects/*/secrets/*/versions/*` or |
| // `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are |
| // supported in that location). |
| OauthTokenSecretVersion string `json:"oauthTokenSecretVersion,omitempty"` |
| // Username: Output only. The username associated with this token. |
| Username string `json:"username,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "OauthTokenSecretVersion") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "OauthTokenSecretVersion") to |
| // include in API requests with the JSON null value. By default, fields with |
| // empty values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s OAuthCredential) MarshalJSON() ([]byte, error) { |
| type NoMethod OAuthCredential |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // Operation: This resource represents a long-running operation that is the |
| // result of a network API call. |
| type Operation struct { |
| // Done: If the value is `false`, it means the operation is still in progress. |
| // If `true`, the operation is completed, and either `error` or `response` is |
| // available. |
| Done bool `json:"done,omitempty"` |
| // Error: The error result of the operation in case of failure or cancellation. |
| Error *Status `json:"error,omitempty"` |
| // Metadata: Service-specific metadata associated with the operation. It |
| // typically contains progress information and common metadata such as create |
| // time. Some services might not provide such metadata. Any method that returns |
| // a long-running operation should document the metadata type, if any. |
| Metadata googleapi.RawMessage `json:"metadata,omitempty"` |
| // Name: The server-assigned name, which is only unique within the same service |
| // that originally returns it. If you use the default HTTP mapping, the `name` |
| // should be a resource name ending with `operations/{unique_id}`. |
| Name string `json:"name,omitempty"` |
| // Response: The normal, successful response of the operation. If the original |
| // method returns no data on success, such as `Delete`, the response is |
| // `google.protobuf.Empty`. If the original method is standard |
| // `Get`/`Create`/`Update`, the response should be the resource. For other |
| // methods, the response should have the type `XxxResponse`, where `Xxx` is the |
| // original method name. For example, if the original method name is |
| // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| Response googleapi.RawMessage `json:"response,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "Done") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Done") to include in API requests |
| // with the JSON null value. By default, fields with empty values are omitted |
| // from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s Operation) MarshalJSON() ([]byte, error) { |
| type NoMethod Operation |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // OperationMetadata: Represents the metadata of the long-running operation. |
| type OperationMetadata struct { |
| // ApiVersion: Output only. API version used to start the operation. |
| ApiVersion string `json:"apiVersion,omitempty"` |
| // CreateTime: Output only. The time the operation was created. |
| CreateTime string `json:"createTime,omitempty"` |
| // EndTime: Output only. The time the operation finished running. |
| EndTime string `json:"endTime,omitempty"` |
| // RequestedCancellation: Output only. Identifies whether the user has |
| // requested cancellation of the operation. Operations that have been cancelled |
| // successfully have google.longrunning.Operation.error value with a |
| // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. |
| RequestedCancellation bool `json:"requestedCancellation,omitempty"` |
| // StatusMessage: Output only. Human-readable status of the operation, if any. |
| StatusMessage string `json:"statusMessage,omitempty"` |
| // Target: Output only. Server-defined resource path for the target of the |
| // operation. |
| Target string `json:"target,omitempty"` |
| // Verb: Output only. Name of the verb executed by the operation. |
| Verb string `json:"verb,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "ApiVersion") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ApiVersion") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s OperationMetadata) MarshalJSON() ([]byte, error) { |
| type NoMethod OperationMetadata |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProcessBitbucketCloudWebhookRequest: RPC request object accepted by the |
| // ProcessBitbucketCloudWebhook RPC method. |
| type ProcessBitbucketCloudWebhookRequest struct { |
| // Body: Required. HTTP request body. |
| Body *HttpBody `json:"body,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Body") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Body") to include in API requests |
| // with the JSON null value. By default, fields with empty values are omitted |
| // from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ProcessBitbucketCloudWebhookRequest) MarshalJSON() ([]byte, error) { |
| type NoMethod ProcessBitbucketCloudWebhookRequest |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProcessBitbucketDataCenterWebhookRequest: RPC request object accepted by the |
| // ProcessBitbucketDataCenterWebhook RPC method. |
| type ProcessBitbucketDataCenterWebhookRequest struct { |
| // Body: Required. HTTP request body. |
| Body *HttpBody `json:"body,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Body") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Body") to include in API requests |
| // with the JSON null value. By default, fields with empty values are omitted |
| // from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ProcessBitbucketDataCenterWebhookRequest) MarshalJSON() ([]byte, error) { |
| type NoMethod ProcessBitbucketDataCenterWebhookRequest |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProcessGitHubEnterpriseWebhookRequest: RPC request object accepted by the |
| // ProcessGitHubEnterpriseWebhook RPC method. |
| type ProcessGitHubEnterpriseWebhookRequest struct { |
| // Body: Required. HTTP request body. |
| Body *HttpBody `json:"body,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Body") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Body") to include in API requests |
| // with the JSON null value. By default, fields with empty values are omitted |
| // from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ProcessGitHubEnterpriseWebhookRequest) MarshalJSON() ([]byte, error) { |
| type NoMethod ProcessGitHubEnterpriseWebhookRequest |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProcessGitLabEnterpriseWebhookRequest: RPC request object accepted by the |
| // ProcessGitLabEnterpriseWebhook RPC method. |
| type ProcessGitLabEnterpriseWebhookRequest struct { |
| // Body: Required. HTTP request body. |
| Body *HttpBody `json:"body,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Body") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Body") to include in API requests |
| // with the JSON null value. By default, fields with empty values are omitted |
| // from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ProcessGitLabEnterpriseWebhookRequest) MarshalJSON() ([]byte, error) { |
| type NoMethod ProcessGitLabEnterpriseWebhookRequest |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProcessGitLabWebhookRequest: RPC request object accepted by the |
| // ProcessGitLabWebhook RPC method. |
| type ProcessGitLabWebhookRequest struct { |
| // Body: Required. HTTP request body. |
| Body *HttpBody `json:"body,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Body") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Body") to include in API requests |
| // with the JSON null value. By default, fields with empty values are omitted |
| // from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ProcessGitLabWebhookRequest) MarshalJSON() ([]byte, error) { |
| type NoMethod ProcessGitLabWebhookRequest |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // Projects: Projects represents the projects to track with the InsightsConfig. |
| type Projects struct { |
| // ProjectIds: Optional. The project IDs. Format: {project} |
| ProjectIds []string `json:"projectIds,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "ProjectIds") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "ProjectIds") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s Projects) MarshalJSON() ([]byte, error) { |
| type NoMethod Projects |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ProviderOAuthConfig: ProviderOAuthConfig is the OAuth config for a provider. |
| type ProviderOAuthConfig struct { |
| // Scopes: Required. User selected scopes to apply to the Oauth config In the |
| // event of changing scopes, user records under AccountConnector will be |
| // deleted and users will re-auth again. |
| Scopes []string `json:"scopes,omitempty"` |
| // SystemProviderId: Optional. Immutable. Developer Connect provided OAuth. |
| // |
| // Possible values: |
| // "SYSTEM_PROVIDER_UNSPECIFIED" - No system provider specified. |
| // "GITHUB" - GitHub provider. Scopes can be found at |
| // https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes |
| // "GITLAB" - GitLab provider. Scopes can be found at |
| // https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes |
| // "GOOGLE" - Deprecated: This provider is no longer supported. Google |
| // provider. Recommended scopes: |
| // "https://www.googleapis.com/auth/drive.readonly", |
| // "https://www.googleapis.com/auth/documents.readonly" |
| // "SENTRY" - Deprecated: This provider is no longer supported. Sentry |
| // provider. Scopes can be found at https://docs.sentry.io/api/permissions/ |
| // "ROVO" - Deprecated: This provider is no longer supported. Rovo provider. |
| // Must select the "rovo" scope. |
| // "NEW_RELIC" - Deprecated: This provider is no longer supported. New Relic |
| // provider. No scopes are allowed. |
| // "DATASTAX" - Deprecated: This provider is no longer supported. Datastax |
| // provider. No scopes are allowed. |
| // "DYNATRACE" - Deprecated: This provider is no longer supported. Dynatrace |
| // provider. |
| SystemProviderId string `json:"systemProviderId,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Scopes") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Scopes") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ProviderOAuthConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod ProviderOAuthConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // RuntimeConfig: RuntimeConfig represents the runtimes where the application |
| // is deployed. |
| type RuntimeConfig struct { |
| // AppHubService: Output only. App Hub Service. |
| AppHubService *AppHubService `json:"appHubService,omitempty"` |
| // AppHubWorkload: Output only. App Hub Workload. |
| AppHubWorkload *AppHubWorkload `json:"appHubWorkload,omitempty"` |
| // GkeWorkload: Output only. Google Kubernetes Engine runtime. |
| GkeWorkload *GKEWorkload `json:"gkeWorkload,omitempty"` |
| // GoogleCloudRun: Output only. Cloud Run runtime. |
| GoogleCloudRun *GoogleCloudRun `json:"googleCloudRun,omitempty"` |
| // State: Output only. The state of the Runtime. |
| // |
| // Possible values: |
| // "STATE_UNSPECIFIED" - No state specified. |
| // "LINKED" - The runtime configuration has been linked to the |
| // InsightsConfig. |
| // "UNLINKED" - The runtime configuration has been unlinked to the |
| // InsightsConfig. |
| State string `json:"state,omitempty"` |
| // Uri: Required. Immutable. The URI of the runtime configuration. For GKE, |
| // this is the cluster name. For Cloud Run, this is the service name. |
| Uri string `json:"uri,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "AppHubService") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "AppHubService") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s RuntimeConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod RuntimeConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // SecureSourceManagerInstanceConfig: Configuration for connections to SSM |
| // instance |
| type SecureSourceManagerInstanceConfig struct { |
| // Instance: Required. Immutable. SSM instance resource, formatted as |
| // `projects/*/locations/*/instances/*` |
| Instance string `json:"instance,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Instance") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Instance") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s SecureSourceManagerInstanceConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod SecureSourceManagerInstanceConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // ServiceDirectoryConfig: ServiceDirectoryConfig represents Service Directory |
| // configuration for a connection. |
| type ServiceDirectoryConfig struct { |
| // Service: Required. The Service Directory service name. Format: |
| // projects/{project}/locations/{location}/namespaces/{namespace}/services/{serv |
| // ice}. |
| Service string `json:"service,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Service") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Service") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s ServiceDirectoryConfig) MarshalJSON() ([]byte, error) { |
| type NoMethod ServiceDirectoryConfig |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // StartOAuthResponse: Message for responding to starting an OAuth flow. |
| type StartOAuthResponse struct { |
| // AuthUri: The authorization server URL to the OAuth flow of the service |
| // provider. |
| AuthUri string `json:"authUri,omitempty"` |
| // ClientId: The client ID to the OAuth App of the service provider. |
| ClientId string `json:"clientId,omitempty"` |
| // CodeChallenge: Please refer to |
| // https://datatracker.ietf.org/doc/html/rfc7636#section-4.1 |
| CodeChallenge string `json:"codeChallenge,omitempty"` |
| // CodeChallengeMethod: Please refer to |
| // https://datatracker.ietf.org/doc/html/rfc7636#section-4.2 |
| CodeChallengeMethod string `json:"codeChallengeMethod,omitempty"` |
| // Scopes: The list of scopes requested by the application. |
| Scopes []string `json:"scopes,omitempty"` |
| // SystemProviderId: The ID of the system provider. |
| // |
| // Possible values: |
| // "SYSTEM_PROVIDER_UNSPECIFIED" - No system provider specified. |
| // "GITHUB" - GitHub provider. Scopes can be found at |
| // https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes |
| // "GITLAB" - GitLab provider. Scopes can be found at |
| // https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes |
| // "GOOGLE" - Deprecated: This provider is no longer supported. Google |
| // provider. Recommended scopes: |
| // "https://www.googleapis.com/auth/drive.readonly", |
| // "https://www.googleapis.com/auth/documents.readonly" |
| // "SENTRY" - Deprecated: This provider is no longer supported. Sentry |
| // provider. Scopes can be found at https://docs.sentry.io/api/permissions/ |
| // "ROVO" - Deprecated: This provider is no longer supported. Rovo provider. |
| // Must select the "rovo" scope. |
| // "NEW_RELIC" - Deprecated: This provider is no longer supported. New Relic |
| // provider. No scopes are allowed. |
| // "DATASTAX" - Deprecated: This provider is no longer supported. Datastax |
| // provider. No scopes are allowed. |
| // "DYNATRACE" - Deprecated: This provider is no longer supported. Dynatrace |
| // provider. |
| SystemProviderId string `json:"systemProviderId,omitempty"` |
| // Ticket: The ticket to be used for post processing the callback from the |
| // service provider. |
| Ticket string `json:"ticket,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "AuthUri") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "AuthUri") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s StartOAuthResponse) MarshalJSON() ([]byte, error) { |
| type NoMethod StartOAuthResponse |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // Status: The `Status` type defines a logical error model that is suitable for |
| // different programming environments, including REST APIs and RPC APIs. It is |
| // used by gRPC (https://github.com/grpc). Each `Status` message contains three |
| // pieces of data: error code, error message, and error details. You can find |
| // out more about this error model and how to work with it in the API Design |
| // Guide (https://cloud.google.com/apis/design/errors). |
| type Status struct { |
| // Code: The status code, which should be an enum value of google.rpc.Code. |
| Code int64 `json:"code,omitempty"` |
| // Details: A list of messages that carry the error details. There is a common |
| // set of message types for APIs to use. |
| Details []googleapi.RawMessage `json:"details,omitempty"` |
| // Message: A developer-facing error message, which should be in English. Any |
| // user-facing error message should be localized and sent in the |
| // google.rpc.Status.details field, or localized by the client. |
| Message string `json:"message,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "Code") to unconditionally |
| // include in API requests. By default, fields with empty or default values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "Code") to include in API requests |
| // with the JSON null value. By default, fields with empty values are omitted |
| // from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s Status) MarshalJSON() ([]byte, error) { |
| type NoMethod Status |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // User: User represents a user connected to the service providers through a |
| // AccountConnector. |
| type User struct { |
| // CreateTime: Output only. The timestamp when the user was created. |
| CreateTime string `json:"createTime,omitempty"` |
| // DisplayName: Output only. Developer Connect automatically converts user |
| // identity to some human readable description, e.g., email address. |
| DisplayName string `json:"displayName,omitempty"` |
| // LastTokenRequestTime: Output only. The timestamp when the token was last |
| // requested. |
| LastTokenRequestTime string `json:"lastTokenRequestTime,omitempty"` |
| // Name: Identifier. Resource name of the user, in the format |
| // `projects/*/locations/*/accountConnectors/*/users/*`. |
| Name string `json:"name,omitempty"` |
| |
| // ServerResponse contains the HTTP response code and headers from the server. |
| googleapi.ServerResponse `json:"-"` |
| // ForceSendFields is a list of field names (e.g. "CreateTime") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "CreateTime") to include in API |
| // requests with the JSON null value. By default, fields with empty values are |
| // omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s User) MarshalJSON() ([]byte, error) { |
| type NoMethod User |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| // UserCredential: Represents a personal access token that authorized the |
| // Connection, and associated metadata. |
| type UserCredential struct { |
| // UserTokenSecretVersion: Required. A SecretManager resource containing the |
| // user token that authorizes the Developer Connect connection. Format: |
| // `projects/*/secrets/*/versions/*` or |
| // `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are |
| // supported in that location). |
| UserTokenSecretVersion string `json:"userTokenSecretVersion,omitempty"` |
| // Username: Output only. The username associated with this token. |
| Username string `json:"username,omitempty"` |
| // ForceSendFields is a list of field names (e.g. "UserTokenSecretVersion") to |
| // unconditionally include in API requests. By default, fields with empty or |
| // default values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| // details. |
| ForceSendFields []string `json:"-"` |
| // NullFields is a list of field names (e.g. "UserTokenSecretVersion") to |
| // include in API requests with the JSON null value. By default, fields with |
| // empty values are omitted from API requests. See |
| // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| NullFields []string `json:"-"` |
| } |
| |
| func (s UserCredential) MarshalJSON() ([]byte, error) { |
| type NoMethod UserCredential |
| return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| } |
| |
| type ProjectsLocationsGetCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Get: Gets information about a location. |
| // |
| // - name: Resource name for the location. |
| func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { |
| c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsGetCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.get", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.get" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Location.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Location{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.get", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsListCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: Lists information about the supported locations for this service. This |
| // method can be called in two ways: * **List all public locations:** Use the |
| // path `GET /v1/locations`. * **List project-visible locations:** Use the path |
| // `GET /v1/projects/{project_id}/locations`. This may include public locations |
| // as well as private or other locations specifically visible to the project. |
| // |
| // - name: The resource that owns the locations collection, if applicable. |
| func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { |
| c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not |
| // use this field. It is unsupported and is ignored unless explicitly |
| // documented otherwise. This is primarily for internal usage. |
| func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { |
| c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) |
| return c |
| } |
| |
| // Filter sets the optional parameter "filter": A filter to narrow down results |
| // to a preferred subset. The filtering language accepts strings like |
| // "displayName=tokyo", and is documented in more detail in AIP-160 |
| // (https://google.aip.dev/160). |
| func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { |
| c.urlParams_.Set("filter", filter) |
| return c |
| } |
| |
| // PageSize sets the optional parameter "pageSize": The maximum number of |
| // results to return. If not set, the service selects a default. |
| func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { |
| c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| return c |
| } |
| |
| // PageToken sets the optional parameter "pageToken": A page token received |
| // from the `next_page_token` field in the response. Send that page token to |
| // receive the subsequent page. |
| func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { |
| c.urlParams_.Set("pageToken", pageToken) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.list", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.list" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *ListLocationsResponse.ServerResponse.Header or (if a response was returned |
| // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| // check whether the returned error was because http.StatusNotModified was |
| // returned. |
| func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &ListLocationsResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.list", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| // Pages invokes f for each page of results. |
| // A non-nil error returned from f will halt the iteration. |
| // The provided context supersedes any context provided to the Context method. |
| func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { |
| c.ctx_ = ctx |
| defer c.PageToken(c.urlParams_.Get("pageToken")) |
| for { |
| x, err := c.Do() |
| if err != nil { |
| return err |
| } |
| if err := f(x); err != nil { |
| return err |
| } |
| if x.NextPageToken == "" { |
| return nil |
| } |
| c.PageToken(x.NextPageToken) |
| } |
| } |
| |
| type ProjectsLocationsAccountConnectorsCreateCall struct { |
| s *Service |
| parent string |
| accountconnector *AccountConnector |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Create: Creates a new AccountConnector in a given project and location. |
| // |
| // - parent: Location resource name as the account_connector’s parent. |
| func (r *ProjectsLocationsAccountConnectorsService) Create(parent string, accountconnector *AccountConnector) *ProjectsLocationsAccountConnectorsCreateCall { |
| c := &ProjectsLocationsAccountConnectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| c.accountconnector = accountconnector |
| return c |
| } |
| |
| // AccountConnectorId sets the optional parameter "accountConnectorId": |
| // Required. The ID to use for the AccountConnector, which will become the |
| // final component of the AccountConnector's resource name. Its format should |
| // adhere to https://google.aip.dev/122#resource-id-segments Names must be |
| // unique per-project per-location. |
| func (c *ProjectsLocationsAccountConnectorsCreateCall) AccountConnectorId(accountConnectorId string) *ProjectsLocationsAccountConnectorsCreateCall { |
| c.urlParams_.Set("accountConnectorId", accountConnectorId) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes since |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsAccountConnectorsCreateCall) RequestId(requestId string) *ProjectsLocationsAccountConnectorsCreateCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsAccountConnectorsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAccountConnectorsCreateCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsCreateCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsCreateCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsCreateCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsCreateCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsCreateCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountconnector) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/accountConnectors") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.create" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsAccountConnectorsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.create", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsAccountConnectorsDeleteCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Delete: Deletes a single AccountConnector. |
| // |
| // - name: Name of the resource. |
| func (r *ProjectsLocationsAccountConnectorsService) Delete(name string) *ProjectsLocationsAccountConnectorsDeleteCall { |
| c := &ProjectsLocationsAccountConnectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Etag sets the optional parameter "etag": The current etag of the |
| // AccountConnectorn. If an etag is provided and does not match the current |
| // etag of the AccountConnector, deletion will be blocked and an ABORTED error |
| // will be returned. |
| func (c *ProjectsLocationsAccountConnectorsDeleteCall) Etag(etag string) *ProjectsLocationsAccountConnectorsDeleteCall { |
| c.urlParams_.Set("etag", etag) |
| return c |
| } |
| |
| // Force sets the optional parameter "force": If set to true, any Users from |
| // this AccountConnector will also be deleted. (Otherwise, the request will |
| // only work if the AccountConnector has no Users.) |
| func (c *ProjectsLocationsAccountConnectorsDeleteCall) Force(force bool) *ProjectsLocationsAccountConnectorsDeleteCall { |
| c.urlParams_.Set("force", fmt.Sprint(force)) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes after |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsAccountConnectorsDeleteCall) RequestId(requestId string) *ProjectsLocationsAccountConnectorsDeleteCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsAccountConnectorsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAccountConnectorsDeleteCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsDeleteCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsDeleteCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsDeleteCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("DELETE", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.delete", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.delete" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsAccountConnectorsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.delete", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsAccountConnectorsGetCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Get: Gets details of a single AccountConnector. |
| // |
| // - name: Name of the resource. |
| func (r *ProjectsLocationsAccountConnectorsService) Get(name string) *ProjectsLocationsAccountConnectorsGetCall { |
| c := &ProjectsLocationsAccountConnectorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsGetCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsAccountConnectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAccountConnectorsGetCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsGetCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsGetCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsGetCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsGetCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.get", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.get" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *AccountConnector.ServerResponse.Header or (if a response was returned at |
| // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| // check whether the returned error was because http.StatusNotModified was |
| // returned. |
| func (c *ProjectsLocationsAccountConnectorsGetCall) Do(opts ...googleapi.CallOption) (*AccountConnector, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &AccountConnector{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.get", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsAccountConnectorsListCall struct { |
| s *Service |
| parent string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: Lists AccountConnectors in a given project and location. |
| // |
| // - parent: Parent value for ListAccountConnectorsRequest. |
| func (r *ProjectsLocationsAccountConnectorsService) List(parent string) *ProjectsLocationsAccountConnectorsListCall { |
| c := &ProjectsLocationsAccountConnectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| return c |
| } |
| |
| // Filter sets the optional parameter "filter": Filtering results |
| func (c *ProjectsLocationsAccountConnectorsListCall) Filter(filter string) *ProjectsLocationsAccountConnectorsListCall { |
| c.urlParams_.Set("filter", filter) |
| return c |
| } |
| |
| // OrderBy sets the optional parameter "orderBy": Hint for how to order the |
| // results |
| func (c *ProjectsLocationsAccountConnectorsListCall) OrderBy(orderBy string) *ProjectsLocationsAccountConnectorsListCall { |
| c.urlParams_.Set("orderBy", orderBy) |
| return c |
| } |
| |
| // PageSize sets the optional parameter "pageSize": Requested page size. Server |
| // may return fewer items than requested. If unspecified, server will pick an |
| // appropriate default. |
| func (c *ProjectsLocationsAccountConnectorsListCall) PageSize(pageSize int64) *ProjectsLocationsAccountConnectorsListCall { |
| c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| return c |
| } |
| |
| // PageToken sets the optional parameter "pageToken": A token identifying a |
| // page of results the server should return. |
| func (c *ProjectsLocationsAccountConnectorsListCall) PageToken(pageToken string) *ProjectsLocationsAccountConnectorsListCall { |
| c.urlParams_.Set("pageToken", pageToken) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsListCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsAccountConnectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAccountConnectorsListCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsListCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsListCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/accountConnectors") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.list", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.list" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *ListAccountConnectorsResponse.ServerResponse.Header or (if a response was |
| // returned at all) in error.(*googleapi.Error).Header. Use |
| // googleapi.IsNotModified to check whether the returned error was because |
| // http.StatusNotModified was returned. |
| func (c *ProjectsLocationsAccountConnectorsListCall) Do(opts ...googleapi.CallOption) (*ListAccountConnectorsResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &ListAccountConnectorsResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.list", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| // Pages invokes f for each page of results. |
| // A non-nil error returned from f will halt the iteration. |
| // The provided context supersedes any context provided to the Context method. |
| func (c *ProjectsLocationsAccountConnectorsListCall) Pages(ctx context.Context, f func(*ListAccountConnectorsResponse) error) error { |
| c.ctx_ = ctx |
| defer c.PageToken(c.urlParams_.Get("pageToken")) |
| for { |
| x, err := c.Do() |
| if err != nil { |
| return err |
| } |
| if err := f(x); err != nil { |
| return err |
| } |
| if x.NextPageToken == "" { |
| return nil |
| } |
| c.PageToken(x.NextPageToken) |
| } |
| } |
| |
| type ProjectsLocationsAccountConnectorsPatchCall struct { |
| s *Service |
| name string |
| accountconnector *AccountConnector |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Patch: Updates the parameters of a single AccountConnector. |
| // |
| // - name: Identifier. The resource name of the accountConnector, in the format |
| // `projects/{project}/locations/{location}/accountConnectors/{account_connect |
| // or_id}`. |
| func (r *ProjectsLocationsAccountConnectorsService) Patch(name string, accountconnector *AccountConnector) *ProjectsLocationsAccountConnectorsPatchCall { |
| c := &ProjectsLocationsAccountConnectorsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| c.accountconnector = accountconnector |
| return c |
| } |
| |
| // AllowMissing sets the optional parameter "allowMissing": If set to true, and |
| // the accountConnector is not found a new accountConnector will be created. In |
| // this situation `update_mask` is ignored. The creation will succeed only if |
| // the input accountConnector has all the necessary |
| func (c *ProjectsLocationsAccountConnectorsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsAccountConnectorsPatchCall { |
| c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes since |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsAccountConnectorsPatchCall) RequestId(requestId string) *ProjectsLocationsAccountConnectorsPatchCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // UpdateMask sets the optional parameter "updateMask": The list of fields to |
| // be updated. |
| func (c *ProjectsLocationsAccountConnectorsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAccountConnectorsPatchCall { |
| c.urlParams_.Set("updateMask", updateMask) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsAccountConnectorsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAccountConnectorsPatchCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsPatchCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsPatchCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsPatchCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsPatchCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsPatchCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accountconnector) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("PATCH", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.patch", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.patch" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsAccountConnectorsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.patch", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsAccountConnectorsUsersDeleteCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Delete: Deletes a single User. |
| // |
| // - name: Name of the resource. |
| func (r *ProjectsLocationsAccountConnectorsUsersService) Delete(name string) *ProjectsLocationsAccountConnectorsUsersDeleteCall { |
| c := &ProjectsLocationsAccountConnectorsUsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Etag sets the optional parameter "etag": This checksum is computed by the |
| // server based on the value of other fields, and may be sent on update and |
| // delete requests to ensure the client has an up-to-date value before |
| // proceeding. |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteCall) Etag(etag string) *ProjectsLocationsAccountConnectorsUsersDeleteCall { |
| c.urlParams_.Set("etag", etag) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes after |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteCall) RequestId(requestId string) *ProjectsLocationsAccountConnectorsUsersDeleteCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAccountConnectorsUsersDeleteCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsUsersDeleteCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsUsersDeleteCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("DELETE", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.delete", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.users.delete" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.delete", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsAccountConnectorsUsersDeleteSelfCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // DeleteSelf: Delete the User based on the user credentials. |
| // |
| // - name: Name of the AccountConnector resource. |
| func (r *ProjectsLocationsAccountConnectorsUsersService) DeleteSelf(name string) *ProjectsLocationsAccountConnectorsUsersDeleteSelfCall { |
| c := &ProjectsLocationsAccountConnectorsUsersDeleteSelfCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteSelfCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsUsersDeleteSelfCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteSelfCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsUsersDeleteSelfCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteSelfCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteSelfCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/users:deleteSelf") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("DELETE", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.deleteSelf", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.users.deleteSelf" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsAccountConnectorsUsersDeleteSelfCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.deleteSelf", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsAccountConnectorsUsersFetchAccessTokenCall struct { |
| s *Service |
| accountConnector string |
| fetchaccesstokenrequest *FetchAccessTokenRequest |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // FetchAccessToken: Fetches OAuth access token based on end user credentials. |
| // |
| // - accountConnector: The resource name of the AccountConnector in the format |
| // `projects/*/locations/*/accountConnectors/*`. |
| func (r *ProjectsLocationsAccountConnectorsUsersService) FetchAccessToken(accountConnector string, fetchaccesstokenrequest *FetchAccessTokenRequest) *ProjectsLocationsAccountConnectorsUsersFetchAccessTokenCall { |
| c := &ProjectsLocationsAccountConnectorsUsersFetchAccessTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.accountConnector = accountConnector |
| c.fetchaccesstokenrequest = fetchaccesstokenrequest |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchAccessTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsUsersFetchAccessTokenCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchAccessTokenCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsUsersFetchAccessTokenCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchAccessTokenCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchAccessTokenCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fetchaccesstokenrequest) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+accountConnector}/users:fetchAccessToken") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "accountConnector": c.accountConnector, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.fetchAccessToken", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.users.fetchAccessToken" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *FetchAccessTokenResponse.ServerResponse.Header or (if a response was |
| // returned at all) in error.(*googleapi.Error).Header. Use |
| // googleapi.IsNotModified to check whether the returned error was because |
| // http.StatusNotModified was returned. |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchAccessTokenCall) Do(opts ...googleapi.CallOption) (*FetchAccessTokenResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &FetchAccessTokenResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.fetchAccessToken", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsAccountConnectorsUsersFetchSelfCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // FetchSelf: Fetch the User based on the user credentials. |
| // |
| // - name: Name of the AccountConnector resource. |
| func (r *ProjectsLocationsAccountConnectorsUsersService) FetchSelf(name string) *ProjectsLocationsAccountConnectorsUsersFetchSelfCall { |
| c := &ProjectsLocationsAccountConnectorsUsersFetchSelfCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchSelfCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsUsersFetchSelfCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchSelfCall) IfNoneMatch(entityTag string) *ProjectsLocationsAccountConnectorsUsersFetchSelfCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchSelfCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsUsersFetchSelfCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchSelfCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchSelfCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/users:fetchSelf") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.fetchSelf", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.users.fetchSelf" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *User.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsAccountConnectorsUsersFetchSelfCall) Do(opts ...googleapi.CallOption) (*User, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &User{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.fetchSelf", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall struct { |
| s *Service |
| accountConnector string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // FinishOAuthFlow: Finishes OAuth flow for an account connector. |
| // |
| // - accountConnector: The resource name of the AccountConnector in the format |
| // `projects/*/locations/*/accountConnectors/*`. |
| func (r *ProjectsLocationsAccountConnectorsUsersService) FinishOAuthFlow(accountConnector string) *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall { |
| c := &ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.accountConnector = accountConnector |
| return c |
| } |
| |
| // GoogleOauthParamsScopes sets the optional parameter |
| // "googleOauthParams.scopes": Required. The scopes returned by Google OAuth |
| // flow. |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) GoogleOauthParamsScopes(googleOauthParamsScopes ...string) *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall { |
| c.urlParams_.SetMulti("googleOauthParams.scopes", append([]string{}, googleOauthParamsScopes...)) |
| return c |
| } |
| |
| // GoogleOauthParamsTicket sets the optional parameter |
| // "googleOauthParams.ticket": Required. The ticket to be used for post |
| // processing the callback from Google OAuth flow. |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) GoogleOauthParamsTicket(googleOauthParamsTicket string) *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall { |
| c.urlParams_.Set("googleOauthParams.ticket", googleOauthParamsTicket) |
| return c |
| } |
| |
| // GoogleOauthParamsVersionInfo sets the optional parameter |
| // "googleOauthParams.versionInfo": The version info returned by Google OAuth |
| // flow. |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) GoogleOauthParamsVersionInfo(googleOauthParamsVersionInfo string) *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall { |
| c.urlParams_.Set("googleOauthParams.versionInfo", googleOauthParamsVersionInfo) |
| return c |
| } |
| |
| // OauthParamsCode sets the optional parameter "oauthParams.code": Required. |
| // The code to be used for getting the token from SCM provider. |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) OauthParamsCode(oauthParamsCode string) *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall { |
| c.urlParams_.Set("oauthParams.code", oauthParamsCode) |
| return c |
| } |
| |
| // OauthParamsTicket sets the optional parameter "oauthParams.ticket": |
| // Required. The ticket to be used for post processing the callback from SCM |
| // provider. |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) OauthParamsTicket(oauthParamsTicket string) *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall { |
| c.urlParams_.Set("oauthParams.ticket", oauthParamsTicket) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) IfNoneMatch(entityTag string) *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+accountConnector}/users:finishOAuthFlow") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "accountConnector": c.accountConnector, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.finishOAuthFlow", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.users.finishOAuthFlow" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *FinishOAuthResponse.ServerResponse.Header or (if a response was returned at |
| // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| // check whether the returned error was because http.StatusNotModified was |
| // returned. |
| func (c *ProjectsLocationsAccountConnectorsUsersFinishOAuthFlowCall) Do(opts ...googleapi.CallOption) (*FinishOAuthResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &FinishOAuthResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.finishOAuthFlow", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsAccountConnectorsUsersListCall struct { |
| s *Service |
| parent string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: Lists Users in a given project, location, and account_connector. |
| // |
| // - parent: Parent value for ListUsersRequest. |
| func (r *ProjectsLocationsAccountConnectorsUsersService) List(parent string) *ProjectsLocationsAccountConnectorsUsersListCall { |
| c := &ProjectsLocationsAccountConnectorsUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| return c |
| } |
| |
| // Filter sets the optional parameter "filter": Filtering results |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) Filter(filter string) *ProjectsLocationsAccountConnectorsUsersListCall { |
| c.urlParams_.Set("filter", filter) |
| return c |
| } |
| |
| // OrderBy sets the optional parameter "orderBy": Hint for how to order the |
| // results |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) OrderBy(orderBy string) *ProjectsLocationsAccountConnectorsUsersListCall { |
| c.urlParams_.Set("orderBy", orderBy) |
| return c |
| } |
| |
| // PageSize sets the optional parameter "pageSize": Requested page size. Server |
| // may return fewer items than requested. If unspecified, server will pick an |
| // appropriate default. |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) PageSize(pageSize int64) *ProjectsLocationsAccountConnectorsUsersListCall { |
| c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| return c |
| } |
| |
| // PageToken sets the optional parameter "pageToken": A token identifying a |
| // page of results the server should return. |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) PageToken(pageToken string) *ProjectsLocationsAccountConnectorsUsersListCall { |
| c.urlParams_.Set("pageToken", pageToken) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsUsersListCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAccountConnectorsUsersListCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsUsersListCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/users") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.list", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.users.list" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *ListUsersResponse.ServerResponse.Header or (if a response was returned at |
| // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| // check whether the returned error was because http.StatusNotModified was |
| // returned. |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &ListUsersResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.list", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| // Pages invokes f for each page of results. |
| // A non-nil error returned from f will halt the iteration. |
| // The provided context supersedes any context provided to the Context method. |
| func (c *ProjectsLocationsAccountConnectorsUsersListCall) Pages(ctx context.Context, f func(*ListUsersResponse) error) error { |
| c.ctx_ = ctx |
| defer c.PageToken(c.urlParams_.Get("pageToken")) |
| for { |
| x, err := c.Do() |
| if err != nil { |
| return err |
| } |
| if err := f(x); err != nil { |
| return err |
| } |
| if x.NextPageToken == "" { |
| return nil |
| } |
| c.PageToken(x.NextPageToken) |
| } |
| } |
| |
| type ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall struct { |
| s *Service |
| accountConnector string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // StartOAuthFlow: Starts OAuth flow for an account connector. |
| // |
| // - accountConnector: The resource name of the AccountConnector in the format |
| // `projects/*/locations/*/accountConnectors/*`. |
| func (r *ProjectsLocationsAccountConnectorsUsersService) StartOAuthFlow(accountConnector string) *ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall { |
| c := &ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.accountConnector = accountConnector |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall) Fields(s ...googleapi.Field) *ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall) IfNoneMatch(entityTag string) *ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall) Context(ctx context.Context) *ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+accountConnector}/users:startOAuthFlow") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "accountConnector": c.accountConnector, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.startOAuthFlow", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.accountConnectors.users.startOAuthFlow" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *StartOAuthResponse.ServerResponse.Header or (if a response was returned at |
| // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| // check whether the returned error was because http.StatusNotModified was |
| // returned. |
| func (c *ProjectsLocationsAccountConnectorsUsersStartOAuthFlowCall) Do(opts ...googleapi.CallOption) (*StartOAuthResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &StartOAuthResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.accountConnectors.users.startOAuthFlow", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsCreateCall struct { |
| s *Service |
| parent string |
| connection *Connection |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Create: Creates a new Connection in a given project and location. |
| // |
| // - parent: Value for parent. |
| func (r *ProjectsLocationsConnectionsService) Create(parent string, connection *Connection) *ProjectsLocationsConnectionsCreateCall { |
| c := &ProjectsLocationsConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| c.connection = connection |
| return c |
| } |
| |
| // ConnectionId sets the optional parameter "connectionId": Required. Id of the |
| // requesting object If auto-generating Id server-side, remove this field and |
| // connection_id from the method_signature of Create RPC |
| func (c *ProjectsLocationsConnectionsCreateCall) ConnectionId(connectionId string) *ProjectsLocationsConnectionsCreateCall { |
| c.urlParams_.Set("connectionId", connectionId) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes since |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsConnectionsCreateCall) RequestId(requestId string) *ProjectsLocationsConnectionsCreateCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsConnectionsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsCreateCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsCreateCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsCreateCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsCreateCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.connection) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.create" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.create", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsDeleteCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Delete: Deletes a single Connection. |
| // |
| // - name: Name of the resource. |
| func (r *ProjectsLocationsConnectionsService) Delete(name string) *ProjectsLocationsConnectionsDeleteCall { |
| c := &ProjectsLocationsConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Etag sets the optional parameter "etag": The current etag of the Connection. |
| // If an etag is provided and does not match the current etag of the |
| // Connection, deletion will be blocked and an ABORTED error will be returned. |
| func (c *ProjectsLocationsConnectionsDeleteCall) Etag(etag string) *ProjectsLocationsConnectionsDeleteCall { |
| c.urlParams_.Set("etag", etag) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes after |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsConnectionsDeleteCall) RequestId(requestId string) *ProjectsLocationsConnectionsDeleteCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsConnectionsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsDeleteCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsDeleteCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsDeleteCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsDeleteCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("DELETE", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.delete", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.delete" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.delete", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsFetchGitHubInstallationsCall struct { |
| s *Service |
| connection string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // FetchGitHubInstallations: FetchGitHubInstallations returns the list of |
| // GitHub Installations that are available to be added to a Connection. For |
| // github.com, only installations accessible to the authorizer token are |
| // returned. For GitHub Enterprise, all installations are returned. |
| // |
| // - connection: The resource name of the connection in the format |
| // `projects/*/locations/*/connections/*`. |
| func (r *ProjectsLocationsConnectionsService) FetchGitHubInstallations(connection string) *ProjectsLocationsConnectionsFetchGitHubInstallationsCall { |
| c := &ProjectsLocationsConnectionsFetchGitHubInstallationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.connection = connection |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsFetchGitHubInstallationsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsFetchGitHubInstallationsCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsConnectionsFetchGitHubInstallationsCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsFetchGitHubInstallationsCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsFetchGitHubInstallationsCall) Context(ctx context.Context) *ProjectsLocationsConnectionsFetchGitHubInstallationsCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsFetchGitHubInstallationsCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsFetchGitHubInstallationsCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+connection}:fetchGitHubInstallations") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "connection": c.connection, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.fetchGitHubInstallations", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.fetchGitHubInstallations" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *FetchGitHubInstallationsResponse.ServerResponse.Header or (if a response |
| // was returned at all) in error.(*googleapi.Error).Header. Use |
| // googleapi.IsNotModified to check whether the returned error was because |
| // http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsFetchGitHubInstallationsCall) Do(opts ...googleapi.CallOption) (*FetchGitHubInstallationsResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &FetchGitHubInstallationsResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.fetchGitHubInstallations", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall struct { |
| s *Service |
| connection string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // FetchLinkableGitRepositories: FetchLinkableGitRepositories returns a list of |
| // git repositories from an SCM that are available to be added to a Connection. |
| // |
| // - connection: The name of the Connection. Format: |
| // `projects/*/locations/*/connections/*`. |
| func (r *ProjectsLocationsConnectionsService) FetchLinkableGitRepositories(connection string) *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall { |
| c := &ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.connection = connection |
| return c |
| } |
| |
| // PageSize sets the optional parameter "pageSize": Number of results to return |
| // in the list. Defaults to 20. |
| func (c *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall { |
| c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| return c |
| } |
| |
| // PageToken sets the optional parameter "pageToken": Page start. |
| func (c *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall) PageToken(pageToken string) *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall { |
| c.urlParams_.Set("pageToken", pageToken) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall) Context(ctx context.Context) *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+connection}:fetchLinkableGitRepositories") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "connection": c.connection, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.fetchLinkableGitRepositories", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.fetchLinkableGitRepositories" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *FetchLinkableGitRepositoriesResponse.ServerResponse.Header or (if a |
| // response was returned at all) in error.(*googleapi.Error).Header. Use |
| // googleapi.IsNotModified to check whether the returned error was because |
| // http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall) Do(opts ...googleapi.CallOption) (*FetchLinkableGitRepositoriesResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &FetchLinkableGitRepositoriesResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.fetchLinkableGitRepositories", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| // Pages invokes f for each page of results. |
| // A non-nil error returned from f will halt the iteration. |
| // The provided context supersedes any context provided to the Context method. |
| func (c *ProjectsLocationsConnectionsFetchLinkableGitRepositoriesCall) Pages(ctx context.Context, f func(*FetchLinkableGitRepositoriesResponse) error) error { |
| c.ctx_ = ctx |
| defer c.PageToken(c.urlParams_.Get("pageToken")) |
| for { |
| x, err := c.Do() |
| if err != nil { |
| return err |
| } |
| if err := f(x); err != nil { |
| return err |
| } |
| if x.NextPageToken == "" { |
| return nil |
| } |
| c.PageToken(x.NextPageToken) |
| } |
| } |
| |
| type ProjectsLocationsConnectionsGetCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Get: Gets details of a single Connection. |
| // |
| // - name: Name of the resource. |
| func (r *ProjectsLocationsConnectionsService) Get(name string) *ProjectsLocationsConnectionsGetCall { |
| c := &ProjectsLocationsConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGetCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGetCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.get", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.get" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Connection.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) (*Connection, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Connection{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.get", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsListCall struct { |
| s *Service |
| parent string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: Lists Connections in a given project and location. |
| // |
| // - parent: Parent value for ListConnectionsRequest. |
| func (r *ProjectsLocationsConnectionsService) List(parent string) *ProjectsLocationsConnectionsListCall { |
| c := &ProjectsLocationsConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| return c |
| } |
| |
| // Filter sets the optional parameter "filter": Filtering results |
| func (c *ProjectsLocationsConnectionsListCall) Filter(filter string) *ProjectsLocationsConnectionsListCall { |
| c.urlParams_.Set("filter", filter) |
| return c |
| } |
| |
| // OrderBy sets the optional parameter "orderBy": Hint for how to order the |
| // results |
| func (c *ProjectsLocationsConnectionsListCall) OrderBy(orderBy string) *ProjectsLocationsConnectionsListCall { |
| c.urlParams_.Set("orderBy", orderBy) |
| return c |
| } |
| |
| // PageSize sets the optional parameter "pageSize": Requested page size. Server |
| // may return fewer items than requested. If unspecified, server will pick an |
| // appropriate default. |
| func (c *ProjectsLocationsConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsListCall { |
| c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| return c |
| } |
| |
| // PageToken sets the optional parameter "pageToken": A token identifying a |
| // page of results the server should return. |
| func (c *ProjectsLocationsConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsListCall { |
| c.urlParams_.Set("pageToken", pageToken) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsListCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsListCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsListCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.list", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.list" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *ListConnectionsResponse.ServerResponse.Header or (if a response was |
| // returned at all) in error.(*googleapi.Error).Header. Use |
| // googleapi.IsNotModified to check whether the returned error was because |
| // http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &ListConnectionsResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.list", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| // Pages invokes f for each page of results. |
| // A non-nil error returned from f will halt the iteration. |
| // The provided context supersedes any context provided to the Context method. |
| func (c *ProjectsLocationsConnectionsListCall) Pages(ctx context.Context, f func(*ListConnectionsResponse) error) error { |
| c.ctx_ = ctx |
| defer c.PageToken(c.urlParams_.Get("pageToken")) |
| for { |
| x, err := c.Do() |
| if err != nil { |
| return err |
| } |
| if err := f(x); err != nil { |
| return err |
| } |
| if x.NextPageToken == "" { |
| return nil |
| } |
| c.PageToken(x.NextPageToken) |
| } |
| } |
| |
| type ProjectsLocationsConnectionsPatchCall struct { |
| s *Service |
| name string |
| connection *Connection |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Patch: Updates the parameters of a single Connection. |
| // |
| // - name: Identifier. The resource name of the connection, in the format |
| // `projects/{project}/locations/{location}/connections/{connection_id}`. |
| func (r *ProjectsLocationsConnectionsService) Patch(name string, connection *Connection) *ProjectsLocationsConnectionsPatchCall { |
| c := &ProjectsLocationsConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| c.connection = connection |
| return c |
| } |
| |
| // AllowMissing sets the optional parameter "allowMissing": If set to true, and |
| // the connection is not found a new connection will be created. In this |
| // situation `update_mask` is ignored. The creation will succeed only if the |
| // input connection has all the necessary information (e.g a github_config with |
| // both user_oauth_token and installation_id properties). |
| func (c *ProjectsLocationsConnectionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsConnectionsPatchCall { |
| c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes since |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsConnectionsPatchCall) RequestId(requestId string) *ProjectsLocationsConnectionsPatchCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // UpdateMask sets the optional parameter "updateMask": Required. Field mask is |
| // used to specify the fields to be overwritten in the Connection resource by |
| // the update. The fields specified in the update_mask are relative to the |
| // resource, not the full request. A field will be overwritten if it is in the |
| // mask. If the user does not provide a mask then all fields will be |
| // overwritten. |
| func (c *ProjectsLocationsConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionsPatchCall { |
| c.urlParams_.Set("updateMask", updateMask) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsConnectionsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsPatchCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsPatchCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionsPatchCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsPatchCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsPatchCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.connection) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("PATCH", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.patch", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.patch" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.patch", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsProcessGitHubEnterpriseWebhookCall struct { |
| s *Service |
| parent string |
| processgithubenterprisewebhookrequest *ProcessGitHubEnterpriseWebhookRequest |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // ProcessGitHubEnterpriseWebhook: ProcessGitHubEnterpriseWebhook is called by |
| // the external GitHub Enterprise instances for notifying events. |
| // |
| // - parent: Project and location where the webhook will be received. Format: |
| // `projects/*/locations/*`. |
| func (r *ProjectsLocationsConnectionsService) ProcessGitHubEnterpriseWebhook(parent string, processgithubenterprisewebhookrequest *ProcessGitHubEnterpriseWebhookRequest) *ProjectsLocationsConnectionsProcessGitHubEnterpriseWebhookCall { |
| c := &ProjectsLocationsConnectionsProcessGitHubEnterpriseWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| c.processgithubenterprisewebhookrequest = processgithubenterprisewebhookrequest |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsProcessGitHubEnterpriseWebhookCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsProcessGitHubEnterpriseWebhookCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsProcessGitHubEnterpriseWebhookCall) Context(ctx context.Context) *ProjectsLocationsConnectionsProcessGitHubEnterpriseWebhookCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsProcessGitHubEnterpriseWebhookCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsProcessGitHubEnterpriseWebhookCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.processgithubenterprisewebhookrequest) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections:processGitHubEnterpriseWebhook") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.processGitHubEnterpriseWebhook", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.processGitHubEnterpriseWebhook" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Empty.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsProcessGitHubEnterpriseWebhookCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Empty{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.processGitHubEnterpriseWebhook", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksCreateCall struct { |
| s *Service |
| parent string |
| gitrepositorylink *GitRepositoryLink |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Create: Creates a GitRepositoryLink. Upon linking a Git Repository, |
| // Developer Connect will configure the Git Repository to send webhook events |
| // to Developer Connect. Connections that use Firebase GitHub Application will |
| // have events forwarded to the Firebase service. Connections that use Gemini |
| // Code Assist will have events forwarded to Gemini Code Assist service. All |
| // other Connections will have events forwarded to Cloud Build. |
| // |
| // - parent: Value for parent. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) Create(parent string, gitrepositorylink *GitRepositoryLink) *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| c.gitrepositorylink = gitrepositorylink |
| return c |
| } |
| |
| // GitRepositoryLinkId sets the optional parameter "gitRepositoryLinkId": |
| // Required. The ID to use for the repository, which will become the final |
| // component of the repository's resource name. This ID should be unique in the |
| // connection. Allows alphanumeric characters and any of -._~%!$&'()*+,;=@. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall) GitRepositoryLinkId(gitRepositoryLinkId string) *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall { |
| c.urlParams_.Set("gitRepositoryLinkId", gitRepositoryLinkId) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes since |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall) RequestId(requestId string) *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.gitrepositorylink) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gitRepositoryLinks") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.create" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.create", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Delete: Deletes a single GitRepositoryLink. |
| // |
| // - name: Name of the resource. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) Delete(name string) *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Etag sets the optional parameter "etag": This checksum is computed by the |
| // server based on the value of other fields, and may be sent on update and |
| // delete requests to ensure the client has an up-to-date value before |
| // proceeding. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall) Etag(etag string) *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall { |
| c.urlParams_.Set("etag", etag) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes after |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall) RequestId(requestId string) *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("DELETE", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.delete", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.delete" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.delete", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall struct { |
| s *Service |
| gitRepositoryLink string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // FetchGitRefs: Fetch the list of branches or tags for a given repository. |
| // |
| // - gitRepositoryLink: The resource name of GitRepositoryLink in the format |
| // `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) FetchGitRefs(gitRepositoryLink string) *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.gitRepositoryLink = gitRepositoryLink |
| return c |
| } |
| |
| // PageSize sets the optional parameter "pageSize": Number of results to return |
| // in the list. Default to 20. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall { |
| c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| return c |
| } |
| |
| // PageToken sets the optional parameter "pageToken": Page start. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall) PageToken(pageToken string) *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall { |
| c.urlParams_.Set("pageToken", pageToken) |
| return c |
| } |
| |
| // RefType sets the optional parameter "refType": Required. Type of refs to |
| // fetch. |
| // |
| // Possible values: |
| // |
| // "REF_TYPE_UNSPECIFIED" - No type specified. |
| // "TAG" - To fetch tags. |
| // "BRANCH" - To fetch branches. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall) RefType(refType string) *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall { |
| c.urlParams_.Set("refType", refType) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+gitRepositoryLink}:fetchGitRefs") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "gitRepositoryLink": c.gitRepositoryLink, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.fetchGitRefs", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.fetchGitRefs" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *FetchGitRefsResponse.ServerResponse.Header or (if a response was returned |
| // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| // check whether the returned error was because http.StatusNotModified was |
| // returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall) Do(opts ...googleapi.CallOption) (*FetchGitRefsResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &FetchGitRefsResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.fetchGitRefs", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| // Pages invokes f for each page of results. |
| // A non-nil error returned from f will halt the iteration. |
| // The provided context supersedes any context provided to the Context method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchGitRefsCall) Pages(ctx context.Context, f func(*FetchGitRefsResponse) error) error { |
| c.ctx_ = ctx |
| defer c.PageToken(c.urlParams_.Get("pageToken")) |
| for { |
| x, err := c.Do() |
| if err != nil { |
| return err |
| } |
| if err := f(x); err != nil { |
| return err |
| } |
| if x.NextPageToken == "" { |
| return nil |
| } |
| c.PageToken(x.NextPageToken) |
| } |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksFetchReadTokenCall struct { |
| s *Service |
| gitRepositoryLink string |
| fetchreadtokenrequest *FetchReadTokenRequest |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // FetchReadToken: Fetches read token of a given gitRepositoryLink. |
| // |
| // - gitRepositoryLink: The resource name of the gitRepositoryLink in the |
| // format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) FetchReadToken(gitRepositoryLink string, fetchreadtokenrequest *FetchReadTokenRequest) *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadTokenCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksFetchReadTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.gitRepositoryLink = gitRepositoryLink |
| c.fetchreadtokenrequest = fetchreadtokenrequest |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadTokenCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadTokenCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadTokenCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadTokenCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadTokenCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fetchreadtokenrequest) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+gitRepositoryLink}:fetchReadToken") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "gitRepositoryLink": c.gitRepositoryLink, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.fetchReadToken", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.fetchReadToken" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *FetchReadTokenResponse.ServerResponse.Header or (if a response was returned |
| // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| // check whether the returned error was because http.StatusNotModified was |
| // returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadTokenCall) Do(opts ...googleapi.CallOption) (*FetchReadTokenResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &FetchReadTokenResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.fetchReadToken", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksFetchReadWriteTokenCall struct { |
| s *Service |
| gitRepositoryLink string |
| fetchreadwritetokenrequest *FetchReadWriteTokenRequest |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // FetchReadWriteToken: Fetches read/write token of a given gitRepositoryLink. |
| // |
| // - gitRepositoryLink: The resource name of the gitRepositoryLink in the |
| // format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) FetchReadWriteToken(gitRepositoryLink string, fetchreadwritetokenrequest *FetchReadWriteTokenRequest) *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadWriteTokenCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksFetchReadWriteTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.gitRepositoryLink = gitRepositoryLink |
| c.fetchreadwritetokenrequest = fetchreadwritetokenrequest |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadWriteTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadWriteTokenCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadWriteTokenCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadWriteTokenCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadWriteTokenCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadWriteTokenCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fetchreadwritetokenrequest) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+gitRepositoryLink}:fetchReadWriteToken") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "gitRepositoryLink": c.gitRepositoryLink, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.fetchReadWriteToken", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.fetchReadWriteToken" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *FetchReadWriteTokenResponse.ServerResponse.Header or (if a response was |
| // returned at all) in error.(*googleapi.Error).Header. Use |
| // googleapi.IsNotModified to check whether the returned error was because |
| // http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksFetchReadWriteTokenCall) Do(opts ...googleapi.CallOption) (*FetchReadWriteTokenResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &FetchReadWriteTokenResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.fetchReadWriteToken", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksGetCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Get: Gets details of a single GitRepositoryLink. |
| // |
| // - name: Name of the resource. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) Get(name string) *ProjectsLocationsConnectionsGitRepositoryLinksGetCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksGetCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGitRepositoryLinksGetCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksGetCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksGetCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksGetCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.get", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.get" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *GitRepositoryLink.ServerResponse.Header or (if a response was returned at |
| // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| // check whether the returned error was because http.StatusNotModified was |
| // returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksGetCall) Do(opts ...googleapi.CallOption) (*GitRepositoryLink, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &GitRepositoryLink{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.get", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksListCall struct { |
| s *Service |
| parent string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: Lists GitRepositoryLinks in a given project, location, and connection. |
| // |
| // - parent: Parent value for ListGitRepositoryLinksRequest. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) List(parent string) *ProjectsLocationsConnectionsGitRepositoryLinksListCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| return c |
| } |
| |
| // Filter sets the optional parameter "filter": Filtering results |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) Filter(filter string) *ProjectsLocationsConnectionsGitRepositoryLinksListCall { |
| c.urlParams_.Set("filter", filter) |
| return c |
| } |
| |
| // OrderBy sets the optional parameter "orderBy": Hint for how to order the |
| // results |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) OrderBy(orderBy string) *ProjectsLocationsConnectionsGitRepositoryLinksListCall { |
| c.urlParams_.Set("orderBy", orderBy) |
| return c |
| } |
| |
| // PageSize sets the optional parameter "pageSize": Requested page size. Server |
| // may return fewer items than requested. If unspecified, server will pick an |
| // appropriate default. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsGitRepositoryLinksListCall { |
| c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| return c |
| } |
| |
| // PageToken sets the optional parameter "pageToken": A token identifying a |
| // page of results the server should return. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsGitRepositoryLinksListCall { |
| c.urlParams_.Set("pageToken", pageToken) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksListCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGitRepositoryLinksListCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksListCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gitRepositoryLinks") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.list", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.list" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *ListGitRepositoryLinksResponse.ServerResponse.Header or (if a response was |
| // returned at all) in error.(*googleapi.Error).Header. Use |
| // googleapi.IsNotModified to check whether the returned error was because |
| // http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) Do(opts ...googleapi.CallOption) (*ListGitRepositoryLinksResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &ListGitRepositoryLinksResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.list", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| // Pages invokes f for each page of results. |
| // A non-nil error returned from f will halt the iteration. |
| // The provided context supersedes any context provided to the Context method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksListCall) Pages(ctx context.Context, f func(*ListGitRepositoryLinksResponse) error) error { |
| c.ctx_ = ctx |
| defer c.PageToken(c.urlParams_.Get("pageToken")) |
| for { |
| x, err := c.Do() |
| if err != nil { |
| return err |
| } |
| if err := f(x); err != nil { |
| return err |
| } |
| if x.NextPageToken == "" { |
| return nil |
| } |
| c.PageToken(x.NextPageToken) |
| } |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketCloudWebhookCall struct { |
| s *Service |
| name string |
| processbitbucketcloudwebhookrequest *ProcessBitbucketCloudWebhookRequest |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // ProcessBitbucketCloudWebhook: ProcessBitbucketCloudWebhook is called by the |
| // external Bitbucket Cloud instances for notifying events. |
| // |
| // - name: The GitRepositoryLink where the webhook will be received. Format: |
| // `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) ProcessBitbucketCloudWebhook(name string, processbitbucketcloudwebhookrequest *ProcessBitbucketCloudWebhookRequest) *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketCloudWebhookCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketCloudWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| c.processbitbucketcloudwebhookrequest = processbitbucketcloudwebhookrequest |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketCloudWebhookCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketCloudWebhookCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketCloudWebhookCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketCloudWebhookCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketCloudWebhookCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketCloudWebhookCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.processbitbucketcloudwebhookrequest) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:processBitbucketCloudWebhook") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.processBitbucketCloudWebhook", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.processBitbucketCloudWebhook" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Empty.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketCloudWebhookCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Empty{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.processBitbucketCloudWebhook", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketDataCenterWebhookCall struct { |
| s *Service |
| name string |
| processbitbucketdatacenterwebhookrequest *ProcessBitbucketDataCenterWebhookRequest |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // ProcessBitbucketDataCenterWebhook: ProcessBitbucketDataCenterWebhook is |
| // called by the external Bitbucket Data Center instances for notifying events. |
| // |
| // - name: The GitRepositoryLink where the webhook will be received. Format: |
| // `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) ProcessBitbucketDataCenterWebhook(name string, processbitbucketdatacenterwebhookrequest *ProcessBitbucketDataCenterWebhookRequest) *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketDataCenterWebhookCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketDataCenterWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| c.processbitbucketdatacenterwebhookrequest = processbitbucketdatacenterwebhookrequest |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketDataCenterWebhookCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketDataCenterWebhookCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketDataCenterWebhookCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketDataCenterWebhookCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketDataCenterWebhookCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketDataCenterWebhookCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.processbitbucketdatacenterwebhookrequest) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:processBitbucketDataCenterWebhook") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.processBitbucketDataCenterWebhook", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.processBitbucketDataCenterWebhook" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Empty.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessBitbucketDataCenterWebhookCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Empty{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.processBitbucketDataCenterWebhook", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabEnterpriseWebhookCall struct { |
| s *Service |
| name string |
| processgitlabenterprisewebhookrequest *ProcessGitLabEnterpriseWebhookRequest |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // ProcessGitLabEnterpriseWebhook: ProcessGitLabEnterpriseWebhook is called by |
| // the external GitLab Enterprise instances for notifying events. |
| // |
| // - name: The GitRepositoryLink resource where the webhook will be received. |
| // Format: `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) ProcessGitLabEnterpriseWebhook(name string, processgitlabenterprisewebhookrequest *ProcessGitLabEnterpriseWebhookRequest) *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabEnterpriseWebhookCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabEnterpriseWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| c.processgitlabenterprisewebhookrequest = processgitlabenterprisewebhookrequest |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabEnterpriseWebhookCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabEnterpriseWebhookCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabEnterpriseWebhookCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabEnterpriseWebhookCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabEnterpriseWebhookCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabEnterpriseWebhookCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.processgitlabenterprisewebhookrequest) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:processGitLabEnterpriseWebhook") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.processGitLabEnterpriseWebhook", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.processGitLabEnterpriseWebhook" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Empty.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabEnterpriseWebhookCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Empty{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.processGitLabEnterpriseWebhook", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabWebhookCall struct { |
| s *Service |
| name string |
| processgitlabwebhookrequest *ProcessGitLabWebhookRequest |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // ProcessGitLabWebhook: ProcessGitLabWebhook is called by the GitLab.com for |
| // notifying events. |
| // |
| // - name: The GitRepositoryLink resource where the webhook will be received. |
| // Format: `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. |
| func (r *ProjectsLocationsConnectionsGitRepositoryLinksService) ProcessGitLabWebhook(name string, processgitlabwebhookrequest *ProcessGitLabWebhookRequest) *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabWebhookCall { |
| c := &ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| c.processgitlabwebhookrequest = processgitlabwebhookrequest |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabWebhookCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabWebhookCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabWebhookCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabWebhookCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabWebhookCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabWebhookCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.processgitlabwebhookrequest) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:processGitLabWebhook") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.processGitLabWebhook", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.connections.gitRepositoryLinks.processGitLabWebhook" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Empty.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsConnectionsGitRepositoryLinksProcessGitLabWebhookCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Empty{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.connections.gitRepositoryLinks.processGitLabWebhook", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsInsightsConfigsCreateCall struct { |
| s *Service |
| parent string |
| insightsconfig *InsightsConfig |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Create: Creates a new InsightsConfig in a given project and location. |
| // |
| // - parent: Value for parent. |
| func (r *ProjectsLocationsInsightsConfigsService) Create(parent string, insightsconfig *InsightsConfig) *ProjectsLocationsInsightsConfigsCreateCall { |
| c := &ProjectsLocationsInsightsConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| c.insightsconfig = insightsconfig |
| return c |
| } |
| |
| // InsightsConfigId sets the optional parameter "insightsConfigId": Required. |
| // ID of the requesting InsightsConfig. |
| func (c *ProjectsLocationsInsightsConfigsCreateCall) InsightsConfigId(insightsConfigId string) *ProjectsLocationsInsightsConfigsCreateCall { |
| c.urlParams_.Set("insightsConfigId", insightsConfigId) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsInsightsConfigsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsInsightsConfigsCreateCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsInsightsConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfigsCreateCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsInsightsConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfigsCreateCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsInsightsConfigsCreateCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsInsightsConfigsCreateCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insightsconfig) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/insightsConfigs") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.insightsConfigs.create" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsInsightsConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.create", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsInsightsConfigsDeleteCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Delete: Deletes a single Insight. |
| // |
| // - name: Value for parent. |
| func (r *ProjectsLocationsInsightsConfigsService) Delete(name string) *ProjectsLocationsInsightsConfigsDeleteCall { |
| c := &ProjectsLocationsInsightsConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Etag sets the optional parameter "etag": This checksum is computed by the |
| // server based on the value of other fields, and may be sent on update and |
| // delete requests to ensure the client has an up-to-date value before |
| // proceeding. |
| func (c *ProjectsLocationsInsightsConfigsDeleteCall) Etag(etag string) *ProjectsLocationsInsightsConfigsDeleteCall { |
| c.urlParams_.Set("etag", etag) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes after |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsInsightsConfigsDeleteCall) RequestId(requestId string) *ProjectsLocationsInsightsConfigsDeleteCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsInsightsConfigsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsInsightsConfigsDeleteCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsInsightsConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfigsDeleteCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsInsightsConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfigsDeleteCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsInsightsConfigsDeleteCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsInsightsConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("DELETE", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.delete", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.insightsConfigs.delete" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsInsightsConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.delete", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsInsightsConfigsGetCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Get: Gets details of a single Insight. |
| // |
| // - name: Name of the resource. |
| func (r *ProjectsLocationsInsightsConfigsService) Get(name string) *ProjectsLocationsInsightsConfigsGetCall { |
| c := &ProjectsLocationsInsightsConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsInsightsConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfigsGetCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsInsightsConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsConfigsGetCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsInsightsConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfigsGetCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsInsightsConfigsGetCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsInsightsConfigsGetCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.get", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.insightsConfigs.get" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *InsightsConfig.ServerResponse.Header or (if a response was returned at all) |
| // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsInsightsConfigsGetCall) Do(opts ...googleapi.CallOption) (*InsightsConfig, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &InsightsConfig{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.get", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsInsightsConfigsListCall struct { |
| s *Service |
| parent string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: Lists InsightsConfigs in a given project and location. |
| // |
| // - parent: Parent value for ListInsightsConfigsRequest. |
| func (r *ProjectsLocationsInsightsConfigsService) List(parent string) *ProjectsLocationsInsightsConfigsListCall { |
| c := &ProjectsLocationsInsightsConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| return c |
| } |
| |
| // Filter sets the optional parameter "filter": Filtering results. See |
| // https://google.aip.dev/160 for more details. Filter string, adhering to the |
| // rules in https://google.aip.dev/160. List only InsightsConfigs matching the |
| // filter. If filter is empty, all InsightsConfigs are listed. |
| func (c *ProjectsLocationsInsightsConfigsListCall) Filter(filter string) *ProjectsLocationsInsightsConfigsListCall { |
| c.urlParams_.Set("filter", filter) |
| return c |
| } |
| |
| // OrderBy sets the optional parameter "orderBy": Hint for how to order the |
| // results. |
| func (c *ProjectsLocationsInsightsConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsInsightsConfigsListCall { |
| c.urlParams_.Set("orderBy", orderBy) |
| return c |
| } |
| |
| // PageSize sets the optional parameter "pageSize": Requested page size. Server |
| // may return fewer items than requested. If unspecified, server will pick an |
| // appropriate default. |
| func (c *ProjectsLocationsInsightsConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsInsightsConfigsListCall { |
| c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| return c |
| } |
| |
| // PageToken sets the optional parameter "pageToken": A token identifying a |
| // page of results the server should return. |
| func (c *ProjectsLocationsInsightsConfigsListCall) PageToken(pageToken string) *ProjectsLocationsInsightsConfigsListCall { |
| c.urlParams_.Set("pageToken", pageToken) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsInsightsConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfigsListCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsInsightsConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsConfigsListCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsInsightsConfigsListCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfigsListCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsInsightsConfigsListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsInsightsConfigsListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/insightsConfigs") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.list", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.insightsConfigs.list" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *ListInsightsConfigsResponse.ServerResponse.Header or (if a response was |
| // returned at all) in error.(*googleapi.Error).Header. Use |
| // googleapi.IsNotModified to check whether the returned error was because |
| // http.StatusNotModified was returned. |
| func (c *ProjectsLocationsInsightsConfigsListCall) Do(opts ...googleapi.CallOption) (*ListInsightsConfigsResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &ListInsightsConfigsResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.list", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| // Pages invokes f for each page of results. |
| // A non-nil error returned from f will halt the iteration. |
| // The provided context supersedes any context provided to the Context method. |
| func (c *ProjectsLocationsInsightsConfigsListCall) Pages(ctx context.Context, f func(*ListInsightsConfigsResponse) error) error { |
| c.ctx_ = ctx |
| defer c.PageToken(c.urlParams_.Get("pageToken")) |
| for { |
| x, err := c.Do() |
| if err != nil { |
| return err |
| } |
| if err := f(x); err != nil { |
| return err |
| } |
| if x.NextPageToken == "" { |
| return nil |
| } |
| c.PageToken(x.NextPageToken) |
| } |
| } |
| |
| type ProjectsLocationsInsightsConfigsPatchCall struct { |
| s *Service |
| name string |
| insightsconfig *InsightsConfig |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Patch: Updates the parameters of a single InsightsConfig. |
| // |
| // - name: Identifier. The name of the InsightsConfig. Format: |
| // projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}. |
| func (r *ProjectsLocationsInsightsConfigsService) Patch(name string, insightsconfig *InsightsConfig) *ProjectsLocationsInsightsConfigsPatchCall { |
| c := &ProjectsLocationsInsightsConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| c.insightsconfig = insightsconfig |
| return c |
| } |
| |
| // AllowMissing sets the optional parameter "allowMissing": If set to true, and |
| // the insightsConfig is not found a new insightsConfig will be created. In |
| // this situation `update_mask` is ignored. The creation will succeed only if |
| // the input insightsConfig has all the necessary information (e.g a |
| // github_config with both user_oauth_token and installation_id properties). |
| func (c *ProjectsLocationsInsightsConfigsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsInsightsConfigsPatchCall { |
| c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) |
| return c |
| } |
| |
| // RequestId sets the optional parameter "requestId": An optional request ID to |
| // identify requests. Specify a unique request ID so that if you must retry |
| // your request, the server will know to ignore the request if it has already |
| // been completed. The server will guarantee that for at least 60 minutes after |
| // the first request. For example, consider a situation where you make an |
| // initial request and the request times out. If you make the request again |
| // with the same request ID, the server can check if original operation with |
| // the same request ID was received, and if so, will ignore the second request. |
| // This prevents clients from accidentally creating duplicate commitments. The |
| // request ID must be a valid UUID with the exception that zero UUID is not |
| // supported (00000000-0000-0000-0000-000000000000). |
| func (c *ProjectsLocationsInsightsConfigsPatchCall) RequestId(requestId string) *ProjectsLocationsInsightsConfigsPatchCall { |
| c.urlParams_.Set("requestId", requestId) |
| return c |
| } |
| |
| // ValidateOnly sets the optional parameter "validateOnly": If set, validate |
| // the request, but do not actually post it. |
| func (c *ProjectsLocationsInsightsConfigsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsInsightsConfigsPatchCall { |
| c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsInsightsConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfigsPatchCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsInsightsConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfigsPatchCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsInsightsConfigsPatchCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsInsightsConfigsPatchCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.insightsconfig) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("PATCH", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.patch", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.insightsConfigs.patch" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsInsightsConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.patch", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsInsightsConfigsDeploymentEventsGetCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Get: Gets a single Deployment Event. |
| // |
| // - name: The name of the deployment event to retrieve. Format: |
| // projects/{project}/locations/{location}/insightsConfigs/{insights_config}/d |
| // eploymentEvents/{uuid}. |
| func (r *ProjectsLocationsInsightsConfigsDeploymentEventsService) Get(name string) *ProjectsLocationsInsightsConfigsDeploymentEventsGetCall { |
| c := &ProjectsLocationsInsightsConfigsDeploymentEventsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfigsDeploymentEventsGetCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsConfigsDeploymentEventsGetCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsGetCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfigsDeploymentEventsGetCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsGetCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsGetCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.deploymentEvents.get", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.insightsConfigs.deploymentEvents.get" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *DeploymentEvent.ServerResponse.Header or (if a response was returned at |
| // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| // check whether the returned error was because http.StatusNotModified was |
| // returned. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsGetCall) Do(opts ...googleapi.CallOption) (*DeploymentEvent, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &DeploymentEvent{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.deploymentEvents.get", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsInsightsConfigsDeploymentEventsListCall struct { |
| s *Service |
| parent string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: Lists Deployment Events in a given insights config. |
| // |
| // - parent: The parent insights config that owns this collection of deployment |
| // events. Format: |
| // projects/{project}/locations/{location}/insightsConfigs/{insights_config}. |
| func (r *ProjectsLocationsInsightsConfigsDeploymentEventsService) List(parent string) *ProjectsLocationsInsightsConfigsDeploymentEventsListCall { |
| c := &ProjectsLocationsInsightsConfigsDeploymentEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.parent = parent |
| return c |
| } |
| |
| // Filter sets the optional parameter "filter": Filter expression that matches |
| // a subset of the DeploymentEvents. https://google.aip.dev/160. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsListCall) Filter(filter string) *ProjectsLocationsInsightsConfigsDeploymentEventsListCall { |
| c.urlParams_.Set("filter", filter) |
| return c |
| } |
| |
| // PageSize sets the optional parameter "pageSize": The maximum number of |
| // deployment events to return. The service may return fewer than this value. |
| // If unspecified, at most 50 deployment events will be returned. The maximum |
| // value is 1000; values above 1000 will be coerced to 1000. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsListCall) PageSize(pageSize int64) *ProjectsLocationsInsightsConfigsDeploymentEventsListCall { |
| c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| return c |
| } |
| |
| // PageToken sets the optional parameter "pageToken": A page token, received |
| // from a previous `ListDeploymentEvents` call. Provide this to retrieve the |
| // subsequent page. When paginating, all other parameters provided to |
| // `ListDeploymentEvents` must match the call that provided the page token. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsListCall) PageToken(pageToken string) *ProjectsLocationsInsightsConfigsDeploymentEventsListCall { |
| c.urlParams_.Set("pageToken", pageToken) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfigsDeploymentEventsListCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsConfigsDeploymentEventsListCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsListCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfigsDeploymentEventsListCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deploymentEvents") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "parent": c.parent, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.deploymentEvents.list", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.insightsConfigs.deploymentEvents.list" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *ListDeploymentEventsResponse.ServerResponse.Header or (if a response was |
| // returned at all) in error.(*googleapi.Error).Header. Use |
| // googleapi.IsNotModified to check whether the returned error was because |
| // http.StatusNotModified was returned. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsListCall) Do(opts ...googleapi.CallOption) (*ListDeploymentEventsResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &ListDeploymentEventsResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.insightsConfigs.deploymentEvents.list", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| // Pages invokes f for each page of results. |
| // A non-nil error returned from f will halt the iteration. |
| // The provided context supersedes any context provided to the Context method. |
| func (c *ProjectsLocationsInsightsConfigsDeploymentEventsListCall) Pages(ctx context.Context, f func(*ListDeploymentEventsResponse) error) error { |
| c.ctx_ = ctx |
| defer c.PageToken(c.urlParams_.Get("pageToken")) |
| for { |
| x, err := c.Do() |
| if err != nil { |
| return err |
| } |
| if err := f(x); err != nil { |
| return err |
| } |
| if x.NextPageToken == "" { |
| return nil |
| } |
| c.PageToken(x.NextPageToken) |
| } |
| } |
| |
| type ProjectsLocationsOperationsCancelCall struct { |
| s *Service |
| name string |
| canceloperationrequest *CancelOperationRequest |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Cancel: Starts asynchronous cancellation on a long-running operation. The |
| // server makes a best effort to cancel the operation, but success is not |
| // guaranteed. If the server doesn't support this method, it returns |
| // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or |
| // other methods to check whether the cancellation succeeded or whether the |
| // operation completed despite cancellation. On successful cancellation, the |
| // operation is not deleted; instead, it becomes an operation with an |
| // Operation.error value with a google.rpc.Status.code of `1`, corresponding to |
| // `Code.CANCELLED`. |
| // |
| // - name: The name of the operation resource to be cancelled. |
| func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { |
| c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| c.canceloperationrequest = canceloperationrequest |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest) |
| if err != nil { |
| return nil, err |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("POST", urls, body) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes())) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.operations.cancel" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Empty.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Empty{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsOperationsDeleteCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Delete: Deletes a long-running operation. This method indicates that the |
| // client is no longer interested in the operation result. It does not cancel |
| // the operation. If the server doesn't support this method, it returns |
| // `google.rpc.Code.UNIMPLEMENTED`. |
| // |
| // - name: The name of the operation resource to be deleted. |
| func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { |
| c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("DELETE", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.operations.delete" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Empty.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Empty{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsOperationsGetCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // Get: Gets the latest state of a long-running operation. Clients can use this |
| // method to poll the operation result at intervals as recommended by the API |
| // service. |
| // |
| // - name: The name of the operation resource. |
| func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { |
| c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.operations.get" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *Operation.ServerResponse.Header or (if a response was returned at all) in |
| // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| // whether the returned error was because http.StatusNotModified was returned. |
| func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &Operation{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| type ProjectsLocationsOperationsListCall struct { |
| s *Service |
| name string |
| urlParams_ gensupport.URLParams |
| ifNoneMatch_ string |
| ctx_ context.Context |
| header_ http.Header |
| } |
| |
| // List: Lists operations that match the specified filter in the request. If |
| // the server doesn't support this method, it returns `UNIMPLEMENTED`. |
| // |
| // - name: The name of the operation's parent resource. |
| func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { |
| c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| c.name = name |
| return c |
| } |
| |
| // Filter sets the optional parameter "filter": The standard list filter. |
| func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { |
| c.urlParams_.Set("filter", filter) |
| return c |
| } |
| |
| // PageSize sets the optional parameter "pageSize": The standard list page |
| // size. |
| func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { |
| c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| return c |
| } |
| |
| // PageToken sets the optional parameter "pageToken": The standard list page |
| // token. |
| func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { |
| c.urlParams_.Set("pageToken", pageToken) |
| return c |
| } |
| |
| // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": |
| // When set to `true`, operations that are reachable are returned as normal, |
| // and those that are unreachable are returned in the |
| // ListOperationsResponse.unreachable field. This can only be `true` when |
| // reading across collections. For example, when `parent` is set to |
| // "projects/example/locations/-". This field is not supported by default and |
| // will result in an `UNIMPLEMENTED` error if set unless explicitly documented |
| // otherwise in service or product specific documentation. |
| func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { |
| c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) |
| return c |
| } |
| |
| // Fields allows partial responses to be retrieved. See |
| // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| // details. |
| func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { |
| c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| return c |
| } |
| |
| // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| // object's ETag matches the given value. This is useful for getting updates |
| // only after the object has changed since the last request. |
| func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { |
| c.ifNoneMatch_ = entityTag |
| return c |
| } |
| |
| // Context sets the context to be used in this call's Do method. |
| func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { |
| c.ctx_ = ctx |
| return c |
| } |
| |
| // Header returns a http.Header that can be modified by the caller to add |
| // headers to the request. |
| func (c *ProjectsLocationsOperationsListCall) Header() http.Header { |
| if c.header_ == nil { |
| c.header_ = make(http.Header) |
| } |
| return c.header_ |
| } |
| |
| func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { |
| reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| if c.ifNoneMatch_ != "" { |
| reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| } |
| c.urlParams_.Set("alt", alt) |
| c.urlParams_.Set("prettyPrint", "false") |
| urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") |
| urls += "?" + c.urlParams_.Encode() |
| req, err := http.NewRequest("GET", urls, nil) |
| if err != nil { |
| return nil, err |
| } |
| req.Header = reqHeaders |
| googleapi.Expand(req.URL, map[string]string{ |
| "name": c.name, |
| }) |
| c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil)) |
| return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| } |
| |
| // Do executes the "developerconnect.projects.locations.operations.list" call. |
| // Any non-2xx status code is an error. Response headers are in either |
| // *ListOperationsResponse.ServerResponse.Header or (if a response was returned |
| // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| // check whether the returned error was because http.StatusNotModified was |
| // returned. |
| func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { |
| gensupport.SetOptions(c.urlParams_, opts...) |
| res, err := c.doRequest("json") |
| if res != nil && res.StatusCode == http.StatusNotModified { |
| if res.Body != nil { |
| res.Body.Close() |
| } |
| return nil, gensupport.WrapError(&googleapi.Error{ |
| Code: res.StatusCode, |
| Header: res.Header, |
| }) |
| } |
| if err != nil { |
| return nil, err |
| } |
| defer googleapi.CloseBody(res) |
| if err := googleapi.CheckResponse(res); err != nil { |
| return nil, gensupport.WrapError(err) |
| } |
| ret := &ListOperationsResponse{ |
| ServerResponse: googleapi.ServerResponse{ |
| Header: res.Header, |
| HTTPStatusCode: res.StatusCode, |
| }, |
| } |
| target := &ret |
| b, err := gensupport.DecodeResponseBytes(target, res) |
| if err != nil { |
| return nil, err |
| } |
| c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "developerconnect.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b)) |
| return ret, nil |
| } |
| |
| // Pages invokes f for each page of results. |
| // A non-nil error returned from f will halt the iteration. |
| // The provided context supersedes any context provided to the Context method. |
| func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { |
| c.ctx_ = ctx |
| defer c.PageToken(c.urlParams_.Get("pageToken")) |
| for { |
| x, err := c.Do() |
| if err != nil { |
| return err |
| } |
| if err := f(x); err != nil { |
| return err |
| } |
| if x.NextPageToken == "" { |
| return nil |
| } |
| c.PageToken(x.NextPageToken) |
| } |
| } |