Documentation ¶
Overview ¶
Package displayvideo provides access to the Display & Video 360 API.
For product documentation, see: https://developers.google.com/display-video/
Creating a client ¶
Usage example:
import "google.golang.org/api/displayvideo/v1" ... ctx := context.Background() displayvideoService, err := displayvideo.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 ¶
By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
displayvideoService, err := displayvideo.NewService(ctx, option.WithScopes(displayvideo.DoubleclickbidmanagerScope))
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
displayvideoService, err := displayvideo.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) displayvideoService, err := displayvideo.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See https://godoc.org/google.golang.org/api/option/ for details on options.
Index ¶
- Constants
- type CreateSdfDownloadTaskRequest
- type GoogleBytestreamMedia
- type IdFilter
- type InventorySourceFilter
- type MediaDownloadCall
- func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall
- func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error)
- func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error)
- func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall
- func (c *MediaDownloadCall) Header() http.Header
- func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall
- type MediaService
- type Operation
- type ParentEntityFilter
- type SdfDownloadTask
- type SdfDownloadTaskMetadata
- type SdfdownloadtasksCreateCall
- func (c *SdfdownloadtasksCreateCall) Context(ctx context.Context) *SdfdownloadtasksCreateCall
- func (c *SdfdownloadtasksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *SdfdownloadtasksCreateCall) Fields(s ...googleapi.Field) *SdfdownloadtasksCreateCall
- func (c *SdfdownloadtasksCreateCall) Header() http.Header
- type SdfdownloadtasksOperationsGetCall
- func (c *SdfdownloadtasksOperationsGetCall) Context(ctx context.Context) *SdfdownloadtasksOperationsGetCall
- func (c *SdfdownloadtasksOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *SdfdownloadtasksOperationsGetCall) Fields(s ...googleapi.Field) *SdfdownloadtasksOperationsGetCall
- func (c *SdfdownloadtasksOperationsGetCall) Header() http.Header
- func (c *SdfdownloadtasksOperationsGetCall) IfNoneMatch(entityTag string) *SdfdownloadtasksOperationsGetCall
- type SdfdownloadtasksOperationsService
- type SdfdownloadtasksService
- type Service
- type Status
Constants ¶
const ( // Create, see, edit, and permanently delete your Display & Video 360 // entities and reports DisplayVideoScope = "https://www.googleapis.com/auth/display-video" // View and manage your reports in DoubleClick Bid Manager DoubleclickbidmanagerScope = "https://www.googleapis.com/auth/doubleclickbidmanager" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateSdfDownloadTaskRequest ¶
type CreateSdfDownloadTaskRequest struct { // AdvertiserId: The ID of the advertiser to download SDF for. AdvertiserId int64 `json:"advertiserId,omitempty,string"` // IdFilter: Filters on entities by their entity IDs. IdFilter *IdFilter `json:"idFilter,omitempty"` // InventorySourceFilter: Filters on Inventory Sources by their IDs. InventorySourceFilter *InventorySourceFilter `json:"inventorySourceFilter,omitempty"` // ParentEntityFilter: Filters on selected file types. The entities in // each file are filtered // by a chosen set of filter entities. The filter entities must be the // same // type as, or a parent type of, the selected file types. ParentEntityFilter *ParentEntityFilter `json:"parentEntityFilter,omitempty"` // PartnerId: The ID of the partner to download SDF for. PartnerId int64 `json:"partnerId,omitempty,string"` // Version: Required. The SDF version of the downloaded file. If set // to // `SDF_VERSION_UNSPECIFIED`, this will default to the version specified // by // the advertiser or partner identified by `root_id`. An advertiser // inherits // its SDF version from its partner unless configured otherwise. // // Possible values: // "SDF_VERSION_UNSPECIFIED" - SDF version value is not specified or // is unknown in this version. // "SDF_VERSION_3_1" - SDF version 3.1 // "SDF_VERSION_4" - SDF version 4 // "SDF_VERSION_4_1" - SDF version 4.1 // "SDF_VERSION_4_2" - SDF version 4.2 // "SDF_VERSION_5" - SDF version 5. // "SDF_VERSION_5_1" - SDF version 5.1 Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "AdvertiserId") 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. "AdvertiserId") 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:"-"` }
CreateSdfDownloadTaskRequest: Request message for [SdfDownloadTaskService.CreateSdfDownloadTask].
func (*CreateSdfDownloadTaskRequest) MarshalJSON ¶
func (s *CreateSdfDownloadTaskRequest) MarshalJSON() ([]byte, error)
type GoogleBytestreamMedia ¶
type GoogleBytestreamMedia struct { // ResourceName: Name of the media resource. ResourceName string `json:"resourceName,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "ResourceName") 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. "ResourceName") 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:"-"` }
GoogleBytestreamMedia: Media resource.
func (*GoogleBytestreamMedia) MarshalJSON ¶
func (s *GoogleBytestreamMedia) MarshalJSON() ([]byte, error)
type IdFilter ¶
type IdFilter struct { // AdGroupAdIds: TrueView Ads to download by ID. All IDs must belong to // the same // Advertiser or // Partner specified in // CreateSdfDownloadTaskRequest. AdGroupAdIds googleapi.Int64s `json:"adGroupAdIds,omitempty"` // AdGroupIds: TrueView Ad Groups to download by ID. All IDs must belong // to the same // Advertiser or // Partner specified in // CreateSdfDownloadTaskRequest. AdGroupIds googleapi.Int64s `json:"adGroupIds,omitempty"` // CampaignIds: Campaigns to download by ID. All IDs must belong to the // same // Advertiser or // Partner specified in // CreateSdfDownloadTaskRequest. CampaignIds googleapi.Int64s `json:"campaignIds,omitempty"` // InsertionOrderIds: Insertion Orders to download by ID. All IDs must // belong to the same // Advertiser or // Partner specified in // CreateSdfDownloadTaskRequest. InsertionOrderIds googleapi.Int64s `json:"insertionOrderIds,omitempty"` // LineItemIds: Line Items to download by ID. All IDs must belong to the // same // Advertiser or // Partner specified in // CreateSdfDownloadTaskRequest. LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"` // MediaProductIds: Media Products to download by ID. All IDs must // belong to the same // Advertiser or // Partner specified in // CreateSdfDownloadTaskRequest. MediaProductIds googleapi.Int64s `json:"mediaProductIds,omitempty"` // ForceSendFields is a list of field names (e.g. "AdGroupAdIds") 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. "AdGroupAdIds") 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:"-"` }
IdFilter: A filtering option that filters entities by their entity IDs.
func (*IdFilter) MarshalJSON ¶
type InventorySourceFilter ¶
type InventorySourceFilter struct { // InventorySourceIds: Inventory Sources to download by ID. All IDs must // belong to the same // Advertiser or // Partner specified in // CreateSdfDownloadTaskRequest. Leave empty to download all // Inventory // Sources for the selected Advertiser or Partner. InventorySourceIds googleapi.Int64s `json:"inventorySourceIds,omitempty"` // ForceSendFields is a list of field names (e.g. "InventorySourceIds") // 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. "InventorySourceIds") 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:"-"` }
InventorySourceFilter: A filtering option for filtering on Inventory Source entities.
func (*InventorySourceFilter) MarshalJSON ¶
func (s *InventorySourceFilter) MarshalJSON() ([]byte, error)
type MediaDownloadCall ¶
type MediaDownloadCall struct {
// contains filtered or unexported fields
}
func (*MediaDownloadCall) Context ¶
func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall
Context sets the context to be used in this call's Do and Download methods. Any pending HTTP request will be aborted if the provided context is canceled.
func (*MediaDownloadCall) Do ¶
func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error)
Do executes the "displayvideo.media.download" call. Exactly one of *GoogleBytestreamMedia or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleBytestreamMedia.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 (*MediaDownloadCall) Download ¶
func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error)
Download fetches the API endpoint's "media" value, instead of the normal API response value. If the returned error is nil, the Response is guaranteed to have a 2xx status code. Callers must close the Response.Body as usual.
func (*MediaDownloadCall) Fields ¶
func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*MediaDownloadCall) Header ¶
func (c *MediaDownloadCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*MediaDownloadCall) IfNoneMatch ¶
func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall
IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type MediaService ¶
type MediaService struct {
// contains filtered or unexported fields
}
func NewMediaService ¶
func NewMediaService(s *Service) *MediaService
func (*MediaService) Download ¶
func (r *MediaService) Download(resourceName string) *MediaDownloadCall
Download: Downloads media. Download is supported on the URI `/download/{resource_name=**}?alt=media.`
**Note**: Download requests will not be successful without including `alt=media` query string.
type Operation ¶
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 response of the operation in case of success. // 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 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. "Done") 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:"-"` }
Operation: This resource represents a long-running operation that is the result of a network API call.
func (*Operation) MarshalJSON ¶
type ParentEntityFilter ¶
type ParentEntityFilter struct { // FileType: Required. File types that will be returned. // // Possible values: // "FILE_TYPE_UNSPECIFIED" - Default value when type is unspecified or // is unknown in this version. // "FILE_TYPE_CAMPAIGN" - Campaign. // "FILE_TYPE_MEDIA_PRODUCT" - Media Product. // "FILE_TYPE_INSERTION_ORDER" - Insertion Order. // "FILE_TYPE_LINE_ITEM" - Line Item. // "FILE_TYPE_AD_GROUP" - TrueView Ad Group. // "FILE_TYPE_AD" - TrueView Ad. FileType []string `json:"fileType,omitempty"` // FilterIds: The IDs of the specified filter type. This is used to // filter entities to // fetch. If filter type is not `FILTER_TYPE_NONE`, at least one ID must // be // specified. FilterIds googleapi.Int64s `json:"filterIds,omitempty"` // FilterType: Required. Filter type used to filter fetched entities. // // Possible values: // "FILTER_TYPE_UNSPECIFIED" - Default value when type is unspecified // or is unknown in this version. // "FILTER_TYPE_NONE" - If selected, no filter will be applied to the // download. Can only be used if // an Advertiser is specified // in CreateSdfDownloadTaskRequest. // "FILTER_TYPE_ADVERTISER_ID" - Advertiser ID. If selected, all // filter IDs must be Advertiser IDs that // belong to the Partner specified // in CreateSdfDownloadTaskRequest. // "FILTER_TYPE_CAMPAIGN_ID" - Campaign ID. If selected, all filter // IDs must be Campaign IDs that belong // to the Advertiser or // Partner specified in // CreateSdfDownloadTaskRequest. // "FILTER_TYPE_MEDIA_PRODUCT_ID" - Media Product ID. If selected, all // filter IDs must be Media Product IDs // that belong to the Advertiser // or Partner specified in // CreateSdfDownloadTaskRequest. Can only be used for // downloading // `FILE_TYPE_MEDIA_PRODUCT`. // "FILTER_TYPE_INSERTION_ORDER_ID" - Insertion Order ID. If selected, // all filter IDs must be Insertion Order IDs // that belong to the Advertiser // or Partner specified in // CreateSdfDownloadTaskRequest. Can only be used for // downloading // `FILE_TYPE_INSERTION_ORDER`, `FILE_TYPE_LINE_ITEM`, // `FILE_TYPE_AD_GROUP`, // and `FILE_TYPE_AD`. // "FILTER_TYPE_LINE_ITEM_ID" - Line Item ID. If selected, all filter // IDs must be Line Item IDs that belong // to the Advertiser or // Partner specified in // CreateSdfDownloadTaskRequest. Can only be used for // downloading // `FILE_TYPE_LINE_ITEM`, `FILE_TYPE_AD_GROUP`, and `FILE_TYPE_AD`. FilterType string `json:"filterType,omitempty"` // ForceSendFields is a list of field names (e.g. "FileType") 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. "FileType") 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:"-"` }
ParentEntityFilter: A filtering option that filters on selected file types belonging to a chosen set of filter entities.
func (*ParentEntityFilter) MarshalJSON ¶
func (s *ParentEntityFilter) MarshalJSON() ([]byte, error)
type SdfDownloadTask ¶
type SdfDownloadTask struct { // ResourceName: A resource name to be used in // media.download to Download the prepared // files. Resource names have the // format // `download/sdfdownloadtasks/media/{media_id}`. `media_id` will be // made // available by the long running operation service once the task status // is // done. ResourceName string `json:"resourceName,omitempty"` // ForceSendFields is a list of field names (e.g. "ResourceName") 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. "ResourceName") 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:"-"` }
SdfDownloadTask: Type for the response returned by [SdfDownloadTaskService.CreateSdfDownloadTask].
func (*SdfDownloadTask) MarshalJSON ¶
func (s *SdfDownloadTask) MarshalJSON() ([]byte, error)
type SdfDownloadTaskMetadata ¶
type SdfDownloadTaskMetadata struct { // CreateTime: The time when the operation was created. CreateTime string `json:"createTime,omitempty"` // EndTime: The time when execution was completed. EndTime string `json:"endTime,omitempty"` // Version: The SDF version used to execute this download task. // // Possible values: // "SDF_VERSION_UNSPECIFIED" - SDF version value is not specified or // is unknown in this version. // "SDF_VERSION_3_1" - SDF version 3.1 // "SDF_VERSION_4" - SDF version 4 // "SDF_VERSION_4_1" - SDF version 4.1 // "SDF_VERSION_4_2" - SDF version 4.2 // "SDF_VERSION_5" - SDF version 5. // "SDF_VERSION_5_1" - SDF version 5.1 Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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:"-"` }
SdfDownloadTaskMetadata: Type for the metadata returned by [SdfDownloadTaskService.CreateSdfDownloadTask].
func (*SdfDownloadTaskMetadata) MarshalJSON ¶
func (s *SdfDownloadTaskMetadata) MarshalJSON() ([]byte, error)
type SdfdownloadtasksCreateCall ¶
type SdfdownloadtasksCreateCall struct {
// contains filtered or unexported fields
}
func (*SdfdownloadtasksCreateCall) Context ¶
func (c *SdfdownloadtasksCreateCall) Context(ctx context.Context) *SdfdownloadtasksCreateCall
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 (*SdfdownloadtasksCreateCall) Do ¶
func (c *SdfdownloadtasksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
Do executes the "displayvideo.sdfdownloadtasks.create" call. Exactly one of *Operation or error will be non-nil. 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 (*SdfdownloadtasksCreateCall) Fields ¶
func (c *SdfdownloadtasksCreateCall) Fields(s ...googleapi.Field) *SdfdownloadtasksCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*SdfdownloadtasksCreateCall) Header ¶
func (c *SdfdownloadtasksCreateCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type SdfdownloadtasksOperationsGetCall ¶
type SdfdownloadtasksOperationsGetCall struct {
// contains filtered or unexported fields
}
func (*SdfdownloadtasksOperationsGetCall) Context ¶
func (c *SdfdownloadtasksOperationsGetCall) Context(ctx context.Context) *SdfdownloadtasksOperationsGetCall
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 (*SdfdownloadtasksOperationsGetCall) Do ¶
func (c *SdfdownloadtasksOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error)
Do executes the "displayvideo.sdfdownloadtasks.operations.get" call. Exactly one of *Operation or error will be non-nil. 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 (*SdfdownloadtasksOperationsGetCall) Fields ¶
func (c *SdfdownloadtasksOperationsGetCall) Fields(s ...googleapi.Field) *SdfdownloadtasksOperationsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*SdfdownloadtasksOperationsGetCall) Header ¶
func (c *SdfdownloadtasksOperationsGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*SdfdownloadtasksOperationsGetCall) IfNoneMatch ¶
func (c *SdfdownloadtasksOperationsGetCall) IfNoneMatch(entityTag string) *SdfdownloadtasksOperationsGetCall
IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type SdfdownloadtasksOperationsService ¶
type SdfdownloadtasksOperationsService struct {
// contains filtered or unexported fields
}
func NewSdfdownloadtasksOperationsService ¶
func NewSdfdownloadtasksOperationsService(s *Service) *SdfdownloadtasksOperationsService
func (*SdfdownloadtasksOperationsService) Get ¶
func (r *SdfdownloadtasksOperationsService) Get(name string) *SdfdownloadtasksOperationsGetCall
Get: Gets the latest state of an asynchronous SDF download task operation. Clients should poll this method at intervals of 30 seconds.
type SdfdownloadtasksService ¶
type SdfdownloadtasksService struct { Operations *SdfdownloadtasksOperationsService // contains filtered or unexported fields }
func NewSdfdownloadtasksService ¶
func NewSdfdownloadtasksService(s *Service) *SdfdownloadtasksService
func (*SdfdownloadtasksService) Create ¶
func (r *SdfdownloadtasksService) Create(createsdfdownloadtaskrequest *CreateSdfDownloadTaskRequest) *SdfdownloadtasksCreateCall
Create: Creates an SDF Download Task. Returns an Operation.
An SDF Download Task is a long-running, asynchronous operation. The metadata type of this operation is SdfDownloadTaskMetadata. If the request is successful, the response type of the operation is SdfDownloadTask. The response will not include the download files, which must be retrieved with media.download. The state of operation can be retrieved with sdfdownloadtask.operations.get.
Any errors can be found in the error.message. Note that error.details is expected to be empty.
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Media *MediaService Sdfdownloadtasks *SdfdownloadtasksService // contains filtered or unexported fields }
func New
deprecated
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 NewService ¶
NewService creates a new Service.
type Status ¶
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 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. "Code") 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:"-"` }
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).