Show / Hide Table of Contents

Class MediaResource

The "media" collection of methods.

Inheritance
object
MediaResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.ChecksService.v1alpha
Assembly: Google.Apis.ChecksService.v1alpha.dll
Syntax
public class MediaResource

Constructors

MediaResource(IClientService)

Constructs a new resource.

Declaration
public MediaResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Upload(GoogleChecksReportV1alphaAnalyzeUploadRequest, string)

Analyzes the uploaded app bundle and returns a google.longrunning.Operation containing the generated Report.

Example (upload only) Send a regular POST request with the header X-Goog-Upload-Protocol: raw.

POST
https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload HTTP/1.1
X-Goog-Upload-Protocol: raw Content-Length: Content-Type: application/octet-stream

Example (upload

with metadata) Send a multipart POST request where the first body part contains the metadata JSON and the second body part contains the binary upload. Include the header X-Goog-Upload-Protocol: multipart.

POST https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload HTTP/1.1
X-Goog-Upload-Protocol: multipart Content-Length: ? Content-Type: multipart/related; boundary=BOUNDARY
--BOUNDARY Content-Type: application/json {"code_reference_id":"db5bcc20f94055fb5bc08cbb9b0e7a5530308786"}
--BOUNDARY --BOUNDARY--

Note: Metadata-only requests are not supported.

Declaration
public virtual MediaResource.UploadRequest Upload(GoogleChecksReportV1alphaAnalyzeUploadRequest body, string parent)
Parameters
Type Name Description
GoogleChecksReportV1alphaAnalyzeUploadRequest body

The body of the request.

string parent

Required. Resource name of the app. Example: accounts/123/apps/456

Returns
Type Description
MediaResource.UploadRequest

Upload(GoogleChecksReportV1alphaAnalyzeUploadRequest, string, Stream, string)

Analyzes the uploaded app bundle and returns a google.longrunning.Operation containing the generated Report.

Example (upload only) Send a regular POST request with the header X-Goog-Upload-Protocol: raw.

POST
https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload HTTP/1.1
X-Goog-Upload-Protocol: raw Content-Length: Content-Type: application/octet-stream

Example (upload

with metadata) Send a multipart POST request where the first body part contains the metadata JSON and the second body part contains the binary upload. Include the header X-Goog-Upload-Protocol: multipart.

POST https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload HTTP/1.1
X-Goog-Upload-Protocol: multipart Content-Length: ? Content-Type: multipart/related; boundary=BOUNDARY
--BOUNDARY Content-Type: application/json {"code_reference_id":"db5bcc20f94055fb5bc08cbb9b0e7a5530308786"}
--BOUNDARY --BOUNDARY--

Note: Metadata-only requests are not supported.

Declaration
public virtual MediaResource.UploadMediaUpload Upload(GoogleChecksReportV1alphaAnalyzeUploadRequest body, string parent, Stream stream, string contentType)
Parameters
Type Name Description
GoogleChecksReportV1alphaAnalyzeUploadRequest body

The body of the request.

string parent

Required. Resource name of the app. Example: accounts/123/apps/456

Stream stream

The stream to upload. See remarks for further information.

string contentType

The content type of the stream to upload.

Returns
Type Description
MediaResource.UploadMediaUpload
Remarks

Considerations regarding stream:

  • If stream is seekable, then the stream position will be reset to 0 before reading commences. If stream is not seekable, then it will be read from its current position
  • Caller is responsible for maintaining the stream open until the upload is completed
  • Caller is responsible for closing the stream
In this article
Back to top Generated by DocFX