    # File lib/fog/google/requests/storage/put_bucket_acl.rb, line 24
            def put_bucket_acl(bucket_name, acl)
              data =
    "<AccessControlPolicy>\n<Owner>\n<ID>\#{acl['Owner']['ID']}</ID>\n<DisplayName>\#{acl['Owner']['DisplayName']}</DisplayName>\n</Owner>\n<AccessControlList>\n"

              acl['AccessControlList'].each do |grant|
                data << "    <Grant>"
                type = case grant['Grantee'].keys.sort
                when ['DisplayName', 'ID']
                  'CanonicalUser'
                when ['EmailAddress']
                  'AmazonCustomerByEmail'
                when ['URI']
                  'Group'
                end
                data << "      <Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"#{type}\">"
                for key, value in grant['Grantee']
                  data << "        <#{key}>#{value}</#{key}>"
                end
                data << "      </Grantee>"
                data << "      <Permission>#{grant['Permission']}</Permission>"
                data << "    </Grant>"
              end

              data <<
    "</AccessControlList>\n</AccessControlPolicy>\n"

              request({
                :body     => data,
                :expects  => 200,
                :headers  => {},
                :host     => "#{bucket_name}.#{@host}",
                :method   => 'PUT',
                :query    => {'acl' => nil}
              })
            end