google-cloud-scheduler 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f20bbe0d8d58a50d0cbf0b92b7300551c022919a1ac35d1c52bd7982fc9cd425
4
- data.tar.gz: 360aa1fe396195e90a076dd6d1e2ed0df85106ffbc0f6fc4b0c7737a007d82b0
3
+ metadata.gz: b2b9679e2ab451aa2cfc859651d11a8864bf83097df463372ae889ecc3b0a2f7
4
+ data.tar.gz: 6640545be8c9a1f6a770aa399852214071e909a7df63fd47ac4836f7e868533d
5
5
  SHA512:
6
- metadata.gz: fe66dffbee6eecc65cd02a7d05a7a60fbb2875a469722c0bfe3adc3385361185349325563d2e8c7b6933f1caecb46f0eeac0de88ea820eb0fb9340e5ed502719
7
- data.tar.gz: 2f976cbc860cf953fdb3bc3a8346e4a2f78fd6264149b7375afb7586f2b0c8313e5c558566ddfa4cc213fa272ee4d1433be8d6101a6fb54a35956cf2cdce2417
6
+ metadata.gz: aa991e809788bf51bd4111f26e2788227abbece1e05a44f6f42b47e7c1f961211950d46ce7867ef80cbea3c115a78a9e64121737f60f86c8e883bb649dccf8a7
7
+ data.tar.gz: 8ea5afeb15cfe49cde67f850c4ddea5b6403df3df87ceb6dd16bf5c812543bea2dc412838846be7295befb5a2a542439efa2d78dd199473ea7185e3df4577671
data/.yardopts CHANGED
@@ -7,3 +7,5 @@
7
7
  ./lib/**/*.rb
8
8
  -
9
9
  README.md
10
+ AUTHENTICATION.md
11
+ LICENSE
data/AUTHENTICATION.md ADDED
@@ -0,0 +1,199 @@
1
+ # Authentication
2
+
3
+ In general, the google-cloud-scheduler library uses [Service
4
+ Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
5
+ credentials to connect to Google Cloud services. When running within [Google
6
+ Cloud Platform environments](#google-cloud-platform-environments)
7
+ the credentials will be discovered automatically. When running on other
8
+ environments, the Service Account credentials can be specified by providing the
9
+ path to the [JSON
10
+ keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) for
11
+ the account (or the JSON itself) in [environment
12
+ variables](#environment-variables). Additionally, Cloud SDK credentials can also
13
+ be discovered automatically, but this is only recommended during development.
14
+
15
+ ## Quickstart
16
+
17
+ 1. [Create a service account and credentials](#creating-a-service-account).
18
+ 2. Set the [environment variable](#environment-variables).
19
+
20
+ ```sh
21
+ export SCHEDULER_CREDENTIALS=/path/to/json`
22
+ ```
23
+
24
+ 3. Initialize the client.
25
+
26
+ ```ruby
27
+ require "google/cloud/scheduler"
28
+
29
+ client = Google::Cloud::Scheduler.new
30
+ ```
31
+
32
+ ## Project and Credential Lookup
33
+
34
+ The google-cloud-scheduler library aims to make authentication
35
+ as simple as possible, and provides several mechanisms to configure your system
36
+ without providing **Project ID** and **Service Account Credentials** directly in
37
+ code.
38
+
39
+ **Project ID** is discovered in the following order:
40
+
41
+ 1. Specify project ID in method arguments
42
+ 2. Specify project ID in configuration
43
+ 3. Discover project ID in environment variables
44
+ 4. Discover GCE project ID
45
+ 5. Discover project ID in credentials JSON
46
+
47
+ **Credentials** are discovered in the following order:
48
+
49
+ 1. Specify credentials in method arguments
50
+ 2. Specify credentials in configuration
51
+ 3. Discover credentials path in environment variables
52
+ 4. Discover credentials JSON in environment variables
53
+ 5. Discover credentials file in the Cloud SDK's path
54
+ 6. Discover GCE credentials
55
+
56
+ ### Google Cloud Platform environments
57
+
58
+ While running on Google Cloud Platform environments such as Google Compute
59
+ Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed.
60
+ The **Project ID** and **Credentials** and are discovered automatically. Code
61
+ should be written as if already authenticated. Just be sure when you [set up the
62
+ GCE instance][gce-how-to], you add the correct scopes for the APIs you want to
63
+ access. For example:
64
+
65
+ * **All APIs**
66
+ * `https://www.googleapis.com/auth/cloud-platform`
67
+ * `https://www.googleapis.com/auth/cloud-platform.read-only`
68
+ * **BigQuery**
69
+ * `https://www.googleapis.com/auth/bigquery`
70
+ * `https://www.googleapis.com/auth/bigquery.insertdata`
71
+ * **Compute Engine**
72
+ * `https://www.googleapis.com/auth/compute`
73
+ * **Datastore**
74
+ * `https://www.googleapis.com/auth/datastore`
75
+ * `https://www.googleapis.com/auth/userinfo.email`
76
+ * **DNS**
77
+ * `https://www.googleapis.com/auth/ndev.clouddns.readwrite`
78
+ * **Pub/Sub**
79
+ * `https://www.googleapis.com/auth/pubsub`
80
+ * **Storage**
81
+ * `https://www.googleapis.com/auth/devstorage.full_control`
82
+ * `https://www.googleapis.com/auth/devstorage.read_only`
83
+ * `https://www.googleapis.com/auth/devstorage.read_write`
84
+
85
+ ### Environment Variables
86
+
87
+ The **Project ID** and **Credentials JSON** can be placed in environment
88
+ variables instead of declaring them directly in code. Each service has its own
89
+ environment variable, allowing for different service accounts to be used for
90
+ different services. (See the READMEs for the individual service gems for
91
+ details.) The path to the **Credentials JSON** file can be stored in the
92
+ environment variable, or the **Credentials JSON** itself can be stored for
93
+ environments such as Docker containers where writing files is difficult or not
94
+ encouraged.
95
+
96
+ The environment variables that google-cloud-scheduler checks for project ID are:
97
+
98
+ 1. `SCHEDULER_PROJECT`
99
+ 2. `GOOGLE_CLOUD_PROJECT`
100
+
101
+ The environment variables that google-cloud-scheduler checks for credentials are configured on {Google::Cloud::Scheduler::V1::Credentials}:
102
+
103
+ 1. `SCHEDULER_CREDENTIALS` - Path to JSON file, or JSON contents
104
+ 2. `SCHEDULER_KEYFILE` - Path to JSON file, or JSON contents
105
+ 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
106
+ 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
107
+ 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
108
+
109
+ ```ruby
110
+ require "google/cloud/scheduler"
111
+
112
+ ENV["SCHEDULER_PROJECT"] = "my-project-id"
113
+ ENV["SCHEDULER_CREDENTIALS"] = "path/to/keyfile.json"
114
+
115
+ client = Google::Cloud::Scheduler.new
116
+ ```
117
+
118
+ ### Configuration
119
+
120
+ The **Project ID** and **Credentials JSON** can be configured instead of placing them in environment variables or providing them as arguments.
121
+
122
+ ```ruby
123
+ require "google/cloud/scheduler"
124
+
125
+ Google::Cloud::Scheduler.configure do |config|
126
+ config.project_id = "my-project-id"
127
+ config.credentials = "path/to/keyfile.json"
128
+ end
129
+
130
+ client = Google::Cloud::Scheduler.new
131
+ ```
132
+
133
+ ### Cloud SDK
134
+
135
+ This option allows for an easy way to authenticate during development. If
136
+ credentials are not provided in code or in environment variables, then Cloud SDK
137
+ credentials are discovered.
138
+
139
+ To configure your system for this, simply:
140
+
141
+ 1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
142
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
143
+ 3. Write code as if already authenticated.
144
+
145
+ **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
146
+ *should* only be used during development.
147
+
148
+ [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
149
+ [dev-console]: https://console.cloud.google.com/project
150
+
151
+ [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
152
+
153
+ [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
154
+ [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
155
+ [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
156
+
157
+ ## Creating a Service Account
158
+
159
+ Google Cloud requires a **Project ID** and **Service Account Credentials** to
160
+ connect to the APIs. You will use the **Project ID** and **JSON key file** to
161
+ connect to most services with google-cloud-scheduler.
162
+
163
+ If you are not running this client within [Google Cloud Platform
164
+ environments](#google-cloud-platform-environments), you need a Google
165
+ Developers service account.
166
+
167
+ 1. Visit the [Google Developers Console][dev-console].
168
+ 1. Create a new project or click on an existing project.
169
+ 1. Activate the slide-out navigation tray and select **API Manager**. From
170
+ here, you will enable the APIs that your application requires.
171
+
172
+ ![Enable the APIs that your application requires][enable-apis]
173
+
174
+ *Note: You may need to enable billing in order to use these services.*
175
+
176
+ 1. Select **Credentials** from the side navigation.
177
+
178
+ You should see a screen like one of the following.
179
+
180
+ ![Create a new service account][create-new-service-account]
181
+
182
+ ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
183
+
184
+ Find the "Add credentials" drop down and select "Service account" to be
185
+ guided through downloading a new JSON key file.
186
+
187
+ If you want to re-use an existing service account, you can easily generate a
188
+ new key file. Just select the account you wish to re-use, and click "Generate
189
+ new JSON key":
190
+
191
+ ![Re-use an existing service account][reuse-service-account]
192
+
193
+ The key file you download will be used by this library to authenticate API
194
+ requests and should be stored in a secure location.
195
+
196
+ ## Troubleshooting
197
+
198
+ If you're having trouble authenticating you can ask for help by following the
199
+ {file:TROUBLESHOOTING.md Troubleshooting Guide}.
@@ -68,11 +68,11 @@ module Google
68
68
  ].freeze
69
69
 
70
70
 
71
- PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
72
- "projects/{project}"
71
+ JOB_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
72
+ "projects/{project}/locations/{location}/jobs/{job}"
73
73
  )
74
74
 
75
- private_constant :PROJECT_PATH_TEMPLATE
75
+ private_constant :JOB_PATH_TEMPLATE
76
76
 
77
77
  LOCATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
78
78
  "projects/{project}/locations/{location}"
@@ -80,18 +80,22 @@ module Google
80
80
 
81
81
  private_constant :LOCATION_PATH_TEMPLATE
82
82
 
83
- JOB_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
84
- "projects/{project}/locations/{location}/jobs/{job}"
83
+ PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
84
+ "projects/{project}"
85
85
  )
86
86
 
87
- private_constant :JOB_PATH_TEMPLATE
87
+ private_constant :PROJECT_PATH_TEMPLATE
88
88
 
89
- # Returns a fully-qualified project resource name string.
89
+ # Returns a fully-qualified job resource name string.
90
90
  # @param project [String]
91
+ # @param location [String]
92
+ # @param job [String]
91
93
  # @return [String]
92
- def self.project_path project
93
- PROJECT_PATH_TEMPLATE.render(
94
- :"project" => project
94
+ def self.job_path project, location, job
95
+ JOB_PATH_TEMPLATE.render(
96
+ :"project" => project,
97
+ :"location" => location,
98
+ :"job" => job
95
99
  )
96
100
  end
97
101
 
@@ -106,16 +110,12 @@ module Google
106
110
  )
107
111
  end
108
112
 
109
- # Returns a fully-qualified job resource name string.
113
+ # Returns a fully-qualified project resource name string.
110
114
  # @param project [String]
111
- # @param location [String]
112
- # @param job [String]
113
115
  # @return [String]
114
- def self.job_path project, location, job
115
- JOB_PATH_TEMPLATE.render(
116
- :"project" => project,
117
- :"location" => location,
118
- :"job" => job
116
+ def self.project_path project
117
+ PROJECT_PATH_TEMPLATE.render(
118
+ :"project" => project
119
119
  )
120
120
  end
121
121
 
@@ -97,7 +97,8 @@ module Google
97
97
  # @!attribute [rw] type_url
98
98
  # @return [String]
99
99
  # A URL/resource name that uniquely identifies the type of the serialized
100
- # protocol buffer message. The last segment of the URL's path must represent
100
+ # protocol buffer message. This string must contain at least
101
+ # one "/" character. The last segment of the URL's path must represent
101
102
  # the fully qualified name of the type (as in
102
103
  # `path/google.protobuf.Duration`). The name should be in a canonical form
103
104
  # (e.g., leading "." is not accepted).
@@ -83,57 +83,49 @@ module Google
83
83
  # describe the updated values, the API ignores the values of all
84
84
  # fields not covered by the mask.
85
85
  #
86
- # If a repeated field is specified for an update operation, the existing
87
- # repeated values in the target resource will be overwritten by the new values.
88
- # Note that a repeated field is only allowed in the last position of a `paths`
89
- # string.
86
+ # If a repeated field is specified for an update operation, new values will
87
+ # be appended to the existing repeated field in the target resource. Note that
88
+ # a repeated field is only allowed in the last position of a `paths` string.
90
89
  #
91
90
  # If a sub-message is specified in the last position of the field mask for an
92
- # update operation, then the existing sub-message in the target resource is
93
- # overwritten. Given the target message:
91
+ # update operation, then new value will be merged into the existing sub-message
92
+ # in the target resource.
93
+ #
94
+ # For example, given the target message:
94
95
  #
95
96
  # f {
96
97
  # b {
97
- # d : 1
98
- # x : 2
98
+ # d: 1
99
+ # x: 2
99
100
  # }
100
- # c : 1
101
+ # c: [1]
101
102
  # }
102
103
  #
103
104
  # And an update message:
104
105
  #
105
106
  # f {
106
107
  # b {
107
- # d : 10
108
+ # d: 10
108
109
  # }
110
+ # c: [2]
109
111
  # }
110
112
  #
111
113
  # then if the field mask is:
112
114
  #
113
- # paths: "f.b"
115
+ # paths: ["f.b", "f.c"]
114
116
  #
115
117
  # then the result will be:
116
118
  #
117
119
  # f {
118
120
  # b {
119
- # d : 10
121
+ # d: 10
122
+ # x: 2
120
123
  # }
121
- # c : 1
124
+ # c: [1, 2]
122
125
  # }
123
126
  #
124
- # However, if the update mask was:
125
- #
126
- # paths: "f.b.d"
127
- #
128
- # then the result would be:
129
- #
130
- # f {
131
- # b {
132
- # d : 10
133
- # x : 2
134
- # }
135
- # c : 1
136
- # }
127
+ # An implementation may provide options to override this default behavior for
128
+ # repeated and message fields.
137
129
  #
138
130
  # In order to reset a field's value to the default, the field must
139
131
  # be in the mask and set to the default value in the provided resource.
@@ -15,17 +15,19 @@
15
15
 
16
16
  module Google
17
17
  module Protobuf
18
- # A Timestamp represents a point in time independent of any time zone
19
- # or calendar, represented as seconds and fractions of seconds at
20
- # nanosecond resolution in UTC Epoch time. It is encoded using the
21
- # Proleptic Gregorian Calendar which extends the Gregorian calendar
22
- # backwards to year one. It is encoded assuming all minutes are 60
23
- # seconds long, i.e. leap seconds are "smeared" so that no leap second
24
- # table is needed for interpretation. Range is from
25
- # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
26
- # By restricting to that range, we ensure that we can convert to
27
- # and from RFC 3339 date strings.
28
- # See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
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.
29
31
  #
30
32
  # = Examples
31
33
  #
@@ -86,12 +88,12 @@ module Google
86
88
  # 01:30 UTC on January 15, 2017.
87
89
  #
88
90
  # In JavaScript, one can convert a Date object to this format using the
89
- # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
91
+ # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
90
92
  # method. In Python, a standard `datetime.datetime` object can be converted
91
93
  # to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
92
94
  # with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
93
95
  # can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
94
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
96
+ # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
95
97
  # ) to obtain a formatter capable of generating timestamps in this format.
96
98
  # @!attribute [rw] seconds
97
99
  # @return [Integer]
@@ -68,11 +68,11 @@ module Google
68
68
  ].freeze
69
69
 
70
70
 
71
- PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
72
- "projects/{project}"
71
+ JOB_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
72
+ "projects/{project}/locations/{location}/jobs/{job}"
73
73
  )
74
74
 
75
- private_constant :PROJECT_PATH_TEMPLATE
75
+ private_constant :JOB_PATH_TEMPLATE
76
76
 
77
77
  LOCATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
78
78
  "projects/{project}/locations/{location}"
@@ -80,18 +80,22 @@ module Google
80
80
 
81
81
  private_constant :LOCATION_PATH_TEMPLATE
82
82
 
83
- JOB_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
84
- "projects/{project}/locations/{location}/jobs/{job}"
83
+ PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
84
+ "projects/{project}"
85
85
  )
86
86
 
87
- private_constant :JOB_PATH_TEMPLATE
87
+ private_constant :PROJECT_PATH_TEMPLATE
88
88
 
89
- # Returns a fully-qualified project resource name string.
89
+ # Returns a fully-qualified job resource name string.
90
90
  # @param project [String]
91
+ # @param location [String]
92
+ # @param job [String]
91
93
  # @return [String]
92
- def self.project_path project
93
- PROJECT_PATH_TEMPLATE.render(
94
- :"project" => project
94
+ def self.job_path project, location, job
95
+ JOB_PATH_TEMPLATE.render(
96
+ :"project" => project,
97
+ :"location" => location,
98
+ :"job" => job
95
99
  )
96
100
  end
97
101
 
@@ -106,16 +110,12 @@ module Google
106
110
  )
107
111
  end
108
112
 
109
- # Returns a fully-qualified job resource name string.
113
+ # Returns a fully-qualified project resource name string.
110
114
  # @param project [String]
111
- # @param location [String]
112
- # @param job [String]
113
115
  # @return [String]
114
- def self.job_path project, location, job
115
- JOB_PATH_TEMPLATE.render(
116
- :"project" => project,
117
- :"location" => location,
118
- :"job" => job
116
+ def self.project_path project
117
+ PROJECT_PATH_TEMPLATE.render(
118
+ :"project" => project
119
119
  )
120
120
  end
121
121
 
@@ -97,7 +97,8 @@ module Google
97
97
  # @!attribute [rw] type_url
98
98
  # @return [String]
99
99
  # A URL/resource name that uniquely identifies the type of the serialized
100
- # protocol buffer message. The last segment of the URL's path must represent
100
+ # protocol buffer message. This string must contain at least
101
+ # one "/" character. The last segment of the URL's path must represent
101
102
  # the fully qualified name of the type (as in
102
103
  # `path/google.protobuf.Duration`). The name should be in a canonical form
103
104
  # (e.g., leading "." is not accepted).
@@ -83,57 +83,49 @@ module Google
83
83
  # describe the updated values, the API ignores the values of all
84
84
  # fields not covered by the mask.
85
85
  #
86
- # If a repeated field is specified for an update operation, the existing
87
- # repeated values in the target resource will be overwritten by the new values.
88
- # Note that a repeated field is only allowed in the last position of a `paths`
89
- # string.
86
+ # If a repeated field is specified for an update operation, new values will
87
+ # be appended to the existing repeated field in the target resource. Note that
88
+ # a repeated field is only allowed in the last position of a `paths` string.
90
89
  #
91
90
  # If a sub-message is specified in the last position of the field mask for an
92
- # update operation, then the existing sub-message in the target resource is
93
- # overwritten. Given the target message:
91
+ # update operation, then new value will be merged into the existing sub-message
92
+ # in the target resource.
93
+ #
94
+ # For example, given the target message:
94
95
  #
95
96
  # f {
96
97
  # b {
97
- # d : 1
98
- # x : 2
98
+ # d: 1
99
+ # x: 2
99
100
  # }
100
- # c : 1
101
+ # c: [1]
101
102
  # }
102
103
  #
103
104
  # And an update message:
104
105
  #
105
106
  # f {
106
107
  # b {
107
- # d : 10
108
+ # d: 10
108
109
  # }
110
+ # c: [2]
109
111
  # }
110
112
  #
111
113
  # then if the field mask is:
112
114
  #
113
- # paths: "f.b"
115
+ # paths: ["f.b", "f.c"]
114
116
  #
115
117
  # then the result will be:
116
118
  #
117
119
  # f {
118
120
  # b {
119
- # d : 10
121
+ # d: 10
122
+ # x: 2
120
123
  # }
121
- # c : 1
124
+ # c: [1, 2]
122
125
  # }
123
126
  #
124
- # However, if the update mask was:
125
- #
126
- # paths: "f.b.d"
127
- #
128
- # then the result would be:
129
- #
130
- # f {
131
- # b {
132
- # d : 10
133
- # x : 2
134
- # }
135
- # c : 1
136
- # }
127
+ # An implementation may provide options to override this default behavior for
128
+ # repeated and message fields.
137
129
  #
138
130
  # In order to reset a field's value to the default, the field must
139
131
  # be in the mask and set to the default value in the provided resource.
@@ -15,17 +15,19 @@
15
15
 
16
16
  module Google
17
17
  module Protobuf
18
- # A Timestamp represents a point in time independent of any time zone
19
- # or calendar, represented as seconds and fractions of seconds at
20
- # nanosecond resolution in UTC Epoch time. It is encoded using the
21
- # Proleptic Gregorian Calendar which extends the Gregorian calendar
22
- # backwards to year one. It is encoded assuming all minutes are 60
23
- # seconds long, i.e. leap seconds are "smeared" so that no leap second
24
- # table is needed for interpretation. Range is from
25
- # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
26
- # By restricting to that range, we ensure that we can convert to
27
- # and from RFC 3339 date strings.
28
- # See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
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.
29
31
  #
30
32
  # = Examples
31
33
  #
@@ -86,12 +88,12 @@ module Google
86
88
  # 01:30 UTC on January 15, 2017.
87
89
  #
88
90
  # In JavaScript, one can convert a Date object to this format using the
89
- # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
91
+ # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
90
92
  # method. In Python, a standard `datetime.datetime` object can be converted
91
93
  # to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
92
94
  # with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
93
95
  # can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
94
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
96
+ # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
95
97
  # ) to obtain a formatter capable of generating timestamps in this format.
96
98
  # @!attribute [rw] seconds
97
99
  # @return [Integer]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-15 00:00:00.000000000 Z
11
+ date: 2019-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -121,6 +121,7 @@ extensions: []
121
121
  extra_rdoc_files: []
122
122
  files:
123
123
  - ".yardopts"
124
+ - AUTHENTICATION.md
124
125
  - LICENSE
125
126
  - README.md
126
127
  - lib/google/cloud/scheduler.rb