Update vendored dependencies
This commit is contained in:
parent
81473f4538
commit
02fc16e97d
254 changed files with 107898 additions and 82739 deletions
701
vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go
generated
vendored
701
vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go
generated
vendored
|
@ -1,4 +1,4 @@
|
|||
// Package bigquerydatatransfer provides access to the BigQuery Data Transfer Service API.
|
||||
// Package bigquerydatatransfer provides access to the BigQuery Data Transfer API.
|
||||
//
|
||||
// See https://cloud.google.com/bigquery/
|
||||
//
|
||||
|
@ -524,44 +524,6 @@ type Empty struct {
|
|||
googleapi.ServerResponse `json:"-"`
|
||||
}
|
||||
|
||||
// IsEnabledRequest: A request to determine whether data transfer is
|
||||
// enabled for the project.
|
||||
type IsEnabledRequest struct {
|
||||
}
|
||||
|
||||
// IsEnabledResponse: A response to indicate whether data transfer is
|
||||
// enabled for the project.
|
||||
type IsEnabledResponse struct {
|
||||
// Enabled: Indicates whether the project is enabled.
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
// server.
|
||||
googleapi.ServerResponse `json:"-"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Enabled") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
// server regardless of whether the field is empty or not. This may be
|
||||
// used to include empty fields in Patch requests.
|
||||
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. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *IsEnabledResponse) MarshalJSON() ([]byte, error) {
|
||||
type noMethod IsEnabledResponse
|
||||
raw := noMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// ListDataSourcesResponse: Returns list of supported data sources and
|
||||
// their metadata.
|
||||
type ListDataSourcesResponse struct {
|
||||
|
@ -574,7 +536,7 @@ type ListDataSourcesResponse struct {
|
|||
// this token can be used as the
|
||||
// `ListDataSourcesRequest.page_token`
|
||||
// to request the next page of list results.
|
||||
// @OutputOnly
|
||||
// Output only.
|
||||
NextPageToken string `json:"nextPageToken,omitempty"`
|
||||
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
|
@ -819,13 +781,17 @@ func (s *Location) MarshalJSON() ([]byte, error) {
|
|||
// ScheduleTransferRunsRequest: A request to schedule transfer runs for
|
||||
// a time range.
|
||||
type ScheduleTransferRunsRequest struct {
|
||||
// RangeEndTime: End time of the range of transfer runs.
|
||||
RangeEndTime string `json:"rangeEndTime,omitempty"`
|
||||
// EndTime: End time of the range of transfer runs. For
|
||||
// example,
|
||||
// "2017-05-30T00:00:00+00:00".
|
||||
EndTime string `json:"endTime,omitempty"`
|
||||
|
||||
// RangeStartTime: Start time of the range of transfer runs.
|
||||
RangeStartTime string `json:"rangeStartTime,omitempty"`
|
||||
// StartTime: Start time of the range of transfer runs. For
|
||||
// example,
|
||||
// "2017-05-25T00:00:00+00:00".
|
||||
StartTime string `json:"startTime,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "RangeEndTime") to
|
||||
// ForceSendFields is a list of field names (e.g. "EndTime") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
|
@ -833,10 +799,10 @@ type ScheduleTransferRunsRequest struct {
|
|||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "RangeEndTime") to include
|
||||
// in API requests with the JSON null value. By default, fields with
|
||||
// empty values are omitted from API requests. However, any field with
|
||||
// an empty value appearing in NullFields will be sent to the server as
|
||||
// NullFields is a list of field names (e.g. "EndTime") to include in
|
||||
// API requests with the JSON null value. By default, fields with empty
|
||||
// values are omitted from API requests. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
|
@ -851,14 +817,14 @@ func (s *ScheduleTransferRunsRequest) MarshalJSON() ([]byte, error) {
|
|||
// ScheduleTransferRunsResponse: A response to schedule transfer runs
|
||||
// for a time range.
|
||||
type ScheduleTransferRunsResponse struct {
|
||||
// CreatedRuns: The transfer runs that were created.
|
||||
CreatedRuns []*TransferRun `json:"createdRuns,omitempty"`
|
||||
// Runs: The transfer runs that were scheduled.
|
||||
Runs []*TransferRun `json:"runs,omitempty"`
|
||||
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
// server.
|
||||
googleapi.ServerResponse `json:"-"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "CreatedRuns") to
|
||||
// ForceSendFields is a list of field names (e.g. "Runs") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
|
@ -866,38 +832,8 @@ type ScheduleTransferRunsResponse struct {
|
|||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "CreatedRuns") to include
|
||||
// in API requests with the JSON null value. By default, fields with
|
||||
// empty values are omitted from API requests. However, any field with
|
||||
// an empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *ScheduleTransferRunsResponse) MarshalJSON() ([]byte, error) {
|
||||
type noMethod ScheduleTransferRunsResponse
|
||||
raw := noMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// SetEnabledRequest: A request to set whether data transfer is enabled
|
||||
// or disabled for a project.
|
||||
type SetEnabledRequest struct {
|
||||
// Enabled: Whether data transfer should be enabled or disabled for the
|
||||
// project.
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Enabled") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
// server regardless of whether the field is empty or not. This may be
|
||||
// used to include empty fields in Patch requests.
|
||||
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
|
||||
// NullFields is a list of field names (e.g. "Runs") to include in API
|
||||
// requests with the JSON null value. By default, fields with empty
|
||||
// values are omitted from API requests. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
|
@ -905,8 +841,8 @@ type SetEnabledRequest struct {
|
|||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *SetEnabledRequest) MarshalJSON() ([]byte, error) {
|
||||
type noMethod SetEnabledRequest
|
||||
func (s *ScheduleTransferRunsResponse) MarshalJSON() ([]byte, error) {
|
||||
type noMethod ScheduleTransferRunsResponse
|
||||
raw := noMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
@ -955,13 +891,14 @@ type TransferConfig struct {
|
|||
// DisplayName: User specified display name for the data transfer.
|
||||
DisplayName string `json:"displayName,omitempty"`
|
||||
|
||||
// Name: The resource name of the transfer run.
|
||||
// Transfer run names have the
|
||||
// Name: The resource name of the transfer config.
|
||||
// Transfer config names have the
|
||||
// form
|
||||
// `projects/{project_id}/transferConfigs/{config_id}`.
|
||||
// Where `config_id` is usually a uuid, even though it is not
|
||||
// guaranteed or required. The name is ignored when creating a transfer
|
||||
// run.
|
||||
// guaranteed or required. The name is ignored when creating a
|
||||
// transfer
|
||||
// config.
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// NextRunTime: Next time when data transfer will run.
|
||||
|
@ -1009,7 +946,7 @@ type TransferConfig struct {
|
|||
// Output only.
|
||||
UpdateTime string `json:"updateTime,omitempty"`
|
||||
|
||||
// UserId: GaiaID of the user on whose behalf transfer is done.
|
||||
// UserId: Unique ID of the user on whose behalf transfer is done.
|
||||
// Applicable only
|
||||
// to data sources that do not support service accounts. When set to
|
||||
// 0,
|
||||
|
@ -1163,7 +1100,11 @@ type TransferRun struct {
|
|||
// Output only.
|
||||
UpdateTime string `json:"updateTime,omitempty"`
|
||||
|
||||
// UserId: The user id for this transfer run.
|
||||
// UserId: Unique ID of the user on whose behalf transfer is done.
|
||||
// Applicable only
|
||||
// to data sources that do not support service accounts. When set to
|
||||
// 0,
|
||||
// the data source service account credentials are used.
|
||||
// Output only.
|
||||
UserId int64 `json:"userId,omitempty,string"`
|
||||
|
||||
|
@ -1194,283 +1135,6 @@ func (s *TransferRun) MarshalJSON() ([]byte, error) {
|
|||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// method id "bigquerydatatransfer.projects.isEnabled":
|
||||
|
||||
type ProjectsIsEnabledCall struct {
|
||||
s *Service
|
||||
name string
|
||||
isenabledrequest *IsEnabledRequest
|
||||
urlParams_ gensupport.URLParams
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// IsEnabled: Returns true if data transfer is enabled for a project.
|
||||
func (r *ProjectsService) IsEnabled(name string, isenabledrequest *IsEnabledRequest) *ProjectsIsEnabledCall {
|
||||
c := &ProjectsIsEnabledCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.name = name
|
||||
c.isenabledrequest = isenabledrequest
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *ProjectsIsEnabledCall) Fields(s ...googleapi.Field) *ProjectsIsEnabledCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *ProjectsIsEnabledCall) Context(ctx context.Context) *ProjectsIsEnabledCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *ProjectsIsEnabledCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *ProjectsIsEnabledCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
body, err := googleapi.WithoutDataWrapper.JSONReader(c.isenabledrequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:isEnabled")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("POST", urls, body)
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"name": c.name,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "bigquerydatatransfer.projects.isEnabled" call.
|
||||
// Exactly one of *IsEnabledResponse or error will be non-nil. Any
|
||||
// non-2xx status code is an error. Response headers are in either
|
||||
// *IsEnabledResponse.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 *ProjectsIsEnabledCall) Do(opts ...googleapi.CallOption) (*IsEnabledResponse, 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, &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, err
|
||||
}
|
||||
ret := &IsEnabledResponse{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Returns true if data transfer is enabled for a project.",
|
||||
// "flatPath": "v1/projects/{projectsId}:isEnabled",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "bigquerydatatransfer.projects.isEnabled",
|
||||
// "parameterOrder": [
|
||||
// "name"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "name": {
|
||||
// "description": "The name of the project resource in the form:\n`projects/{project_id}`",
|
||||
// "location": "path",
|
||||
// "pattern": "^projects/[^/]+$",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "v1/{+name}:isEnabled",
|
||||
// "request": {
|
||||
// "$ref": "IsEnabledRequest"
|
||||
// },
|
||||
// "response": {
|
||||
// "$ref": "IsEnabledResponse"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/bigquery",
|
||||
// "https://www.googleapis.com/auth/cloud-platform",
|
||||
// "https://www.googleapis.com/auth/cloud-platform.read-only"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "bigquerydatatransfer.projects.setEnabled":
|
||||
|
||||
type ProjectsSetEnabledCall struct {
|
||||
s *Service
|
||||
name string
|
||||
setenabledrequest *SetEnabledRequest
|
||||
urlParams_ gensupport.URLParams
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// SetEnabled: Enables or disables data transfer for a project.
|
||||
// This
|
||||
// method requires the additional scope
|
||||
// of
|
||||
// 'https://www.googleapis.com/auth/cloudplatformprojects'
|
||||
// to manage the cloud project permissions.
|
||||
func (r *ProjectsService) SetEnabled(name string, setenabledrequest *SetEnabledRequest) *ProjectsSetEnabledCall {
|
||||
c := &ProjectsSetEnabledCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.name = name
|
||||
c.setenabledrequest = setenabledrequest
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *ProjectsSetEnabledCall) Fields(s ...googleapi.Field) *ProjectsSetEnabledCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *ProjectsSetEnabledCall) Context(ctx context.Context) *ProjectsSetEnabledCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *ProjectsSetEnabledCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *ProjectsSetEnabledCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
body, err := googleapi.WithoutDataWrapper.JSONReader(c.setenabledrequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setEnabled")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("POST", urls, body)
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"name": c.name,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "bigquerydatatransfer.projects.setEnabled" call.
|
||||
// Exactly one of *Empty or error will be non-nil. 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 *ProjectsSetEnabledCall) 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, &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, err
|
||||
}
|
||||
ret := &Empty{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Enables or disables data transfer for a project. This\nmethod requires the additional scope of\n'https://www.googleapis.com/auth/cloudplatformprojects'\nto manage the cloud project permissions.",
|
||||
// "flatPath": "v1/projects/{projectsId}:setEnabled",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "bigquerydatatransfer.projects.setEnabled",
|
||||
// "parameterOrder": [
|
||||
// "name"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "name": {
|
||||
// "description": "The name of the project resource in the form:\n`projects/{project_id}`",
|
||||
// "location": "path",
|
||||
// "pattern": "^projects/[^/]+$",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "v1/{+name}:setEnabled",
|
||||
// "request": {
|
||||
// "$ref": "SetEnabledRequest"
|
||||
// },
|
||||
// "response": {
|
||||
// "$ref": "Empty"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/cloud-platform"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "bigquerydatatransfer.projects.dataSources.checkValidCreds":
|
||||
|
||||
type ProjectsDataSourcesCheckValidCredsCall struct {
|
||||
|
@ -1485,6 +1149,13 @@ type ProjectsDataSourcesCheckValidCredsCall struct {
|
|||
// CheckValidCreds: Returns true if valid credentials exist for the
|
||||
// given data source and
|
||||
// requesting user.
|
||||
// Some data sources doesn't support service account, so we need to talk
|
||||
// to
|
||||
// them on behalf of the end user. This API just checks whether we have
|
||||
// OAuth
|
||||
// token for the particular user, which is a pre-requisite before user
|
||||
// can
|
||||
// create a transfer config.
|
||||
func (r *ProjectsDataSourcesService) CheckValidCreds(name string, checkvalidcredsrequest *CheckValidCredsRequest) *ProjectsDataSourcesCheckValidCredsCall {
|
||||
c := &ProjectsDataSourcesCheckValidCredsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.name = name
|
||||
|
@ -1578,7 +1249,7 @@ func (c *ProjectsDataSourcesCheckValidCredsCall) Do(opts ...googleapi.CallOption
|
|||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.",
|
||||
// "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.\nSome data sources doesn't support service account, so we need to talk to\nthem on behalf of the end user. This API just checks whether we have OAuth\ntoken for the particular user, which is a pre-requisite before user can\ncreate a transfer config.",
|
||||
// "flatPath": "v1/projects/{projectsId}/dataSources/{dataSourcesId}:checkValidCreds",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "bigquerydatatransfer.projects.dataSources.checkValidCreds",
|
||||
|
@ -2086,143 +1757,6 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location,
|
|||
|
||||
}
|
||||
|
||||
// method id "bigquerydatatransfer.projects.locations.isEnabled":
|
||||
|
||||
type ProjectsLocationsIsEnabledCall struct {
|
||||
s *Service
|
||||
name string
|
||||
isenabledrequest *IsEnabledRequest
|
||||
urlParams_ gensupport.URLParams
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// IsEnabled: Returns true if data transfer is enabled for a project.
|
||||
func (r *ProjectsLocationsService) IsEnabled(name string, isenabledrequest *IsEnabledRequest) *ProjectsLocationsIsEnabledCall {
|
||||
c := &ProjectsLocationsIsEnabledCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.name = name
|
||||
c.isenabledrequest = isenabledrequest
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *ProjectsLocationsIsEnabledCall) Fields(s ...googleapi.Field) *ProjectsLocationsIsEnabledCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *ProjectsLocationsIsEnabledCall) Context(ctx context.Context) *ProjectsLocationsIsEnabledCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *ProjectsLocationsIsEnabledCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *ProjectsLocationsIsEnabledCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
body, err := googleapi.WithoutDataWrapper.JSONReader(c.isenabledrequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:isEnabled")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("POST", urls, body)
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"name": c.name,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "bigquerydatatransfer.projects.locations.isEnabled" call.
|
||||
// Exactly one of *IsEnabledResponse or error will be non-nil. Any
|
||||
// non-2xx status code is an error. Response headers are in either
|
||||
// *IsEnabledResponse.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 *ProjectsLocationsIsEnabledCall) Do(opts ...googleapi.CallOption) (*IsEnabledResponse, 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, &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, err
|
||||
}
|
||||
ret := &IsEnabledResponse{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Returns true if data transfer is enabled for a project.",
|
||||
// "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:isEnabled",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "bigquerydatatransfer.projects.locations.isEnabled",
|
||||
// "parameterOrder": [
|
||||
// "name"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "name": {
|
||||
// "description": "The name of the project resource in the form:\n`projects/{project_id}`",
|
||||
// "location": "path",
|
||||
// "pattern": "^projects/[^/]+/locations/[^/]+$",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "v1/{+name}:isEnabled",
|
||||
// "request": {
|
||||
// "$ref": "IsEnabledRequest"
|
||||
// },
|
||||
// "response": {
|
||||
// "$ref": "IsEnabledResponse"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/bigquery",
|
||||
// "https://www.googleapis.com/auth/cloud-platform",
|
||||
// "https://www.googleapis.com/auth/cloud-platform.read-only"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "bigquerydatatransfer.projects.locations.list":
|
||||
|
||||
type ProjectsLocationsListCall struct {
|
||||
|
@ -2423,146 +1957,6 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat
|
|||
}
|
||||
}
|
||||
|
||||
// method id "bigquerydatatransfer.projects.locations.setEnabled":
|
||||
|
||||
type ProjectsLocationsSetEnabledCall struct {
|
||||
s *Service
|
||||
name string
|
||||
setenabledrequest *SetEnabledRequest
|
||||
urlParams_ gensupport.URLParams
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// SetEnabled: Enables or disables data transfer for a project.
|
||||
// This
|
||||
// method requires the additional scope
|
||||
// of
|
||||
// 'https://www.googleapis.com/auth/cloudplatformprojects'
|
||||
// to manage the cloud project permissions.
|
||||
func (r *ProjectsLocationsService) SetEnabled(name string, setenabledrequest *SetEnabledRequest) *ProjectsLocationsSetEnabledCall {
|
||||
c := &ProjectsLocationsSetEnabledCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.name = name
|
||||
c.setenabledrequest = setenabledrequest
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *ProjectsLocationsSetEnabledCall) Fields(s ...googleapi.Field) *ProjectsLocationsSetEnabledCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *ProjectsLocationsSetEnabledCall) Context(ctx context.Context) *ProjectsLocationsSetEnabledCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *ProjectsLocationsSetEnabledCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *ProjectsLocationsSetEnabledCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
body, err := googleapi.WithoutDataWrapper.JSONReader(c.setenabledrequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setEnabled")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("POST", urls, body)
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"name": c.name,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "bigquerydatatransfer.projects.locations.setEnabled" call.
|
||||
// Exactly one of *Empty or error will be non-nil. 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 *ProjectsLocationsSetEnabledCall) 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, &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, err
|
||||
}
|
||||
ret := &Empty{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Enables or disables data transfer for a project. This\nmethod requires the additional scope of\n'https://www.googleapis.com/auth/cloudplatformprojects'\nto manage the cloud project permissions.",
|
||||
// "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:setEnabled",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "bigquerydatatransfer.projects.locations.setEnabled",
|
||||
// "parameterOrder": [
|
||||
// "name"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "name": {
|
||||
// "description": "The name of the project resource in the form:\n`projects/{project_id}`",
|
||||
// "location": "path",
|
||||
// "pattern": "^projects/[^/]+/locations/[^/]+$",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "v1/{+name}:setEnabled",
|
||||
// "request": {
|
||||
// "$ref": "SetEnabledRequest"
|
||||
// },
|
||||
// "response": {
|
||||
// "$ref": "Empty"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/cloud-platform"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "bigquerydatatransfer.projects.locations.dataSources.checkValidCreds":
|
||||
|
||||
type ProjectsLocationsDataSourcesCheckValidCredsCall struct {
|
||||
|
@ -2577,6 +1971,13 @@ type ProjectsLocationsDataSourcesCheckValidCredsCall struct {
|
|||
// CheckValidCreds: Returns true if valid credentials exist for the
|
||||
// given data source and
|
||||
// requesting user.
|
||||
// Some data sources doesn't support service account, so we need to talk
|
||||
// to
|
||||
// them on behalf of the end user. This API just checks whether we have
|
||||
// OAuth
|
||||
// token for the particular user, which is a pre-requisite before user
|
||||
// can
|
||||
// create a transfer config.
|
||||
func (r *ProjectsLocationsDataSourcesService) CheckValidCreds(name string, checkvalidcredsrequest *CheckValidCredsRequest) *ProjectsLocationsDataSourcesCheckValidCredsCall {
|
||||
c := &ProjectsLocationsDataSourcesCheckValidCredsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.name = name
|
||||
|
@ -2670,7 +2071,7 @@ func (c *ProjectsLocationsDataSourcesCheckValidCredsCall) Do(opts ...googleapi.C
|
|||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.",
|
||||
// "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.\nSome data sources doesn't support service account, so we need to talk to\nthem on behalf of the end user. This API just checks whether we have OAuth\ntoken for the particular user, which is a pre-requisite before user can\ncreate a transfer config.",
|
||||
// "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources/{dataSourcesId}:checkValidCreds",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "bigquerydatatransfer.projects.locations.dataSources.checkValidCreds",
|
||||
|
@ -3840,7 +3241,7 @@ func (c *ProjectsLocationsTransferConfigsPatchCall) Do(opts ...googleapi.CallOpt
|
|||
// "type": "string"
|
||||
// },
|
||||
// "name": {
|
||||
// "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer run.",
|
||||
// "description": "The resource name of the transfer config.\nTransfer config names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer\nconfig.",
|
||||
// "location": "path",
|
||||
// "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$",
|
||||
// "required": true,
|
||||
|
@ -5538,7 +4939,7 @@ func (c *ProjectsTransferConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Tr
|
|||
// "type": "string"
|
||||
// },
|
||||
// "name": {
|
||||
// "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer run.",
|
||||
// "description": "The resource name of the transfer config.\nTransfer config names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer\nconfig.",
|
||||
// "location": "path",
|
||||
// "pattern": "^projects/[^/]+/transferConfigs/[^/]+$",
|
||||
// "required": true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue