diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 5e99df3..a6d2397 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -4,12 +4,13 @@ This is the **primary** instruction file for AI coding agents. `AGENTS.md` and ` ## What this repository is -The single source of truth for generic, domain-agnostic Protobuf contracts shared across Feather gRPC services. The schema in `proto/core.proto` is compiled into two published packages: +The single source of truth for generic, domain-agnostic Protobuf contracts shared across Feather gRPC services. The schema in `proto/feather/core/v1/core.proto` is compiled by `buf generate` into committed output under `gen/`, published as: -- **.NET**: `Feather.Contracts` NuGet package (built from `Contracts.csproj`). -- **PHP**: `feather/contracts` composer package, with generated classes committed under `php/`. +- **.NET**: `Feather.Contracts` NuGet package (`Contracts.csproj` compiles `gen/csharp`). +- **PHP**: `feather/contracts` composer package (autoloads `gen/php`). +- **Protobuf module**: `buf.build/feathertools/core` on the Buf Schema Registry. -It is consumed as a .NET dependency in `Feather.Grpc`, as a PHP dependency in the PHP contracts library, and by importing `proto/core.proto` directly into other `.proto` files. +It is consumed as a .NET dependency in `Feather.Grpc`, as a PHP dependency in the PHP contracts library, and by depending on the BSR module in other `.proto` files. ## Golden rules @@ -21,13 +22,13 @@ It is consumed as a .NET dependency in `Feather.Grpc`, as a PHP dependency in th ## Editing the schema -After changing `proto/core.proto`: +After changing `proto/feather/core/v1/core.proto`: -1. Lint: `./bin/lint-proto.sh` (needs `brew install protolint`; config in `.protolint/.protolint.yaml`). +1. Lint: `buf lint` (config in `buf.yaml`, STANDARD rule set). 2. .NET classes regenerate automatically at build time via `Grpc.Tools` — run `./build.sh`. -3. Regenerate committed PHP classes: `./bin/grpc-php.sh` (builds `grpc-generator.dockerfile`, runs `generate-both.sh` in the container). Commit the updated `php/` output. +3. Regenerate committed classes: `buf generate` (remote plugins in `buf.gen.yaml`, managed mode) emits C# to `gen/csharp` and PHP to `gen/php`. Commit the updated `gen/` output. `buf build` only compiles the schema; use `buf generate` to emit code. -**Before opening a PR**, always run `./bin/grpc-php.sh` and commit the regenerated `php/` files so they stay in sync with `proto/core.proto` in git. +**Before opening a PR**, always run `buf generate` and commit the regenerated `gen/` files so they stay in sync with the schema in git. ### Proto naming conventions @@ -35,7 +36,7 @@ After changing `proto/core.proto`: - Messages / enums: `UpperCamelCase` - Fields: `lower_snake_case` - Enum values: `UPPER_SNAKE_CASE` -- Package stays `feather.core`; keep `csharp_namespace = "Feather.Contracts"` and `php_namespace = "Feather\\Contracts"`. +- Package is `feather.core.v1`; do NOT set `csharp_namespace` / `php_namespace` — Buf managed mode derives them (`Feather.Core.V1`, `Feather\Core\V1`). ## Build & tooling @@ -48,7 +49,7 @@ After changing `proto/core.proto`: - `net-tests.yaml` — .NET build & tests. - `php-tests.yaml` — PHP lint / static analysis. -- `proto-lint.yaml` — protolint on the schema. +- `proto-lint.yaml` — `buf lint` on the schema. - `net-publish.yaml` — publishes NuGet on a `MAJOR.MINOR.PATCH` tag push. - `pr-check.yaml` — blocks fixup commits; shellcheck. diff --git a/.github/workflows/bsr-publish.yaml b/.github/workflows/bsr-publish.yaml new file mode 100644 index 0000000..c009839 --- /dev/null +++ b/.github/workflows/bsr-publish.yaml @@ -0,0 +1,22 @@ +name: BSR Publish + +on: + push: + tags: + - '[0-9]+\.[0-9]+\.[0-9]+' + +jobs: + publish: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - uses: actions/checkout@v6 + + - name: Push to the Buf Schema Registry + uses: bufbuild/buf-action@v1 + with: + token: ${{ secrets.BUF_TOKEN }} + push: true diff --git a/.github/workflows/proto-lint.yaml b/.github/workflows/proto-lint.yaml index 86ccaf4..9cc23af 100644 --- a/.github/workflows/proto-lint.yaml +++ b/.github/workflows/proto-lint.yaml @@ -7,13 +7,15 @@ on: - cron: "0 3 * * *" jobs: - protolint: + buf-lint: name: "Proto files linting" runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - name: Run protolint - uses: plexsystems/protolint-action@v0.7.0 + - uses: bufbuild/buf-action@v1 with: - configDirectory: .protolint + setup_only: true + + - name: Run buf lint + run: buf lint diff --git a/.protolint/.protolint.yaml b/.protolint/.protolint.yaml deleted file mode 100644 index 4c61a87..0000000 --- a/.protolint/.protolint.yaml +++ /dev/null @@ -1,28 +0,0 @@ -lint: - rules: - no_default: false - add: - - ENUM_FIELD_NAMES_PREFIX - - ENUM_FIELD_NAMES_UPPER_SNAKE_CASE - - ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH - - ENUM_NAMES_UPPER_CAMEL_CASE - - FILE_NAMES_LOWER_SNAKE_CASE - - FIELD_NAMES_LOWER_SNAKE_CASE - - MPORTS_SORTED - - MESSAGE_NAMES_UPPER_CAMEL_CASE - - ORDER - - RPC_NAMES_UPPER_CAMEL_CASE - - SERVICE_NAMES_UPPER_CAMEL_CASE - - REPEATED_FIELD_NAMES_PLURALIZED - - QUOTE_CONSISTENT - - INDENT - - PROTO3_FIELDS_AVOID_REQUIRED - - PROTO3_GROUPS_AVOID - - MAX_LINE_LENGTH - - remove: - - PACKAGE_NAME_LOWER_CASE - - rules_option: - max_line_length: - max_chars: 240 diff --git a/CHANGELOG.md b/CHANGELOG.md index f2cc8d4..b6068d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Unreleased +### Changed +- Distribute the schema via the Buf Schema Registry (`buf.build/feathertools/core`); added `buf.yaml` and `buf.gen.yaml` (managed mode). +- Moved `proto/core.proto` to `proto/feather/core/v1/core.proto` and bumped the package to `feather.core.v1`. +- Generated namespaces changed: .NET `Feather.Contracts` → `Feather.Core.V1`, PHP `Feather\Contracts` → `Feather\Core\V1`. + +### Removed +- Removed the `csharp_namespace` / `php_namespace` proto options; Buf managed mode now derives them. ## 1.0.0 - 2026-07-30 - Initial implementation diff --git a/Contracts.csproj b/Contracts.csproj index b2a5ebe..f48e7f9 100644 --- a/Contracts.csproj +++ b/Contracts.csproj @@ -10,11 +10,9 @@ https://github.com/FeatherTools/grpc.contract.core.git https://github.com/FeatherTools/grpc.contract.core + - - - - + diff --git a/README.md b/README.md index 17d3631..22635c2 100644 --- a/README.md +++ b/README.md @@ -6,20 +6,21 @@ > Core Protobuf contracts (generic, reusable message types) shared across Feather gRPC services — packaged for both .NET and PHP. -This repository is the single source of truth for the low-level, domain-agnostic contracts used across Feather. The Protobuf schema in [`proto/core.proto`](proto/core.proto) is compiled into: +This repository is the single source of truth for the low-level, domain-agnostic contracts used across Feather. The Protobuf schema in [`proto/feather/core/v1/core.proto`](proto/feather/core/v1/core.proto) is compiled into: -- a **.NET** library published as the [`Feather.Contracts`](https://www.nuget.org/packages/Feather.Contracts) NuGet package, and -- a **PHP** package (`feather/contracts`) with generated message, client and RoadRunner server classes under [`php/`](php/). +- a **.NET** library published as the [`Feather.Contracts`](https://www.nuget.org/packages/Feather.Contracts) NuGet package, +- a **PHP** package (`feather/contracts`) with generated message, client and RoadRunner server classes under [`gen/php/`](gen/php/), and +- a **Protobuf module** published to the [Buf Schema Registry](https://buf.build/feathertools/core) (`buf.build/feathertools/core`). It is designed to be consumed in three ways: 1. As a **.NET dependency** in the `Feather.Grpc` library, providing the core message types. 2. As a **PHP dependency** in the PHP contracts library, providing the same core types. -3. **Directly in other `.proto` files**, by importing `proto/core.proto` and referencing the `feather.core` types. +3. **Directly in other `.proto` files**, by depending on the BSR module `buf.build/feathertools/core` and referencing the `feather.core.v1` types. ## Contracts -All messages live in the `feather.core` package ([`proto/core.proto`](proto/core.proto)): +All messages live in the `feather.core.v1` package ([`proto/feather/core/v1/core.proto`](proto/feather/core/v1/core.proto)): | Message | Purpose | | ----------------------- | ------------------------------------------------------------------------------ | @@ -31,10 +32,10 @@ All messages live in the `feather.core` package ([`proto/core.proto`](proto/core | `Box` | An `Instance` bound to a `Spot`. | | `SerializedForChunking` | Wrapper (`bytes content`) for chunking large payloads in streaming gRPC calls. | -Generated namespaces: +Generated namespaces (derived by Buf managed mode from the `feather.core.v1` package): -- .NET: `Feather.Contracts` -- PHP: `Feather\Contracts` (messages) and `GPBMetadata\Proto\Core` (metadata) +- .NET: `Feather.Core.V1` +- PHP: `Feather\Core\V1` (messages) and `Feather\Core\V1\GPBMetadata` (metadata) ## Install @@ -45,7 +46,7 @@ dotnet add package Feather.Contracts ``` ```fsharp -open Feather.Contracts +open Feather.Core.V1 let error = Error(Name = "NotFound", Message = "Instance not found") ``` @@ -72,21 +73,31 @@ composer require feather/contracts:dev-main ``` ```php -use Feather\Contracts\Error; +use Feather\Core\V1\Error; $error = (new Error())->setName('NotFound')->setMessage('Instance not found'); ``` ### Import in another `.proto` +Add the BSR module as a dependency in your `buf.yaml`: + +```yaml +version: v2 +deps: + - buf.build/feathertools/core +``` + +Then import and reference the `feather.core.v1` types: + ```proto syntax = "proto3"; -import "proto/core.proto"; +import "feather/core/v1/core.proto"; message Envelope { - feather.core.CorrelationId correlation_id = 1; - feather.core.Error error = 2; + feather.core.v1.CorrelationId correlation_id = 1; + feather.core.v1.Error error = 2; } ``` @@ -113,44 +124,53 @@ Common flags: `no-lint`, `no-clean` to skip the respective steps. ## Working with the Protobuf schema -`proto/core.proto` is the source of truth. After editing it: +[`proto/feather/core/v1/core.proto`](proto/feather/core/v1/core.proto) is the source of truth. After editing it: 1. **Lint** the schema: ```sh - ./bin/lint-proto.sh # requires: brew install protolint + buf lint ``` 2. **.NET** classes are generated automatically at build time by `Grpc.Tools` (see [`Contracts.csproj`](Contracts.csproj)) — just run `./build.sh`. -3. **PHP** classes are regenerated with the containerized generator (produces message, client `*Client`/`*Stub` and RoadRunner server `*Interface` classes): +3. **PHP** classes (and the C# reference output) are regenerated with Buf using the remote plugins in [`buf.gen.yaml`](buf.gen.yaml): ```sh - ./bin/grpc-php.sh + buf generate ``` - This builds [`grpc-generator.dockerfile`](grpc-generator.dockerfile) and runs [`generate-both.sh`](generate-both.sh) inside it. Generated PHP output lands in [`php/`](php/) and is committed to the repository. + This produces PHP message, client and RoadRunner server classes under [`gen/php/`](gen/php/) (namespace `Feather\Core\V1`) and the C# under [`gen/csharp/`](gen/csharp/); both are committed to the repository. `buf build` only compiles the schema to an in-memory image; use `buf generate` to emit code. - > **Before opening a PR**, run `./bin/grpc-php.sh` and commit the regenerated `php/` files so they stay in sync with `proto/core.proto` in git. + > **Before opening a PR**, run `buf generate` and commit the regenerated `gen/` files so they stay in sync with the schema in git. + +4. **Publish** the module to the Buf Schema Registry: + + ```sh + buf registry login # first time only + buf push # publishes buf.build/feathertools/core + ``` ### Proto conventions - File name: `lower_snake_case`; messages: `UpperCamelCase`; fields: `lower_snake_case`; enum values: `UPPER_SNAKE_CASE`. - Keep types generic and domain-agnostic — this library holds only reusable primitives. -- Full rule set: [`.protolint/.protolint.yaml`](.protolint/.protolint.yaml). +- Enforced by Buf's `STANDARD` lint rule set (see [`buf.yaml`](buf.yaml)). ## Repository layout ``` -proto/core.proto # Source-of-truth Protobuf schema -Contracts.csproj # .NET package (Feather.Contracts) -composer.json # PHP package (feather/contracts) -php/ # Generated PHP classes (committed) -build/ # FAKE build project (F#) -bin/ # Helper scripts (proto lint, PHP generation) -.github/workflows/ # CI: net-tests, php-tests, proto-lint, net-publish, pr-check +proto/feather/core/v1/core.proto # Source-of-truth Protobuf schema +buf.yaml # Buf module (buf.build/feathertools/core), lint & breaking config +buf.gen.yaml # Buf code generation (managed mode, remote plugins) +Contracts.csproj # .NET package (Feather.Contracts), compiles gen/csharp +composer.json # PHP package (feather/contracts), autoloads gen/php +gen/csharp/ # Generated C# classes (committed, compiled by Contracts.csproj) +gen/php/ # Generated PHP classes (committed, autoloaded by composer) +build/ # FAKE build project (F#) +.github/workflows/ # CI: net-tests, php-tests, proto-lint, net-publish, bsr-publish, pr-check ``` ## Releasing -Publishing the NuGet package is triggered by pushing a semver tag (`MAJOR.MINOR.PATCH`), which runs the [`.NET Publish`](.github/workflows/net-publish.yaml) workflow. Update [`CHANGELOG.md`](CHANGELOG.md) and the `` in [`Contracts.csproj`](Contracts.csproj) before tagging. +Publishing the NuGet package is triggered by pushing a semver tag (`MAJOR.MINOR.PATCH`), which runs the [`.NET Publish`](.github/workflows/net-publish.yaml) workflow. Update [`CHANGELOG.md`](CHANGELOG.md) and the `` in [`Contracts.csproj`](Contracts.csproj) before tagging. Publish the Protobuf module to the BSR with `buf push`. diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 0000000..74b55be --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,18 @@ +version: v2 +clean: true +managed: + enabled: true # derive csharp_namespace / php_namespace from the package +plugins: + # C# messages + gRPC + - remote: buf.build/protocolbuffers/csharp + out: gen/csharp + - remote: buf.build/grpc/csharp + out: gen/csharp + # PHP messages + RoadRunner gRPC (official BSR plugin) + - remote: buf.build/protocolbuffers/php + out: gen/php + - remote: buf.build/community/roadrunner-server-php-grpc + out: gen/php + # future: TypeScript / Java — add one line each +inputs: + - directory: proto diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000..8b13a62 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,10 @@ +version: v2 +modules: + - path: proto + name: buf.build/feathertools/core +lint: + use: + - STANDARD +breaking: + use: + - FILE diff --git a/composer.json b/composer.json index 0765db9..4402127 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,7 @@ }, "autoload": { "psr-4": { - "Feather\\Contracts\\": "php/Feather/Contracts/", - "GPBMetadata\\": "php/GPBMetadata/" + "Feather\\Core\\V1\\": "gen/php/Feather/Core/V1/" } }, "archive": { @@ -29,6 +28,7 @@ "/proto", "/tuc", "/paket-files", + "/gen/csharp", "*.csproj", "*.sh", "/paket.*" @@ -48,7 +48,7 @@ "@composer normalize" ], "lint": [ - "vendor/bin/parallel-lint -j 10 ./php", + "vendor/bin/parallel-lint -j 10 ./gen/php", "@composer validate", "@composer normalize --dry-run" ] diff --git a/gen/csharp/Core.cs b/gen/csharp/Core.cs new file mode 100644 index 0000000..3a4139c --- /dev/null +++ b/gen/csharp/Core.cs @@ -0,0 +1,1581 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: feather/core/v1/core.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Feather.Core.V1 { + + /// Holder for reflection information generated from feather/core/v1/core.proto + public static partial class CoreReflection { + + #region Descriptor + /// File descriptor for feather/core/v1/core.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static CoreReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChpmZWF0aGVyL2NvcmUvdjEvY29yZS5wcm90bxIPZmVhdGhlci5jb3JlLnYx", + "IjUKBUVycm9yEhIKBG5hbWUYASABKAlSBG5hbWUSGAoHbWVzc2FnZRgCIAEo", + "CVIHbWVzc2FnZSIfCg1Db3JyZWxhdGlvbklkEg4KAmlkGAEgASgJUgJpZCIy", + "CglUaW1lc3RhbXASJQoOdW5peF90aW1lc3RhbXAYASABKANSDXVuaXhUaW1l", + "c3RhbXAiMgoEU3BvdBISCgR6b25lGAEgASgJUgR6b25lEhYKBmJ1Y2tldBgC", + "IAEoCVIGYnVja2V0IiYKCEluc3RhbmNlEhoKCGluc3RhbmNlGAEgASgJUghp", + "bnN0YW5jZSJnCgNCb3gSNQoIaW5zdGFuY2UYASABKAsyGS5mZWF0aGVyLmNv", + "cmUudjEuSW5zdGFuY2VSCGluc3RhbmNlEikKBHNwb3QYAiABKAsyFS5mZWF0", + "aGVyLmNvcmUudjEuU3BvdFIEc3BvdCIxChVTZXJpYWxpemVkRm9yQ2h1bmtp", + "bmcSGAoHY29udGVudBgBIAEoDFIHY29udGVudEJ+ChNjb20uZmVhdGhlci5j", + "b3JlLnYxQglDb3JlUHJvdG9QAaICA0ZDWKoCD0ZlYXRoZXIuQ29yZS5WMcoC", + "D0ZlYXRoZXJcQ29yZVxWMeICG0ZlYXRoZXJcQ29yZVxWMVxHUEJNZXRhZGF0", + "YeoCEUZlYXRoZXI6OkNvcmU6OlYxYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Feather.Core.V1.Error), global::Feather.Core.V1.Error.Parser, new[]{ "Name", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Feather.Core.V1.CorrelationId), global::Feather.Core.V1.CorrelationId.Parser, new[]{ "Id" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Feather.Core.V1.Timestamp), global::Feather.Core.V1.Timestamp.Parser, new[]{ "UnixTimestamp" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Feather.Core.V1.Spot), global::Feather.Core.V1.Spot.Parser, new[]{ "Zone", "Bucket" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Feather.Core.V1.Instance), global::Feather.Core.V1.Instance.Parser, new[]{ "Instance_" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Feather.Core.V1.Box), global::Feather.Core.V1.Box.Parser, new[]{ "Instance", "Spot" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Feather.Core.V1.SerializedForChunking), global::Feather.Core.V1.SerializedForChunking.Parser, new[]{ "Content" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Error : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Error()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Feather.Core.V1.CoreReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Error() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Error(Error other) : this() { + name_ = other.name_; + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Error Clone() { + return new Error(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 2; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Error); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Error other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Error other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CorrelationId : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CorrelationId()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Feather.Core.V1.CoreReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CorrelationId() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CorrelationId(CorrelationId other) : this() { + id_ = other.id_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CorrelationId Clone() { + return new CorrelationId(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private string id_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CorrelationId); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CorrelationId other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CorrelationId other) { + if (other == null) { + return; + } + if (other.Id.Length != 0) { + Id = other.Id; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Id = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Id = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Timestamp : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Timestamp()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Feather.Core.V1.CoreReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Timestamp() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Timestamp(Timestamp other) : this() { + unixTimestamp_ = other.unixTimestamp_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Timestamp Clone() { + return new Timestamp(this); + } + + /// Field number for the "unix_timestamp" field. + public const int UnixTimestampFieldNumber = 1; + private long unixTimestamp_; + /// + /// Unix timestamp in milliseconds + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long UnixTimestamp { + get { return unixTimestamp_; } + set { + unixTimestamp_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Timestamp); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Timestamp other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UnixTimestamp != other.UnixTimestamp) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UnixTimestamp != 0L) hash ^= UnixTimestamp.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UnixTimestamp != 0L) { + output.WriteRawTag(8); + output.WriteInt64(UnixTimestamp); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UnixTimestamp != 0L) { + output.WriteRawTag(8); + output.WriteInt64(UnixTimestamp); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UnixTimestamp != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(UnixTimestamp); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Timestamp other) { + if (other == null) { + return; + } + if (other.UnixTimestamp != 0L) { + UnixTimestamp = other.UnixTimestamp; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UnixTimestamp = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UnixTimestamp = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Spot : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Spot()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Feather.Core.V1.CoreReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Spot() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Spot(Spot other) : this() { + zone_ = other.zone_; + bucket_ = other.bucket_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Spot Clone() { + return new Spot(this); + } + + /// Field number for the "zone" field. + public const int ZoneFieldNumber = 1; + private string zone_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Zone { + get { return zone_; } + set { + zone_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "bucket" field. + public const int BucketFieldNumber = 2; + private string bucket_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Bucket { + get { return bucket_; } + set { + bucket_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Spot); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Spot other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Zone != other.Zone) return false; + if (Bucket != other.Bucket) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Zone.Length != 0) hash ^= Zone.GetHashCode(); + if (Bucket.Length != 0) hash ^= Bucket.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Zone.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Zone); + } + if (Bucket.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Bucket); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Zone.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Zone); + } + if (Bucket.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Bucket); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Zone.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Zone); + } + if (Bucket.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Bucket); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Spot other) { + if (other == null) { + return; + } + if (other.Zone.Length != 0) { + Zone = other.Zone; + } + if (other.Bucket.Length != 0) { + Bucket = other.Bucket; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Zone = input.ReadString(); + break; + } + case 18: { + Bucket = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Zone = input.ReadString(); + break; + } + case 18: { + Bucket = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Instance : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Instance()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Feather.Core.V1.CoreReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Instance() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Instance(Instance other) : this() { + instance_ = other.instance_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Instance Clone() { + return new Instance(this); + } + + /// Field number for the "instance" field. + public const int Instance_FieldNumber = 1; + private string instance_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Instance_ { + get { return instance_; } + set { + instance_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Instance); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Instance other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Instance_ != other.Instance_) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Instance_.Length != 0) hash ^= Instance_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Instance_.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Instance_); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Instance_.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Instance_); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Instance_.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Instance_); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Instance other) { + if (other == null) { + return; + } + if (other.Instance_.Length != 0) { + Instance_ = other.Instance_; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Instance_ = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Instance_ = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Box : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Box()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Feather.Core.V1.CoreReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Box() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Box(Box other) : this() { + instance_ = other.instance_ != null ? other.instance_.Clone() : null; + spot_ = other.spot_ != null ? other.spot_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Box Clone() { + return new Box(this); + } + + /// Field number for the "instance" field. + public const int InstanceFieldNumber = 1; + private global::Feather.Core.V1.Instance instance_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Feather.Core.V1.Instance Instance { + get { return instance_; } + set { + instance_ = value; + } + } + + /// Field number for the "spot" field. + public const int SpotFieldNumber = 2; + private global::Feather.Core.V1.Spot spot_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Feather.Core.V1.Spot Spot { + get { return spot_; } + set { + spot_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Box); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Box other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Instance, other.Instance)) return false; + if (!object.Equals(Spot, other.Spot)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (instance_ != null) hash ^= Instance.GetHashCode(); + if (spot_ != null) hash ^= Spot.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (instance_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Instance); + } + if (spot_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Spot); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (instance_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Instance); + } + if (spot_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Spot); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (instance_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Instance); + } + if (spot_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Spot); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Box other) { + if (other == null) { + return; + } + if (other.instance_ != null) { + if (instance_ == null) { + Instance = new global::Feather.Core.V1.Instance(); + } + Instance.MergeFrom(other.Instance); + } + if (other.spot_ != null) { + if (spot_ == null) { + Spot = new global::Feather.Core.V1.Spot(); + } + Spot.MergeFrom(other.Spot); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (instance_ == null) { + Instance = new global::Feather.Core.V1.Instance(); + } + input.ReadMessage(Instance); + break; + } + case 18: { + if (spot_ == null) { + Spot = new global::Feather.Core.V1.Spot(); + } + input.ReadMessage(Spot); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (instance_ == null) { + Instance = new global::Feather.Core.V1.Instance(); + } + input.ReadMessage(Instance); + break; + } + case 18: { + if (spot_ == null) { + Spot = new global::Feather.Core.V1.Spot(); + } + input.ReadMessage(Spot); + break; + } + } + } + } + #endif + + } + + /// + /// Common message for chunking large content (e.g. user data files) in stream gRPC calls which expects the whole message for processing + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SerializedForChunking : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SerializedForChunking()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Feather.Core.V1.CoreReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SerializedForChunking() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SerializedForChunking(SerializedForChunking other) : this() { + content_ = other.content_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SerializedForChunking Clone() { + return new SerializedForChunking(this); + } + + /// Field number for the "content" field. + public const int ContentFieldNumber = 1; + private pb::ByteString content_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Content { + get { return content_; } + set { + content_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SerializedForChunking); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SerializedForChunking other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Content != other.Content) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Content.Length != 0) hash ^= Content.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Content.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Content); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Content.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Content); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Content.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Content); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SerializedForChunking other) { + if (other == null) { + return; + } + if (other.Content.Length != 0) { + Content = other.Content; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Content = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Content = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/php/Feather/Contracts/Box.php b/gen/php/Feather/Core/V1/Box.php similarity index 51% rename from php/Feather/Contracts/Box.php rename to gen/php/Feather/Core/V1/Box.php index a21b05c..e8ede40 100644 --- a/php/Feather/Contracts/Box.php +++ b/gen/php/Feather/Core/V1/Box.php @@ -1,25 +1,25 @@ feather.core.Box + * Generated from protobuf message feather.core.v1.Box */ class Box extends \Google\Protobuf\Internal\Message { /** - * Generated from protobuf field .feather.core.Instance instance = 1; + * Generated from protobuf field .feather.core.v1.Instance instance = 1 [json_name = "instance"]; */ protected $instance = null; /** - * Generated from protobuf field .feather.core.Spot spot = 2; + * Generated from protobuf field .feather.core.v1.Spot spot = 2 [json_name = "spot"]; */ protected $spot = null; @@ -29,18 +29,18 @@ class Box extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type \Feather\Contracts\Instance $instance - * @type \Feather\Contracts\Spot $spot + * @type \Feather\Core\V1\Instance $instance + * @type \Feather\Core\V1\Spot $spot * } */ public function __construct($data = NULL) { - \GPBMetadata\Proto\Core::initOnce(); + \Feather\Core\V1\GPBMetadata\Core::initOnce(); parent::__construct($data); } /** - * Generated from protobuf field .feather.core.Instance instance = 1; - * @return \Feather\Contracts\Instance|null + * Generated from protobuf field .feather.core.v1.Instance instance = 1 [json_name = "instance"]; + * @return \Feather\Core\V1\Instance|null */ public function getInstance() { @@ -58,11 +58,11 @@ public function clearInstance() } /** - * Generated from protobuf field .feather.core.Instance instance = 1; - * @param \Feather\Contracts\Instance $var + * Generated from protobuf field .feather.core.v1.Instance instance = 1 [json_name = "instance"]; + * @param \Feather\Core\V1\Instance $var * @return $this */ - public function setInstance(\Feather\Contracts\Instance|null $var) + public function setInstance(\Feather\Core\V1\Instance|null $var) { $this->instance = $var; @@ -70,8 +70,8 @@ public function setInstance(\Feather\Contracts\Instance|null $var) } /** - * Generated from protobuf field .feather.core.Spot spot = 2; - * @return \Feather\Contracts\Spot|null + * Generated from protobuf field .feather.core.v1.Spot spot = 2 [json_name = "spot"]; + * @return \Feather\Core\V1\Spot|null */ public function getSpot() { @@ -89,11 +89,11 @@ public function clearSpot() } /** - * Generated from protobuf field .feather.core.Spot spot = 2; - * @param \Feather\Contracts\Spot $var + * Generated from protobuf field .feather.core.v1.Spot spot = 2 [json_name = "spot"]; + * @param \Feather\Core\V1\Spot $var * @return $this */ - public function setSpot(\Feather\Contracts\Spot|null $var) + public function setSpot(\Feather\Core\V1\Spot|null $var) { $this->spot = $var; diff --git a/php/Feather/Contracts/CorrelationId.php b/gen/php/Feather/Core/V1/CorrelationId.php similarity index 66% rename from php/Feather/Contracts/CorrelationId.php rename to gen/php/Feather/Core/V1/CorrelationId.php index c0075e6..5d5f9ca 100644 --- a/php/Feather/Contracts/CorrelationId.php +++ b/gen/php/Feather/Core/V1/CorrelationId.php @@ -1,21 +1,21 @@ feather.core.CorrelationId + * Generated from protobuf message feather.core.v1.CorrelationId */ class CorrelationId extends \Google\Protobuf\Internal\Message { /** - * Generated from protobuf field string id = 1; + * Generated from protobuf field string id = 1 [json_name = "id"]; */ protected $id = ''; @@ -29,12 +29,12 @@ class CorrelationId extends \Google\Protobuf\Internal\Message * } */ public function __construct($data = NULL) { - \GPBMetadata\Proto\Core::initOnce(); + \Feather\Core\V1\GPBMetadata\Core::initOnce(); parent::__construct($data); } /** - * Generated from protobuf field string id = 1; + * Generated from protobuf field string id = 1 [json_name = "id"]; * @return string */ public function getId() @@ -43,7 +43,7 @@ public function getId() } /** - * Generated from protobuf field string id = 1; + * Generated from protobuf field string id = 1 [json_name = "id"]; * @param string $var * @return $this */ diff --git a/php/Feather/Contracts/Error.php b/gen/php/Feather/Core/V1/Error.php similarity index 64% rename from php/Feather/Contracts/Error.php rename to gen/php/Feather/Core/V1/Error.php index 3debbcb..6877c2e 100644 --- a/php/Feather/Contracts/Error.php +++ b/gen/php/Feather/Core/V1/Error.php @@ -1,25 +1,25 @@ feather.core.Error + * Generated from protobuf message feather.core.v1.Error */ class Error extends \Google\Protobuf\Internal\Message { /** - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [json_name = "name"]; */ protected $name = ''; /** - * Generated from protobuf field string message = 2; + * Generated from protobuf field string message = 2 [json_name = "message"]; */ protected $message = ''; @@ -34,12 +34,12 @@ class Error extends \Google\Protobuf\Internal\Message * } */ public function __construct($data = NULL) { - \GPBMetadata\Proto\Core::initOnce(); + \Feather\Core\V1\GPBMetadata\Core::initOnce(); parent::__construct($data); } /** - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [json_name = "name"]; * @return string */ public function getName() @@ -48,7 +48,7 @@ public function getName() } /** - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [json_name = "name"]; * @param string $var * @return $this */ @@ -61,7 +61,7 @@ public function setName(string $var) } /** - * Generated from protobuf field string message = 2; + * Generated from protobuf field string message = 2 [json_name = "message"]; * @return string */ public function getMessage() @@ -70,7 +70,7 @@ public function getMessage() } /** - * Generated from protobuf field string message = 2; + * Generated from protobuf field string message = 2 [json_name = "message"]; * @param string $var * @return $this */ diff --git a/gen/php/Feather/Core/V1/GPBMetadata/Core.php b/gen/php/Feather/Core/V1/GPBMetadata/Core.php new file mode 100644 index 0000000..e1f83c9 --- /dev/null +++ b/gen/php/Feather/Core/V1/GPBMetadata/Core.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xB9\x04\x0A\x1Afeather/core/v1/core.proto\x12\x0Ffeather.core.v1\"5\x0A\x05Error\x12\x12\x0A\x04name\x18\x01 \x01(\x09R\x04name\x12\x18\x0A\x07message\x18\x02 \x01(\x09R\x07message\"\x1F\x0A\x0DCorrelationId\x12\x0E\x0A\x02id\x18\x01 \x01(\x09R\x02id\"2\x0A\x09Timestamp\x12%\x0A\x0Eunix_timestamp\x18\x01 \x01(\x03R\x0DunixTimestamp\"2\x0A\x04Spot\x12\x12\x0A\x04zone\x18\x01 \x01(\x09R\x04zone\x12\x16\x0A\x06bucket\x18\x02 \x01(\x09R\x06bucket\"&\x0A\x08Instance\x12\x1A\x0A\x08instance\x18\x01 \x01(\x09R\x08instance\"g\x0A\x03Box\x125\x0A\x08instance\x18\x01 \x01(\x0B2\x19.feather.core.v1.InstanceR\x08instance\x12)\x0A\x04spot\x18\x02 \x01(\x0B2\x15.feather.core.v1.SpotR\x04spot\"1\x0A\x15SerializedForChunking\x12\x18\x0A\x07content\x18\x01 \x01(\x0CR\x07contentB~\x0A\x13com.feather.core.v1B\x09CoreProtoP\x01\xA2\x02\x03FCX\xAA\x02\x0FFeather.Core.V1\xCA\x02\x0FFeather\\Core\\V1\xE2\x02\x1BFeather\\Core\\V1\\GPBMetadata\xEA\x02\x11Feather::Core::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/php/Feather/Contracts/Instance.php b/gen/php/Feather/Core/V1/Instance.php similarity index 66% rename from php/Feather/Contracts/Instance.php rename to gen/php/Feather/Core/V1/Instance.php index 3049e24..b822cc1 100644 --- a/php/Feather/Contracts/Instance.php +++ b/gen/php/Feather/Core/V1/Instance.php @@ -1,21 +1,21 @@ feather.core.Instance + * Generated from protobuf message feather.core.v1.Instance */ class Instance extends \Google\Protobuf\Internal\Message { /** - * Generated from protobuf field string instance = 1; + * Generated from protobuf field string instance = 1 [json_name = "instance"]; */ protected $instance = ''; @@ -29,12 +29,12 @@ class Instance extends \Google\Protobuf\Internal\Message * } */ public function __construct($data = NULL) { - \GPBMetadata\Proto\Core::initOnce(); + \Feather\Core\V1\GPBMetadata\Core::initOnce(); parent::__construct($data); } /** - * Generated from protobuf field string instance = 1; + * Generated from protobuf field string instance = 1 [json_name = "instance"]; * @return string */ public function getInstance() @@ -43,7 +43,7 @@ public function getInstance() } /** - * Generated from protobuf field string instance = 1; + * Generated from protobuf field string instance = 1 [json_name = "instance"]; * @param string $var * @return $this */ diff --git a/php/Feather/Contracts/SerializedForChunking.php b/gen/php/Feather/Core/V1/SerializedForChunking.php similarity index 69% rename from php/Feather/Contracts/SerializedForChunking.php rename to gen/php/Feather/Core/V1/SerializedForChunking.php index c041088..7999aaa 100644 --- a/php/Feather/Contracts/SerializedForChunking.php +++ b/gen/php/Feather/Core/V1/SerializedForChunking.php @@ -1,9 +1,9 @@ feather.core.SerializedForChunking + * Generated from protobuf message feather.core.v1.SerializedForChunking */ class SerializedForChunking extends \Google\Protobuf\Internal\Message { /** - * Generated from protobuf field bytes content = 1; + * Generated from protobuf field bytes content = 1 [json_name = "content"]; */ protected $content = ''; @@ -31,12 +31,12 @@ class SerializedForChunking extends \Google\Protobuf\Internal\Message * } */ public function __construct($data = NULL) { - \GPBMetadata\Proto\Core::initOnce(); + \Feather\Core\V1\GPBMetadata\Core::initOnce(); parent::__construct($data); } /** - * Generated from protobuf field bytes content = 1; + * Generated from protobuf field bytes content = 1 [json_name = "content"]; * @return string */ public function getContent() @@ -45,7 +45,7 @@ public function getContent() } /** - * Generated from protobuf field bytes content = 1; + * Generated from protobuf field bytes content = 1 [json_name = "content"]; * @param string $var * @return $this */ diff --git a/php/Feather/Contracts/Spot.php b/gen/php/Feather/Core/V1/Spot.php similarity index 64% rename from php/Feather/Contracts/Spot.php rename to gen/php/Feather/Core/V1/Spot.php index e462188..1ac64b1 100644 --- a/php/Feather/Contracts/Spot.php +++ b/gen/php/Feather/Core/V1/Spot.php @@ -1,25 +1,25 @@ feather.core.Spot + * Generated from protobuf message feather.core.v1.Spot */ class Spot extends \Google\Protobuf\Internal\Message { /** - * Generated from protobuf field string zone = 1; + * Generated from protobuf field string zone = 1 [json_name = "zone"]; */ protected $zone = ''; /** - * Generated from protobuf field string bucket = 2; + * Generated from protobuf field string bucket = 2 [json_name = "bucket"]; */ protected $bucket = ''; @@ -34,12 +34,12 @@ class Spot extends \Google\Protobuf\Internal\Message * } */ public function __construct($data = NULL) { - \GPBMetadata\Proto\Core::initOnce(); + \Feather\Core\V1\GPBMetadata\Core::initOnce(); parent::__construct($data); } /** - * Generated from protobuf field string zone = 1; + * Generated from protobuf field string zone = 1 [json_name = "zone"]; * @return string */ public function getZone() @@ -48,7 +48,7 @@ public function getZone() } /** - * Generated from protobuf field string zone = 1; + * Generated from protobuf field string zone = 1 [json_name = "zone"]; * @param string $var * @return $this */ @@ -61,7 +61,7 @@ public function setZone(string $var) } /** - * Generated from protobuf field string bucket = 2; + * Generated from protobuf field string bucket = 2 [json_name = "bucket"]; * @return string */ public function getBucket() @@ -70,7 +70,7 @@ public function getBucket() } /** - * Generated from protobuf field string bucket = 2; + * Generated from protobuf field string bucket = 2 [json_name = "bucket"]; * @param string $var * @return $this */ diff --git a/php/Feather/Contracts/Timestamp.php b/gen/php/Feather/Core/V1/Timestamp.php similarity index 80% rename from php/Feather/Contracts/Timestamp.php rename to gen/php/Feather/Core/V1/Timestamp.php index ac6f9bf..a84cd3a 100644 --- a/php/Feather/Contracts/Timestamp.php +++ b/gen/php/Feather/Core/V1/Timestamp.php @@ -1,23 +1,23 @@ feather.core.Timestamp + * Generated from protobuf message feather.core.v1.Timestamp */ class Timestamp extends \Google\Protobuf\Internal\Message { /** * Unix timestamp in milliseconds * - * Generated from protobuf field int64 unix_timestamp = 1; + * Generated from protobuf field int64 unix_timestamp = 1 [json_name = "unixTimestamp"]; */ protected $unix_timestamp = 0; @@ -32,14 +32,14 @@ class Timestamp extends \Google\Protobuf\Internal\Message * } */ public function __construct($data = NULL) { - \GPBMetadata\Proto\Core::initOnce(); + \Feather\Core\V1\GPBMetadata\Core::initOnce(); parent::__construct($data); } /** * Unix timestamp in milliseconds * - * Generated from protobuf field int64 unix_timestamp = 1; + * Generated from protobuf field int64 unix_timestamp = 1 [json_name = "unixTimestamp"]; * @return int|string */ public function getUnixTimestamp() @@ -50,7 +50,7 @@ public function getUnixTimestamp() /** * Unix timestamp in milliseconds * - * Generated from protobuf field int64 unix_timestamp = 1; + * Generated from protobuf field int64 unix_timestamp = 1 [json_name = "unixTimestamp"]; * @param int|string $var * @return $this */ diff --git a/generate-both.sh b/generate-both.sh deleted file mode 100755 index 9b756c6..0000000 --- a/generate-both.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# Script to generate PHP gRPC classes with both client and server code - -PROTO_PATH=${PROTO_PATH:-proto} -OUTPUT_PATH=${OUTPUT_PATH:-php} - -echo "Generating PHP gRPC classes..." -echo "Proto path: ${PROTO_PATH}" -echo "Output path: ${OUTPUT_PATH}" - -mkdir -p ${OUTPUT_PATH} - -protoc \ - --plugin=protoc-gen-grpc=/usr/local/bin/protoc-gen-grpc \ - --plugin=protoc-gen-php-grpc=/usr/local/bin/protoc-gen-php-grpc \ - --php_out=${OUTPUT_PATH} \ - --grpc_out=generate_server:${OUTPUT_PATH} \ - --php-grpc_out=${OUTPUT_PATH} \ - --proto_path=. \ - ${PROTO_PATH}/*.proto - -echo "Generation complete!" -echo "" -echo "Generated files:" -echo " - Message classes (php_out)" -echo " - Client classes: *Client.php, *Stub.php (grpc_out)" -echo " - Server interfaces: *Interface.php (php-grpc_out)" diff --git a/grpc-generator.dockerfile b/grpc-generator.dockerfile deleted file mode 100644 index 283150c..0000000 --- a/grpc-generator.dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -# Dockerfile for generating PHP gRPC classes with both client and server code -# docker build -f ./grpc-generator.dockerfile -t grpc-php-generator . - -FROM composer:2.8.5 AS composer - -FROM php:8.5-alpine AS grpc-builder - -RUN apk --no-cache add \ - git \ - autoconf \ - automake \ - make \ - cmake \ - curl \ - libtool \ - unzip \ - gcc \ - g++ \ - pkgconfig \ - linux-headers - -WORKDIR /github/grpc - -RUN git clone --depth 1 https://github.com/grpc/grpc . && \ - git submodule update --init --recursive - -ARG MAKEFLAGS=-j8 - -WORKDIR /github/grpc/cmake/build - -RUN cmake ../.. && \ - make protoc grpc_php_plugin - -# Final image for generation -FROM php:8.5-alpine - -RUN apk --no-cache add \ - git \ - unzip \ - libzip-dev \ - linux-headers - -# Install PHP extensions -RUN docker-php-ext-install sockets - -# Copy composer -COPY --from=composer /usr/bin/composer /usr/bin/composer - -# Copy protoc and grpc_php_plugin -COPY --from=grpc-builder /github/grpc/cmake/build/third_party/protobuf/protoc \ - /usr/local/bin/protoc - -COPY --from=grpc-builder /github/grpc/cmake/build/grpc_php_plugin \ - /usr/local/bin/protoc-gen-grpc - -# Install RoadRunner CLI (includes protoc-gen-php-grpc) -WORKDIR /tmp -RUN composer require spiral/roadrunner-cli:^2.7 spiral/roadrunner-grpc:^3.5 google/protobuf:^4.33 && \ - ln -s /tmp/vendor/bin/rr /usr/local/bin/rr - -# Create symlink for RoadRunner's protoc plugin -RUN rr download-protoc-binary && \ - find /tmp -name "protoc-gen-php-grpc" -type f -exec ln -s {} /usr/local/bin/protoc-gen-php-grpc \; - -WORKDIR /workspace - -CMD ["/bin/sh"] diff --git a/php/GPBMetadata/Proto/Core.php b/php/GPBMetadata/Proto/Core.php deleted file mode 100644 index 6b1e362..0000000 --- a/php/GPBMetadata/Proto/Core.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xFD\x02\x0A\x10proto/core.proto\x12\x0Cfeather.core\"&\x0A\x05Error\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x0F\x0A\x07message\x18\x02 \x01(\x09\"\x1B\x0A\x0DCorrelationId\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\"#\x0A\x09Timestamp\x12\x16\x0A\x0Eunix_timestamp\x18\x01 \x01(\x03\"\$\x0A\x04Spot\x12\x0C\x0A\x04zone\x18\x01 \x01(\x09\x12\x0E\x0A\x06bucket\x18\x02 \x01(\x09\"\x1C\x0A\x08Instance\x12\x10\x0A\x08instance\x18\x01 \x01(\x09\"Q\x0A\x03Box\x12(\x0A\x08instance\x18\x01 \x01(\x0B2\x16.feather.core.Instance\x12 \x0A\x04spot\x18\x02 \x01(\x0B2\x12.feather.core.Spot\"(\x0A\x15SerializedForChunking\x12\x0F\x0A\x07content\x18\x01 \x01(\x0CB(\xAA\x02\x11Feather.Contracts\xCA\x02\x11Feather\\Contractsb\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/proto/core.proto b/proto/feather/core/v1/core.proto similarity index 83% rename from proto/core.proto rename to proto/feather/core/v1/core.proto index 2698e19..4666e42 100644 --- a/proto/core.proto +++ b/proto/feather/core/v1/core.proto @@ -1,9 +1,6 @@ syntax = "proto3"; -package feather.core; - -option csharp_namespace = "Feather.Contracts"; -option php_namespace = "Feather\\Contracts"; +package feather.core.v1; // Generic types