PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 3.2.2
ShareThis Dashboard for Google Analytics v3.2.2
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / lib / analytics-admin / vendor / google / protobuf / src / Google / Protobuf / Duration.php
googleanalytics / lib / analytics-admin / vendor / google / protobuf / src / Google / Protobuf Last commit date
Field 3 years ago Internal 2 years ago Any.php 2 years ago Api.php 3 years ago BoolValue.php 3 years ago BytesValue.php 3 years ago Descriptor.php 2 years ago DescriptorPool.php 2 years ago DoubleValue.php 3 years ago Duration.php 3 years ago Enum.php 3 years ago EnumDescriptor.php 2 years ago EnumValue.php 3 years ago EnumValueDescriptor.php 2 years ago Field.php 3 years ago FieldDescriptor.php 2 years ago FieldMask.php 3 years ago Field_Cardinality.php 3 years ago Field_Kind.php 3 years ago FloatValue.php 3 years ago GPBEmpty.php 3 years ago Int32Value.php 3 years ago Int64Value.php 3 years ago ListValue.php 3 years ago Method.php 3 years ago Mixin.php 3 years ago NullValue.php 3 years ago OneofDescriptor.php 2 years ago Option.php 3 years ago SourceContext.php 3 years ago StringValue.php 3 years ago Struct.php 3 years ago Syntax.php 3 years ago Timestamp.php 3 years ago Type.php 3 years ago UInt32Value.php 3 years ago UInt64Value.php 3 years ago Value.php 3 years ago
Duration.php
174 lines
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: google/protobuf/duration.proto
4
5 namespace Google\Protobuf;
6
7 use Google\Protobuf\Internal\GPBType;
8 use Google\Protobuf\Internal\RepeatedField;
9 use Google\Protobuf\Internal\GPBUtil;
10
11 /**
12 * A Duration represents a signed, fixed-length span of time represented
13 * as a count of seconds and fractions of seconds at nanosecond
14 * resolution. It is independent of any calendar and concepts like "day"
15 * or "month". It is related to Timestamp in that the difference between
16 * two Timestamp values is a Duration and it can be added or subtracted
17 * from a Timestamp. Range is approximately +-10,000 years.
18 * # Examples
19 * Example 1: Compute Duration from two Timestamps in pseudo code.
20 * Timestamp start = ...;
21 * Timestamp end = ...;
22 * Duration duration = ...;
23 * duration.seconds = end.seconds - start.seconds;
24 * duration.nanos = end.nanos - start.nanos;
25 * if (duration.seconds < 0 && duration.nanos > 0) {
26 * duration.seconds += 1;
27 * duration.nanos -= 1000000000;
28 * } else if (duration.seconds > 0 && duration.nanos < 0) {
29 * duration.seconds -= 1;
30 * duration.nanos += 1000000000;
31 * }
32 * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
33 * Timestamp start = ...;
34 * Duration duration = ...;
35 * Timestamp end = ...;
36 * end.seconds = start.seconds + duration.seconds;
37 * end.nanos = start.nanos + duration.nanos;
38 * if (end.nanos < 0) {
39 * end.seconds -= 1;
40 * end.nanos += 1000000000;
41 * } else if (end.nanos >= 1000000000) {
42 * end.seconds += 1;
43 * end.nanos -= 1000000000;
44 * }
45 * Example 3: Compute Duration from datetime.timedelta in Python.
46 * td = datetime.timedelta(days=3, minutes=10)
47 * duration = Duration()
48 * duration.FromTimedelta(td)
49 * # JSON Mapping
50 * In JSON format, the Duration type is encoded as a string rather than an
51 * object, where the string ends in the suffix "s" (indicating seconds) and
52 * is preceded by the number of seconds, with nanoseconds expressed as
53 * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
54 * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
55 * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
56 * microsecond should be expressed in JSON format as "3.000001s".
57 *
58 * Generated from protobuf message <code>google.protobuf.Duration</code>
59 */
60 class Duration extends \Google\Protobuf\Internal\Message
61 {
62 /**
63 * Signed seconds of the span of time. Must be from -315,576,000,000
64 * to +315,576,000,000 inclusive. Note: these bounds are computed from:
65 * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
66 *
67 * Generated from protobuf field <code>int64 seconds = 1;</code>
68 */
69 protected $seconds = 0;
70 /**
71 * Signed fractions of a second at nanosecond resolution of the span
72 * of time. Durations less than one second are represented with a 0
73 * `seconds` field and a positive or negative `nanos` field. For durations
74 * of one second or more, a non-zero value for the `nanos` field must be
75 * of the same sign as the `seconds` field. Must be from -999,999,999
76 * to +999,999,999 inclusive.
77 *
78 * Generated from protobuf field <code>int32 nanos = 2;</code>
79 */
80 protected $nanos = 0;
81
82 /**
83 * Constructor.
84 *
85 * @param array $data {
86 * Optional. Data for populating the Message object.
87 *
88 * @type int|string $seconds
89 * Signed seconds of the span of time. Must be from -315,576,000,000
90 * to +315,576,000,000 inclusive. Note: these bounds are computed from:
91 * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
92 * @type int $nanos
93 * Signed fractions of a second at nanosecond resolution of the span
94 * of time. Durations less than one second are represented with a 0
95 * `seconds` field and a positive or negative `nanos` field. For durations
96 * of one second or more, a non-zero value for the `nanos` field must be
97 * of the same sign as the `seconds` field. Must be from -999,999,999
98 * to +999,999,999 inclusive.
99 * }
100 */
101 public function __construct($data = NULL) {
102 \GPBMetadata\Google\Protobuf\Duration::initOnce();
103 parent::__construct($data);
104 }
105
106 /**
107 * Signed seconds of the span of time. Must be from -315,576,000,000
108 * to +315,576,000,000 inclusive. Note: these bounds are computed from:
109 * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
110 *
111 * Generated from protobuf field <code>int64 seconds = 1;</code>
112 * @return int|string
113 */
114 public function getSeconds()
115 {
116 return $this->seconds;
117 }
118
119 /**
120 * Signed seconds of the span of time. Must be from -315,576,000,000
121 * to +315,576,000,000 inclusive. Note: these bounds are computed from:
122 * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
123 *
124 * Generated from protobuf field <code>int64 seconds = 1;</code>
125 * @param int|string $var
126 * @return $this
127 */
128 public function setSeconds($var)
129 {
130 GPBUtil::checkInt64($var);
131 $this->seconds = $var;
132
133 return $this;
134 }
135
136 /**
137 * Signed fractions of a second at nanosecond resolution of the span
138 * of time. Durations less than one second are represented with a 0
139 * `seconds` field and a positive or negative `nanos` field. For durations
140 * of one second or more, a non-zero value for the `nanos` field must be
141 * of the same sign as the `seconds` field. Must be from -999,999,999
142 * to +999,999,999 inclusive.
143 *
144 * Generated from protobuf field <code>int32 nanos = 2;</code>
145 * @return int
146 */
147 public function getNanos()
148 {
149 return $this->nanos;
150 }
151
152 /**
153 * Signed fractions of a second at nanosecond resolution of the span
154 * of time. Durations less than one second are represented with a 0
155 * `seconds` field and a positive or negative `nanos` field. For durations
156 * of one second or more, a non-zero value for the `nanos` field must be
157 * of the same sign as the `seconds` field. Must be from -999,999,999
158 * to +999,999,999 inclusive.
159 *
160 * Generated from protobuf field <code>int32 nanos = 2;</code>
161 * @param int $var
162 * @return $this
163 */
164 public function setNanos($var)
165 {
166 GPBUtil::checkInt32($var);
167 $this->nanos = $var;
168
169 return $this;
170 }
171
172 }
173
174