Skip to content

Commit

Permalink
docs: [google-cloud-scheduler] update comments (#13467)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

BEGIN_COMMIT_OVERRIDE
docs: annotate output-only fields as such
docs: update comments
END_COMMIT_OVERRIDE



PiperOrigin-RevId: 719865415

Source-Link:
googleapis/googleapis@47444ff

Source-Link:
googleapis/googleapis-gen@2166b70
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNjaGVkdWxlci8uT3dsQm90LnlhbWwiLCJoIjoiMjE2NmI3MDNkNTAwMmZkOWZjYzE4Y2QwMzk5NTZkYmUwMWQ1N2ZjMSJ9

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jan 27, 2025
1 parent 5579df8 commit 6707477
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.15.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.15.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore

from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import duration_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
_LOGGER = std_logging.getLogger(__name__)

from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import duration_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import google.auth # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2 # type: ignore
from google.oauth2 import service_account # type: ignore
from google.protobuf import empty_pb2 # type: ignore

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf.json_format import MessageToJson
import google.protobuf.message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf.json_format import MessageToJson
import google.protobuf.message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.requests import AuthorizedSession # type: ignore
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import json_format
from requests import __version__ as requests_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from google.api_core import gapic_v1, path_template
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import json_format

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ class ListJobsRequest(proto.Message):
[next_page_token][google.cloud.scheduler.v1.ListJobsResponse.next_page_token]
returned from the previous call to
[ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs].
It is an error to switch the value of
[filter][google.cloud.scheduler.v1.ListJobsRequest.filter]
or
[order_by][google.cloud.scheduler.v1.ListJobsRequest.order_by]
while iterating through pages.
"""

parent: str = proto.Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ class Job(proto.Message):
of
[retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count]
times, with exponential backoff, until the next scheduled
start time.
start time. If retry_count is 0, a job attempt will not be
retried if it fails. Instead the Cloud Scheduler system will
wait for the next scheduled execution time. Setting
retry_count to 0 does not prevent failed jobs from running
according to schedule after the failure.
time_zone (str):
Specifies the time zone to be used in interpreting
[schedule][google.cloud.scheduler.v1.Job.schedule]. The
Expand Down Expand Up @@ -290,9 +294,11 @@ class RetryConfig(proto.Message):
The default value of retry_count is zero.
If retry_count is zero, a job attempt will *not* be retried
if it fails. Instead the Cloud Scheduler system will wait
for the next scheduled execution time.
If retry_count is 0, a job attempt will not be retried if it
fails. Instead the Cloud Scheduler system will wait for the
next scheduled execution time. Setting retry_count to 0 does
not prevent failed jobs from running according to schedule
after the failure.
If retry_count is set to a non-zero number then Cloud
Scheduler will retry failed attempts, using exponential
Expand Down Expand Up @@ -335,10 +341,10 @@ class RetryConfig(proto.Message):
[min_backoff_duration][google.cloud.scheduler.v1.RetryConfig.min_backoff_duration]
is 10s,
[max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration]
is 300s, and ``max_doublings`` is 3, then the a job will
first be retried in 10s. The retry interval will double
three times, and then increase linearly by 2^3 \* 10s.
Finally, the job will retry at intervals of
is 300s, and ``max_doublings`` is 3, then the job will first
be retried in 10s. The retry interval will double three
times, and then increase linearly by 2^3 \* 10s. Finally,
the job will retry at intervals of
[max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration]
until the job has been attempted
[retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,22 @@ class HttpTarget(proto.Message):
http_method (google.cloud.scheduler_v1.types.HttpMethod):
Which HTTP method to use for the request.
headers (MutableMapping[str, str]):
HTTP request headers.
This map contains the header field names and values.
The user can specify HTTP request headers to send with the
job's HTTP request. This map contains the header field names
and values. Repeated headers are not supported, but a header
value can contain commas. These headers represent a subset
of the headers that will accompany the job's HTTP request.
Some HTTP request headers will be ignored or replaced. A
partial list of headers that will be ignored or replaced is
below:
job's HTTP request. Repeated headers are not supported, but
a header value can contain commas.
The following headers represent a subset of the headers that
accompany the job's HTTP request. Some HTTP request headers
are ignored or replaced. A partial list of headers that are
ignored or replaced is below:
- Host: This will be computed by Cloud Scheduler and
derived from
[uri][google.cloud.scheduler.v1.HttpTarget.uri].
- ``Content-Length``: This will be computed by Cloud
Scheduler.
- ``User-Agent``: This will be set to
Expand All @@ -120,6 +123,17 @@ class HttpTarget(proto.Message):
contain the job schedule as an offset of UTC parsed
according to RFC3339.
If the job has a
[body][google.cloud.scheduler.v1.HttpTarget.body] and the
following headers are not set by the user, Cloud Scheduler
sets default values:
- ``Content-Type``: This will be set to
``"application/octet-stream"``. You can override this
default by explicitly setting ``Content-Type`` to a
particular media type when creating the job. For example,
you can set ``Content-Type`` to ``"application/json"``.
The total size of headers must be less than 80KB.
body (bytes):
HTTP request body. A request body is allowed only if the
Expand Down Expand Up @@ -229,22 +243,21 @@ class AppEngineHttpTarget(proto.Message):
contain the job schedule as an offset of UTC parsed
according to RFC3339.
If the job has an
[body][google.cloud.scheduler.v1.AppEngineHttpTarget.body],
Cloud Scheduler sets the following headers:
If the job has a
[body][google.cloud.scheduler.v1.AppEngineHttpTarget.body]
and the following headers are not set by the user, Cloud
Scheduler sets default values:
- ``Content-Type``: By default, the ``Content-Type`` header
is set to ``"application/octet-stream"``. The default can
be overridden by explictly setting ``Content-Type`` to a
particular media type when the job is created. For
example, ``Content-Type`` can be set to
``"application/json"``.
- ``Content-Length``: This is computed by Cloud Scheduler.
This value is output only. It cannot be changed.
- ``Content-Type``: This will be set to
``"application/octet-stream"``. You can override this
default by explicitly setting ``Content-Type`` to a
particular media type when creating the job. For example,
you can set ``Content-Type`` to ``"application/json"``.
The headers below are output only. They cannot be set or
overridden:
- ``Content-Length``: This is computed by Cloud Scheduler.
- ``X-Google-*``: For Google internal use only.
- ``X-AppEngine-*``: For Google internal use only.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.15.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-scheduler",
"version": "2.15.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-scheduler",
"version": "2.15.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
from google.auth import credentials as ga_credentials
from google.auth.exceptions import MutualTLSChannelError
from google.cloud.location import locations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.oauth2 import service_account
from google.protobuf import any_pb2 # type: ignore
from google.protobuf import duration_pb2 # type: ignore
Expand Down

0 comments on commit 6707477

Please sign in to comment.