σ {r Qc@s‘d„Zdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZd efd „ƒYZd efd „ƒYZd S(cCs%d|}d|}d|||fS(Ns<%s>ss%s%s%s((tkeytvaluetstarttend((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyttags  tWebsiteConfigurationcBs2eZdZdZddddd„Zd„ZRS(s Website configuration for a bucket. :ivar suffix: Suffix that is appended to a request that is for a "directory" on the website endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/ the data that is returned will be for the object with the key name images/index.html). The suffix must not be empty and must not include a slash character. :ivar error_key: The object key name to use when a 4xx class error occurs. This key identifies the page that is returned when such an error occurs. :ivar redirect_all_requests_to: Describes the redirect behavior for every request to this bucket's website endpoint. If this value is non None, no other values are considered when configuring the website configuration for the bucket. This is an instance of ``RedirectLocation``. :ivar routing_rules: ``RoutingRules`` object which specifies conditions and redirects that apply when the conditions are met. s  %(body)s cCs(||_||_||_||_dS(N(tsuffixt error_keytredirect_all_requests_tot routing_rules(tselfRRRR ((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyt__init__<s   cCsίg}|jdk r:|jtdtd|jƒƒƒn|jdk rn|jtdtd|jƒƒƒn|jdk r–|j|jjƒƒn|jdk rΎ|j|jjƒƒndj|ƒ}|j i|d6S(Nt IndexDocumenttSuffixt ErrorDocumenttKeys tbody( RtNonetappendRRRtto_xmlR tjointWEBSITE_SKELETON(R t body_partsR((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyRCs%%N(t__name__t __module__t__doc__RRR R(((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyRs tRedirectLocationcBs#eZdZdd„Zd„ZRS(s*Specify redirect behavior for every request to a bucket's endpoint. :ivar hostname: Name of the host where requests will be redirected. :ivar protocol: Protocol to use (http, https) when redirecting requests. The default is the protocol that is used in the original request. cCs||_||_dS(N(thostnametprotocol(R RR((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR [s cCsrg}|jdk r1|jtd|jƒƒn|jdk r\|jtd|jƒƒntddj|ƒƒS(NtHostNametProtocoltRedirectAllRequestsTos (RRRRRR(R t inner_text((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR_s N(RRRRR R(((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyRQs t RoutingRulescBs#eZd„Zd„Zd„ZRS(cCs g|_dS(N(t_rules(R ((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR iscCs|jj|ƒ|S(sΨ :type rule: :class:`boto.s3.website.RoutingRule` :param rule: A routing rule. :return: This ``RoutingRules`` object is returned, so that it can chain subsequent calls. (R"R(R trule((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pytadd_rulels cCsCg}x$|jD]}|j|jƒƒqWtddj|ƒƒS(NR!s (R"RRRR(R R R#((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyRys(RRR R$R(((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR!hs  t RoutingRulecBsMeZdZd„Zd„Zeddd„ƒZdddddd„ZRS(sRepresents a single routing rule. There are convenience methods to making creating rules more concise:: rule = RoutingRule.when(key_prefix='foo/').then_redirect('example.com') :ivar condition: Describes condition that must be met for the specified redirect to apply. :ivar redirect: Specifies redirect behavior. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can can specify a different error code to return. cCs||_||_dS(N(t conditiontredirect(R R&R'((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR s cCs#td|jjƒ|jjƒƒS(NR%(RR&RR'(R ((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR”scCs|td|d|ƒdƒS(Nt key_prefixthttp_error_code(t ConditionR(tclsR(R)((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pytwhen˜sc Cs.td|d|d|d|d|ƒ|_|S(NRRt replace_keytreplace_key_prefixthttp_redirect_code(tRedirectR'(R RRR-R.R/((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyt then_redirects   N( RRRR Rt classmethodRR,R1(((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR%€s   R*cBs&eZdZddd„Zd„ZRS(s% :ivar key_prefix: The object key name prefix when the redirect is applied. For example, to redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html. To redirect request for all pages with the prefix docs/, the key prefix will be /docs, which identifies all objects in the docs/ folder. :ivar http_error_code: The HTTP error code when the redirect is applied. In the event of an error, if the error code equals this value, then the specified redirect is applied. cCs||_||_dS(N(R(R)(R R(R)((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR ΅s cCsrg}|jdk r1|jtd|jƒƒn|jdk r\|jtd|jƒƒntddj|ƒƒS(NtKeyPrefixEqualstHttpErrorCodeReturnedEqualsR*s (R(RRRR)R(R R ((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyRΉsN(RRRRR R(((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR*§s R0cBs/eZdZdddddd„Zd„ZRS(sδ :ivar hostname: The host name to use in the redirect request. :ivar protocol: The protocol to use in the redirect request. Can be either 'http' or 'https'. :ivar replace_key: The specific object key to use in the redirect request. For example, redirect request to error.html. :ivar replace_key_prefix: The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with KeyPrefixEquals set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents. :ivar http_redirect_code: The HTTP redirect code to use on the response. cCs1||_||_||_||_||_dS(N(RRR-R.R/(R RRR-R.R/((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR Ψs     cCsσg}|jdk r1|jtd|jƒƒn|jdk r\|jtd|jƒƒn|jdk r‡|jtd|jƒƒn|jdk r²|jtd|jƒƒn|jdk rέ|jtd|jƒƒntddj|ƒƒS(NRRtReplaceKeyWithtReplaceKeyPrefixWithtHttpRedirectCodeR0s ( RRRRRR-R.R/R(R R ((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyRΰs N(RRRRR R(((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyR0Δs N(RtobjectRRR!R%R*R0(((s2/tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/s3/website.pyts 4'