internal override HttpRequestMessageBuilder BuildRequest(HttpRequestMessageBuilder requestMessageBuilder)
    {
        requestMessageBuilder.AddQueryParameter("replication", "");
        var body = BucketReplication.MarshalXML();
        // Convert string to a byte array
        var bodyInBytes = Encoding.ASCII.GetBytes(body);

        requestMessageBuilder.BodyParameters.Add("content-type", "text/xml");
        requestMessageBuilder.SetBody(bodyInBytes);

        return(requestMessageBuilder);
    }
    internal override HttpRequestMessageBuilder BuildRequest(HttpRequestMessageBuilder requestMessageBuilder)
    {
        requestMessageBuilder.AddQueryParameter("notification", "");
        var bucketNotificationConfiguration = new BucketNotification();
        var body = utils.MarshalXML(bucketNotificationConfiguration, "http://s3.amazonaws.com/doc/2006-03-01/");
        // Convert string to a byte array
        var bodyInBytes = Encoding.ASCII.GetBytes(body);

        requestMessageBuilder.BodyParameters.Add("content-type", "text/xml");
        requestMessageBuilder.SetBody(bodyInBytes);

        return(requestMessageBuilder);
    }
    internal override HttpRequestMessageBuilder BuildRequest(HttpRequestMessageBuilder requestMessageBuilder)
    {
        requestMessageBuilder.AddQueryParameter("lifecycle", "");
        var body = BucketLifecycle.MarshalXML();
        // Convert string to a byte array
        var bodyInBytes = Encoding.ASCII.GetBytes(body);

        requestMessageBuilder.BodyParameters.Add("content-type", "text/xml");
        requestMessageBuilder.SetBody(bodyInBytes);
        requestMessageBuilder.AddOrUpdateHeaderParameter("Content-Md5",
                                                         utils.getMD5SumStr(bodyInBytes));

        return(requestMessageBuilder);
    }
    internal override HttpRequestMessageBuilder BuildRequest(HttpRequestMessageBuilder requestMessageBuilder)
    {
        if (EncryptionConfig == null)
        {
            EncryptionConfig = ServerSideEncryptionConfiguration.GetSSEConfigurationWithS3Rule();
        }

        requestMessageBuilder.AddQueryParameter("encryption", "");
        var body = utils.MarshalXML(EncryptionConfig, "http://s3.amazonaws.com/doc/2006-03-01/");
        // Convert string to a byte array
        var bodyInBytes = Encoding.ASCII.GetBytes(body);

        requestMessageBuilder.BodyParameters.Add("content-type", "text/xml");
        requestMessageBuilder.SetBody(bodyInBytes);

        return(requestMessageBuilder);
    }
    internal override HttpRequestMessageBuilder BuildRequest(HttpRequestMessageBuilder requestMessageBuilder)
    {
        if (BucketNotificationConfiguration == null)
        {
            throw new UnexpectedMinioException(
                      "Cannot BuildRequest for SetBucketNotificationsArgs. BucketNotification configuration not assigned");
        }
        requestMessageBuilder.AddQueryParameter("notification", "");
        var body = utils.MarshalXML(BucketNotificationConfiguration, "http://s3.amazonaws.com/doc/2006-03-01/");
        // Convert string to a byte array
        var bodyInBytes = Encoding.ASCII.GetBytes(body);

        requestMessageBuilder.BodyParameters.Add("content-type", "text/xml");
        requestMessageBuilder.SetBody(bodyInBytes);

        return(requestMessageBuilder);
    }