blob: bff5347504973db49a39bae02b44ea74f640b291 [file] [log] [blame]
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -04001<?xml version="1.0" encoding="ascii"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6 <title>oauth2client.appengine.CredentialsProperty</title>
7 <link rel="stylesheet" href="epydoc.css" type="text/css" />
8 <script type="text/javascript" src="epydoc.js"></script>
9</head>
10
11<body bgcolor="white" text="black" link="blue" vlink="#204080"
12 alink="#204080">
13<!-- ==================== NAVIGATION BAR ==================== -->
14<table class="navbar" border="0" width="100%" cellpadding="0"
15 bgcolor="#a0c0ff" cellspacing="0">
16 <tr valign="middle">
17
18 <!-- Tree link -->
19 <th>&nbsp;&nbsp;&nbsp;<a
20 href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
21
22 <!-- Index link -->
23 <th>&nbsp;&nbsp;&nbsp;<a
24 href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
25
26 <!-- Help link -->
27 <th>&nbsp;&nbsp;&nbsp;<a
28 href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
29
30 <th class="navbar" width="100%"></th>
31 </tr>
32</table>
33<table width="100%" cellpadding="0" cellspacing="0">
34 <tr valign="top">
35 <td width="100%">
36 <span class="breadcrumbs">
37 <a href="oauth2client-module.html">Package&nbsp;oauth2client</a> ::
38 <a href="oauth2client.appengine-module.html">Module&nbsp;appengine</a> ::
39 Class&nbsp;CredentialsProperty
40 </span>
41 </td>
42 <td>
43 <table cellpadding="0" cellspacing="0">
44 <!-- hide/show private -->
45 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
46 onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
47 <tr><td align="right"><span class="options"
48 >[<a href="frames.html" target="_top">frames</a
49 >]&nbsp;|&nbsp;<a href="oauth2client.appengine.CredentialsProperty-class.html"
50 target="_top">no&nbsp;frames</a>]</span></td></tr>
51 </table>
52 </td>
53 </tr>
54</table>
55<!-- ==================== CLASS DESCRIPTION ==================== -->
56<h1 class="epydoc">Class CredentialsProperty</h1><p class="nomargin-top"><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty">source&nbsp;code</a></span></p>
57<center>
Joe Gregorio37802c32013-08-06 12:24:05 -040058<center> <map id="uml_class_diagram_for_oauth2cl_5" name="uml_class_diagram_for_oauth2cl_5">
59<area shape="rect" id="node111" href="oauth2client.appengine.CredentialsProperty-class.html#data_type" title="str(object) &#45;&gt; string" alt="" coords="255,271,529,289"/>
60<area shape="rect" id="node111" href="oauth2client.appengine.CredentialsProperty-class.html#get_value_for_datastore" title="Datastore representation of this property." alt="" coords="255,292,529,311"/>
61<area shape="rect" id="node111" href="oauth2client.appengine.CredentialsProperty-class.html#make_value_from_datastore" title="Native representation of this property." alt="" coords="255,311,529,329"/>
62<area shape="rect" id="node111" href="oauth2client.appengine.CredentialsProperty-class.html#validate" title="Assert that provided value is compatible with this property." alt="" coords="255,329,529,348"/>
63<area shape="rect" id="node1" href="oauth2client.appengine.CredentialsProperty-class.html" title="App Engine datastore Property for Credentials." alt="" coords="243,246,541,354"/>
64<area shape="rect" id="node112" href="javascript:void(0);" title="google.appengine.ext.db.Property.creation_counter" alt="" coords="17,31,765,49"/>
65<area shape="rect" id="node112" href="javascript:void(0);" title="Initializes this Property with the given options." alt="" coords="17,52,765,71"/>
66<area shape="rect" id="node112" href="javascript:void(0);" title="Configure property, connecting it to its model." alt="" coords="17,71,765,89"/>
67<area shape="rect" id="node112" href="javascript:void(0);" title="Returns the value for this property on the given model instance." alt="" coords="17,89,765,108"/>
68<area shape="rect" id="node112" href="javascript:void(0);" title="Sets the value for this property on the given model instance." alt="" coords="17,108,765,127"/>
69<area shape="rect" id="node112" href="javascript:void(0);" title="Default value for unassigned values." alt="" coords="17,127,765,145"/>
70<area shape="rect" id="node112" href="javascript:void(0);" title="Determine if value is empty in the context of this property." alt="" coords="17,145,765,164"/>
71<area shape="rect" id="node112" href="javascript:void(0);" title="Determine new value for auto&#45;updated property." alt="" coords="17,164,765,183"/>
72<area shape="rect" id="node112" href="javascript:void(0);" title="google.appengine.ext.db.Property.make_value_from_datastore_index_value" alt="" coords="17,183,765,201"/>
73<area shape="rect" id="node112" href="javascript:void(0);" title="Deprecated backwards&#45;compatible accessor method for self.data_type." alt="" coords="17,201,765,220"/>
74<area shape="rect" id="node2" href="javascript:void(0);" title="A Property is an attribute of a Model." alt="" coords="5,6,776,226"/>
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -040075</map>
Joe Gregorio37802c32013-08-06 12:24:05 -040076 <img src="uml_class_diagram_for_oauth2cl_5.gif" alt='' usemap="#uml_class_diagram_for_oauth2cl_5" ismap="ismap" class="graph-without-title" />
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -040077</center>
78</center>
79<hr />
80<pre class="literalblock">
81App Engine datastore Property for Credentials.
82
83Utility property that allows easy storage and retrieval of
84oath2client.Credentials
85
86</pre>
87
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -040088<!-- ==================== INSTANCE METHODS ==================== -->
89<a name="section-InstanceMethods"></a>
90<table class="summary" border="1" cellpadding="3"
91 cellspacing="0" width="100%" bgcolor="white">
92<tr bgcolor="#70b0f0" class="table-header">
93 <td colspan="2" class="table-header">
94 <table border="0" cellpadding="0" cellspacing="0" width="100%">
95 <tr valign="top">
96 <td align="left"><span class="table-header">Instance Methods</span></td>
97 <td align="right" valign="top"
98 ><span class="options">[<a href="#section-InstanceMethods"
99 class="privatelink" onclick="toggle_private();"
100 >hide private</a>]</span></td>
101 </tr>
102 </table>
103 </td>
104</tr>
105<tr>
106 <td width="15%" align="right" valign="top" class="summary">
107 <span class="summary-type">&nbsp;</span>
108 </td><td class="summary">
109 <table width="100%" cellpadding="0" cellspacing="0" border="0">
110 <tr>
Joe Gregorio41be8e82013-03-07 10:31:47 -0500111 <td><span class="summary-sig"><a href="oauth2client.appengine.CredentialsProperty-class.html#get_value_for_datastore" class="summary-sig-name">get_value_for_datastore</a>(<span class="summary-sig-arg">self</span>,
112 <span class="summary-sig-arg">model_instance</span>)</span><br />
113 Datastore representation of this property.</td>
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -0400114 <td align="right" valign="top">
115 <span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.get_value_for_datastore">source&nbsp;code</a></span>
116
117 </td>
118 </tr>
119 </table>
120
121 </td>
122 </tr>
123<tr>
124 <td width="15%" align="right" valign="top" class="summary">
125 <span class="summary-type">&nbsp;</span>
126 </td><td class="summary">
127 <table width="100%" cellpadding="0" cellspacing="0" border="0">
128 <tr>
Joe Gregorio41be8e82013-03-07 10:31:47 -0500129 <td><span class="summary-sig"><a href="oauth2client.appengine.CredentialsProperty-class.html#make_value_from_datastore" class="summary-sig-name">make_value_from_datastore</a>(<span class="summary-sig-arg">self</span>,
130 <span class="summary-sig-arg">value</span>)</span><br />
131 Native representation of this property.</td>
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -0400132 <td align="right" valign="top">
133 <span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.make_value_from_datastore">source&nbsp;code</a></span>
134
135 </td>
136 </tr>
137 </table>
138
139 </td>
140 </tr>
141<tr>
142 <td width="15%" align="right" valign="top" class="summary">
143 <span class="summary-type">&nbsp;</span>
144 </td><td class="summary">
145 <table width="100%" cellpadding="0" cellspacing="0" border="0">
146 <tr>
Joe Gregorio41be8e82013-03-07 10:31:47 -0500147 <td><span class="summary-sig"><a href="oauth2client.appengine.CredentialsProperty-class.html#validate" class="summary-sig-name">validate</a>(<span class="summary-sig-arg">self</span>,
148 <span class="summary-sig-arg">value</span>)</span><br />
149 Assert that provided value is compatible with this property.</td>
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -0400150 <td align="right" valign="top">
151 <span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.validate">source&nbsp;code</a></span>
152
153 </td>
154 </tr>
155 </table>
156
157 </td>
158 </tr>
Joe Gregorio41be8e82013-03-07 10:31:47 -0500159 <tr>
160 <td colspan="2" class="summary">
161 <p class="indent-wrapped-lines"><b>Inherited from <code>google.appengine.ext.db.Property</code></b>:
162 <code>__get__</code>,
163 <code>__init__</code>,
164 <code>__property_config__</code>,
165 <code>__set__</code>,
166 <code>datastore_type</code>,
167 <code>default_value</code>,
168 <code>empty</code>,
169 <code>get_updated_value_for_datastore</code>,
170 <code>make_value_from_datastore_index_value</code>
171 </p>
172 <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>google.appengine.ext.db.Property</code></b> (private):
173 <code>_attr_name</code>,
174 <code>_require_parameter</code>
175 </p></div>
176 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
177 <code>__delattr__</code>,
178 <code>__format__</code>,
179 <code>__getattribute__</code>,
180 <code>__hash__</code>,
181 <code>__new__</code>,
182 <code>__reduce__</code>,
183 <code>__reduce_ex__</code>,
184 <code>__repr__</code>,
185 <code>__setattr__</code>,
186 <code>__sizeof__</code>,
187 <code>__str__</code>,
188 <code>__subclasshook__</code>
189 </p>
190 </td>
191 </tr>
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -0400192</table>
193<!-- ==================== CLASS VARIABLES ==================== -->
194<a name="section-ClassVariables"></a>
195<table class="summary" border="1" cellpadding="3"
196 cellspacing="0" width="100%" bgcolor="white">
197<tr bgcolor="#70b0f0" class="table-header">
198 <td colspan="2" class="table-header">
199 <table border="0" cellpadding="0" cellspacing="0" width="100%">
200 <tr valign="top">
201 <td align="left"><span class="table-header">Class Variables</span></td>
202 <td align="right" valign="top"
203 ><span class="options">[<a href="#section-ClassVariables"
204 class="privatelink" onclick="toggle_private();"
205 >hide private</a>]</span></td>
206 </tr>
207 </table>
208 </td>
209</tr>
Joe Gregoriof4839b02012-09-06 13:47:24 -0400210<tr>
211 <td width="15%" align="right" valign="top" class="summary">
212 <span class="summary-type">&nbsp;</span>
213 </td><td class="summary">
Joe Gregorio41be8e82013-03-07 10:31:47 -0500214 <a name="data_type"></a><span class="summary-name">data_type</span> = <code title="Credentials">Credentials</code><br />
215 str(object) -&gt; string
216 </td>
217 </tr>
218 <tr>
219 <td colspan="2" class="summary">
220 <p class="indent-wrapped-lines"><b>Inherited from <code>google.appengine.ext.db.Property</code></b>:
221 <code>creation_counter</code>
222 </p>
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -0400223 </td>
224 </tr>
225</table>
Joe Gregorio41be8e82013-03-07 10:31:47 -0500226<!-- ==================== PROPERTIES ==================== -->
227<a name="section-Properties"></a>
228<table class="summary" border="1" cellpadding="3"
229 cellspacing="0" width="100%" bgcolor="white">
230<tr bgcolor="#70b0f0" class="table-header">
231 <td colspan="2" class="table-header">
232 <table border="0" cellpadding="0" cellspacing="0" width="100%">
233 <tr valign="top">
234 <td align="left"><span class="table-header">Properties</span></td>
235 <td align="right" valign="top"
236 ><span class="options">[<a href="#section-Properties"
237 class="privatelink" onclick="toggle_private();"
238 >hide private</a>]</span></td>
239 </tr>
240 </table>
241 </td>
242</tr>
243 <tr>
244 <td colspan="2" class="summary">
245 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
246 <code>__class__</code>
247 </p>
248 </td>
249 </tr>
250</table>
251<!-- ==================== METHOD DETAILS ==================== -->
252<a name="section-MethodDetails"></a>
253<table class="details" border="1" cellpadding="3"
254 cellspacing="0" width="100%" bgcolor="white">
255<tr bgcolor="#70b0f0" class="table-header">
256 <td colspan="2" class="table-header">
257 <table border="0" cellpadding="0" cellspacing="0" width="100%">
258 <tr valign="top">
259 <td align="left"><span class="table-header">Method Details</span></td>
260 <td align="right" valign="top"
261 ><span class="options">[<a href="#section-MethodDetails"
262 class="privatelink" onclick="toggle_private();"
263 >hide private</a>]</span></td>
264 </tr>
265 </table>
266 </td>
267</tr>
268</table>
269<a name="get_value_for_datastore"></a>
270<div>
271<table class="details" border="1" cellpadding="3"
272 cellspacing="0" width="100%" bgcolor="white">
273<tr><td>
274 <table width="100%" cellpadding="0" cellspacing="0" border="0">
275 <tr valign="top"><td>
276 <h3 class="epydoc"><span class="sig"><span class="sig-name">get_value_for_datastore</span>(<span class="sig-arg">self</span>,
277 <span class="sig-arg">model_instance</span>)</span>
278 </h3>
279 </td><td align="right" valign="top"
280 ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.get_value_for_datastore">source&nbsp;code</a></span>&nbsp;
281 </td>
282 </tr></table>
283
284 <pre class="literalblock">
285Datastore representation of this property.
286
287Looks for this property in the given model instance, and returns the proper
288datastore representation of the value that can be stored in a datastore
289entity. Most critically, it will fetch the datastore key value for
290reference properties.
291
292Some properies (e.g. DateTimeProperty, UserProperty) optionally update their
293value on every put(). This call must return the current value for such
294properties (get_updated_value_for_datastore returns the new value).
295
296Args:
297 model_instance: Instance to fetch datastore value from.
298
299Returns:
300 Datastore representation of the model value in a form that is
301 appropriate for storing in the datastore.
302
303</pre>
304 <dl class="fields">
305 <dt>Overrides:
306 google.appengine.ext.db.Property.get_value_for_datastore
307 <dd><em class="note">(inherited documentation)</em></dd>
308 </dt>
309 </dl>
310</td></tr></table>
311</div>
312<a name="make_value_from_datastore"></a>
313<div>
314<table class="details" border="1" cellpadding="3"
315 cellspacing="0" width="100%" bgcolor="white">
316<tr><td>
317 <table width="100%" cellpadding="0" cellspacing="0" border="0">
318 <tr valign="top"><td>
319 <h3 class="epydoc"><span class="sig"><span class="sig-name">make_value_from_datastore</span>(<span class="sig-arg">self</span>,
320 <span class="sig-arg">value</span>)</span>
321 </h3>
322 </td><td align="right" valign="top"
323 ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.make_value_from_datastore">source&nbsp;code</a></span>&nbsp;
324 </td>
325 </tr></table>
326
327 <pre class="literalblock">
328Native representation of this property.
329
330Given a value retrieved from a datastore entity, return a value,
331possibly converted, to be stored on the model instance. Usually
332this returns the value unchanged, but a property class may
333override this when it uses a different datatype on the model
334instance than on the entity.
335
336This API is not quite symmetric with get_value_for_datastore(),
337because the model instance on which to store the converted value
338may not exist yet -- we may be collecting values to be passed to a
339model constructor.
340
341Args:
342 value: value retrieved from the datastore entity.
343
344Returns:
345 The value converted for use as a model instance attribute.
346
347</pre>
348 <dl class="fields">
349 <dt>Overrides:
350 google.appengine.ext.db.Property.make_value_from_datastore
351 <dd><em class="note">(inherited documentation)</em></dd>
352 </dt>
353 </dl>
354</td></tr></table>
355</div>
356<a name="validate"></a>
357<div>
358<table class="details" border="1" cellpadding="3"
359 cellspacing="0" width="100%" bgcolor="white">
360<tr><td>
361 <table width="100%" cellpadding="0" cellspacing="0" border="0">
362 <tr valign="top"><td>
363 <h3 class="epydoc"><span class="sig"><span class="sig-name">validate</span>(<span class="sig-arg">self</span>,
364 <span class="sig-arg">value</span>)</span>
365 </h3>
366 </td><td align="right" valign="top"
367 ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.validate">source&nbsp;code</a></span>&nbsp;
368 </td>
369 </tr></table>
370
371 <pre class="literalblock">
372Assert that provided value is compatible with this property.
373
374Args:
375 value: Value to validate against this Property.
376
377Returns:
378 A valid value, either the input unchanged or adapted to the
379 required type.
380
381Raises:
382 BadValueError if the value is not appropriate for this
383 property in any way.
384
385</pre>
386 <dl class="fields">
387 <dt>Overrides:
388 google.appengine.ext.db.Property.validate
389 <dd><em class="note">(inherited documentation)</em></dd>
390 </dt>
391 </dl>
392</td></tr></table>
393</div>
394<br />
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -0400395<!-- ==================== NAVIGATION BAR ==================== -->
396<table class="navbar" border="0" width="100%" cellpadding="0"
397 bgcolor="#a0c0ff" cellspacing="0">
398 <tr valign="middle">
399
400 <!-- Tree link -->
401 <th>&nbsp;&nbsp;&nbsp;<a
402 href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
403
404 <!-- Index link -->
405 <th>&nbsp;&nbsp;&nbsp;<a
406 href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
407
408 <!-- Help link -->
409 <th>&nbsp;&nbsp;&nbsp;<a
410 href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
411
412 <th class="navbar" width="100%"></th>
413 </tr>
414</table>
415<table border="0" cellpadding="0" cellspacing="0" width="100%%">
416 <tr>
417 <td align="left" class="footer">
Joe Gregorio37802c32013-08-06 12:24:05 -0400418 Generated by Epydoc 3.0.1 on Tue Aug 6 12:16:44 2013
Joe Gregorio5dc0f5c2012-06-05 13:34:31 -0400419 </td>
420 <td align="right" class="footer">
421 <a target="mainFrame" href="http://epydoc.sourceforge.net"
422 >http://epydoc.sourceforge.net</a>
423 </td>
424 </tr>
425</table>
426
427<script type="text/javascript">
428 <!--
429 // Private objects are initially displayed (because if
430 // javascript is turned off then we want them to be
431 // visible); but by default, we want to hide them. So hide
432 // them unless we have a cookie that says to show them.
433 checkCookie();
434 // -->
435</script>
436</body>
437</html>