func (c *Client) SelectObject(bucket, object string, args *api.SelectObjectArgs) (*api.SelectObjectResult, error) {
	return api.SelectObject(c, bucket, object, args)
}
SelectObject - select the object content

PARAMS:
- bucket: the name of the bucket
- object: the name of the object
- args: the optional arguments to select the object
RETURNS:
- *api.SelectObjectResult: select object result
- error: any error if it occurs
package bos
import (
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	"os"
	"github.com/baidubce/bce-sdk-go/auth"
	"github.com/baidubce/bce-sdk-go/bce"
	"github.com/baidubce/bce-sdk-go/services/bos/api"
	"github.com/baidubce/bce-sdk-go/util/log"
)
const (
	DEFAULT_SERVICE_DOMAIN = bce.DEFAULT_REGION + ".bcebos.com"
	DEFAULT_MAX_PARALLEL   = 10
	MULTIPART_ALIGN        = 1 << 20          
	MIN_MULTIPART_SIZE     = 100 * (1 << 10)  
	DEFAULT_MULTIPART_SIZE = 12 * (1 << 20)   
	MAX_PART_NUMBER        = 10000
	MAX_SINGLE_PART_SIZE   = 5 * (1 << 30)     
	MAX_SINGLE_OBJECT_SIZE = 48.8 * (1 << 40)  
)
type Client struct {
	*bce.BceClient
	MaxParallel   int64
	MultipartSize int64
}
type BosClientConfiguration struct {
	Ak               string
	Sk               string
	Endpoint         string
	RedirectDisabled bool
}
func NewClient(ak, sk, endpoint string) (*Client, error) {
	return NewClientWithConfig(&BosClientConfiguration{
		Ak:               ak,
		Sk:               sk,
		Endpoint:         endpoint,
		RedirectDisabled: false,
	})
}
func NewClientWithConfig(config *BosClientConfiguration) (*Client, error) {
	var credentials *auth.BceCredentials
	var err error
	ak, sk, endpoint := config.Ak, config.Sk, config.Endpoint
	if len(ak) == 0 && len(sk) == 0 {  
		credentials, err = nil, nil
	} else {
		credentials, err = auth.NewBceCredentials(ak, sk)
		if err != nil {
			return nil, err
		}
	}
	if len(endpoint) == 0 {
		endpoint = DEFAULT_SERVICE_DOMAIN
	}
	defaultSignOptions := &auth.SignOptions{
		HeadersToSign: auth.DEFAULT_HEADERS_TO_SIGN,
		ExpireSeconds: auth.DEFAULT_EXPIRE_SECONDS}
	defaultConf := &bce.BceClientConfiguration{
		Endpoint:                  endpoint,
		Region:                    bce.DEFAULT_REGION,
		UserAgent:                 bce.DEFAULT_USER_AGENT,
		Credentials:               credentials,
		SignOption:                defaultSignOptions,
		Retry:                     bce.DEFAULT_RETRY_POLICY,
		ConnectionTimeoutInMillis: bce.DEFAULT_CONNECTION_TIMEOUT_IN_MILLIS,
		RedirectDisabled:          config.RedirectDisabled}
	v1Signer := &auth.BceV1Signer{}
	client := &Client{bce.NewBceClient(defaultConf, v1Signer),
		DEFAULT_MAX_PARALLEL, DEFAULT_MULTIPART_SIZE}
	return client, nil
}
func (c *Client) ListBuckets() (*api.ListBucketsResult, error) {
	return api.ListBuckets(c)
}
func (c *Client) ListObjects(bucket string,
	args *api.ListObjectsArgs) (*api.ListObjectsResult, error) {
	return api.ListObjects(c, bucket, args)
}
func (c *Client) SimpleListObjects(bucket, prefix string, maxKeys int, marker,
	delimiter string) (*api.ListObjectsResult, error) {
	args := &api.ListObjectsArgs{delimiter, marker, maxKeys, prefix}
	return api.ListObjects(c, bucket, args)
}
func (c *Client) HeadBucket(bucket string) error {
	return api.HeadBucket(c, bucket)
}
func (c *Client) DoesBucketExist(bucket string) (bool, error) {
	err := api.HeadBucket(c, bucket)
	if err == nil {
		return true, nil
	}
	if realErr, ok := err.(*bce.BceServiceError); ok {
		if realErr.StatusCode == http.StatusForbidden {
			return true, nil
		}
		if realErr.StatusCode == http.StatusNotFound {
			return false, nil
		}
	}
	return false, err
}
func (c *Client) PutBucket(bucket string) (string, error) {
	return api.PutBucket(c, bucket)
}
func (c *Client) DeleteBucket(bucket string) error {
	return api.DeleteBucket(c, bucket)
}
func (c *Client) GetBucketLocation(bucket string) (string, error) {
	return api.GetBucketLocation(c, bucket)
}
func (c *Client) PutBucketAcl(bucket string, aclBody *bce.Body) error {
	return api.PutBucketAcl(c, bucket, "", aclBody)
}
func (c *Client) PutBucketAclFromCanned(bucket, cannedAcl string) error {
	return api.PutBucketAcl(c, bucket, cannedAcl, nil)
}
func (c *Client) PutBucketAclFromFile(bucket, aclFile string) error {
	body, err := bce.NewBodyFromFile(aclFile)
	if err != nil {
		return err
	}
	return api.PutBucketAcl(c, bucket, "", body)
}
func (c *Client) PutBucketAclFromString(bucket, aclString string) error {
	body, err := bce.NewBodyFromString(aclString)
	if err != nil {
		return err
	}
	return api.PutBucketAcl(c, bucket, "", body)
}
func (c *Client) PutBucketAclFromStruct(bucket string, aclObj *api.PutBucketAclArgs) error {
	jsonBytes, jsonErr := json.Marshal(aclObj)
	if jsonErr != nil {
		return jsonErr
	}
	body, err := bce.NewBodyFromBytes(jsonBytes)
	if err != nil {
		return err
	}
	return api.PutBucketAcl(c, bucket, "", body)
}
func (c *Client) GetBucketAcl(bucket string) (*api.GetBucketAclResult, error) {
	return api.GetBucketAcl(c, bucket)
}
func (c *Client) PutBucketLogging(bucket string, body *bce.Body) error {
	return api.PutBucketLogging(c, bucket, body)
}
func (c *Client) PutBucketLoggingFromString(bucket, logging string) error {
	body, err := bce.NewBodyFromString(logging)
	if err != nil {
		return err
	}
	return api.PutBucketLogging(c, bucket, body)
}
func (c *Client) PutBucketLoggingFromStruct(bucket string, obj *api.PutBucketLoggingArgs) error {
	jsonBytes, jsonErr := json.Marshal(obj)
	if jsonErr != nil {
		return jsonErr
	}
	body, err := bce.NewBodyFromBytes(jsonBytes)
	if err != nil {
		return err
	}
	return api.PutBucketLogging(c, bucket, body)
}
func (c *Client) GetBucketLogging(bucket string) (*api.GetBucketLoggingResult, error) {
	return api.GetBucketLogging(c, bucket)
}
func (c *Client) DeleteBucketLogging(bucket string) error {
	return api.DeleteBucketLogging(c, bucket)
}
func (c *Client) PutBucketLifecycle(bucket string, lifecycle *bce.Body) error {
	return api.PutBucketLifecycle(c, bucket, lifecycle)
}
func (c *Client) PutBucketLifecycleFromString(bucket, lifecycle string) error {
	body, err := bce.NewBodyFromString(lifecycle)
	if err != nil {
		return err
	}
	return api.PutBucketLifecycle(c, bucket, body)
}
func (c *Client) GetBucketLifecycle(bucket string) (*api.GetBucketLifecycleResult, error) {
	return api.GetBucketLifecycle(c, bucket)
}
func (c *Client) DeleteBucketLifecycle(bucket string) error {
	return api.DeleteBucketLifecycle(c, bucket)
}
func (c *Client) PutBucketStorageclass(bucket, storageClass string) error {
	return api.PutBucketStorageclass(c, bucket, storageClass)
}
func (c *Client) GetBucketStorageclass(bucket string) (string, error) {
	return api.GetBucketStorageclass(c, bucket)
}
func (c *Client) PutBucketReplication(bucket string, replicationConf *bce.Body, replicationRuleId string) error {
	return api.PutBucketReplication(c, bucket, replicationConf, replicationRuleId)
}
func (c *Client) PutBucketReplicationFromFile(bucket, confFile string, replicationRuleId string) error {
	body, err := bce.NewBodyFromFile(confFile)
	if err != nil {
		return err
	}
	return api.PutBucketReplication(c, bucket, body, replicationRuleId)
}
func (c *Client) PutBucketReplicationFromString(bucket, confString string, replicationRuleId string) error {
	body, err := bce.NewBodyFromString(confString)
	if err != nil {
		return err
	}
	return api.PutBucketReplication(c, bucket, body, replicationRuleId)
}
func (c *Client) PutBucketReplicationFromStruct(bucket string,
	confObj *api.PutBucketReplicationArgs, replicationRuleId string) error {
	jsonBytes, jsonErr := json.Marshal(confObj)
	if jsonErr != nil {
		return jsonErr
	}
	body, err := bce.NewBodyFromBytes(jsonBytes)
	if err != nil {
		return err
	}
	return api.PutBucketReplication(c, bucket, body, replicationRuleId)
}
func (c *Client) GetBucketReplication(bucket string, replicationRuleId string) (*api.GetBucketReplicationResult, error) {
	return api.GetBucketReplication(c, bucket, replicationRuleId)
}
func (c *Client) ListBucketReplication(bucket string) (*api.ListBucketReplicationResult, error) {
	return api.ListBucketReplication(c, bucket)
}
func (c *Client) DeleteBucketReplication(bucket string, replicationRuleId string) error {
	return api.DeleteBucketReplication(c, bucket, replicationRuleId)
}
func (c *Client) GetBucketReplicationProgress(bucket string, replicationRuleId string) (
	*api.GetBucketReplicationProgressResult, error) {
	return api.GetBucketReplicationProgress(c, bucket, replicationRuleId)
}
func (c *Client) PutBucketEncryption(bucket, algorithm string) error {
	return api.PutBucketEncryption(c, bucket, algorithm)
}
func (c *Client) GetBucketEncryption(bucket string) (string, error) {
	return api.GetBucketEncryption(c, bucket)
}
func (c *Client) DeleteBucketEncryption(bucket string) error {
	return api.DeleteBucketEncryption(c, bucket)
}
func (c *Client) PutBucketStaticWebsite(bucket string, config *bce.Body) error {
	return api.PutBucketStaticWebsite(c, bucket, config)
}
func (c *Client) PutBucketStaticWebsiteFromString(bucket, jsonConfig string) error {
	body, err := bce.NewBodyFromString(jsonConfig)
	if err != nil {
		return err
	}
	return api.PutBucketStaticWebsite(c, bucket, body)
}
func (c *Client) PutBucketStaticWebsiteFromStruct(bucket string,
	confObj *api.PutBucketStaticWebsiteArgs) error {
	jsonBytes, jsonErr := json.Marshal(confObj)
	if jsonErr != nil {
		return jsonErr
	}
	body, err := bce.NewBodyFromBytes(jsonBytes)
	if err != nil {
		return err
	}
	return api.PutBucketStaticWebsite(c, bucket, body)
}
func (c *Client) SimplePutBucketStaticWebsite(bucket, index, notFound string) error {
	confObj := &api.PutBucketStaticWebsiteArgs{index, notFound}
	return c.PutBucketStaticWebsiteFromStruct(bucket, confObj)
}
func (c *Client) GetBucketStaticWebsite(bucket string) (
	*api.GetBucketStaticWebsiteResult, error) {
	return api.GetBucketStaticWebsite(c, bucket)
}
func (c *Client) DeleteBucketStaticWebsite(bucket string) error {
	return api.DeleteBucketStaticWebsite(c, bucket)
}
func (c *Client) PutBucketCors(bucket string, config *bce.Body) error {
	return api.PutBucketCors(c, bucket, config)
}
func (c *Client) PutBucketCorsFromFile(bucket, filename string) error {
	body, err := bce.NewBodyFromFile(filename)
	if err != nil {
		return err
	}
	return api.PutBucketCors(c, bucket, body)
}
func (c *Client) PutBucketCorsFromString(bucket, jsonConfig string) error {
	body, err := bce.NewBodyFromString(jsonConfig)
	if err != nil {
		return err
	}
	return api.PutBucketCors(c, bucket, body)
}
func (c *Client) PutBucketCorsFromStruct(bucket string, confObj *api.PutBucketCorsArgs) error {
	jsonBytes, jsonErr := json.Marshal(confObj)
	if jsonErr != nil {
		return jsonErr
	}
	body, err := bce.NewBodyFromBytes(jsonBytes)
	if err != nil {
		return err
	}
	return api.PutBucketCors(c, bucket, body)
}
func (c *Client) GetBucketCors(bucket string) (*api.GetBucketCorsResult, error) {
	return api.GetBucketCors(c, bucket)
}
func (c *Client) DeleteBucketCors(bucket string) error {
	return api.DeleteBucketCors(c, bucket)
}
func (c *Client) PutBucketCopyrightProtection(bucket string, resources ...string) error {
	return api.PutBucketCopyrightProtection(c, bucket, resources...)
}
func (c *Client) GetBucketCopyrightProtection(bucket string) ([]string, error) {
	return api.GetBucketCopyrightProtection(c, bucket)
}
func (c *Client) DeleteBucketCopyrightProtection(bucket string) error {
	return api.DeleteBucketCopyrightProtection(c, bucket)
}
func (c *Client) PutObject(bucket, object string, body *bce.Body,
	args *api.PutObjectArgs) (string, error) {
	return api.PutObject(c, bucket, object, body, args)
}
func (c *Client) BasicPutObject(bucket, object string, body *bce.Body) (string, error) {
	return api.PutObject(c, bucket, object, body, nil)
}
func (c *Client) PutObjectFromBytes(bucket, object string, bytesArr []byte,
	args *api.PutObjectArgs) (string, error) {
	body, err := bce.NewBodyFromBytes(bytesArr)
	if err != nil {
		return "", err
	}
	return api.PutObject(c, bucket, object, body, args)
}
func (c *Client) PutObjectFromString(bucket, object, content string,
	args *api.PutObjectArgs) (string, error) {
	body, err := bce.NewBodyFromString(content)
	if err != nil {
		return "", err
	}
	return api.PutObject(c, bucket, object, body, args)
}
func (c *Client) PutObjectFromFile(bucket, object, fileName string,
	args *api.PutObjectArgs) (string, error) {
	body, err := bce.NewBodyFromFile(fileName)
	if err != nil {
		return "", err
	}
	return api.PutObject(c, bucket, object, body, args)
}
func (c *Client) PutObjectFromStream(bucket, object string, reader io.Reader,
	args *api.PutObjectArgs) (string, error) {
	body, err := bce.NewBodyFromSizedReader(reader, -1)
	if err != nil {
		return "", err
	}
	return api.PutObject(c, bucket, object, body, args)
}
func (c *Client) CopyObject(bucket, object, srcBucket, srcObject string,
	args *api.CopyObjectArgs) (*api.CopyObjectResult, error) {
	source := fmt.Sprintf("/%s/%s", srcBucket, srcObject)
	return api.CopyObject(c, bucket, object, source, args)
}
func (c *Client) BasicCopyObject(bucket, object, srcBucket,
	srcObject string) (*api.CopyObjectResult, error) {
	source := fmt.Sprintf("/%s/%s", srcBucket, srcObject)
	return api.CopyObject(c, bucket, object, source, nil)
}
func (c *Client) GetObject(bucket, object string, responseHeaders map[string]string,
	ranges ...int64) (*api.GetObjectResult, error) {
	return api.GetObject(c, bucket, object, responseHeaders, ranges...)
}
func (c *Client) BasicGetObject(bucket, object string) (*api.GetObjectResult, error) {
	return api.GetObject(c, bucket, object, nil)
}
func (c *Client) BasicGetObjectToFile(bucket, object, filePath string) error {
	res, err := api.GetObject(c, bucket, object, nil)
	if err != nil {
		return err
	}
	defer res.Body.Close()
	file, fileErr := os.OpenFile(filePath, os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0644)
	if fileErr != nil {
		return fileErr
	}
	defer file.Close()
	written, writeErr := io.CopyN(file, res.Body, res.ContentLength)
	if writeErr != nil {
		return writeErr
	}
	if written != res.ContentLength {
		return fmt.Errorf("written content size does not match the response content")
	}
	return nil
}
func (c *Client) GetObjectMeta(bucket, object string) (*api.GetObjectMetaResult, error) {
	return api.GetObjectMeta(c, bucket, object)
}