protected override string TransObjectCannedAcl(CannedAclEnum cannedAcl)
 {
     if (cannedAcl == CannedAclEnum.PublicReadDelivered)
     {
         cannedAcl = CannedAclEnum.PublicRead;
     }
     else if (cannedAcl == CannedAclEnum.PublicReadWriteDelivered)
     {
         cannedAcl = CannedAclEnum.PublicReadWrite;
     }
     return(EnumAdaptor.GetStringValue(cannedAcl));
 }
        private void TransGrants(XmlWriter xmlWriter, IList <Grant> grants, bool isBucket, string startElementName)
        {
            xmlWriter.WriteStartElement(startElementName);
            foreach (Grant grant in grants)
            {
                if (grant.Grantee != null && grant.Permission.HasValue)
                {
                    xmlWriter.WriteStartElement("Grant");

                    if (grant.Grantee is GroupGrantee)
                    {
                        GroupGrantee groupGrantee = grant.Grantee as GroupGrantee;
                        if (groupGrantee.GroupGranteeType == GroupGranteeEnum.AllUsers)
                        {
                            xmlWriter.WriteStartElement("Grantee");
                            xmlWriter.WriteElementString("Canned", "Everyone");
                            xmlWriter.WriteEndElement();
                        }
                    }
                    else if (grant.Grantee is CanonicalGrantee)
                    {
                        xmlWriter.WriteStartElement("Grantee");
                        CanonicalGrantee canonicalGrantee = grant.Grantee as CanonicalGrantee;
                        xmlWriter.WriteElementString("ID", canonicalGrantee.Id);
                        xmlWriter.WriteEndElement();
                    }
                    xmlWriter.WriteElementString("Permission", EnumAdaptor.GetStringValue(grant.Permission));
                    if (isBucket)
                    {
                        xmlWriter.WriteElementString("Delivered", grant.Delivered.ToString().ToLower());
                    }
                    xmlWriter.WriteEndElement();
                }
            }
            xmlWriter.WriteEndElement();
        }
 protected override string TransSseKmsAlgorithm(SseKmsAlgorithmEnum algorithm)
 {
     return(EnumAdaptor.GetStringValue(algorithm));
 }
 protected override string TransBucketCannedAcl(CannedAclEnum cannedAcl)
 {
     return(EnumAdaptor.GetStringValue(cannedAcl));
 }
 protected override string TransEventType(EventTypeEnum eventType)
 {
     return(EnumAdaptor.GetStringValue(eventType));
 }