Skip to content

Commit

Permalink
docs(speech): Update Status documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and quartzmo committed Jan 22, 2020
1 parent a77e56f commit c97a67c
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 113 deletions.
Expand Up @@ -17,67 +17,19 @@ module Google
module Rpc
# The `Status` type defines a logical error model that is suitable for
# different programming environments, including REST APIs and RPC APIs. It is
# used by [gRPC](https://github.com/grpc). The error model is designed to be:
# used by [gRPC](https://github.com/grpc). Each `Status` message contains
# three pieces of data: error code, error message, and error details.
#
# * Simple to use and understand for most users
# * Flexible enough to meet unexpected needs
#
# = Overview
#
# The `Status` message contains three pieces of data: error code, error
# message, and error details. The error code should be an enum value of
# {Google::Rpc::Code}, but it may accept additional error codes
# if needed. The error message should be a developer-facing English message
# that helps developers *understand* and *resolve* the error. If a localized
# user-facing error message is needed, put the localized message in the error
# details or localize it in the client. The optional error details may contain
# arbitrary information about the error. There is a predefined set of error
# detail types in the package `google.rpc` that can be used for common error
# conditions.
#
# = Language mapping
#
# The `Status` message is the logical representation of the error model, but it
# is not necessarily the actual wire format. When the `Status` message is
# exposed in different client libraries and different wire protocols, it can be
# mapped differently. For example, it will likely be mapped to some exceptions
# in Java, but more likely mapped to some error codes in C.
#
# = Other uses
#
# The error model and the `Status` message can be used in a variety of
# environments, either with or without APIs, to provide a
# consistent developer experience across different environments.
#
# Example uses of this error model include:
#
# * Partial errors. If a service needs to return partial errors to the client,
# it may embed the `Status` in the normal response to indicate the partial
# errors.
#
# * Workflow errors. A typical workflow has multiple steps. Each step may
# have a `Status` message for error reporting.
#
# * Batch operations. If a client uses batch request and batch response, the
# `Status` message should be used directly inside batch response, one for
# each error sub-response.
#
# * Asynchronous operations. If an API call embeds asynchronous operation
# results in its response, the status of those operations should be
# represented directly using the `Status` message.
#
# * Logging. If some API errors are stored in logs, the message `Status` could
# be used directly after any stripping needed for security/privacy reasons.
# You can find out more about this error model and how to work with it in the
# [API Design Guide](https://cloud.google.com/apis/design/errors).
# @!attribute [rw] code
# @return [Integer]
# The status code, which should be an enum value of
# {Google::Rpc::Code}.
# The status code, which should be an enum value of {Google::Rpc::Code}.
# @!attribute [rw] message
# @return [String]
# A developer-facing error message, which should be in English. Any
# user-facing error message should be localized and sent in the
# {Google::Rpc::Status#details} field, or localized
# by the client.
# {Google::Rpc::Status#details} field, or localized by the client.
# @!attribute [rw] details
# @return [Array<Google::Protobuf::Any>]
# A list of messages that carry the error details. There is a common set of
Expand Down
Expand Up @@ -17,67 +17,19 @@ module Google
module Rpc
# The `Status` type defines a logical error model that is suitable for
# different programming environments, including REST APIs and RPC APIs. It is
# used by [gRPC](https://github.com/grpc). The error model is designed to be:
# used by [gRPC](https://github.com/grpc). Each `Status` message contains
# three pieces of data: error code, error message, and error details.
#
# * Simple to use and understand for most users
# * Flexible enough to meet unexpected needs
#
# = Overview
#
# The `Status` message contains three pieces of data: error code, error
# message, and error details. The error code should be an enum value of
# {Google::Rpc::Code}, but it may accept additional error codes
# if needed. The error message should be a developer-facing English message
# that helps developers *understand* and *resolve* the error. If a localized
# user-facing error message is needed, put the localized message in the error
# details or localize it in the client. The optional error details may contain
# arbitrary information about the error. There is a predefined set of error
# detail types in the package `google.rpc` that can be used for common error
# conditions.
#
# = Language mapping
#
# The `Status` message is the logical representation of the error model, but it
# is not necessarily the actual wire format. When the `Status` message is
# exposed in different client libraries and different wire protocols, it can be
# mapped differently. For example, it will likely be mapped to some exceptions
# in Java, but more likely mapped to some error codes in C.
#
# = Other uses
#
# The error model and the `Status` message can be used in a variety of
# environments, either with or without APIs, to provide a
# consistent developer experience across different environments.
#
# Example uses of this error model include:
#
# * Partial errors. If a service needs to return partial errors to the client,
# it may embed the `Status` in the normal response to indicate the partial
# errors.
#
# * Workflow errors. A typical workflow has multiple steps. Each step may
# have a `Status` message for error reporting.
#
# * Batch operations. If a client uses batch request and batch response, the
# `Status` message should be used directly inside batch response, one for
# each error sub-response.
#
# * Asynchronous operations. If an API call embeds asynchronous operation
# results in its response, the status of those operations should be
# represented directly using the `Status` message.
#
# * Logging. If some API errors are stored in logs, the message `Status` could
# be used directly after any stripping needed for security/privacy reasons.
# You can find out more about this error model and how to work with it in the
# [API Design Guide](https://cloud.google.com/apis/design/errors).
# @!attribute [rw] code
# @return [Integer]
# The status code, which should be an enum value of
# {Google::Rpc::Code}.
# The status code, which should be an enum value of {Google::Rpc::Code}.
# @!attribute [rw] message
# @return [String]
# A developer-facing error message, which should be in English. Any
# user-facing error message should be localized and sent in the
# {Google::Rpc::Status#details} field, or localized
# by the client.
# {Google::Rpc::Status#details} field, or localized by the client.
# @!attribute [rw] details
# @return [Array<Google::Protobuf::Any>]
# A list of messages that carry the error details. There is a common set of
Expand Down
166 changes: 161 additions & 5 deletions google-cloud-speech/synth.metadata
@@ -1,19 +1,20 @@
{
"updateTime": "2020-01-15T11:48:41.735610Z",
"updateTime": "2020-01-22T11:44:24.128301Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.44.0",
"dockerImage": "googleapis/artman@sha256:10a6d0342b8d62544810ac5ad86c3b21049ec0696608ac60175da8e513234344"
"version": "0.44.1",
"dockerImage": "googleapis/artman@sha256:5599b61e56a372d21b671969ee915fbca0f6c3a0daaeb898d01f8f685f1bbc8b"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "d99df0d67057a233c711187e0689baa4f8e6333d",
"internalRef": "289709813"
"sha": "cda99c1f7dc5e4ca9b1caeae1dc330838cbc1461",
"internalRef": "290800639",
"log": "cda99c1f7dc5e4ca9b1caeae1dc330838cbc1461\nChange api_name to 'asset' for v1p1beta1\n\nPiperOrigin-RevId: 290800639\n\n94e9e90c303a820ce40643d9129e7f0d2054e8a1\nAdds Google Maps Road service\n\nPiperOrigin-RevId: 290795667\n\na3b23dcb2eaecce98c600c7d009451bdec52dbda\nrpc: new message ErrorInfo, other comment updates\n\nPiperOrigin-RevId: 290781668\n\n26420ef4e46c37f193c0fbe53d6ebac481de460e\nAdd proto definition for Org Policy v1.\n\nPiperOrigin-RevId: 290771923\n\n7f0dab8177cf371ae019a082e2512de7ac102888\nPublish Routes Preferred API v1 service definitions.\n\nPiperOrigin-RevId: 290326986\n\nad6e508d0728e1d1bca6e3f328cd562718cb772d\nFix: Qualify resource type references with \"jobs.googleapis.com/\"\n\nPiperOrigin-RevId: 290285762\n\n58e770d568a2b78168ddc19a874178fee8265a9d\ncts client library\n\nPiperOrigin-RevId: 290146169\n\naf9daa4c3b4c4a8b7133b81588dd9ffd37270af2\nAdd more programming language options to public proto\n\nPiperOrigin-RevId: 290144091\n\nd9f2bbf2df301ef84641d4cec7c828736a0bd907\ntalent: add missing resource.proto dep to Bazel build target\n\nPiperOrigin-RevId: 290143164\n\n3b3968237451d027b42471cd28884a5a1faed6c7\nAnnotate Talent API.\nAdd gRPC service config for retry.\nUpdate bazel file with google.api.resource dependency.\n\nPiperOrigin-RevId: 290125172\n\n0735b4b096872960568d1f366bfa75b7b0e1f1a3\nWeekly library update.\n\nPiperOrigin-RevId: 289939042\n\n8760d3d9a4543d7f9c0d1c7870aca08b116e4095\nWeekly library update.\n\nPiperOrigin-RevId: 289939020\n\n8607df842f782a901805187e02fff598145b0b0e\nChange Talent API timeout to 30s.\n\nPiperOrigin-RevId: 289912621\n\n908155991fe32570653bcb72ecfdcfc896642f41\nAdd Recommendations AI V1Beta1\n\nPiperOrigin-RevId: 289901914\n\n5c9a8c2bebd8b71aa66d1cc473edfaac837a2c78\nAdding no-arg method signatures for ListBillingAccounts and ListServices\n\nPiperOrigin-RevId: 289891136\n\n50b0e8286ac988b0593bd890eb31fef6ea2f5767\nlongrunning: add grpc service config and default_host annotation to operations.proto\n\nPiperOrigin-RevId: 289876944\n\n6cac27dabe51c54807b0401698c32d34998948a9\n Updating default deadline for Cloud Security Command Center's v1 APIs.\n\nPiperOrigin-RevId: 289875412\n\n"
}
},
{
Expand Down Expand Up @@ -45,5 +46,160 @@
"config": "google/cloud/speech/artman_speech_v1p1beta1.yaml"
}
}
],
"newFiles": [
{
"path": ".gitignore"
},
{
"path": ".repo-metadata.json"
},
{
"path": ".rubocop.yml"
},
{
"path": ".yardopts"
},
{
"path": "AUTHENTICATION.md"
},
{
"path": "CHANGELOG.md"
},
{
"path": "Gemfile"
},
{
"path": "LICENSE"
},
{
"path": "README.md"
},
{
"path": "Rakefile"
},
{
"path": "acceptance/google/cloud/speech/v1/speech_smoke_test.rb"
},
{
"path": "acceptance/google/cloud/speech/v1/stream_test.rb"
},
{
"path": "acceptance/google/cloud/speech/v1p1beta1/speech_smoke_test.rb"
},
{
"path": "acceptance/google/cloud/speech/v1p1beta1/stream_test.rb"
},
{
"path": "google-cloud-speech.gemspec"
},
{
"path": "lib/google/cloud/speech.rb"
},
{
"path": "lib/google/cloud/speech/v1.rb"
},
{
"path": "lib/google/cloud/speech/v1/cloud_speech_pb.rb"
},
{
"path": "lib/google/cloud/speech/v1/cloud_speech_services_pb.rb"
},
{
"path": "lib/google/cloud/speech/v1/credentials.rb"
},
{
"path": "lib/google/cloud/speech/v1/doc/google/cloud/speech/v1/cloud_speech.rb"
},
{
"path": "lib/google/cloud/speech/v1/doc/google/longrunning/operations.rb"
},
{
"path": "lib/google/cloud/speech/v1/doc/google/protobuf/any.rb"
},
{
"path": "lib/google/cloud/speech/v1/doc/google/protobuf/duration.rb"
},
{
"path": "lib/google/cloud/speech/v1/doc/google/rpc/status.rb"
},
{
"path": "lib/google/cloud/speech/v1/helpers.rb"
},
{
"path": "lib/google/cloud/speech/v1/speech_client.rb"
},
{
"path": "lib/google/cloud/speech/v1/speech_client_config.json"
},
{
"path": "lib/google/cloud/speech/v1/stream.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/credentials.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/doc/google/cloud/speech/v1p1beta1/cloud_speech.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/doc/google/longrunning/operations.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/doc/google/protobuf/any.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/doc/google/protobuf/duration.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/doc/google/rpc/status.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/helpers.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/speech_client.rb"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/speech_client_config.json"
},
{
"path": "lib/google/cloud/speech/v1p1beta1/stream.rb"
},
{
"path": "lib/google/cloud/speech/version.rb"
},
{
"path": "synth.metadata"
},
{
"path": "synth.py"
},
{
"path": "test/google/cloud/speech/v1/get_operation_test.rb"
},
{
"path": "test/google/cloud/speech/v1/speech_client_test.rb"
},
{
"path": "test/google/cloud/speech/v1/stream_test.rb"
},
{
"path": "test/google/cloud/speech/v1p1beta1/get_operation_test.rb"
},
{
"path": "test/google/cloud/speech/v1p1beta1/speech_client_test.rb"
},
{
"path": "test/google/cloud/speech/v1p1beta1/stream_test.rb"
}
]
}

0 comments on commit c97a67c

Please sign in to comment.