google-cloud-asset 0.8.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +272 -0
  6. data/README.md +36 -24
  7. data/lib/{google/cloud/asset/v1/doc/google/protobuf/empty.rb → google-cloud-asset.rb} +4 -14
  8. data/lib/google/cloud/asset.rb +76 -116
  9. data/lib/google/cloud/asset/version.rb +1 -1
  10. metadata +73 -78
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/asset/v1.rb +0 -146
  13. data/lib/google/cloud/asset/v1/asset_service_client.rb +0 -669
  14. data/lib/google/cloud/asset/v1/asset_service_client_config.json +0 -61
  15. data/lib/google/cloud/asset/v1/asset_service_pb.rb +0 -123
  16. data/lib/google/cloud/asset/v1/asset_service_services_pb.rb +0 -69
  17. data/lib/google/cloud/asset/v1/assets_pb.rb +0 -51
  18. data/lib/google/cloud/asset/v1/credentials.rb +0 -41
  19. data/lib/google/cloud/asset/v1/doc/google/cloud/asset/v1/asset_service.rb +0 -295
  20. data/lib/google/cloud/asset/v1/doc/google/cloud/asset/v1/assets.rb +0 -116
  21. data/lib/google/cloud/asset/v1/doc/google/iam/v1/policy.rb +0 -151
  22. data/lib/google/cloud/asset/v1/doc/google/longrunning/operations.rb +0 -51
  23. data/lib/google/cloud/asset/v1/doc/google/protobuf/any.rb +0 -131
  24. data/lib/google/cloud/asset/v1/doc/google/protobuf/field_mask.rb +0 -222
  25. data/lib/google/cloud/asset/v1/doc/google/protobuf/struct.rb +0 -74
  26. data/lib/google/cloud/asset/v1/doc/google/protobuf/timestamp.rb +0 -113
  27. data/lib/google/cloud/asset/v1/doc/google/rpc/status.rb +0 -39
  28. data/lib/google/cloud/asset/v1/doc/google/type/expr.rb +0 -45
  29. data/lib/google/cloud/asset/v1/helpers.rb +0 -39
  30. data/lib/google/cloud/asset/v1beta1.rb +0 -146
  31. data/lib/google/cloud/asset/v1beta1/asset_service_client.rb +0 -400
  32. data/lib/google/cloud/asset/v1beta1/asset_service_client_config.json +0 -36
  33. data/lib/google/cloud/asset/v1beta1/asset_service_pb.rb +0 -67
  34. data/lib/google/cloud/asset/v1beta1/asset_service_services_pb.rb +0 -59
  35. data/lib/google/cloud/asset/v1beta1/assets_pb.rb +0 -50
  36. data/lib/google/cloud/asset/v1beta1/credentials.rb +0 -41
  37. data/lib/google/cloud/asset/v1beta1/doc/google/cloud/asset/v1beta1/asset_service.rb +0 -140
  38. data/lib/google/cloud/asset/v1beta1/doc/google/cloud/asset/v1beta1/assets.rb +0 -108
  39. data/lib/google/cloud/asset/v1beta1/doc/google/iam/v1/policy.rb +0 -151
  40. data/lib/google/cloud/asset/v1beta1/doc/google/longrunning/operations.rb +0 -51
  41. data/lib/google/cloud/asset/v1beta1/doc/google/protobuf/any.rb +0 -131
  42. data/lib/google/cloud/asset/v1beta1/doc/google/protobuf/struct.rb +0 -74
  43. data/lib/google/cloud/asset/v1beta1/doc/google/protobuf/timestamp.rb +0 -113
  44. data/lib/google/cloud/asset/v1beta1/doc/google/rpc/status.rb +0 -39
  45. data/lib/google/cloud/asset/v1beta1/doc/google/type/expr.rb +0 -45
  46. data/lib/google/cloud/asset/v1beta1/helpers.rb +0 -31
  47. data/lib/google/cloud/orgpolicy/v1/doc/google/cloud/orgpolicy/v1/orgpolicy.rb +0 -308
  48. data/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb +0 -55
@@ -1,151 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Iam
18
- module V1
19
- # Defines an Identity and Access Management (IAM) policy. It is used to
20
- # specify access control policies for Cloud Platform resources.
21
- #
22
- #
23
- # A `Policy` is a collection of `bindings`. A `binding` binds one or more
24
- # `members` to a single `role`. Members can be user accounts, service accounts,
25
- # Google groups, and domains (such as G Suite). A `role` is a named list of
26
- # permissions (defined by IAM or configured by users). A `binding` can
27
- # optionally specify a `condition`, which is a logic expression that further
28
- # constrains the role binding based on attributes about the request and/or
29
- # target resource.
30
- #
31
- # **JSON Example**
32
- #
33
- # {
34
- # "bindings": [
35
- # {
36
- # "role": "roles/resourcemanager.organizationAdmin",
37
- # "members": [
38
- # "user:mike@example.com",
39
- # "group:admins@example.com",
40
- # "domain:google.com",
41
- # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
42
- # ]
43
- # },
44
- # {
45
- # "role": "roles/resourcemanager.organizationViewer",
46
- # "members": ["user:eve@example.com"],
47
- # "condition": {
48
- # "title": "expirable access",
49
- # "description": "Does not grant access after Sep 2020",
50
- # "expression": "request.time <
51
- # timestamp('2020-10-01T00:00:00.000Z')",
52
- # }
53
- # }
54
- # ]
55
- # }
56
- #
57
- # **YAML Example**
58
- #
59
- # bindings:
60
- # * members:
61
- # * user:mike@example.com
62
- # * group:admins@example.com
63
- # * domain:google.com
64
- # * serviceAccount:my-project-id@appspot.gserviceaccount.com
65
- # role: roles/resourcemanager.organizationAdmin
66
- # * members:
67
- # * user:eve@example.com
68
- # role: roles/resourcemanager.organizationViewer
69
- # condition:
70
- # title: expirable access
71
- # description: Does not grant access after Sep 2020
72
- # expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
73
- #
74
- # For a description of IAM and its features, see the
75
- # [IAM developer's guide](https://cloud.google.com/iam/docs).
76
- # @!attribute [rw] version
77
- # @return [Integer]
78
- # Specifies the format of the policy.
79
- #
80
- # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
81
- # rejected.
82
- #
83
- # Operations affecting conditional bindings must specify version 3. This can
84
- # be either setting a conditional policy, modifying a conditional binding,
85
- # or removing a binding (conditional or unconditional) from the stored
86
- # conditional policy.
87
- # Operations on non-conditional policies may specify any valid value or
88
- # leave the field unset.
89
- #
90
- # If no etag is provided in the call to `setIamPolicy`, version compliance
91
- # checks against the stored policy is skipped.
92
- # @!attribute [rw] bindings
93
- # @return [Array<Google::Iam::V1::Binding>]
94
- # Associates a list of `members` to a `role`. Optionally may specify a
95
- # `condition` that determines when binding is in effect.
96
- # `bindings` with no members will result in an error.
97
- # @!attribute [rw] etag
98
- # @return [String]
99
- # `etag` is used for optimistic concurrency control as a way to help
100
- # prevent simultaneous updates of a policy from overwriting each other.
101
- # It is strongly suggested that systems make use of the `etag` in the
102
- # read-modify-write cycle to perform policy updates in order to avoid race
103
- # conditions: An `etag` is returned in the response to `getIamPolicy`, and
104
- # systems are expected to put that etag in the request to `setIamPolicy` to
105
- # ensure that their change will be applied to the same version of the policy.
106
- #
107
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing
108
- # policy is overwritten. Due to blind-set semantics of an etag-less policy,
109
- # 'setIamPolicy' will not fail even if the incoming policy version does not
110
- # meet the requirements for modifying the stored policy.
111
- class Policy; end
112
-
113
- # Associates `members` with a `role`.
114
- # @!attribute [rw] role
115
- # @return [String]
116
- # Role that is assigned to `members`.
117
- # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
118
- # @!attribute [rw] members
119
- # @return [Array<String>]
120
- # Specifies the identities requesting access for a Cloud Platform resource.
121
- # `members` can have the following values:
122
- #
123
- # * `allUsers`: A special identifier that represents anyone who is
124
- # on the internet; with or without a Google account.
125
- #
126
- # * `allAuthenticatedUsers`: A special identifier that represents anyone
127
- # who is authenticated with a Google account or a service account.
128
- #
129
- # * `user:{emailid}`: An email address that represents a specific Google
130
- # account. For example, `alice@example.com` .
131
- #
132
- #
133
- # * `serviceAccount:{emailid}`: An email address that represents a service
134
- # account. For example, `my-other-app@appspot.gserviceaccount.com`.
135
- #
136
- # * `group:{emailid}`: An email address that represents a Google group.
137
- # For example, `admins@example.com`.
138
- #
139
- #
140
- # * `domain:{domain}`: The G Suite domain (primary) that represents all the
141
- # users of that domain. For example, `google.com` or `example.com`.
142
- # @!attribute [rw] condition
143
- # @return [Google::Type::Expr]
144
- # The condition that is associated with this binding.
145
- # NOTE: An unsatisfied condition will not allow user access via current
146
- # binding. Different bindings, including their conditions, are examined
147
- # independently.
148
- class Binding; end
149
- end
150
- end
151
- end
@@ -1,51 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Longrunning
18
- # This resource represents a long-running operation that is the result of a
19
- # network API call.
20
- # @!attribute [rw] name
21
- # @return [String]
22
- # The server-assigned name, which is only unique within the same service that
23
- # originally returns it. If you use the default HTTP mapping, the
24
- # `name` should be a resource name ending with `operations/{unique_id}`.
25
- # @!attribute [rw] metadata
26
- # @return [Google::Protobuf::Any]
27
- # Service-specific metadata associated with the operation. It typically
28
- # contains progress information and common metadata such as create time.
29
- # Some services might not provide such metadata. Any method that returns a
30
- # long-running operation should document the metadata type, if any.
31
- # @!attribute [rw] done
32
- # @return [true, false]
33
- # If the value is `false`, it means the operation is still in progress.
34
- # If `true`, the operation is completed, and either `error` or `response` is
35
- # available.
36
- # @!attribute [rw] error
37
- # @return [Google::Rpc::Status]
38
- # The error result of the operation in case of failure or cancellation.
39
- # @!attribute [rw] response
40
- # @return [Google::Protobuf::Any]
41
- # The normal response of the operation in case of success. If the original
42
- # method returns no data on success, such as `Delete`, the response is
43
- # `google.protobuf.Empty`. If the original method is standard
44
- # `Get`/`Create`/`Update`, the response should be the resource. For other
45
- # methods, the response should have the type `XxxResponse`, where `Xxx`
46
- # is the original method name. For example, if the original method name
47
- # is `TakeSnapshot()`, the inferred response type is
48
- # `TakeSnapshotResponse`.
49
- class Operation; end
50
- end
51
- end
@@ -1,131 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Protobuf
18
- # `Any` contains an arbitrary serialized protocol buffer message along with a
19
- # URL that describes the type of the serialized message.
20
- #
21
- # Protobuf library provides support to pack/unpack Any values in the form
22
- # of utility functions or additional generated methods of the Any type.
23
- #
24
- # Example 1: Pack and unpack a message in C++.
25
- #
26
- # Foo foo = ...;
27
- # Any any;
28
- # any.PackFrom(foo);
29
- # ...
30
- # if (any.UnpackTo(&foo)) {
31
- # ...
32
- # }
33
- #
34
- # Example 2: Pack and unpack a message in Java.
35
- #
36
- # Foo foo = ...;
37
- # Any any = Any.pack(foo);
38
- # ...
39
- # if (any.is(Foo.class)) {
40
- # foo = any.unpack(Foo.class);
41
- # }
42
- #
43
- # Example 3: Pack and unpack a message in Python.
44
- #
45
- # foo = Foo(...)
46
- # any = Any()
47
- # any.Pack(foo)
48
- # ...
49
- # if any.Is(Foo.DESCRIPTOR):
50
- # any.Unpack(foo)
51
- # ...
52
- #
53
- # Example 4: Pack and unpack a message in Go
54
- #
55
- # foo := &pb.Foo{...}
56
- # any, err := ptypes.MarshalAny(foo)
57
- # ...
58
- # foo := &pb.Foo{}
59
- # if err := ptypes.UnmarshalAny(any, foo); err != nil {
60
- # ...
61
- # }
62
- #
63
- # The pack methods provided by protobuf library will by default use
64
- # 'type.googleapis.com/full.type.name' as the type URL and the unpack
65
- # methods only use the fully qualified type name after the last '/'
66
- # in the type URL, for example "foo.bar.com/x/y.z" will yield type
67
- # name "y.z".
68
- #
69
- #
70
- # = JSON
71
- #
72
- # The JSON representation of an `Any` value uses the regular
73
- # representation of the deserialized, embedded message, with an
74
- # additional field `@type` which contains the type URL. Example:
75
- #
76
- # package google.profile;
77
- # message Person {
78
- # string first_name = 1;
79
- # string last_name = 2;
80
- # }
81
- #
82
- # {
83
- # "@type": "type.googleapis.com/google.profile.Person",
84
- # "firstName": <string>,
85
- # "lastName": <string>
86
- # }
87
- #
88
- # If the embedded message type is well-known and has a custom JSON
89
- # representation, that representation will be embedded adding a field
90
- # `value` which holds the custom JSON in addition to the `@type`
91
- # field. Example (for message {Google::Protobuf::Duration}):
92
- #
93
- # {
94
- # "@type": "type.googleapis.com/google.protobuf.Duration",
95
- # "value": "1.212s"
96
- # }
97
- # @!attribute [rw] type_url
98
- # @return [String]
99
- # A URL/resource name that uniquely identifies the type of the serialized
100
- # protocol buffer message. This string must contain at least
101
- # one "/" character. The last segment of the URL's path must represent
102
- # the fully qualified name of the type (as in
103
- # `path/google.protobuf.Duration`). The name should be in a canonical form
104
- # (e.g., leading "." is not accepted).
105
- #
106
- # In practice, teams usually precompile into the binary all types that they
107
- # expect it to use in the context of Any. However, for URLs which use the
108
- # scheme `http`, `https`, or no scheme, one can optionally set up a type
109
- # server that maps type URLs to message definitions as follows:
110
- #
111
- # * If no scheme is provided, `https` is assumed.
112
- # * An HTTP GET on the URL must yield a {Google::Protobuf::Type}
113
- # value in binary format, or produce an error.
114
- # * Applications are allowed to cache lookup results based on the
115
- # URL, or have them precompiled into a binary to avoid any
116
- # lookup. Therefore, binary compatibility needs to be preserved
117
- # on changes to types. (Use versioned type names to manage
118
- # breaking changes.)
119
- #
120
- # Note: this functionality is not currently available in the official
121
- # protobuf release, and it is not used for type URLs beginning with
122
- # type.googleapis.com.
123
- #
124
- # Schemes other than `http`, `https` (or the empty scheme) might be
125
- # used with implementation specific semantics.
126
- # @!attribute [rw] value
127
- # @return [String]
128
- # Must be a valid serialized protocol buffer of the above specified type.
129
- class Any; end
130
- end
131
- end
@@ -1,74 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Protobuf
18
- # `Struct` represents a structured data value, consisting of fields
19
- # which map to dynamically typed values. In some languages, `Struct`
20
- # might be supported by a native representation. For example, in
21
- # scripting languages like JS a struct is represented as an
22
- # object. The details of that representation are described together
23
- # with the proto support for the language.
24
- #
25
- # The JSON representation for `Struct` is JSON object.
26
- # @!attribute [rw] fields
27
- # @return [Hash{String => Google::Protobuf::Value}]
28
- # Unordered map of dynamically typed values.
29
- class Struct; end
30
-
31
- # `Value` represents a dynamically typed value which can be either
32
- # null, a number, a string, a boolean, a recursive struct value, or a
33
- # list of values. A producer of value is expected to set one of that
34
- # variants, absence of any variant indicates an error.
35
- #
36
- # The JSON representation for `Value` is JSON value.
37
- # @!attribute [rw] null_value
38
- # @return [Google::Protobuf::NullValue]
39
- # Represents a null value.
40
- # @!attribute [rw] number_value
41
- # @return [Float]
42
- # Represents a double value.
43
- # @!attribute [rw] string_value
44
- # @return [String]
45
- # Represents a string value.
46
- # @!attribute [rw] bool_value
47
- # @return [true, false]
48
- # Represents a boolean value.
49
- # @!attribute [rw] struct_value
50
- # @return [Google::Protobuf::Struct]
51
- # Represents a structured value.
52
- # @!attribute [rw] list_value
53
- # @return [Google::Protobuf::ListValue]
54
- # Represents a repeated `Value`.
55
- class Value; end
56
-
57
- # `ListValue` is a wrapper around a repeated field of values.
58
- #
59
- # The JSON representation for `ListValue` is JSON array.
60
- # @!attribute [rw] values
61
- # @return [Array<Google::Protobuf::Value>]
62
- # Repeated field of dynamically typed values.
63
- class ListValue; end
64
-
65
- # `NullValue` is a singleton enumeration to represent the null value for the
66
- # `Value` type union.
67
- #
68
- # The JSON representation for `NullValue` is JSON `null`.
69
- module NullValue
70
- # Null value.
71
- NULL_VALUE = 0
72
- end
73
- end
74
- end
@@ -1,113 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Protobuf
18
- # A Timestamp represents a point in time independent of any time zone or local
19
- # calendar, encoded as a count of seconds and fractions of seconds at
20
- # nanosecond resolution. The count is relative to an epoch at UTC midnight on
21
- # January 1, 1970, in the proleptic Gregorian calendar which extends the
22
- # Gregorian calendar backwards to year one.
23
- #
24
- # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
25
- # second table is needed for interpretation, using a [24-hour linear
26
- # smear](https://developers.google.com/time/smear).
27
- #
28
- # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
29
- # restricting to that range, we ensure that we can convert to and from [RFC
30
- # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
31
- #
32
- # = Examples
33
- #
34
- # Example 1: Compute Timestamp from POSIX `time()`.
35
- #
36
- # Timestamp timestamp;
37
- # timestamp.set_seconds(time(NULL));
38
- # timestamp.set_nanos(0);
39
- #
40
- # Example 2: Compute Timestamp from POSIX `gettimeofday()`.
41
- #
42
- # struct timeval tv;
43
- # gettimeofday(&tv, NULL);
44
- #
45
- # Timestamp timestamp;
46
- # timestamp.set_seconds(tv.tv_sec);
47
- # timestamp.set_nanos(tv.tv_usec * 1000);
48
- #
49
- # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
50
- #
51
- # FILETIME ft;
52
- # GetSystemTimeAsFileTime(&ft);
53
- # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
54
- #
55
- # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
56
- # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
57
- # Timestamp timestamp;
58
- # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
59
- # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
60
- #
61
- # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
62
- #
63
- # long millis = System.currentTimeMillis();
64
- #
65
- # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
66
- # .setNanos((int) ((millis % 1000) * 1000000)).build();
67
- #
68
- #
69
- # Example 5: Compute Timestamp from current time in Python.
70
- #
71
- # timestamp = Timestamp()
72
- # timestamp.GetCurrentTime()
73
- #
74
- # = JSON Mapping
75
- #
76
- # In JSON format, the Timestamp type is encoded as a string in the
77
- # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
78
- # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
79
- # where \\{year} is always expressed using four digits while \\{month}, \\{day},
80
- # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
81
- # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
82
- # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
83
- # is required. A proto3 JSON serializer should always use UTC (as indicated by
84
- # "Z") when printing the Timestamp type and a proto3 JSON parser should be
85
- # able to accept both UTC and other timezones (as indicated by an offset).
86
- #
87
- # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
88
- # 01:30 UTC on January 15, 2017.
89
- #
90
- # In JavaScript, one can convert a Date object to this format using the
91
- # standard
92
- # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
93
- # method. In Python, a standard `datetime.datetime` object can be converted
94
- # to this format using
95
- # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
96
- # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
97
- # the Joda Time's [`ISODateTimeFormat.dateTime()`](
98
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
99
- # ) to obtain a formatter capable of generating timestamps in this format.
100
- # @!attribute [rw] seconds
101
- # @return [Integer]
102
- # Represents seconds of UTC time since Unix epoch
103
- # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
104
- # 9999-12-31T23:59:59Z inclusive.
105
- # @!attribute [rw] nanos
106
- # @return [Integer]
107
- # Non-negative fractions of a second at nanosecond resolution. Negative
108
- # second values with fractions must still have non-negative nanos values
109
- # that count forward in time. Must be from 0 to 999,999,999
110
- # inclusive.
111
- class Timestamp; end
112
- end
113
- end