Expand description
Well-known-types for Google Cloud APIs.
WARNING: this crate is under active development. We expect multiple breaking changes in the upcoming releases. Testing is also incomplete, we do not recommend that you use this crate in production. We welcome feedback about the APIs, documentation, missing features, bugs, etc.
Google Cloud APIs use a number of well-known types. These typically have custom JSON encoding, and may provide conversion functions to and from native or commonly used Rust types.
Modules§
- descriptor_
proto - Defines additional types related to DescriptorProto.
- enum_
descriptor_ proto - Defines additional types related to EnumDescriptorProto.
- extension_
range_ options - Defines additional types related to ExtensionRangeOptions.
- feature_
set - Defines additional types related to FeatureSet.
- feature_
set_ defaults - Defines additional types related to FeatureSetDefaults.
- field
- Defines additional types related to Field.
- field_
descriptor_ proto - Defines additional types related to FieldDescriptorProto.
- field_
options - Defines additional types related to FieldOptions.
- file_
options - Defines additional types related to FileOptions.
- generated_
code_ info - Defines additional types related to GeneratedCodeInfo.
- message
- Define traits required of all messages.
- method_
options - Defines additional types related to MethodOptions.
- source_
code_ info - Defines additional types related to SourceCodeInfo.
- uninterpreted_
option - Defines additional types related to UninterpretedOption.
Structs§
- Any
Any
contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.- Api
- Api is a light-weight descriptor for an API Interface.
- Descriptor
Proto - Describes a message type.
- Duration
- Well-known duration representation for Google APIs.
- Empty
- A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
- Enum
- Enum type definition.
- Enum
Descriptor Proto - Describes an enum type.
- Enum
Options - Enum
Value - Enum value definition.
- Enum
Value Descriptor Proto - Describes a value within an enum.
- Enum
Value Options - Extension
Range Options - Feature
Set - TODO Enums in C++ gencode (and potentially other languages) are not well scoped. This means that each of the feature enums below can clash with each other. The short names we’ve chosen maximize call-site readability, but leave us very open to this scenario. A future feature will be designed and implemented to handle this, hopefully before we ever hit a conflict here.
- Feature
SetDefaults - A compiled specification for the defaults of a set of features. These messages are generated from FeatureSet extensions and can be used to seed feature resolution. The resolution with this object becomes a simple search for the closest matching edition, followed by proto merges.
- Field
- A single field of a message type.
- Field
Descriptor Proto - Describes a field within a message.
- Field
Mask FieldMask
represents a set of symbolic field paths.- Field
Options - File
Descriptor Proto - Describes a complete .proto file.
- File
Descriptor Set - The protocol compiler can output a FileDescriptorSet containing the .proto files it parses.
- File
Options - Generated
Code Info - Describes the relationship between generated code and its original source file. A GeneratedCodeInfo message is associated with only one generated source file, but may contain references to different source .proto files.
- Message
Options - Method
- Method represents a method of an API interface.
- Method
Descriptor Proto - Describes a method of a service.
- Method
Options - Mixin
- Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows:
- Null
Value - The Google Cloud APIs use
google.protobuf.NullValue
to represent JSON null values. - Oneof
Descriptor Proto - Describes a oneof.
- Oneof
Options - Option
- A protocol buffer option, which can be attached to a message, field, enumeration, etc.
- Service
Descriptor Proto - Describes a service.
- Service
Options - Source
Code Info - Encapsulates information about the original source file from which a FileDescriptorProto was generated.
- Source
Context SourceContext
represents information about the source of a protobuf element, like the file in which it is defined.- Timestamp
- Well-known point in time representation for Google APIs.
- Type
- A protocol buffer message type.
- Uninterpreted
Option - A message representing a option the parser does not recognize. This only appears in options protos created by the compiler::Parser class. DescriptorPool resolves these when building Descriptor objects. Therefore, options protos in descriptor objects (e.g. returned by Descriptor::options(), or produced by Descriptor::CopyTo()) will never have UninterpretedOptions in them.
Enums§
- AnyError
- Indicates a problem trying to use an Any.
- Duration
Error - Represent failures in converting or creating Duration instances.
- Edition
- The full set of known editions.
- Syntax
- The syntax in which a protocol buffer element is defined.
- Timestamp
Error - Represent failures in converting or creating Timestamp instances.
Type Aliases§
- Bool
Value - Implements the
google.cloud.BoolValue
well-known type. - Bytes
Value - Implements the
google.cloud.BytesValue
well-known type. - Double
Value - Implements the
google.cloud.DoubleValue
well-known type. - Float
Value - Implements the
google.cloud.FloatValue
well-known type. - Int32
Value - Implements the
google.cloud.Int32Value
well-known type. - Int64
Value - Implements the
google.cloud.Int64Value
well-known type. - List
Value - The Google Cloud APIs use
google.protobuf.ListValue
to represent JSON to represent lists of JSON values. - String
Value - Implements the
google.cloud.StringValue
well-known type. - Struct
- The Google Cloud APIs use
google.protobuf.Struct
to represent JSON objects. - UInt32
Value - Implements the
google.cloud.UInt32Value
well-known type. - UInt64
Value - Implements the
google.cloud.UInt64Value
well-known type. - Value
- The Google Cloud APIs use
google.protobuf.Value
to represent JSON values, including objects, lists, and scalars.