// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using Google.Apis.Http; using System; using System.Net.Http; namespace Google.Apis.Upload { /// /// Options for operations. /// public sealed class ResumableUploadOptions { /// /// Gets or sets the HTTP client to use when starting the upload sessions and uploading data. /// public HttpClient HttpClient { get; set; } /// /// Gets or sets the callback for modifying the session initiation request. /// See https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload#start-resumable for more information. /// /// /// Note: If these options are used with a created using , /// this property will be ignored as the session has already been initiated. /// public Action ModifySessionInitiationRequest { get; set; } /// /// Gets or sets the serializer to use when parsing error responses. /// public ISerializer Serializer { get; set; } /// /// Gets or sets the name of the service performing the upload. /// /// /// This will be used to set the in the event of an error. /// public string ServiceName { get; set; } /// /// Gets the as a if it is an instance of one. /// internal ConfigurableHttpClient ConfigurableHttpClient => HttpClient as ConfigurableHttpClient; } }