diff --git a/.github/workflows/artifact-release.yml b/.github/workflows/artifact-release.yml index 3f2fc7405d..d7d4e8d1d6 100644 --- a/.github/workflows/artifact-release.yml +++ b/.github/workflows/artifact-release.yml @@ -6,6 +6,7 @@ on: - "v*.*.*" branches: - main + - "develop/v[0-9].[0-9]" paths: # path filters are not evaluated for pushes of tags - backend/** - cli/** @@ -29,10 +30,26 @@ jobs: fetch-depth: 0 - name: Calculate Next Pre-release version id: next_pre_version + if: github.ref == 'refs/heads/main' uses: paulhatch/semantic-version@v5.4.0 with: version_format: "${major}.${minor}.${patch}-pre.${increment}" + - name: Extract develop version + id: extract_version + if: startsWith(github.ref, 'refs/heads/develop/v') + run: | + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + VERSION_NUMBER="${BRANCH_NAME#develop/v}" + echo "VERSION=$VERSION_NUMBER" >> $GITHUB_OUTPUT + + - name: Calculate Next Pre-release version (develop) + id: next_pre_version_develop + if: startsWith(github.ref, 'refs/heads/develop/v') + uses: paulhatch/semantic-version@v5.4.0 + with: + version_format: "${{ steps.extract_version.outputs.VERSION }}.0-dev.${increment}" + - name: Get current time id: current-time run: echo "CURRENT_TIME=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT @@ -53,6 +70,7 @@ jobs: type=semver,pattern={{raw}} type=sha type=raw,value=${{ steps.next_pre_version.outputs.version }},enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=raw,value=${{ steps.next_pre_version_develop.outputs.version }},enable=${{ startsWith(github.ref, 'refs/heads/develop/v') }} - name: Login to GHCR uses: docker/login-action@v3 @@ -92,9 +110,24 @@ jobs: fetch-depth: 0 - name: Calculate Next Pre-release version id: next_pre_version + if: github.ref == 'refs/heads/main' uses: paulhatch/semantic-version@v5.4.0 with: version_format: "${major}.${minor}.${patch}-pre.${increment}" + - name: Extract develop version + id: extract_version + if: startsWith(github.ref, 'refs/heads/develop/v') + run: | + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + VERSION_NUMBER="${BRANCH_NAME#develop/v}" + echo "VERSION=$VERSION_NUMBER" >> $GITHUB_OUTPUT + + - name: Calculate Next Pre-release version (develop) + id: next_pre_version_develop + if: startsWith(github.ref, 'refs/heads/develop/v') + uses: paulhatch/semantic-version@v5.4.0 + with: + version_format: "${{ steps.extract_version.outputs.VERSION }}.0-dev.${increment}" - name: Docker meta id: meta uses: docker/metadata-action@v5 @@ -111,7 +144,7 @@ jobs: type=semver,pattern={{raw}} type=sha type=raw,value=${{ steps.next_pre_version.outputs.version }},enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - + type=raw,value=${{ steps.next_pre_version_develop.outputs.version }},enable=${{ startsWith(github.ref, 'refs/heads/develop/v') }} - name: Login to GHCR uses: docker/login-action@v3 with: @@ -146,9 +179,24 @@ jobs: fetch-depth: 0 - name: Calculate Next Pre-release version id: next_pre_version + if: github.ref == 'refs/heads/main' uses: paulhatch/semantic-version@v5.4.0 with: version_format: "${major}.${minor}.${patch}-pre.${increment}" + - name: Extract develop version + id: extract_version + if: startsWith(github.ref, 'refs/heads/develop/v') + run: | + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + VERSION_NUMBER="${BRANCH_NAME#develop/v}" + echo "VERSION=$VERSION_NUMBER" >> $GITHUB_OUTPUT + + - name: Calculate Next Pre-release version (develop) + id: next_pre_version_develop + if: startsWith(github.ref, 'refs/heads/develop/v') + uses: paulhatch/semantic-version@v5.4.0 + with: + version_format: "${{ steps.extract_version.outputs.VERSION }}.0-dev.${increment}" - name: Docker meta id: meta uses: docker/metadata-action@v5 @@ -165,7 +213,7 @@ jobs: type=semver,pattern={{raw}} type=sha type=raw,value=${{ steps.next_pre_version.outputs.version }},enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - + type=raw,value=${{ steps.next_pre_version_develop.outputs.version }},enable=${{ startsWith(github.ref, 'refs/heads/develop/v') }} - name: Login to GHCR uses: docker/login-action@v3 with: @@ -198,9 +246,24 @@ jobs: fetch-depth: 0 - name: Calculate Next Pre-release version id: next_pre_version + if: github.ref == 'refs/heads/main' uses: paulhatch/semantic-version@v5.4.0 with: version_format: "${major}.${minor}.${patch}-pre.${increment}" + - name: Extract develop version + id: extract_version + if: startsWith(github.ref, 'refs/heads/develop/v') + run: | + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + VERSION_NUMBER="${BRANCH_NAME#develop/v}" + echo "VERSION=$VERSION_NUMBER" >> $GITHUB_OUTPUT + + - name: Calculate Next Pre-release version (develop) + id: next_pre_version_develop + if: startsWith(github.ref, 'refs/heads/develop/v') + uses: paulhatch/semantic-version@v5.4.0 + with: + version_format: "${{ steps.extract_version.outputs.VERSION }}.0-dev.${increment}" - name: Setup Trimmed Helm Version run: | @@ -211,6 +274,11 @@ jobs: echo "$TRIMMED_VERSION" echo "CHART_VERSION=$TRIMMED_VERSION" >> $GITHUB_ENV echo "IS_PRERELEASE=false" >> $GITHUB_ENV + elif [[ $GITHUB_REF =~ ^refs/heads/develop/v[0-9]+\.[0-9]+$ ]]; then + VERSION="${{ steps.next_pre_version_develop.outputs.version }}" + echo "$VERSION" + echo "CHART_VERSION=$VERSION" >> $GITHUB_ENV + echo "IS_PRERELEASE=true" >> $GITHUB_ENV else VERSION="${{ steps.next_pre_version.outputs.version }}" echo "$VERSION" @@ -279,9 +347,24 @@ jobs: fetch-depth: 0 - name: Calculate Next Pre-release version id: next_pre_version + if: github.ref == 'refs/heads/main' uses: paulhatch/semantic-version@v5.4.0 with: version_format: "${major}.${minor}.${patch}-pre.${increment}" + - name: Extract develop version + id: extract_version + if: startsWith(github.ref, 'refs/heads/develop/v') + run: | + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + VERSION_NUMBER="${BRANCH_NAME#develop/v}" + echo "VERSION=$VERSION_NUMBER" >> $GITHUB_OUTPUT + + - name: Calculate Next Pre-release version (develop) + id: next_pre_version_develop + if: startsWith(github.ref, 'refs/heads/develop/v') + uses: paulhatch/semantic-version@v5.4.0 + with: + version_format: "${{ steps.extract_version.outputs.VERSION }}.0-dev.${increment}" - name: Setup Trimmed Helm Version run: | @@ -292,6 +375,11 @@ jobs: echo "$TRIMMED_VERSION" echo "CHART_VERSION=$TRIMMED_VERSION" >> $GITHUB_ENV echo "IS_PRERELEASE=false" >> $GITHUB_ENV + elif [[ $GITHUB_REF =~ ^refs/heads/develop/v[0-9]+\.[0-9]+$ ]]; then + VERSION="${{ steps.next_pre_version_develop.outputs.version }}" + echo "$VERSION" + echo "CHART_VERSION=$VERSION" >> $GITHUB_ENV + echo "IS_PRERELEASE=true" >> $GITHUB_ENV else VERSION="${{ steps.next_pre_version.outputs.version }}" echo "$VERSION" @@ -360,10 +448,26 @@ jobs: fetch-depth: 0 - name: Calculate Next Pre-release version id: next_pre_version + if: github.ref == 'refs/heads/main' uses: paulhatch/semantic-version@v5.4.0 with: version_format: "${major}.${minor}.${patch}-pre.${increment}" + - name: Extract develop version + id: extract_version + if: startsWith(github.ref, 'refs/heads/develop/v') + run: | + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + VERSION_NUMBER="${BRANCH_NAME#develop/v}" + echo "VERSION=$VERSION_NUMBER" >> $GITHUB_OUTPUT + + - name: Calculate Next Pre-release version (develop) + id: next_pre_version_develop + if: startsWith(github.ref, 'refs/heads/develop/v') + uses: paulhatch/semantic-version@v5.4.0 + with: + version_format: "${{ steps.extract_version.outputs.VERSION }}.0-dev.${increment}" + - name: Setup Trimmed Helm Version run: | if [[ $GITHUB_REF == refs/tags/* ]]; then @@ -373,6 +477,11 @@ jobs: echo "$TRIMMED_VERSION" echo "CHART_VERSION=$TRIMMED_VERSION" >> $GITHUB_ENV echo "IS_PRERELEASE=false" >> $GITHUB_ENV + elif [[ $GITHUB_REF =~ ^refs/heads/develop/v[0-9]+\.[0-9]+$ ]]; then + VERSION="${{ steps.next_pre_version_develop.outputs.version }}" + echo "$VERSION" + echo "CHART_VERSION=$VERSION" >> $GITHUB_ENV + echo "IS_PRERELEASE=true" >> $GITHUB_ENV else VERSION="${{ steps.next_pre_version.outputs.version }}" echo "$VERSION" @@ -443,10 +552,26 @@ jobs: fetch-depth: 0 - name: Calculate Next Pre-release version id: next_pre_version + if: github.ref == 'refs/heads/main' uses: paulhatch/semantic-version@v5.4.0 with: version_format: "${major}.${minor}.${patch}-pre.${increment}" + - name: Extract develop version + id: extract_version + if: startsWith(github.ref, 'refs/heads/develop/v') + run: | + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + VERSION_NUMBER="${BRANCH_NAME#develop/v}" + echo "VERSION=$VERSION_NUMBER" >> $GITHUB_OUTPUT + + - name: Calculate Next Pre-release version (develop) + id: next_pre_version_develop + if: startsWith(github.ref, 'refs/heads/develop/v') + uses: paulhatch/semantic-version@v5.4.0 + with: + version_format: "${{ steps.extract_version.outputs.VERSION }}.0-dev.${increment}" + - name: Setup Trimmed Helm Version run: | if [[ $GITHUB_REF == refs/tags/* ]]; then @@ -456,6 +581,11 @@ jobs: echo "$TRIMMED_VERSION" echo "CHART_VERSION=$TRIMMED_VERSION" >> $GITHUB_ENV echo "IS_PRERELEASE=false" >> $GITHUB_ENV + elif [[ $GITHUB_REF =~ ^refs/heads/develop/v[0-9]+\.[0-9]+$ ]]; then + VERSION="${{ steps.next_pre_version_develop.outputs.version }}" + echo "$VERSION" + echo "CHART_VERSION=$VERSION" >> $GITHUB_ENV + echo "IS_PRERELEASE=true" >> $GITHUB_ENV else VERSION="${{ steps.next_pre_version.outputs.version }}" echo "$VERSION" diff --git a/.gitignore b/.gitignore index 35a6a1cc6b..6d423f4189 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ neosync_cloud_ca.key .env.app.local .env.api.local +.env.worker.local diff --git a/Makefile b/Makefile index 3a32d04795..7dc3bb3df1 100644 --- a/Makefile +++ b/Makefile @@ -115,7 +115,7 @@ compose/up: ## Composes up the production environment compose/down: ## Composes down the production environment docker compose -f $(PROD_COMPOSE_FILE) down -compose/auth/up: ## Composes up the production environment with auth +compose/auth/up: ## Composes up the production environment with auth - Requires a valid Neosync Enterprise license! BUILDX_NO_DEFAULT_ATTESTATIONS=1 docker compose -f $(PROD_COMPOSE_FILE) -f $(PROD_AUTH_COMPOSE_FILE) up -d compose/auth/down: ## Composes down the production environment with auth @@ -127,7 +127,7 @@ compose/dev/up: ## Composes up the development environment. compose/dev/down: ## Composes down the development environment docker compose -f $(DEV_COMPOSE_FILE) down -compose/dev/auth/up: ## Composes up the development environment with auth. +compose/dev/auth/up: ## Composes up the development environment with auth. - Requires a valid Neosync Enterprise license! BUILDX_NO_DEFAULT_ATTESTATIONS=1 docker compose -f $(DEV_COMPOSE_FILE) -f $(DEV_AUTH_COMPOSE_FILE) up -d compose/dev/auth/down: ## Composes down the development environment with auth diff --git a/backend/charts/api/README.md b/backend/charts/api/README.md index 35fca182f9..a30555d5de 100644 --- a/backend/charts/api/README.md +++ b/backend/charts/api/README.md @@ -76,7 +76,7 @@ A Helm chart for the Neosync Backend API | resources.limits.memory | string | `"512Mi"` | Sets the max Memory amount | | resources.requests.cpu | string | `"100m"` | Sets the CPU amount to be requested | | resources.requests.memory | string | `"128Mi"` | Sets the Memory amount to be requested | -| runLogs.enabled | bool | `true` | Independently set so that configuration can exist but logs can still be independently disabled. Defaults to true with k8s-pods configuration for backwards compat and because this is a helm chart this is defacto kubernetes | +| runLogs.enabled | bool | `false` | Enable this if planning to surface logs within Neosync API and UI (requires a valid license). | | runLogs.lokiConfig.baseUrl | string | `nil` | The base url to the loki instance | | runLogs.lokiConfig.keepLabels | string | `nil` | List format. | | runLogs.lokiConfig.labelsQuery | string | `nil` | LogQL labels query (without the {} as those are provided by the system) | diff --git a/backend/charts/api/values.yaml b/backend/charts/api/values.yaml index 0db0c4058c..c383009d4e 100644 --- a/backend/charts/api/values.yaml +++ b/backend/charts/api/values.yaml @@ -204,8 +204,8 @@ kubernetes: # If runLogs are disabled, will fallback on the kubernetes configuration above for backwards compat runLogs: - # -- Independently set so that configuration can exist but logs can still be independently disabled. Defaults to true with k8s-pods configuration for backwards compat and because this is a helm chart this is defacto kubernetes - enabled: true + # -- Enable this if planning to surface logs within Neosync API and UI (requires a valid license). + enabled: false # -- Possible values: k8s-pods, loki type: k8s-pods diff --git a/backend/gen/go/protos/mgmt/v1alpha1/auth.pb.go b/backend/gen/go/protos/mgmt/v1alpha1/auth.pb.go index c712dbe816..a4f6454dab 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/auth.pb.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/auth.pb.go @@ -408,97 +408,6 @@ func (x *GetAuthorizeUrlResponse) GetUrl() string { return "" } -type GetCliIssuerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetCliIssuerRequest) Reset() { - *x = GetCliIssuerRequest{} - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCliIssuerRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCliIssuerRequest) ProtoMessage() {} - -func (x *GetCliIssuerRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCliIssuerRequest.ProtoReflect.Descriptor instead. -func (*GetCliIssuerRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_auth_proto_rawDescGZIP(), []int{7} -} - -type GetCliIssuerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The backing authentication issuer url - IssuerUrl string `protobuf:"bytes,1,opt,name=issuer_url,json=issuerUrl,proto3" json:"issuer_url,omitempty"` - // The audience that will be used in the access token. This corresponds to the "aud" claim - Audience string `protobuf:"bytes,2,opt,name=audience,proto3" json:"audience,omitempty"` -} - -func (x *GetCliIssuerResponse) Reset() { - *x = GetCliIssuerResponse{} - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCliIssuerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCliIssuerResponse) ProtoMessage() {} - -func (x *GetCliIssuerResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCliIssuerResponse.ProtoReflect.Descriptor instead. -func (*GetCliIssuerResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_auth_proto_rawDescGZIP(), []int{8} -} - -func (x *GetCliIssuerResponse) GetIssuerUrl() string { - if x != nil { - return x.IssuerUrl - } - return "" -} - -func (x *GetCliIssuerResponse) GetAudience() string { - if x != nil { - return x.Audience - } - return "" -} - type RefreshCliRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -510,7 +419,7 @@ type RefreshCliRequest struct { func (x *RefreshCliRequest) Reset() { *x = RefreshCliRequest{} - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[9] + mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -522,7 +431,7 @@ func (x *RefreshCliRequest) String() string { func (*RefreshCliRequest) ProtoMessage() {} func (x *RefreshCliRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[9] + mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -535,7 +444,7 @@ func (x *RefreshCliRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RefreshCliRequest.ProtoReflect.Descriptor instead. func (*RefreshCliRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_auth_proto_rawDescGZIP(), []int{9} + return file_mgmt_v1alpha1_auth_proto_rawDescGZIP(), []int{7} } func (x *RefreshCliRequest) GetRefreshToken() string { @@ -556,7 +465,7 @@ type RefreshCliResponse struct { func (x *RefreshCliResponse) Reset() { *x = RefreshCliResponse{} - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[10] + mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -568,7 +477,7 @@ func (x *RefreshCliResponse) String() string { func (*RefreshCliResponse) ProtoMessage() {} func (x *RefreshCliResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[10] + mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -581,7 +490,7 @@ func (x *RefreshCliResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RefreshCliResponse.ProtoReflect.Descriptor instead. func (*RefreshCliResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_auth_proto_rawDescGZIP(), []int{10} + return file_mgmt_v1alpha1_auth_proto_rawDescGZIP(), []int{8} } func (x *RefreshCliResponse) GetAccessToken() *AccessToken { @@ -599,7 +508,7 @@ type CheckTokenRequest struct { func (x *CheckTokenRequest) Reset() { *x = CheckTokenRequest{} - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[11] + mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -611,7 +520,7 @@ func (x *CheckTokenRequest) String() string { func (*CheckTokenRequest) ProtoMessage() {} func (x *CheckTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[11] + mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -624,7 +533,7 @@ func (x *CheckTokenRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckTokenRequest.ProtoReflect.Descriptor instead. func (*CheckTokenRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_auth_proto_rawDescGZIP(), []int{11} + return file_mgmt_v1alpha1_auth_proto_rawDescGZIP(), []int{9} } type CheckTokenResponse struct { @@ -635,7 +544,7 @@ type CheckTokenResponse struct { func (x *CheckTokenResponse) Reset() { *x = CheckTokenResponse{} - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[12] + mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -647,7 +556,7 @@ func (x *CheckTokenResponse) String() string { func (*CheckTokenResponse) ProtoMessage() {} func (x *CheckTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[12] + mi := &file_mgmt_v1alpha1_auth_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -660,7 +569,7 @@ func (x *CheckTokenResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckTokenResponse.ProtoReflect.Descriptor instead. func (*CheckTokenResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_auth_proto_rawDescGZIP(), []int{12} + return file_mgmt_v1alpha1_auth_proto_rawDescGZIP(), []int{10} } var File_mgmt_v1alpha1_auth_proto protoreflect.FileDescriptor @@ -712,73 +621,61 @@ var file_mgmt_v1alpha1_auth_proto_rawDesc = []byte{ 0x02, 0x10, 0x01, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6c, - 0x69, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, - 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, - 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, - 0x65, 0x22, 0x41, 0x0a, 0x11, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6c, 0x69, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, - 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x53, 0x0a, 0x12, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, - 0x6c, 0x69, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0b, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, - 0x0a, 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa3, 0x04, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6c, 0x69, - 0x12, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6c, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6c, 0x69, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0a, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6c, - 0x69, 0x12, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6c, 0x69, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6c, 0x69, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, - 0x0c, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x22, 0x2e, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x41, 0x0a, 0x11, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x43, 0x6c, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x0d, + 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x53, 0x0a, 0x12, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6c, 0x69, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3d, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0x13, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc8, 0x03, 0x0a, 0x0b, 0x41, + 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x43, 0x6c, 0x69, 0x12, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6c, 0x69, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6c, 0x69, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0a, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x43, 0x6c, 0x69, 0x12, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, + 0x6c, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x43, 0x6c, 0x69, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, + 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6c, 0x69, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x25, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x55, - 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0d, - 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x2e, + 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x75, + 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xc5, 0x01, 0x0a, 0x11, 0x63, - 0x6f, 0x6d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x42, 0x09, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x63, 0x6c, 0x65, 0x75, - 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x2e, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xc5, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x09, 0x41, 0x75, 0x74, + 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x63, 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, + 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, + 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, + 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, + 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -793,7 +690,7 @@ func file_mgmt_v1alpha1_auth_proto_rawDescGZIP() []byte { return file_mgmt_v1alpha1_auth_proto_rawDescData } -var file_mgmt_v1alpha1_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_mgmt_v1alpha1_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_mgmt_v1alpha1_auth_proto_goTypes = []any{ (*LoginCliRequest)(nil), // 0: mgmt.v1alpha1.LoginCliRequest (*LoginCliResponse)(nil), // 1: mgmt.v1alpha1.LoginCliResponse @@ -802,30 +699,26 @@ var file_mgmt_v1alpha1_auth_proto_goTypes = []any{ (*AccessToken)(nil), // 4: mgmt.v1alpha1.AccessToken (*GetAuthorizeUrlRequest)(nil), // 5: mgmt.v1alpha1.GetAuthorizeUrlRequest (*GetAuthorizeUrlResponse)(nil), // 6: mgmt.v1alpha1.GetAuthorizeUrlResponse - (*GetCliIssuerRequest)(nil), // 7: mgmt.v1alpha1.GetCliIssuerRequest - (*GetCliIssuerResponse)(nil), // 8: mgmt.v1alpha1.GetCliIssuerResponse - (*RefreshCliRequest)(nil), // 9: mgmt.v1alpha1.RefreshCliRequest - (*RefreshCliResponse)(nil), // 10: mgmt.v1alpha1.RefreshCliResponse - (*CheckTokenRequest)(nil), // 11: mgmt.v1alpha1.CheckTokenRequest - (*CheckTokenResponse)(nil), // 12: mgmt.v1alpha1.CheckTokenResponse + (*RefreshCliRequest)(nil), // 7: mgmt.v1alpha1.RefreshCliRequest + (*RefreshCliResponse)(nil), // 8: mgmt.v1alpha1.RefreshCliResponse + (*CheckTokenRequest)(nil), // 9: mgmt.v1alpha1.CheckTokenRequest + (*CheckTokenResponse)(nil), // 10: mgmt.v1alpha1.CheckTokenResponse } var file_mgmt_v1alpha1_auth_proto_depIdxs = []int32{ 4, // 0: mgmt.v1alpha1.LoginCliResponse.access_token:type_name -> mgmt.v1alpha1.AccessToken 4, // 1: mgmt.v1alpha1.RefreshCliResponse.access_token:type_name -> mgmt.v1alpha1.AccessToken 0, // 2: mgmt.v1alpha1.AuthService.LoginCli:input_type -> mgmt.v1alpha1.LoginCliRequest - 9, // 3: mgmt.v1alpha1.AuthService.RefreshCli:input_type -> mgmt.v1alpha1.RefreshCliRequest - 11, // 4: mgmt.v1alpha1.AuthService.CheckToken:input_type -> mgmt.v1alpha1.CheckTokenRequest - 7, // 5: mgmt.v1alpha1.AuthService.GetCliIssuer:input_type -> mgmt.v1alpha1.GetCliIssuerRequest - 5, // 6: mgmt.v1alpha1.AuthService.GetAuthorizeUrl:input_type -> mgmt.v1alpha1.GetAuthorizeUrlRequest - 2, // 7: mgmt.v1alpha1.AuthService.GetAuthStatus:input_type -> mgmt.v1alpha1.GetAuthStatusRequest - 1, // 8: mgmt.v1alpha1.AuthService.LoginCli:output_type -> mgmt.v1alpha1.LoginCliResponse - 10, // 9: mgmt.v1alpha1.AuthService.RefreshCli:output_type -> mgmt.v1alpha1.RefreshCliResponse - 12, // 10: mgmt.v1alpha1.AuthService.CheckToken:output_type -> mgmt.v1alpha1.CheckTokenResponse - 8, // 11: mgmt.v1alpha1.AuthService.GetCliIssuer:output_type -> mgmt.v1alpha1.GetCliIssuerResponse - 6, // 12: mgmt.v1alpha1.AuthService.GetAuthorizeUrl:output_type -> mgmt.v1alpha1.GetAuthorizeUrlResponse - 3, // 13: mgmt.v1alpha1.AuthService.GetAuthStatus:output_type -> mgmt.v1alpha1.GetAuthStatusResponse - 8, // [8:14] is the sub-list for method output_type - 2, // [2:8] is the sub-list for method input_type + 7, // 3: mgmt.v1alpha1.AuthService.RefreshCli:input_type -> mgmt.v1alpha1.RefreshCliRequest + 9, // 4: mgmt.v1alpha1.AuthService.CheckToken:input_type -> mgmt.v1alpha1.CheckTokenRequest + 5, // 5: mgmt.v1alpha1.AuthService.GetAuthorizeUrl:input_type -> mgmt.v1alpha1.GetAuthorizeUrlRequest + 2, // 6: mgmt.v1alpha1.AuthService.GetAuthStatus:input_type -> mgmt.v1alpha1.GetAuthStatusRequest + 1, // 7: mgmt.v1alpha1.AuthService.LoginCli:output_type -> mgmt.v1alpha1.LoginCliResponse + 8, // 8: mgmt.v1alpha1.AuthService.RefreshCli:output_type -> mgmt.v1alpha1.RefreshCliResponse + 10, // 9: mgmt.v1alpha1.AuthService.CheckToken:output_type -> mgmt.v1alpha1.CheckTokenResponse + 6, // 10: mgmt.v1alpha1.AuthService.GetAuthorizeUrl:output_type -> mgmt.v1alpha1.GetAuthorizeUrlResponse + 3, // 11: mgmt.v1alpha1.AuthService.GetAuthStatus:output_type -> mgmt.v1alpha1.GetAuthStatusResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -843,7 +736,7 @@ func file_mgmt_v1alpha1_auth_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mgmt_v1alpha1_auth_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/gen/go/protos/mgmt/v1alpha1/auth.pb.json.go b/backend/gen/go/protos/mgmt/v1alpha1/auth.pb.json.go index 0a56c5b5d0..b89752c410 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/auth.pb.json.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/auth.pb.json.go @@ -77,26 +77,6 @@ func (msg *GetAuthorizeUrlResponse) UnmarshalJSON(b []byte) error { return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } -// MarshalJSON implements json.Marshaler -func (msg *GetCliIssuerRequest) MarshalJSON() ([]byte, error) { - return protojson.MarshalOptions{}.Marshal(msg) -} - -// UnmarshalJSON implements json.Unmarshaler -func (msg *GetCliIssuerRequest) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{}.Unmarshal(b, msg) -} - -// MarshalJSON implements json.Marshaler -func (msg *GetCliIssuerResponse) MarshalJSON() ([]byte, error) { - return protojson.MarshalOptions{}.Marshal(msg) -} - -// UnmarshalJSON implements json.Unmarshaler -func (msg *GetCliIssuerResponse) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{}.Unmarshal(b, msg) -} - // MarshalJSON implements json.Marshaler func (msg *RefreshCliRequest) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{}.Marshal(msg) diff --git a/backend/gen/go/protos/mgmt/v1alpha1/connection.pb.go b/backend/gen/go/protos/mgmt/v1alpha1/connection.pb.go index a98a11102a..5dcadde0d5 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/connection.pb.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/connection.pb.go @@ -2247,8 +2247,6 @@ type AwsS3ConnectionConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: Marked as deprecated in mgmt/v1alpha1/connection.proto. - BucketArn string `protobuf:"bytes,1,opt,name=bucket_arn,json=bucketArn,proto3" json:"bucket_arn,omitempty"` PathPrefix *string `protobuf:"bytes,2,opt,name=path_prefix,json=pathPrefix,proto3,oneof" json:"path_prefix,omitempty"` Credentials *AwsS3Credentials `protobuf:"bytes,3,opt,name=credentials,proto3,oneof" json:"credentials,omitempty"` Region *string `protobuf:"bytes,4,opt,name=region,proto3,oneof" json:"region,omitempty"` @@ -2286,14 +2284,6 @@ func (*AwsS3ConnectionConfig) Descriptor() ([]byte, []int) { return file_mgmt_v1alpha1_connection_proto_rawDescGZIP(), []int{32} } -// Deprecated: Marked as deprecated in mgmt/v1alpha1/connection.proto. -func (x *AwsS3ConnectionConfig) GetBucketArn() string { - if x != nil { - return x.BucketArn - } - return "" -} - func (x *AwsS3ConnectionConfig) GetPathPrefix() string { if x != nil && x.PathPrefix != nil { return *x.PathPrefix @@ -3064,169 +3054,167 @@ var file_mgmt_v1alpha1_connection_proto_rawDesc = []byte{ 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x6c, 0x73, 0x42, 0x1a, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0xbf, 0x02, 0x0a, 0x15, 0x41, + 0x66, 0x69, 0x67, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0xa2, 0x02, 0x0a, 0x15, 0x41, 0x77, 0x73, 0x53, 0x33, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0a, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x61, - 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x41, 0x72, 0x6e, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, - 0x70, 0x61, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, - 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x41, 0x77, 0x73, 0x53, 0x33, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x48, 0x01, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x88, - 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x42, - 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xa7, 0x03, 0x0a, - 0x10, 0x41, 0x77, 0x73, 0x53, 0x33, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x27, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, 0x63, 0x32, - 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0b, 0x66, - 0x72, 0x6f, 0x6d, 0x45, 0x63, 0x32, 0x52, 0x6f, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, - 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x05, 0x52, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x41, 0x72, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, - 0x10, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x0e, 0x72, 0x6f, 0x6c, 0x65, 0x45, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, - 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, - 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, 0x63, 0x32, 0x5f, - 0x72, 0x6f, 0x6c, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x61, 0x72, - 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x1f, 0x47, 0x63, 0x70, 0x43, 0x6c, - 0x6f, 0x75, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, 0x06, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x70, - 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, - 0x01, 0x12, 0x43, 0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x19, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x20, 0x49, 0x73, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xba, - 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, - 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x21, 0x49, 0x73, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x69, 0x73, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, - 0x22, 0x4f, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x22, 0x6e, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x71, 0x6c, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72, 0x6f, 0x72, 0x72, 0x5f, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, - 0x65, 0x72, 0x6f, 0x72, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, - 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x6f, 0x72, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x32, 0xe1, 0x07, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, - 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x19, - 0x49, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, - 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x74, + 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x41, 0x77, 0x73, 0x53, 0x33, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x48, 0x01, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, + 0x1f, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x1f, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, + 0xa7, 0x03, 0x0a, 0x10, 0x41, 0x77, 0x73, 0x53, 0x33, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, + 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x65, 0x63, 0x32, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, + 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x45, 0x63, 0x32, 0x52, 0x6f, 0x6c, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x41, 0x72, 0x6e, 0x88, 0x01, 0x01, + 0x12, 0x2d, 0x0a, 0x10, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x0e, 0x72, 0x6f, + 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x14, 0x0a, + 0x12, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6b, 0x65, 0x79, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, + 0x63, 0x32, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x6f, 0x6c, 0x65, + 0x5f, 0x61, 0x72, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x1f, 0x47, 0x63, + 0x70, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, + 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, + 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x24, + 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x19, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x61, + 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x20, 0x49, 0x73, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, + 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, + 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x0e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x21, 0x49, + 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x22, 0x4f, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x71, 0x6c, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, + 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x22, 0x6e, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x71, 0x6c, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72, 0x6f, 0x72, + 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0c, 0x65, 0x72, 0x6f, 0x72, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, + 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x6f, 0x72, 0x72, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x32, 0xe1, 0x07, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0d, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x10, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x65, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, + 0x01, 0x0a, 0x19, 0x49, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2f, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x74, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x19, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, - 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x53, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x71, - 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x53, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xcb, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x63, 0x6c, 0x65, - 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x2e, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x19, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0x79, 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x49, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0d, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x53, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x23, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x53, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xcb, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, + 0x63, 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, + 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/gen/go/protos/mgmt/v1alpha1/connection_data.pb.go b/backend/gen/go/protos/mgmt/v1alpha1/connection_data.pb.go index af7d6fdbae..a413b5d1c0 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/connection_data.pb.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/connection_data.pb.go @@ -484,8 +484,8 @@ type GetConnectionDataStreamResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A map of column name to the bytes value of the data that was found for that column and row - Row map[string][]byte `protobuf:"bytes,1,rep,name=row,proto3" json:"row,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // A map of column name to column value, where the value is serialized as bytes. The value represents a map[string]any structure. + RowBytes []byte `protobuf:"bytes,2,opt,name=row_bytes,json=rowBytes,proto3" json:"row_bytes,omitempty"` } func (x *GetConnectionDataStreamResponse) Reset() { @@ -518,9 +518,9 @@ func (*GetConnectionDataStreamResponse) Descriptor() ([]byte, []int) { return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{7} } -func (x *GetConnectionDataStreamResponse) GetRow() map[string][]byte { +func (x *GetConnectionDataStreamResponse) GetRowBytes() []byte { if x != nil { - return x.Row + return x.RowBytes } return nil } @@ -1420,65 +1420,18 @@ func (x *GetConnectionSchemaMapsResponse) GetConnectionIds() []string { return nil } -type GetConnectionForeignConstraintsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` -} - -func (x *GetConnectionForeignConstraintsRequest) Reset() { - *x = GetConnectionForeignConstraintsRequest{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConnectionForeignConstraintsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConnectionForeignConstraintsRequest) ProtoMessage() {} - -func (x *GetConnectionForeignConstraintsRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[23] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConnectionForeignConstraintsRequest.ProtoReflect.Descriptor instead. -func (*GetConnectionForeignConstraintsRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{23} -} - -func (x *GetConnectionForeignConstraintsRequest) GetConnectionId() string { - if x != nil { - return x.ConnectionId - } - return "" -} - type ForeignKey struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` - // @deprecated - use columns - Column string `protobuf:"bytes,2,opt,name=column,proto3" json:"column,omitempty"` + Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` Columns []string `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"` } func (x *ForeignKey) Reset() { *x = ForeignKey{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[24] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1490,7 +1443,7 @@ func (x *ForeignKey) String() string { func (*ForeignKey) ProtoMessage() {} func (x *ForeignKey) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[24] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1503,7 +1456,7 @@ func (x *ForeignKey) ProtoReflect() protoreflect.Message { // Deprecated: Use ForeignKey.ProtoReflect.Descriptor instead. func (*ForeignKey) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{24} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{23} } func (x *ForeignKey) GetTable() string { @@ -1513,13 +1466,6 @@ func (x *ForeignKey) GetTable() string { return "" } -func (x *ForeignKey) GetColumn() string { - if x != nil { - return x.Column - } - return "" -} - func (x *ForeignKey) GetColumns() []string { if x != nil { return x.Columns @@ -1532,10 +1478,6 @@ type ForeignConstraint struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // @deprecated - use columns - Column string `protobuf:"bytes,1,opt,name=column,proto3" json:"column,omitempty"` - // @deprecated - use not_nullable - IsNullable bool `protobuf:"varint,2,opt,name=is_nullable,json=isNullable,proto3" json:"is_nullable,omitempty"` ForeignKey *ForeignKey `protobuf:"bytes,3,opt,name=foreign_key,json=foreignKey,proto3" json:"foreign_key,omitempty"` Columns []string `protobuf:"bytes,4,rep,name=columns,proto3" json:"columns,omitempty"` NotNullable []bool `protobuf:"varint,5,rep,packed,name=not_nullable,json=notNullable,proto3" json:"not_nullable,omitempty"` @@ -1543,7 +1485,7 @@ type ForeignConstraint struct { func (x *ForeignConstraint) Reset() { *x = ForeignConstraint{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[25] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1555,7 +1497,7 @@ func (x *ForeignConstraint) String() string { func (*ForeignConstraint) ProtoMessage() {} func (x *ForeignConstraint) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[25] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1568,21 +1510,7 @@ func (x *ForeignConstraint) ProtoReflect() protoreflect.Message { // Deprecated: Use ForeignConstraint.ProtoReflect.Descriptor instead. func (*ForeignConstraint) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{25} -} - -func (x *ForeignConstraint) GetColumn() string { - if x != nil { - return x.Column - } - return "" -} - -func (x *ForeignConstraint) GetIsNullable() bool { - if x != nil { - return x.IsNullable - } - return false + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{24} } func (x *ForeignConstraint) GetForeignKey() *ForeignKey { @@ -1616,7 +1544,7 @@ type ForeignConstraintTables struct { func (x *ForeignConstraintTables) Reset() { *x = ForeignConstraintTables{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[26] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1628,7 +1556,7 @@ func (x *ForeignConstraintTables) String() string { func (*ForeignConstraintTables) ProtoMessage() {} func (x *ForeignConstraintTables) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[26] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1641,7 +1569,7 @@ func (x *ForeignConstraintTables) ProtoReflect() protoreflect.Message { // Deprecated: Use ForeignConstraintTables.ProtoReflect.Descriptor instead. func (*ForeignConstraintTables) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{26} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{25} } func (x *ForeignConstraintTables) GetConstraints() []*ForeignConstraint { @@ -1651,53 +1579,6 @@ func (x *ForeignConstraintTables) GetConstraints() []*ForeignConstraint { return nil } -// Dependency constraints for a specific table -type GetConnectionForeignConstraintsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the key here is . and the list of tables that it depends on, also `.
` format. - TableConstraints map[string]*ForeignConstraintTables `protobuf:"bytes,1,rep,name=table_constraints,json=tableConstraints,proto3" json:"table_constraints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *GetConnectionForeignConstraintsResponse) Reset() { - *x = GetConnectionForeignConstraintsResponse{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConnectionForeignConstraintsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConnectionForeignConstraintsResponse) ProtoMessage() {} - -func (x *GetConnectionForeignConstraintsResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[27] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConnectionForeignConstraintsResponse.ProtoReflect.Descriptor instead. -func (*GetConnectionForeignConstraintsResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{27} -} - -func (x *GetConnectionForeignConstraintsResponse) GetTableConstraints() map[string]*ForeignConstraintTables { - if x != nil { - return x.TableConstraints - } - return nil -} - type InitStatementOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1710,7 +1591,7 @@ type InitStatementOptions struct { func (x *InitStatementOptions) Reset() { *x = InitStatementOptions{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[28] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1722,7 +1603,7 @@ func (x *InitStatementOptions) String() string { func (*InitStatementOptions) ProtoMessage() {} func (x *InitStatementOptions) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[28] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1735,7 +1616,7 @@ func (x *InitStatementOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use InitStatementOptions.ProtoReflect.Descriptor instead. func (*InitStatementOptions) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{28} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{26} } func (x *InitStatementOptions) GetInitSchema() bool { @@ -1770,7 +1651,7 @@ type GetConnectionInitStatementsRequest struct { func (x *GetConnectionInitStatementsRequest) Reset() { *x = GetConnectionInitStatementsRequest{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[29] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1782,7 +1663,7 @@ func (x *GetConnectionInitStatementsRequest) String() string { func (*GetConnectionInitStatementsRequest) ProtoMessage() {} func (x *GetConnectionInitStatementsRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[29] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1795,7 +1676,7 @@ func (x *GetConnectionInitStatementsRequest) ProtoReflect() protoreflect.Message // Deprecated: Use GetConnectionInitStatementsRequest.ProtoReflect.Descriptor instead. func (*GetConnectionInitStatementsRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{29} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{27} } func (x *GetConnectionInitStatementsRequest) GetConnectionId() string { @@ -1823,7 +1704,7 @@ type SchemaInitStatements struct { func (x *SchemaInitStatements) Reset() { *x = SchemaInitStatements{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[30] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1835,7 +1716,7 @@ func (x *SchemaInitStatements) String() string { func (*SchemaInitStatements) ProtoMessage() {} func (x *SchemaInitStatements) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[30] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1848,7 +1729,7 @@ func (x *SchemaInitStatements) ProtoReflect() protoreflect.Message { // Deprecated: Use SchemaInitStatements.ProtoReflect.Descriptor instead. func (*SchemaInitStatements) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{30} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{28} } func (x *SchemaInitStatements) GetLabel() string { @@ -1880,7 +1761,7 @@ type GetConnectionInitStatementsResponse struct { func (x *GetConnectionInitStatementsResponse) Reset() { *x = GetConnectionInitStatementsResponse{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[31] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1892,7 +1773,7 @@ func (x *GetConnectionInitStatementsResponse) String() string { func (*GetConnectionInitStatementsResponse) ProtoMessage() {} func (x *GetConnectionInitStatementsResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[31] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1905,7 +1786,7 @@ func (x *GetConnectionInitStatementsResponse) ProtoReflect() protoreflect.Messag // Deprecated: Use GetConnectionInitStatementsResponse.ProtoReflect.Descriptor instead. func (*GetConnectionInitStatementsResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{31} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{29} } func (x *GetConnectionInitStatementsResponse) GetTableInitStatements() map[string]string { @@ -1939,7 +1820,7 @@ type PrimaryConstraint struct { func (x *PrimaryConstraint) Reset() { *x = PrimaryConstraint{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[32] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1951,7 +1832,7 @@ func (x *PrimaryConstraint) String() string { func (*PrimaryConstraint) ProtoMessage() {} func (x *PrimaryConstraint) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[32] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1964,7 +1845,7 @@ func (x *PrimaryConstraint) ProtoReflect() protoreflect.Message { // Deprecated: Use PrimaryConstraint.ProtoReflect.Descriptor instead. func (*PrimaryConstraint) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{32} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{30} } func (x *PrimaryConstraint) GetColumns() []string { @@ -1974,190 +1855,6 @@ func (x *PrimaryConstraint) GetColumns() []string { return nil } -// Primary constraints for a specific table -type GetConnectionPrimaryConstraintsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` -} - -func (x *GetConnectionPrimaryConstraintsRequest) Reset() { - *x = GetConnectionPrimaryConstraintsRequest{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConnectionPrimaryConstraintsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConnectionPrimaryConstraintsRequest) ProtoMessage() {} - -func (x *GetConnectionPrimaryConstraintsRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[33] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConnectionPrimaryConstraintsRequest.ProtoReflect.Descriptor instead. -func (*GetConnectionPrimaryConstraintsRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{33} -} - -func (x *GetConnectionPrimaryConstraintsRequest) GetConnectionId() string { - if x != nil { - return x.ConnectionId - } - return "" -} - -type GetConnectionPrimaryConstraintsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the key here is .
and value is the primary constraint - TableConstraints map[string]*PrimaryConstraint `protobuf:"bytes,1,rep,name=table_constraints,json=tableConstraints,proto3" json:"table_constraints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *GetConnectionPrimaryConstraintsResponse) Reset() { - *x = GetConnectionPrimaryConstraintsResponse{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConnectionPrimaryConstraintsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConnectionPrimaryConstraintsResponse) ProtoMessage() {} - -func (x *GetConnectionPrimaryConstraintsResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[34] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConnectionPrimaryConstraintsResponse.ProtoReflect.Descriptor instead. -func (*GetConnectionPrimaryConstraintsResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{34} -} - -func (x *GetConnectionPrimaryConstraintsResponse) GetTableConstraints() map[string]*PrimaryConstraint { - if x != nil { - return x.TableConstraints - } - return nil -} - -// Unique constraints for a specific table -type GetConnectionUniqueConstraintsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` -} - -func (x *GetConnectionUniqueConstraintsRequest) Reset() { - *x = GetConnectionUniqueConstraintsRequest{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConnectionUniqueConstraintsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConnectionUniqueConstraintsRequest) ProtoMessage() {} - -func (x *GetConnectionUniqueConstraintsRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[35] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConnectionUniqueConstraintsRequest.ProtoReflect.Descriptor instead. -func (*GetConnectionUniqueConstraintsRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{35} -} - -func (x *GetConnectionUniqueConstraintsRequest) GetConnectionId() string { - if x != nil { - return x.ConnectionId - } - return "" -} - -type GetConnectionUniqueConstraintsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the key here is .
and value is the unique constraint - TableConstraints map[string]*UniqueConstraint `protobuf:"bytes,1,rep,name=table_constraints,json=tableConstraints,proto3" json:"table_constraints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *GetConnectionUniqueConstraintsResponse) Reset() { - *x = GetConnectionUniqueConstraintsResponse{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConnectionUniqueConstraintsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConnectionUniqueConstraintsResponse) ProtoMessage() {} - -func (x *GetConnectionUniqueConstraintsResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[36] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConnectionUniqueConstraintsResponse.ProtoReflect.Descriptor instead. -func (*GetConnectionUniqueConstraintsResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{36} -} - -func (x *GetConnectionUniqueConstraintsResponse) GetTableConstraints() map[string]*UniqueConstraint { - if x != nil { - return x.TableConstraints - } - return nil -} - type UniqueConstraint struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2168,7 +1865,7 @@ type UniqueConstraint struct { func (x *UniqueConstraint) Reset() { *x = UniqueConstraint{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[37] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2180,7 +1877,7 @@ func (x *UniqueConstraint) String() string { func (*UniqueConstraint) ProtoMessage() {} func (x *UniqueConstraint) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[37] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2193,7 +1890,7 @@ func (x *UniqueConstraint) ProtoReflect() protoreflect.Message { // Deprecated: Use UniqueConstraint.ProtoReflect.Descriptor instead. func (*UniqueConstraint) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{37} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{31} } func (x *UniqueConstraint) GetColumns() []string { @@ -2218,7 +1915,7 @@ type GetAiGeneratedDataRequest struct { func (x *GetAiGeneratedDataRequest) Reset() { *x = GetAiGeneratedDataRequest{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[38] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2230,7 +1927,7 @@ func (x *GetAiGeneratedDataRequest) String() string { func (*GetAiGeneratedDataRequest) ProtoMessage() {} func (x *GetAiGeneratedDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[38] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2243,7 +1940,7 @@ func (x *GetAiGeneratedDataRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAiGeneratedDataRequest.ProtoReflect.Descriptor instead. func (*GetAiGeneratedDataRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{38} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{32} } func (x *GetAiGeneratedDataRequest) GetAiConnectionId() string { @@ -2299,7 +1996,7 @@ type DatabaseTable struct { func (x *DatabaseTable) Reset() { *x = DatabaseTable{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[39] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2311,7 +2008,7 @@ func (x *DatabaseTable) String() string { func (*DatabaseTable) ProtoMessage() {} func (x *DatabaseTable) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[39] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2324,7 +2021,7 @@ func (x *DatabaseTable) ProtoReflect() protoreflect.Message { // Deprecated: Use DatabaseTable.ProtoReflect.Descriptor instead. func (*DatabaseTable) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{39} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{33} } func (x *DatabaseTable) GetSchema() string { @@ -2352,7 +2049,7 @@ type GetAiGeneratedDataResponse struct { func (x *GetAiGeneratedDataResponse) Reset() { *x = GetAiGeneratedDataResponse{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[40] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2364,7 +2061,7 @@ func (x *GetAiGeneratedDataResponse) String() string { func (*GetAiGeneratedDataResponse) ProtoMessage() {} func (x *GetAiGeneratedDataResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[40] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2377,7 +2074,7 @@ func (x *GetAiGeneratedDataResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAiGeneratedDataResponse.ProtoReflect.Descriptor instead. func (*GetAiGeneratedDataResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{40} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{34} } func (x *GetAiGeneratedDataResponse) GetRecords() []*structpb.Struct { @@ -2397,7 +2094,7 @@ type GetConnectionTableConstraintsRequest struct { func (x *GetConnectionTableConstraintsRequest) Reset() { *x = GetConnectionTableConstraintsRequest{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[41] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2409,7 +2106,7 @@ func (x *GetConnectionTableConstraintsRequest) String() string { func (*GetConnectionTableConstraintsRequest) ProtoMessage() {} func (x *GetConnectionTableConstraintsRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[41] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2422,7 +2119,7 @@ func (x *GetConnectionTableConstraintsRequest) ProtoReflect() protoreflect.Messa // Deprecated: Use GetConnectionTableConstraintsRequest.ProtoReflect.Descriptor instead. func (*GetConnectionTableConstraintsRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{41} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{35} } func (x *GetConnectionTableConstraintsRequest) GetConnectionId() string { @@ -2442,7 +2139,7 @@ type UniqueConstraints struct { func (x *UniqueConstraints) Reset() { *x = UniqueConstraints{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[42] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2454,7 +2151,7 @@ func (x *UniqueConstraints) String() string { func (*UniqueConstraints) ProtoMessage() {} func (x *UniqueConstraints) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[42] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2467,7 +2164,7 @@ func (x *UniqueConstraints) ProtoReflect() protoreflect.Message { // Deprecated: Use UniqueConstraints.ProtoReflect.Descriptor instead. func (*UniqueConstraints) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{42} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{36} } func (x *UniqueConstraints) GetConstraints() []*UniqueConstraint { @@ -2492,7 +2189,7 @@ type GetConnectionTableConstraintsResponse struct { func (x *GetConnectionTableConstraintsResponse) Reset() { *x = GetConnectionTableConstraintsResponse{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[43] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2504,7 +2201,7 @@ func (x *GetConnectionTableConstraintsResponse) String() string { func (*GetConnectionTableConstraintsResponse) ProtoMessage() {} func (x *GetConnectionTableConstraintsResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[43] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2517,7 +2214,7 @@ func (x *GetConnectionTableConstraintsResponse) ProtoReflect() protoreflect.Mess // Deprecated: Use GetConnectionTableConstraintsResponse.ProtoReflect.Descriptor instead. func (*GetConnectionTableConstraintsResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{43} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{37} } func (x *GetConnectionTableConstraintsResponse) GetForeignKeyConstraints() map[string]*ForeignConstraintTables { @@ -2554,7 +2251,7 @@ type GetTableRowCountRequest struct { func (x *GetTableRowCountRequest) Reset() { *x = GetTableRowCountRequest{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[44] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2566,7 +2263,7 @@ func (x *GetTableRowCountRequest) String() string { func (*GetTableRowCountRequest) ProtoMessage() {} func (x *GetTableRowCountRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[44] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2579,7 +2276,7 @@ func (x *GetTableRowCountRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTableRowCountRequest.ProtoReflect.Descriptor instead. func (*GetTableRowCountRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{44} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{38} } func (x *GetTableRowCountRequest) GetConnectionId() string { @@ -2620,7 +2317,7 @@ type GetTableRowCountResponse struct { func (x *GetTableRowCountResponse) Reset() { *x = GetTableRowCountResponse{} - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[45] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2632,7 +2329,7 @@ func (x *GetTableRowCountResponse) String() string { func (*GetTableRowCountResponse) ProtoMessage() {} func (x *GetTableRowCountResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[45] + mi := &file_mgmt_v1alpha1_connection_data_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2645,7 +2342,7 @@ func (x *GetTableRowCountResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTableRowCountResponse.ProtoReflect.Descriptor instead. func (*GetTableRowCountResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{45} + return file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP(), []int{39} } func (x *GetTableRowCountResponse) GetCount() int64 { @@ -2723,513 +2420,408 @@ var file_mgmt_v1alpha1_connection_data_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x03, 0x72, 0x6f, 0x77, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x72, - 0x6f, 0x77, 0x1a, 0x36, 0x0a, 0x08, 0x52, 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x16, 0x0a, 0x14, 0x50, 0x6f, - 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x73, 0x71, 0x6c, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x65, 0x0a, 0x11, - 0x41, 0x77, 0x73, 0x53, 0x33, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x21, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x05, 0x6a, - 0x6f, 0x62, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x04, 0x0a, - 0x02, 0x69, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x6f, 0x44, 0x42, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0x6f, 0x0a, 0x1b, 0x47, 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x53, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x21, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x05, 0x6a, 0x6f, 0x62, - 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, - 0x00, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x04, 0x0a, 0x02, 0x69, - 0x64, 0x22, 0xc0, 0x04, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x09, - 0x70, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x08, 0x70, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x46, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x33, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x77, 0x73, 0x53, 0x33, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x77, 0x73, - 0x53, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, 0x6d, 0x79, 0x73, 0x71, - 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, - 0x79, 0x73, 0x71, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x45, 0x0a, 0x0c, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x64, 0x0a, 0x17, 0x67, 0x63, 0x70, 0x5f, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x15, 0x67, 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0f, - 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x64, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x44, 0x42, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x79, - 0x6e, 0x61, 0x6d, 0x6f, 0x64, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, - 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x42, 0x0f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x05, 0xba, - 0x48, 0x02, 0x08, 0x01, 0x22, 0xe0, 0x02, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, - 0x65, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, - 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x1b, 0x0a, - 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, - 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x69, 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x63, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x01, 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x13, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x02, 0x52, 0x12, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x11, 0x0a, 0x0f, - 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, - 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, - 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x22, 0x56, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x37, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x1d, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0d, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xe7, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0a, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x1a, 0x68, 0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x6a, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x48, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x95, 0x01, 0x0a, - 0x1f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x25, 0x0a, - 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x73, 0x22, 0x57, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, - 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, - 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, - 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x54, 0x0a, - 0x0a, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x11, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, - 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x12, 0x3a, 0x0a, 0x0b, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, - 0x65, 0x79, 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x5f, - 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0b, - 0x6e, 0x6f, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x5d, 0x0a, 0x17, 0x46, - 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x65, - 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x63, - 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x91, 0x02, 0x0a, 0x27, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x65, - 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x4c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, - 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x73, 0x1a, 0x6b, 0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x65, - 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x98, - 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x6e, - 0x69, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x72, 0x75, 0x6e, - 0x63, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x65, - 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, - 0x74, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x29, - 0x0a, 0x10, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x63, 0x61, - 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, - 0x74, 0x65, 0x43, 0x61, 0x73, 0x63, 0x61, 0x64, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x22, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, - 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4c, - 0x0a, 0x14, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xa3, 0x04, 0x0a, - 0x23, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, - 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x15, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, - 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x62, 0x6c, 0x65, 0x22, 0x44, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x77, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x6f, 0x77, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x16, 0x0a, 0x14, 0x50, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x65, 0x0a, 0x11, 0x41, + 0x77, 0x73, 0x53, 0x33, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x21, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x05, 0x6a, 0x6f, + 0x62, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x48, 0x00, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x04, 0x0a, 0x02, + 0x69, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x79, 0x6e, 0x61, 0x6d, + 0x6f, 0x44, 0x42, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0x6f, 0x0a, 0x1b, 0x47, 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, + 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, + 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, + 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, + 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x04, 0x0a, 0x02, 0x69, 0x64, + 0x22, 0xc0, 0x04, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x09, 0x70, + 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, + 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x08, 0x70, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x46, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x33, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x77, 0x73, 0x53, 0x33, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x77, 0x73, 0x53, + 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, 0x6d, 0x79, 0x73, 0x71, 0x6c, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, + 0x73, 0x71, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, + 0x00, 0x52, 0x0b, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, + 0x0a, 0x0c, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x64, 0x0a, 0x17, 0x67, 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x48, 0x00, 0x52, 0x15, 0x67, 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0f, 0x64, + 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x64, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x44, 0x42, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x6f, 0x64, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, 0x6d, + 0x73, 0x73, 0x71, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x0f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x05, 0xba, 0x48, + 0x02, 0x08, 0x01, 0x22, 0xe0, 0x02, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x1b, 0x0a, 0x09, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, + 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x69, 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x34, 0x0a, 0x13, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x02, 0x52, 0x12, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x5f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x16, + 0x0a, 0x14, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, + 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0x56, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x37, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, + 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xe7, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x1a, 0x68, 0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, + 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x6a, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x48, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x1f, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x73, 0x22, 0x42, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x98, 0x01, 0x0a, 0x11, 0x46, 0x6f, 0x72, 0x65, + 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x3a, 0x0a, + 0x0b, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x0a, 0x66, + 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0b, 0x6e, 0x6f, 0x74, 0x4e, 0x75, + 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, + 0x10, 0x03, 0x22, 0x5d, 0x0a, 0x17, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, + 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x42, 0x0a, + 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, + 0x73, 0x22, 0x98, 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, + 0x69, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x34, 0x0a, 0x16, 0x74, + 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x69, + 0x6e, 0x73, 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x74, 0x72, 0x75, + 0x6e, 0x63, 0x61, 0x74, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x73, 0x65, 0x72, + 0x74, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, + 0x73, 0x63, 0x61, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x74, 0x72, 0x75, + 0x6e, 0x63, 0x61, 0x74, 0x65, 0x43, 0x61, 0x73, 0x63, 0x61, 0x64, 0x65, 0x22, 0x92, 0x01, 0x0a, + 0x22, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, + 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x4c, 0x0a, 0x14, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x6e, 0x69, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, + 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0xa3, 0x04, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x69, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x13, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x17, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x59, 0x0a, 0x16, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x6e, - 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x14, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x46, - 0x0a, 0x18, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4a, 0x0a, 0x1c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, - 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x2d, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x73, 0x22, 0x57, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0d, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x8b, 0x02, 0x0a, 0x27, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x4c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, - 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x73, 0x1a, 0x65, 0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x15, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x13, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x17, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x59, 0x0a, 0x16, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x6e, 0x69, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x14, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x1a, 0x46, 0x0a, 0x18, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4a, 0x0a, 0x1c, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2d, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x2c, 0x0a, 0x10, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x73, 0x22, 0xba, 0x02, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x69, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x32, 0x0a, 0x10, 0x61, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, + 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0e, 0x61, 0x69, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x09, 0xba, 0x48, 0x06, 0x22, 0x04, 0x18, 0x0a, 0x28, 0x01, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, + 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x42, + 0x0e, 0x0a, 0x0c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x22, + 0x4f, 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x1f, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x4f, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x69, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, + 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x73, 0x22, 0x55, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x56, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, + 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, + 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, + 0x22, 0xfd, 0x05, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x17, 0x66, + 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, + 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, 0x66, + 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, + 0x69, 0x6e, 0x74, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x17, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, + 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x7a, + 0x0a, 0x12, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, + 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, + 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0x70, 0x0a, 0x1a, 0x46, 0x6f, + 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, + 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, + 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6a, 0x0a, 0x1a, + 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x56, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, - 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, - 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0x88, 0x02, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x11, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0x64, 0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, - 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2c, 0x0a, 0x10, 0x55, - 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0xba, 0x02, 0x0a, 0x19, 0x47, 0x65, - 0x74, 0x41, 0x69, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x10, 0x61, 0x69, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0e, 0x61, 0x69, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xba, 0x48, 0x06, 0x22, - 0x04, 0x18, 0x0a, 0x28, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0a, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, - 0x6d, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x75, 0x73, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x12, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, - 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x22, 0x4f, 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x4f, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x69, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, - 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x55, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, - 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, - 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, - 0x56, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, - 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0xfd, 0x05, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, - 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x87, 0x01, 0x0a, 0x17, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, - 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x17, - 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x73, - 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4f, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x43, 0x6f, - 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, - 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x7a, 0x0a, 0x12, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x4b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, - 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, - 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x73, 0x1a, 0x70, 0x0a, 0x1a, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, - 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, - 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x6a, 0x0a, 0x1a, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, - 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x66, 0x0a, 0x16, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x71, 0x75, - 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa5, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, - 0x0a, 0x0d, 0x5f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x22, - 0x30, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x32, 0xa2, 0x0b, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7c, 0x0a, 0x17, 0x47, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x66, 0x0a, 0x16, 0x55, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xa5, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x77, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x26, 0x0a, 0x0c, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x43, 0x6c, + 0x61, 0x75, 0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x22, 0x30, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xe6, 0x07, 0x0a, 0x15, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x7c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, + 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6e, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x12, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x77, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x4d, 0x61, 0x70, 0x12, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x2d, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x30, 0x01, 0x12, 0x6e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x77, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x12, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8c, - 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, - 0x12, 0x33, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x92, 0x01, - 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x92, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, - 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, - 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x86, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x6d, 0x67, 0x6d, + 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8c, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, + 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x86, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, - 0x6e, 0x74, 0x73, 0x12, 0x34, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x69, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x69, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x69, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x65, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xcf, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6e, 0x75, 0x63, 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, - 0x6d, 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, - 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, - 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x6b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x69, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x69, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x69, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x52, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0xcf, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x63, + 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x2e, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x5c, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, 0x5c, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3244,65 +2836,55 @@ func file_mgmt_v1alpha1_connection_data_proto_rawDescGZIP() []byte { return file_mgmt_v1alpha1_connection_data_proto_rawDescData } -var file_mgmt_v1alpha1_connection_data_proto_msgTypes = make([]protoimpl.MessageInfo, 56) +var file_mgmt_v1alpha1_connection_data_proto_msgTypes = make([]protoimpl.MessageInfo, 46) var file_mgmt_v1alpha1_connection_data_proto_goTypes = []any{ - (*PostgresStreamConfig)(nil), // 0: mgmt.v1alpha1.PostgresStreamConfig - (*MysqlStreamConfig)(nil), // 1: mgmt.v1alpha1.MysqlStreamConfig - (*AwsDynamoDBStreamConfig)(nil), // 2: mgmt.v1alpha1.AwsDynamoDBStreamConfig - (*AwsS3StreamConfig)(nil), // 3: mgmt.v1alpha1.AwsS3StreamConfig - (*GcpCloudStorageStreamConfig)(nil), // 4: mgmt.v1alpha1.GcpCloudStorageStreamConfig - (*ConnectionStreamConfig)(nil), // 5: mgmt.v1alpha1.ConnectionStreamConfig - (*GetConnectionDataStreamRequest)(nil), // 6: mgmt.v1alpha1.GetConnectionDataStreamRequest - (*GetConnectionDataStreamResponse)(nil), // 7: mgmt.v1alpha1.GetConnectionDataStreamResponse - (*PostgresSchemaConfig)(nil), // 8: mgmt.v1alpha1.PostgresSchemaConfig - (*MysqlSchemaConfig)(nil), // 9: mgmt.v1alpha1.MysqlSchemaConfig - (*MssqlSchemaConfig)(nil), // 10: mgmt.v1alpha1.MssqlSchemaConfig - (*AwsS3SchemaConfig)(nil), // 11: mgmt.v1alpha1.AwsS3SchemaConfig - (*MongoSchemaConfig)(nil), // 12: mgmt.v1alpha1.MongoSchemaConfig - (*DynamoDBSchemaConfig)(nil), // 13: mgmt.v1alpha1.DynamoDBSchemaConfig - (*GcpCloudStorageSchemaConfig)(nil), // 14: mgmt.v1alpha1.GcpCloudStorageSchemaConfig - (*ConnectionSchemaConfig)(nil), // 15: mgmt.v1alpha1.ConnectionSchemaConfig - (*DatabaseColumn)(nil), // 16: mgmt.v1alpha1.DatabaseColumn - (*GetConnectionSchemaRequest)(nil), // 17: mgmt.v1alpha1.GetConnectionSchemaRequest - (*GetConnectionSchemaResponse)(nil), // 18: mgmt.v1alpha1.GetConnectionSchemaResponse - (*GetConnectionSchemaMapRequest)(nil), // 19: mgmt.v1alpha1.GetConnectionSchemaMapRequest - (*GetConnectionSchemaMapResponse)(nil), // 20: mgmt.v1alpha1.GetConnectionSchemaMapResponse - (*GetConnectionSchemaMapsRequest)(nil), // 21: mgmt.v1alpha1.GetConnectionSchemaMapsRequest - (*GetConnectionSchemaMapsResponse)(nil), // 22: mgmt.v1alpha1.GetConnectionSchemaMapsResponse - (*GetConnectionForeignConstraintsRequest)(nil), // 23: mgmt.v1alpha1.GetConnectionForeignConstraintsRequest - (*ForeignKey)(nil), // 24: mgmt.v1alpha1.ForeignKey - (*ForeignConstraint)(nil), // 25: mgmt.v1alpha1.ForeignConstraint - (*ForeignConstraintTables)(nil), // 26: mgmt.v1alpha1.ForeignConstraintTables - (*GetConnectionForeignConstraintsResponse)(nil), // 27: mgmt.v1alpha1.GetConnectionForeignConstraintsResponse - (*InitStatementOptions)(nil), // 28: mgmt.v1alpha1.InitStatementOptions - (*GetConnectionInitStatementsRequest)(nil), // 29: mgmt.v1alpha1.GetConnectionInitStatementsRequest - (*SchemaInitStatements)(nil), // 30: mgmt.v1alpha1.SchemaInitStatements - (*GetConnectionInitStatementsResponse)(nil), // 31: mgmt.v1alpha1.GetConnectionInitStatementsResponse - (*PrimaryConstraint)(nil), // 32: mgmt.v1alpha1.PrimaryConstraint - (*GetConnectionPrimaryConstraintsRequest)(nil), // 33: mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest - (*GetConnectionPrimaryConstraintsResponse)(nil), // 34: mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse - (*GetConnectionUniqueConstraintsRequest)(nil), // 35: mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest - (*GetConnectionUniqueConstraintsResponse)(nil), // 36: mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse - (*UniqueConstraint)(nil), // 37: mgmt.v1alpha1.UniqueConstraint - (*GetAiGeneratedDataRequest)(nil), // 38: mgmt.v1alpha1.GetAiGeneratedDataRequest - (*DatabaseTable)(nil), // 39: mgmt.v1alpha1.DatabaseTable - (*GetAiGeneratedDataResponse)(nil), // 40: mgmt.v1alpha1.GetAiGeneratedDataResponse - (*GetConnectionTableConstraintsRequest)(nil), // 41: mgmt.v1alpha1.GetConnectionTableConstraintsRequest - (*UniqueConstraints)(nil), // 42: mgmt.v1alpha1.UniqueConstraints - (*GetConnectionTableConstraintsResponse)(nil), // 43: mgmt.v1alpha1.GetConnectionTableConstraintsResponse - (*GetTableRowCountRequest)(nil), // 44: mgmt.v1alpha1.GetTableRowCountRequest - (*GetTableRowCountResponse)(nil), // 45: mgmt.v1alpha1.GetTableRowCountResponse - nil, // 46: mgmt.v1alpha1.GetConnectionDataStreamResponse.RowEntry - nil, // 47: mgmt.v1alpha1.GetConnectionSchemaMapResponse.SchemaMapEntry - nil, // 48: mgmt.v1alpha1.GetConnectionForeignConstraintsResponse.TableConstraintsEntry - nil, // 49: mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableInitStatementsEntry - nil, // 50: mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableTruncateStatementsEntry - nil, // 51: mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry - nil, // 52: mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse.TableConstraintsEntry - nil, // 53: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry - nil, // 54: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry - nil, // 55: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.UniqueConstraintsEntry - (*structpb.Struct)(nil), // 56: google.protobuf.Struct + (*PostgresStreamConfig)(nil), // 0: mgmt.v1alpha1.PostgresStreamConfig + (*MysqlStreamConfig)(nil), // 1: mgmt.v1alpha1.MysqlStreamConfig + (*AwsDynamoDBStreamConfig)(nil), // 2: mgmt.v1alpha1.AwsDynamoDBStreamConfig + (*AwsS3StreamConfig)(nil), // 3: mgmt.v1alpha1.AwsS3StreamConfig + (*GcpCloudStorageStreamConfig)(nil), // 4: mgmt.v1alpha1.GcpCloudStorageStreamConfig + (*ConnectionStreamConfig)(nil), // 5: mgmt.v1alpha1.ConnectionStreamConfig + (*GetConnectionDataStreamRequest)(nil), // 6: mgmt.v1alpha1.GetConnectionDataStreamRequest + (*GetConnectionDataStreamResponse)(nil), // 7: mgmt.v1alpha1.GetConnectionDataStreamResponse + (*PostgresSchemaConfig)(nil), // 8: mgmt.v1alpha1.PostgresSchemaConfig + (*MysqlSchemaConfig)(nil), // 9: mgmt.v1alpha1.MysqlSchemaConfig + (*MssqlSchemaConfig)(nil), // 10: mgmt.v1alpha1.MssqlSchemaConfig + (*AwsS3SchemaConfig)(nil), // 11: mgmt.v1alpha1.AwsS3SchemaConfig + (*MongoSchemaConfig)(nil), // 12: mgmt.v1alpha1.MongoSchemaConfig + (*DynamoDBSchemaConfig)(nil), // 13: mgmt.v1alpha1.DynamoDBSchemaConfig + (*GcpCloudStorageSchemaConfig)(nil), // 14: mgmt.v1alpha1.GcpCloudStorageSchemaConfig + (*ConnectionSchemaConfig)(nil), // 15: mgmt.v1alpha1.ConnectionSchemaConfig + (*DatabaseColumn)(nil), // 16: mgmt.v1alpha1.DatabaseColumn + (*GetConnectionSchemaRequest)(nil), // 17: mgmt.v1alpha1.GetConnectionSchemaRequest + (*GetConnectionSchemaResponse)(nil), // 18: mgmt.v1alpha1.GetConnectionSchemaResponse + (*GetConnectionSchemaMapRequest)(nil), // 19: mgmt.v1alpha1.GetConnectionSchemaMapRequest + (*GetConnectionSchemaMapResponse)(nil), // 20: mgmt.v1alpha1.GetConnectionSchemaMapResponse + (*GetConnectionSchemaMapsRequest)(nil), // 21: mgmt.v1alpha1.GetConnectionSchemaMapsRequest + (*GetConnectionSchemaMapsResponse)(nil), // 22: mgmt.v1alpha1.GetConnectionSchemaMapsResponse + (*ForeignKey)(nil), // 23: mgmt.v1alpha1.ForeignKey + (*ForeignConstraint)(nil), // 24: mgmt.v1alpha1.ForeignConstraint + (*ForeignConstraintTables)(nil), // 25: mgmt.v1alpha1.ForeignConstraintTables + (*InitStatementOptions)(nil), // 26: mgmt.v1alpha1.InitStatementOptions + (*GetConnectionInitStatementsRequest)(nil), // 27: mgmt.v1alpha1.GetConnectionInitStatementsRequest + (*SchemaInitStatements)(nil), // 28: mgmt.v1alpha1.SchemaInitStatements + (*GetConnectionInitStatementsResponse)(nil), // 29: mgmt.v1alpha1.GetConnectionInitStatementsResponse + (*PrimaryConstraint)(nil), // 30: mgmt.v1alpha1.PrimaryConstraint + (*UniqueConstraint)(nil), // 31: mgmt.v1alpha1.UniqueConstraint + (*GetAiGeneratedDataRequest)(nil), // 32: mgmt.v1alpha1.GetAiGeneratedDataRequest + (*DatabaseTable)(nil), // 33: mgmt.v1alpha1.DatabaseTable + (*GetAiGeneratedDataResponse)(nil), // 34: mgmt.v1alpha1.GetAiGeneratedDataResponse + (*GetConnectionTableConstraintsRequest)(nil), // 35: mgmt.v1alpha1.GetConnectionTableConstraintsRequest + (*UniqueConstraints)(nil), // 36: mgmt.v1alpha1.UniqueConstraints + (*GetConnectionTableConstraintsResponse)(nil), // 37: mgmt.v1alpha1.GetConnectionTableConstraintsResponse + (*GetTableRowCountRequest)(nil), // 38: mgmt.v1alpha1.GetTableRowCountRequest + (*GetTableRowCountResponse)(nil), // 39: mgmt.v1alpha1.GetTableRowCountResponse + nil, // 40: mgmt.v1alpha1.GetConnectionSchemaMapResponse.SchemaMapEntry + nil, // 41: mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableInitStatementsEntry + nil, // 42: mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableTruncateStatementsEntry + nil, // 43: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry + nil, // 44: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry + nil, // 45: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.UniqueConstraintsEntry + (*structpb.Struct)(nil), // 46: google.protobuf.Struct } var file_mgmt_v1alpha1_connection_data_proto_depIdxs = []int32{ 0, // 0: mgmt.v1alpha1.ConnectionStreamConfig.pg_config:type_name -> mgmt.v1alpha1.PostgresStreamConfig @@ -3311,69 +2893,56 @@ var file_mgmt_v1alpha1_connection_data_proto_depIdxs = []int32{ 4, // 3: mgmt.v1alpha1.ConnectionStreamConfig.gcp_cloudstorage_config:type_name -> mgmt.v1alpha1.GcpCloudStorageStreamConfig 2, // 4: mgmt.v1alpha1.ConnectionStreamConfig.dynamodb_config:type_name -> mgmt.v1alpha1.AwsDynamoDBStreamConfig 5, // 5: mgmt.v1alpha1.GetConnectionDataStreamRequest.stream_config:type_name -> mgmt.v1alpha1.ConnectionStreamConfig - 46, // 6: mgmt.v1alpha1.GetConnectionDataStreamResponse.row:type_name -> mgmt.v1alpha1.GetConnectionDataStreamResponse.RowEntry - 8, // 7: mgmt.v1alpha1.ConnectionSchemaConfig.pg_config:type_name -> mgmt.v1alpha1.PostgresSchemaConfig - 11, // 8: mgmt.v1alpha1.ConnectionSchemaConfig.aws_s3_config:type_name -> mgmt.v1alpha1.AwsS3SchemaConfig - 9, // 9: mgmt.v1alpha1.ConnectionSchemaConfig.mysql_config:type_name -> mgmt.v1alpha1.MysqlSchemaConfig - 12, // 10: mgmt.v1alpha1.ConnectionSchemaConfig.mongo_config:type_name -> mgmt.v1alpha1.MongoSchemaConfig - 14, // 11: mgmt.v1alpha1.ConnectionSchemaConfig.gcp_cloudstorage_config:type_name -> mgmt.v1alpha1.GcpCloudStorageSchemaConfig - 13, // 12: mgmt.v1alpha1.ConnectionSchemaConfig.dynamodb_config:type_name -> mgmt.v1alpha1.DynamoDBSchemaConfig - 10, // 13: mgmt.v1alpha1.ConnectionSchemaConfig.mssql_config:type_name -> mgmt.v1alpha1.MssqlSchemaConfig - 15, // 14: mgmt.v1alpha1.GetConnectionSchemaRequest.schema_config:type_name -> mgmt.v1alpha1.ConnectionSchemaConfig - 16, // 15: mgmt.v1alpha1.GetConnectionSchemaResponse.schemas:type_name -> mgmt.v1alpha1.DatabaseColumn - 15, // 16: mgmt.v1alpha1.GetConnectionSchemaMapRequest.schema_config:type_name -> mgmt.v1alpha1.ConnectionSchemaConfig - 47, // 17: mgmt.v1alpha1.GetConnectionSchemaMapResponse.schema_map:type_name -> mgmt.v1alpha1.GetConnectionSchemaMapResponse.SchemaMapEntry - 19, // 18: mgmt.v1alpha1.GetConnectionSchemaMapsRequest.requests:type_name -> mgmt.v1alpha1.GetConnectionSchemaMapRequest - 20, // 19: mgmt.v1alpha1.GetConnectionSchemaMapsResponse.responses:type_name -> mgmt.v1alpha1.GetConnectionSchemaMapResponse - 24, // 20: mgmt.v1alpha1.ForeignConstraint.foreign_key:type_name -> mgmt.v1alpha1.ForeignKey - 25, // 21: mgmt.v1alpha1.ForeignConstraintTables.constraints:type_name -> mgmt.v1alpha1.ForeignConstraint - 48, // 22: mgmt.v1alpha1.GetConnectionForeignConstraintsResponse.table_constraints:type_name -> mgmt.v1alpha1.GetConnectionForeignConstraintsResponse.TableConstraintsEntry - 28, // 23: mgmt.v1alpha1.GetConnectionInitStatementsRequest.options:type_name -> mgmt.v1alpha1.InitStatementOptions - 49, // 24: mgmt.v1alpha1.GetConnectionInitStatementsResponse.table_init_statements:type_name -> mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableInitStatementsEntry - 50, // 25: mgmt.v1alpha1.GetConnectionInitStatementsResponse.table_truncate_statements:type_name -> mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableTruncateStatementsEntry - 30, // 26: mgmt.v1alpha1.GetConnectionInitStatementsResponse.schema_init_statements:type_name -> mgmt.v1alpha1.SchemaInitStatements - 51, // 27: mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse.table_constraints:type_name -> mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry - 52, // 28: mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse.table_constraints:type_name -> mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse.TableConstraintsEntry - 39, // 29: mgmt.v1alpha1.GetAiGeneratedDataRequest.table:type_name -> mgmt.v1alpha1.DatabaseTable - 56, // 30: mgmt.v1alpha1.GetAiGeneratedDataResponse.records:type_name -> google.protobuf.Struct - 37, // 31: mgmt.v1alpha1.UniqueConstraints.constraints:type_name -> mgmt.v1alpha1.UniqueConstraint - 53, // 32: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.foreign_key_constraints:type_name -> mgmt.v1alpha1.GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry - 54, // 33: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.primary_key_constraints:type_name -> mgmt.v1alpha1.GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry - 55, // 34: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.unique_constraints:type_name -> mgmt.v1alpha1.GetConnectionTableConstraintsResponse.UniqueConstraintsEntry - 18, // 35: mgmt.v1alpha1.GetConnectionSchemaMapResponse.SchemaMapEntry.value:type_name -> mgmt.v1alpha1.GetConnectionSchemaResponse - 26, // 36: mgmt.v1alpha1.GetConnectionForeignConstraintsResponse.TableConstraintsEntry.value:type_name -> mgmt.v1alpha1.ForeignConstraintTables - 32, // 37: mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry.value:type_name -> mgmt.v1alpha1.PrimaryConstraint - 37, // 38: mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse.TableConstraintsEntry.value:type_name -> mgmt.v1alpha1.UniqueConstraint - 26, // 39: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry.value:type_name -> mgmt.v1alpha1.ForeignConstraintTables - 32, // 40: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry.value:type_name -> mgmt.v1alpha1.PrimaryConstraint - 42, // 41: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.UniqueConstraintsEntry.value:type_name -> mgmt.v1alpha1.UniqueConstraints - 6, // 42: mgmt.v1alpha1.ConnectionDataService.GetConnectionDataStream:input_type -> mgmt.v1alpha1.GetConnectionDataStreamRequest - 17, // 43: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchema:input_type -> mgmt.v1alpha1.GetConnectionSchemaRequest - 19, // 44: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMap:input_type -> mgmt.v1alpha1.GetConnectionSchemaMapRequest - 21, // 45: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMaps:input_type -> mgmt.v1alpha1.GetConnectionSchemaMapsRequest - 41, // 46: mgmt.v1alpha1.ConnectionDataService.GetConnectionTableConstraints:input_type -> mgmt.v1alpha1.GetConnectionTableConstraintsRequest - 23, // 47: mgmt.v1alpha1.ConnectionDataService.GetConnectionForeignConstraints:input_type -> mgmt.v1alpha1.GetConnectionForeignConstraintsRequest - 33, // 48: mgmt.v1alpha1.ConnectionDataService.GetConnectionPrimaryConstraints:input_type -> mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest - 29, // 49: mgmt.v1alpha1.ConnectionDataService.GetConnectionInitStatements:input_type -> mgmt.v1alpha1.GetConnectionInitStatementsRequest - 35, // 50: mgmt.v1alpha1.ConnectionDataService.GetConnectionUniqueConstraints:input_type -> mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest - 38, // 51: mgmt.v1alpha1.ConnectionDataService.GetAiGeneratedData:input_type -> mgmt.v1alpha1.GetAiGeneratedDataRequest - 44, // 52: mgmt.v1alpha1.ConnectionDataService.GetTableRowCount:input_type -> mgmt.v1alpha1.GetTableRowCountRequest - 7, // 53: mgmt.v1alpha1.ConnectionDataService.GetConnectionDataStream:output_type -> mgmt.v1alpha1.GetConnectionDataStreamResponse - 18, // 54: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchema:output_type -> mgmt.v1alpha1.GetConnectionSchemaResponse - 20, // 55: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMap:output_type -> mgmt.v1alpha1.GetConnectionSchemaMapResponse - 22, // 56: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMaps:output_type -> mgmt.v1alpha1.GetConnectionSchemaMapsResponse - 43, // 57: mgmt.v1alpha1.ConnectionDataService.GetConnectionTableConstraints:output_type -> mgmt.v1alpha1.GetConnectionTableConstraintsResponse - 27, // 58: mgmt.v1alpha1.ConnectionDataService.GetConnectionForeignConstraints:output_type -> mgmt.v1alpha1.GetConnectionForeignConstraintsResponse - 34, // 59: mgmt.v1alpha1.ConnectionDataService.GetConnectionPrimaryConstraints:output_type -> mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse - 31, // 60: mgmt.v1alpha1.ConnectionDataService.GetConnectionInitStatements:output_type -> mgmt.v1alpha1.GetConnectionInitStatementsResponse - 36, // 61: mgmt.v1alpha1.ConnectionDataService.GetConnectionUniqueConstraints:output_type -> mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse - 40, // 62: mgmt.v1alpha1.ConnectionDataService.GetAiGeneratedData:output_type -> mgmt.v1alpha1.GetAiGeneratedDataResponse - 45, // 63: mgmt.v1alpha1.ConnectionDataService.GetTableRowCount:output_type -> mgmt.v1alpha1.GetTableRowCountResponse - 53, // [53:64] is the sub-list for method output_type - 42, // [42:53] is the sub-list for method input_type - 42, // [42:42] is the sub-list for extension type_name - 42, // [42:42] is the sub-list for extension extendee - 0, // [0:42] is the sub-list for field type_name + 8, // 6: mgmt.v1alpha1.ConnectionSchemaConfig.pg_config:type_name -> mgmt.v1alpha1.PostgresSchemaConfig + 11, // 7: mgmt.v1alpha1.ConnectionSchemaConfig.aws_s3_config:type_name -> mgmt.v1alpha1.AwsS3SchemaConfig + 9, // 8: mgmt.v1alpha1.ConnectionSchemaConfig.mysql_config:type_name -> mgmt.v1alpha1.MysqlSchemaConfig + 12, // 9: mgmt.v1alpha1.ConnectionSchemaConfig.mongo_config:type_name -> mgmt.v1alpha1.MongoSchemaConfig + 14, // 10: mgmt.v1alpha1.ConnectionSchemaConfig.gcp_cloudstorage_config:type_name -> mgmt.v1alpha1.GcpCloudStorageSchemaConfig + 13, // 11: mgmt.v1alpha1.ConnectionSchemaConfig.dynamodb_config:type_name -> mgmt.v1alpha1.DynamoDBSchemaConfig + 10, // 12: mgmt.v1alpha1.ConnectionSchemaConfig.mssql_config:type_name -> mgmt.v1alpha1.MssqlSchemaConfig + 15, // 13: mgmt.v1alpha1.GetConnectionSchemaRequest.schema_config:type_name -> mgmt.v1alpha1.ConnectionSchemaConfig + 16, // 14: mgmt.v1alpha1.GetConnectionSchemaResponse.schemas:type_name -> mgmt.v1alpha1.DatabaseColumn + 15, // 15: mgmt.v1alpha1.GetConnectionSchemaMapRequest.schema_config:type_name -> mgmt.v1alpha1.ConnectionSchemaConfig + 40, // 16: mgmt.v1alpha1.GetConnectionSchemaMapResponse.schema_map:type_name -> mgmt.v1alpha1.GetConnectionSchemaMapResponse.SchemaMapEntry + 19, // 17: mgmt.v1alpha1.GetConnectionSchemaMapsRequest.requests:type_name -> mgmt.v1alpha1.GetConnectionSchemaMapRequest + 20, // 18: mgmt.v1alpha1.GetConnectionSchemaMapsResponse.responses:type_name -> mgmt.v1alpha1.GetConnectionSchemaMapResponse + 23, // 19: mgmt.v1alpha1.ForeignConstraint.foreign_key:type_name -> mgmt.v1alpha1.ForeignKey + 24, // 20: mgmt.v1alpha1.ForeignConstraintTables.constraints:type_name -> mgmt.v1alpha1.ForeignConstraint + 26, // 21: mgmt.v1alpha1.GetConnectionInitStatementsRequest.options:type_name -> mgmt.v1alpha1.InitStatementOptions + 41, // 22: mgmt.v1alpha1.GetConnectionInitStatementsResponse.table_init_statements:type_name -> mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableInitStatementsEntry + 42, // 23: mgmt.v1alpha1.GetConnectionInitStatementsResponse.table_truncate_statements:type_name -> mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableTruncateStatementsEntry + 28, // 24: mgmt.v1alpha1.GetConnectionInitStatementsResponse.schema_init_statements:type_name -> mgmt.v1alpha1.SchemaInitStatements + 33, // 25: mgmt.v1alpha1.GetAiGeneratedDataRequest.table:type_name -> mgmt.v1alpha1.DatabaseTable + 46, // 26: mgmt.v1alpha1.GetAiGeneratedDataResponse.records:type_name -> google.protobuf.Struct + 31, // 27: mgmt.v1alpha1.UniqueConstraints.constraints:type_name -> mgmt.v1alpha1.UniqueConstraint + 43, // 28: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.foreign_key_constraints:type_name -> mgmt.v1alpha1.GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry + 44, // 29: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.primary_key_constraints:type_name -> mgmt.v1alpha1.GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry + 45, // 30: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.unique_constraints:type_name -> mgmt.v1alpha1.GetConnectionTableConstraintsResponse.UniqueConstraintsEntry + 18, // 31: mgmt.v1alpha1.GetConnectionSchemaMapResponse.SchemaMapEntry.value:type_name -> mgmt.v1alpha1.GetConnectionSchemaResponse + 25, // 32: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry.value:type_name -> mgmt.v1alpha1.ForeignConstraintTables + 30, // 33: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry.value:type_name -> mgmt.v1alpha1.PrimaryConstraint + 36, // 34: mgmt.v1alpha1.GetConnectionTableConstraintsResponse.UniqueConstraintsEntry.value:type_name -> mgmt.v1alpha1.UniqueConstraints + 6, // 35: mgmt.v1alpha1.ConnectionDataService.GetConnectionDataStream:input_type -> mgmt.v1alpha1.GetConnectionDataStreamRequest + 17, // 36: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchema:input_type -> mgmt.v1alpha1.GetConnectionSchemaRequest + 19, // 37: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMap:input_type -> mgmt.v1alpha1.GetConnectionSchemaMapRequest + 21, // 38: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMaps:input_type -> mgmt.v1alpha1.GetConnectionSchemaMapsRequest + 35, // 39: mgmt.v1alpha1.ConnectionDataService.GetConnectionTableConstraints:input_type -> mgmt.v1alpha1.GetConnectionTableConstraintsRequest + 27, // 40: mgmt.v1alpha1.ConnectionDataService.GetConnectionInitStatements:input_type -> mgmt.v1alpha1.GetConnectionInitStatementsRequest + 32, // 41: mgmt.v1alpha1.ConnectionDataService.GetAiGeneratedData:input_type -> mgmt.v1alpha1.GetAiGeneratedDataRequest + 38, // 42: mgmt.v1alpha1.ConnectionDataService.GetTableRowCount:input_type -> mgmt.v1alpha1.GetTableRowCountRequest + 7, // 43: mgmt.v1alpha1.ConnectionDataService.GetConnectionDataStream:output_type -> mgmt.v1alpha1.GetConnectionDataStreamResponse + 18, // 44: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchema:output_type -> mgmt.v1alpha1.GetConnectionSchemaResponse + 20, // 45: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMap:output_type -> mgmt.v1alpha1.GetConnectionSchemaMapResponse + 22, // 46: mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMaps:output_type -> mgmt.v1alpha1.GetConnectionSchemaMapsResponse + 37, // 47: mgmt.v1alpha1.ConnectionDataService.GetConnectionTableConstraints:output_type -> mgmt.v1alpha1.GetConnectionTableConstraintsResponse + 29, // 48: mgmt.v1alpha1.ConnectionDataService.GetConnectionInitStatements:output_type -> mgmt.v1alpha1.GetConnectionInitStatementsResponse + 34, // 49: mgmt.v1alpha1.ConnectionDataService.GetAiGeneratedData:output_type -> mgmt.v1alpha1.GetAiGeneratedDataResponse + 39, // 50: mgmt.v1alpha1.ConnectionDataService.GetTableRowCount:output_type -> mgmt.v1alpha1.GetTableRowCountResponse + 43, // [43:51] is the sub-list for method output_type + 35, // [35:43] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name } func init() { file_mgmt_v1alpha1_connection_data_proto_init() } @@ -3414,15 +2983,15 @@ func file_mgmt_v1alpha1_connection_data_proto_init() { (*ConnectionSchemaConfig_MssqlConfig)(nil), } file_mgmt_v1alpha1_connection_data_proto_msgTypes[16].OneofWrappers = []any{} + file_mgmt_v1alpha1_connection_data_proto_msgTypes[32].OneofWrappers = []any{} file_mgmt_v1alpha1_connection_data_proto_msgTypes[38].OneofWrappers = []any{} - file_mgmt_v1alpha1_connection_data_proto_msgTypes[44].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mgmt_v1alpha1_connection_data_proto_rawDesc, NumEnums: 0, - NumMessages: 56, + NumMessages: 46, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/gen/go/protos/mgmt/v1alpha1/connection_data.pb.json.go b/backend/gen/go/protos/mgmt/v1alpha1/connection_data.pb.json.go index 6f7e77daae..147973fa4a 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/connection_data.pb.json.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/connection_data.pb.json.go @@ -237,16 +237,6 @@ func (msg *GetConnectionSchemaMapsResponse) UnmarshalJSON(b []byte) error { return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } -// MarshalJSON implements json.Marshaler -func (msg *GetConnectionForeignConstraintsRequest) MarshalJSON() ([]byte, error) { - return protojson.MarshalOptions{}.Marshal(msg) -} - -// UnmarshalJSON implements json.Unmarshaler -func (msg *GetConnectionForeignConstraintsRequest) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{}.Unmarshal(b, msg) -} - // MarshalJSON implements json.Marshaler func (msg *ForeignKey) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{}.Marshal(msg) @@ -277,16 +267,6 @@ func (msg *ForeignConstraintTables) UnmarshalJSON(b []byte) error { return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } -// MarshalJSON implements json.Marshaler -func (msg *GetConnectionForeignConstraintsResponse) MarshalJSON() ([]byte, error) { - return protojson.MarshalOptions{}.Marshal(msg) -} - -// UnmarshalJSON implements json.Unmarshaler -func (msg *GetConnectionForeignConstraintsResponse) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{}.Unmarshal(b, msg) -} - // MarshalJSON implements json.Marshaler func (msg *InitStatementOptions) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{}.Marshal(msg) @@ -337,46 +317,6 @@ func (msg *PrimaryConstraint) UnmarshalJSON(b []byte) error { return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } -// MarshalJSON implements json.Marshaler -func (msg *GetConnectionPrimaryConstraintsRequest) MarshalJSON() ([]byte, error) { - return protojson.MarshalOptions{}.Marshal(msg) -} - -// UnmarshalJSON implements json.Unmarshaler -func (msg *GetConnectionPrimaryConstraintsRequest) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{}.Unmarshal(b, msg) -} - -// MarshalJSON implements json.Marshaler -func (msg *GetConnectionPrimaryConstraintsResponse) MarshalJSON() ([]byte, error) { - return protojson.MarshalOptions{}.Marshal(msg) -} - -// UnmarshalJSON implements json.Unmarshaler -func (msg *GetConnectionPrimaryConstraintsResponse) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{}.Unmarshal(b, msg) -} - -// MarshalJSON implements json.Marshaler -func (msg *GetConnectionUniqueConstraintsRequest) MarshalJSON() ([]byte, error) { - return protojson.MarshalOptions{}.Marshal(msg) -} - -// UnmarshalJSON implements json.Unmarshaler -func (msg *GetConnectionUniqueConstraintsRequest) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{}.Unmarshal(b, msg) -} - -// MarshalJSON implements json.Marshaler -func (msg *GetConnectionUniqueConstraintsResponse) MarshalJSON() ([]byte, error) { - return protojson.MarshalOptions{}.Marshal(msg) -} - -// UnmarshalJSON implements json.Unmarshaler -func (msg *GetConnectionUniqueConstraintsResponse) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{}.Unmarshal(b, msg) -} - // MarshalJSON implements json.Marshaler func (msg *UniqueConstraint) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{}.Marshal(msg) diff --git a/backend/gen/go/protos/mgmt/v1alpha1/job.pb.go b/backend/gen/go/protos/mgmt/v1alpha1/job.pb.go index 05bc9d72b4..0e0341c0d2 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/job.pb.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/job.pb.go @@ -1459,8 +1459,6 @@ type PostgresSourceConnectionOptions struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // @deprecated - Use new_column_addition_strategy instead - HaltOnNewColumnAddition *bool `protobuf:"varint,1,opt,name=halt_on_new_column_addition,json=haltOnNewColumnAddition,proto3,oneof" json:"halt_on_new_column_addition,omitempty"` Schemas []*PostgresSourceSchemaOption `protobuf:"bytes,2,rep,name=schemas,proto3" json:"schemas,omitempty"` ConnectionId string `protobuf:"bytes,3,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` SubsetByForeignKeyConstraints bool `protobuf:"varint,4,opt,name=subset_by_foreign_key_constraints,json=subsetByForeignKeyConstraints,proto3" json:"subset_by_foreign_key_constraints,omitempty"` @@ -1498,13 +1496,6 @@ func (*PostgresSourceConnectionOptions) Descriptor() ([]byte, []int) { return file_mgmt_v1alpha1_job_proto_rawDescGZIP(), []int{16} } -func (x *PostgresSourceConnectionOptions) GetHaltOnNewColumnAddition() bool { - if x != nil && x.HaltOnNewColumnAddition != nil { - return *x.HaltOnNewColumnAddition - } - return false -} - func (x *PostgresSourceConnectionOptions) GetSchemas() []*PostgresSourceSchemaOption { if x != nil { return x.Schemas @@ -3377,8 +3368,6 @@ type JobMappingTransformer struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // @deprecated - This is no longer used in favor just providing the TransformerConfig - Source TransformerSource `protobuf:"varint,1,opt,name=source,proto3,enum=mgmt.v1alpha1.TransformerSource" json:"source,omitempty"` Config *TransformerConfig `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` } @@ -3412,13 +3401,6 @@ func (*JobMappingTransformer) Descriptor() ([]byte, []int) { return file_mgmt_v1alpha1_job_proto_rawDescGZIP(), []int{47} } -func (x *JobMappingTransformer) GetSource() TransformerSource { - if x != nil { - return x.Source - } - return TransformerSource_TRANSFORMER_SOURCE_UNSPECIFIED -} - func (x *JobMappingTransformer) GetConfig() *TransformerConfig { if x != nil { return x.Config @@ -8928,7 +8910,7 @@ type isPostgresSourceConnectionOptions_NewColumnAdditionStrategy_Strategy interf } type PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob_ struct { - // halt job if a new column is detected. This is equiavlent to the deprecated halt_on_new_column_addition + // halt job if a new column is detected. HaltJob *PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob `protobuf:"bytes,1,opt,name=halt_job,json=haltJob,proto3,oneof"` } @@ -9366,107 +9348,11 @@ var file_mgmt_v1alpha1_job_proto_rawDesc = []byte{ 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, - 0x22, 0xec, 0x05, 0x0a, 0x1f, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, + 0x22, 0x8f, 0x05, 0x0a, 0x1f, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x1b, 0x68, 0x61, 0x6c, 0x74, 0x5f, 0x6f, 0x6e, 0x5f, - 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x17, 0x68, 0x61, 0x6c, - 0x74, 0x4f, 0x6e, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x64, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, - 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x0d, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x21, 0x73, - 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x42, 0x79, - 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x1c, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x65, 0x77, - 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x19, 0x6e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, - 0x79, 0x1a, 0x9b, 0x02, 0x0a, 0x19, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, - 0x6d, 0x0a, 0x08, 0x68, 0x61, 0x6c, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x50, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x64, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2e, 0x48, 0x61, 0x6c, 0x74, - 0x4a, 0x6f, 0x62, 0x48, 0x00, 0x52, 0x07, 0x68, 0x61, 0x6c, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x6d, - 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x50, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x4d, - 0x61, 0x70, 0x48, 0x00, 0x52, 0x07, 0x61, 0x75, 0x74, 0x6f, 0x4d, 0x61, 0x70, 0x1a, 0x09, 0x0a, - 0x07, 0x48, 0x61, 0x6c, 0x74, 0x4a, 0x6f, 0x62, 0x1a, 0x09, 0x0a, 0x07, 0x41, 0x75, 0x74, 0x6f, - 0x4d, 0x61, 0x70, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, - 0x1e, 0x0a, 0x1c, 0x5f, 0x68, 0x61, 0x6c, 0x74, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x65, 0x77, 0x5f, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x76, 0x0a, 0x1a, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x40, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x6a, 0x0a, 0x19, 0x50, 0x6f, 0x73, 0x74, 0x67, - 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x0b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x88, - 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, - 0x75, 0x73, 0x65, 0x22, 0x97, 0x02, 0x0a, 0x1c, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x1b, 0x68, 0x61, 0x6c, 0x74, 0x5f, 0x6f, 0x6e, 0x5f, - 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x68, 0x61, 0x6c, 0x74, 0x4f, - 0x6e, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x21, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x62, 0x79, - 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, - 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x42, 0x79, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, - 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x70, 0x0a, - 0x17, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x12, 0x3d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, - 0x67, 0x0a, 0x16, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x26, 0x0a, 0x0c, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x43, 0x6c, - 0x61, 0x75, 0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x22, 0x97, 0x02, 0x0a, 0x1c, 0x4d, 0x73, 0x73, - 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x1b, 0x68, 0x61, 0x6c, - 0x74, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, - 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, - 0x68, 0x61, 0x6c, 0x74, 0x4f, 0x6e, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, @@ -9476,1347 +9362,1434 @@ var file_mgmt_v1alpha1_job_proto_rawDesc = []byte{ 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x42, 0x79, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x74, 0x73, 0x22, 0x70, 0x0a, 0x17, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x16, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, - 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, - 0x61, 0x75, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, - 0x5f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x22, 0x4d, 0x0a, - 0x1c, 0x41, 0x77, 0x73, 0x53, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, - 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xcf, 0x05, 0x0a, - 0x15, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x60, 0x0a, 0x10, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x33, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, - 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, - 0x73, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x41, 0x77, 0x73, 0x53, 0x33, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x77, 0x73, 0x53, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x57, 0x0a, 0x0d, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x44, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x6d, - 0x79, 0x73, 0x71, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0f, 0x6d, - 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x44, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x6d, 0x6f, 0x6e, 0x67, - 0x6f, 0x64, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x76, 0x0a, 0x18, 0x67, 0x63, - 0x70, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x70, - 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x16, 0x67, 0x63, 0x70, 0x43, - 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x60, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x64, 0x62, 0x5f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, - 0x61, 0x6d, 0x6f, 0x44, 0x42, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x64, 0x62, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x57, 0x0a, 0x0d, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x67, + 0x74, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x1c, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, + 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x52, 0x19, 0x6e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x1a, 0x9b, + 0x02, 0x0a, 0x19, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x64, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x6d, 0x0a, 0x08, + 0x68, 0x61, 0x6c, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x50, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, + 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, + 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2e, 0x48, 0x61, 0x6c, 0x74, 0x4a, 0x6f, 0x62, + 0x48, 0x00, 0x52, 0x07, 0x68, 0x61, 0x6c, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x6d, 0x0a, 0x08, 0x61, + 0x75, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x50, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, + 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x65, + 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x61, 0x70, 0x48, + 0x00, 0x52, 0x07, 0x61, 0x75, 0x74, 0x6f, 0x4d, 0x61, 0x70, 0x1a, 0x09, 0x0a, 0x07, 0x48, 0x61, + 0x6c, 0x74, 0x4a, 0x6f, 0x62, 0x1a, 0x09, 0x0a, 0x07, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x61, 0x70, + 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x4a, 0x04, 0x08, 0x01, + 0x10, 0x02, 0x22, 0x76, 0x0a, 0x1a, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x40, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x6a, 0x0a, 0x19, 0x50, 0x6f, + 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x26, 0x0a, + 0x0c, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x43, 0x6c, 0x61, 0x75, + 0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x22, 0x97, 0x02, 0x0a, 0x1c, 0x4d, 0x79, 0x73, 0x71, 0x6c, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x1b, 0x68, 0x61, 0x6c, 0x74, 0x5f, + 0x6f, 0x6e, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x61, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x68, 0x61, + 0x6c, 0x74, 0x4f, 0x6e, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x64, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, + 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x21, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, + 0x5f, 0x62, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x1d, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x42, 0x79, 0x46, 0x6f, 0x72, 0x65, 0x69, + 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, + 0x22, 0x70, 0x0a, 0x17, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x3d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x22, 0x67, 0x0a, 0x16, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, + 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x22, 0x97, 0x02, 0x0a, 0x1c, + 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x1b, + 0x68, 0x61, 0x6c, 0x74, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x17, 0x68, 0x61, 0x6c, 0x74, 0x4f, 0x6e, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x07, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, - 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, - 0x0c, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0f, 0x0a, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x25, - 0x0a, 0x23, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x0d, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x21, 0x73, + 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x42, 0x79, + 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x70, 0x0a, 0x17, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x16, 0x4d, 0x73, 0x73, 0x71, 0x6c, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x88, 0x01, 0x01, 0x42, + 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, + 0x22, 0x4d, 0x0a, 0x1c, 0x41, 0x77, 0x73, 0x53, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, + 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, + 0xcf, 0x05, 0x0a, 0x15, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x60, 0x0a, 0x10, 0x70, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x6f, 0x73, 0x74, + 0x67, 0x72, 0x65, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x0e, 0x61, + 0x77, 0x73, 0x5f, 0x73, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x41, 0x77, 0x73, 0x53, 0x33, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2d, 0x0a, 0x2b, 0x47, 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x77, 0x73, 0x53, 0x33, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x57, 0x0a, 0x0d, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, + 0x71, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, + 0x52, 0x0c, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, + 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x6d, + 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x76, 0x0a, + 0x18, 0x67, 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x16, 0x67, + 0x63, 0x70, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x60, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x64, + 0x62, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x33, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x44, 0x42, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7d, 0x0a, 0x24, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x44, 0x42, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x44, 0x42, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x73, 0x22, 0x71, 0x0a, 0x1f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x44, 0x42, 0x44, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xa4, 0x03, 0x0a, 0x24, 0x50, 0x6f, 0x73, 0x74, 0x67, - 0x72, 0x65, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x51, 0x0a, 0x0e, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, - 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x0d, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, - 0x6e, 0x69, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x48, - 0x0a, 0x0b, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x4f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x73, 0x6b, 0x69, 0x70, - 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x69, 0x6f, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, - 0x6b, 0x69, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x56, 0x69, 0x6f, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x0d, 0x6d, 0x61, 0x78, - 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x07, 0xba, 0x48, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, - 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, - 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x22, 0x39, 0x0a, - 0x18, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x4f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, - 0x69, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x6f, 0x5f, - 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x64, - 0x6f, 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x6d, 0x0a, 0x1b, 0x50, 0x6f, 0x73, 0x74, - 0x67, 0x72, 0x65, 0x73, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x72, 0x75, 0x6e, 0x63, - 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, - 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x61, 0x73, 0x63, 0x61, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x63, 0x61, 0x73, 0x63, 0x61, 0x64, 0x65, 0x22, 0x9b, 0x03, 0x0a, 0x21, 0x4d, 0x79, 0x73, 0x71, - 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, - 0x0e, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x54, 0x72, 0x75, 0x6e, 0x63, - 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, - 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2a, 0x0a, - 0x11, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x45, 0x0a, 0x0b, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x64, 0x62, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x57, 0x0a, 0x0d, 0x6d, 0x73, 0x73, 0x71, 0x6c, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, - 0x79, 0x73, 0x71, 0x6c, 0x4f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, - 0x12, 0x3d, 0x0a, 0x1b, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x6b, 0x69, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, - 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x30, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x30, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xba, 0x48, 0x04, 0x2a, 0x02, 0x28, - 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, - 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, - 0x6c, 0x69, 0x67, 0x68, 0x74, 0x22, 0x50, 0x0a, 0x18, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x54, 0x72, - 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, - 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, - 0x65, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x22, 0x36, 0x0a, 0x15, 0x4d, 0x79, 0x73, 0x71, 0x6c, - 0x4f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, - 0x9b, 0x03, 0x0a, 0x21, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x0e, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, - 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x73, 0x71, 0x6c, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x73, 0x71, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x42, 0x0f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, + 0x01, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2d, 0x0a, 0x2b, 0x47, 0x63, 0x70, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7d, 0x0a, 0x24, 0x44, 0x79, 0x6e, 0x61, 0x6d, + 0x6f, 0x44, 0x42, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x55, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x44, 0x42, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x71, 0x0a, 0x1f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, + 0x44, 0x42, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xa4, 0x03, 0x0a, 0x24, 0x50, 0x6f, + 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x51, 0x0a, 0x0e, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x73, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x12, 0x45, 0x0a, 0x0b, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x4f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x73, 0x6b, 0x69, 0x70, - 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x69, 0x6f, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, - 0x6b, 0x69, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x56, 0x69, 0x6f, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x0d, 0x6d, 0x61, 0x78, - 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x07, 0xba, 0x48, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, - 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, - 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x22, 0x50, 0x0a, - 0x18, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x72, 0x75, - 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x6e, 0x73, - 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, - 0x61, 0x74, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x22, - 0x36, 0x0a, 0x15, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x4f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x6f, 0x5f, 0x6e, - 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x64, 0x6f, - 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0xb9, 0x04, 0x0a, 0x21, 0x41, 0x77, 0x73, 0x53, - 0x33, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x62, 0x0a, - 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x77, 0x73, 0x53, 0x33, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x12, 0x30, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xba, 0x48, 0x04, 0x2a, 0x02, 0x28, - 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x61, 0x12, 0x48, 0x0a, 0x0b, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x4f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x0a, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x73, + 0x6b, 0x69, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x18, 0x73, 0x6b, 0x69, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, + 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x0d, + 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x07, 0xba, 0x48, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, + 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x22, 0x39, 0x0a, 0x18, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x4f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, + 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x09, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x6d, 0x0a, 0x1b, 0x50, + 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x72, + 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x6e, + 0x73, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x74, 0x72, 0x75, 0x6e, + 0x63, 0x61, 0x74, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x73, 0x63, 0x61, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x63, 0x61, 0x73, 0x63, 0x61, 0x64, 0x65, 0x22, 0x9b, 0x03, 0x0a, 0x21, 0x4d, + 0x79, 0x73, 0x71, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x4e, 0x0a, 0x0e, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x54, 0x72, + 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0d, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x69, + 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x45, 0x0a, 0x0b, + 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x4f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, + 0x69, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x65, + 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x6b, 0x69, 0x70, 0x46, 0x6f, + 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x62, - 0x61, 0x74, 0x63, 0x68, 0x22, 0x8e, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, - 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, - 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, - 0x12, 0x24, 0x0a, 0x20, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x53, - 0x53, 0x5f, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x44, 0x55, 0x4e, 0x44, - 0x41, 0x4e, 0x43, 0x59, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, - 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x47, 0x4c, 0x41, 0x43, 0x49, 0x45, 0x52, 0x10, - 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, - 0x53, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x5f, 0x49, 0x41, 0x10, 0x04, - 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x53, - 0x53, 0x5f, 0x4f, 0x4e, 0x45, 0x5a, 0x4f, 0x4e, 0x45, 0x5f, 0x49, 0x41, 0x10, 0x05, 0x12, 0x25, - 0x0a, 0x21, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, - 0x49, 0x4e, 0x54, 0x45, 0x4c, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x49, 0x45, 0x52, - 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, - 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x45, 0x50, 0x5f, 0x41, 0x52, 0x43, 0x48, - 0x49, 0x56, 0x45, 0x10, 0x07, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, - 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x22, 0x5a, 0x0a, 0x0b, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, - 0xf2, 0x04, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, - 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x34, 0x0a, - 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, - 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x72, - 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, - 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, - 0x72, 0x75, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x49, 0x0a, 0x10, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x73, 0x79, 0x6e, 0x63, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x76, 0x69, 0x72, 0x74, 0x75, - 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, - 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, - 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x12, - 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, - 0x79, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x22, 0x47, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0a, - 0x72, 0x75, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, - 0x0c, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x95, 0x02, - 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x47, 0x0a, 0x19, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x6f, - 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x01, 0x48, 0x00, 0x52, - 0x16, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x6f, 0x43, 0x6c, 0x6f, 0x73, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x41, 0x0a, 0x16, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, - 0x02, 0x28, 0x01, 0x48, 0x01, 0x52, 0x13, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x6f, 0x43, 0x6c, - 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, - 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x1c, 0x0a, 0x1a, - 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6c, 0x6f, - 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x5b, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x37, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, - 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, - 0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x00, 0x48, 0x00, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, - 0x11, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, - 0x74, 0x73, 0x22, 0x39, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x8b, 0x01, - 0x0a, 0x15, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, - 0x6d, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x12, 0x38, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9a, 0x01, 0x0a, 0x0a, - 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x12, 0x46, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x0b, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x22, 0x29, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4a, - 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x36, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x70, 0x0a, 0x18, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, - 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, - 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x41, 0x0a, - 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, - 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, - 0x22, 0x63, 0x0a, 0x0f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x61, 0x75, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x70, 0x61, - 0x75, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x6f, 0x74, 0x65, 0x22, 0x38, 0x0a, 0x10, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, - 0x80, 0x02, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, - 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, - 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xba, 0x48, 0x04, + 0x2a, 0x02, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x46, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x69, + 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x22, 0x50, 0x0a, 0x18, 0x4d, 0x79, 0x73, 0x71, + 0x6c, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, + 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x42, 0x65, + 0x66, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x22, 0x36, 0x0a, 0x15, 0x4d, 0x79, + 0x73, 0x71, 0x6c, 0x4f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x68, 0x69, + 0x6e, 0x67, 0x22, 0x9b, 0x03, 0x0a, 0x21, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x0e, 0x74, 0x72, 0x75, 0x6e, + 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x74, 0x72, 0x75, 0x6e, 0x63, + 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x6e, 0x69, 0x74, + 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x12, 0x45, 0x0a, 0x0b, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, + 0x69, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x4f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x0a, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x73, + 0x6b, 0x69, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x18, 0x73, 0x6b, 0x69, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, + 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x0d, + 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x07, 0xba, 0x48, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, + 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x22, 0x50, 0x0a, 0x18, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x16, + 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, + 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x74, 0x72, + 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x73, 0x65, + 0x72, 0x74, 0x22, 0x36, 0x0a, 0x15, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x4f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x6c, 0x69, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x64, + 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0xb9, 0x04, 0x0a, 0x21, 0x41, + 0x77, 0x73, 0x53, 0x33, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x62, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x77, 0x73, 0x53, 0x33, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xba, 0x48, 0x04, + 0x2a, 0x02, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x46, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x22, 0x8e, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x54, 0x4f, 0x52, + 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x54, 0x4f, 0x52, 0x41, + 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, + 0x44, 0x10, 0x01, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x43, + 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x44, + 0x55, 0x4e, 0x44, 0x41, 0x4e, 0x43, 0x59, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x4f, + 0x52, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x47, 0x4c, 0x41, 0x43, 0x49, + 0x45, 0x52, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, + 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x5f, 0x49, + 0x41, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x43, + 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x4f, 0x4e, 0x45, 0x5a, 0x4f, 0x4e, 0x45, 0x5f, 0x49, 0x41, 0x10, + 0x05, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, + 0x53, 0x53, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x4c, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x49, 0x45, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x54, 0x4f, 0x52, + 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x45, 0x50, 0x5f, 0x41, + 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x10, 0x07, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x78, + 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x5a, 0x0a, 0x0b, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x22, 0xf2, 0x04, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x34, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, + 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x07, 0x6a, + 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x76, 0x69, 0x72, 0x74, 0x75, - 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, - 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x12, - 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, - 0x79, 0x73, 0x22, 0x49, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x6a, + 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x49, 0x0a, 0x10, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x73, + 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x76, 0x69, + 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, + 0x79, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, + 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x52, 0x12, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, + 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x47, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x75, + 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x00, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x22, 0x95, 0x02, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x19, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x01, + 0x48, 0x00, 0x52, 0x16, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x6f, 0x43, 0x6c, + 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x41, 0x0a, + 0x16, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, + 0x48, 0x04, 0x22, 0x02, 0x28, 0x01, 0x48, 0x01, 0x52, 0x13, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x6f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x3d, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, + 0x1c, 0x0a, 0x1a, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, + 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x19, 0x0a, + 0x17, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x5b, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, + 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x37, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x42, 0x07, 0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x00, 0x48, 0x00, 0x52, 0x0f, 0x6d, 0x61, + 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x88, 0x01, 0x01, + 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x61, 0x74, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x73, 0x22, 0x39, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, + 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, + 0x22, 0x57, 0x0a, 0x15, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x9a, 0x01, 0x0a, 0x0a, 0x4a, 0x6f, + 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x46, + 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x22, 0x29, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x36, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x70, 0x0a, 0x18, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x28, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x63, 0x72, + 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x41, 0x0a, 0x19, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x63, + 0x0a, 0x0f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, + 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, + 0x61, 0x75, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x70, 0x61, 0x75, 0x73, + 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, + 0x6f, 0x74, 0x65, 0x22, 0x38, 0x0a, 0x10, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x72, 0x0a, - 0x1a, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x54, 0x0a, 0x10, 0x70, - 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x73, 0x22, 0x66, 0x0a, 0x17, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x0d, - 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, 0x79, 0x73, - 0x71, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0x5e, 0x0a, 0x1a, 0x44, 0x79, 0x6e, - 0x61, 0x6d, 0x6f, 0x44, 0x42, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x44, 0x42, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x66, 0x0a, 0x17, 0x4d, 0x73, 0x73, - 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, - 0x62, 0x73, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x0d, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, - 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x73, 0x22, 0xf2, 0x02, 0x0a, 0x18, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x71, 0x6c, 0x53, 0x75, 0x62, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x54, - 0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, 0x73, - 0x65, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x75, - 0x62, 0x73, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x0c, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x75, - 0x62, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, 0x73, - 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x75, 0x62, 0x73, 0x65, - 0x74, 0x12, 0x54, 0x0a, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x64, 0x62, 0x5f, 0x73, 0x75, - 0x62, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x6f, 0x44, 0x42, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, - 0x75, 0x62, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x64, - 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x0c, 0x6d, 0x73, 0x73, 0x71, 0x6c, - 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, - 0x75, 0x62, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x75, - 0x62, 0x73, 0x65, 0x74, 0x42, 0x10, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, - 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0xd0, 0x01, 0x0a, 0x27, 0x53, 0x65, 0x74, 0x4a, 0x6f, - 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x80, 0x02, + 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x07, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, - 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x62, 0x65, 0x74, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, - 0x48, 0x0a, 0x21, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x66, 0x6f, 0x72, - 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x73, 0x75, 0x62, 0x73, - 0x65, 0x74, 0x42, 0x79, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, - 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x50, 0x0a, 0x28, 0x53, 0x65, 0x74, - 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, + 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x35, + 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, + 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, + 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x12, 0x76, 0x69, + 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, + 0x22, 0x49, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0xde, 0x01, 0x0a, 0x25, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x72, 0x0a, 0x1a, 0x50, + 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x54, 0x0a, 0x10, 0x70, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, + 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, + 0x66, 0x0a, 0x17, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x0d, 0x6d, 0x79, + 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, 0x79, 0x73, 0x71, 0x6c, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0x5e, 0x0a, 0x1a, 0x44, 0x79, 0x6e, 0x61, 0x6d, + 0x6f, 0x44, 0x42, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, + 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x44, 0x42, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x66, 0x0a, 0x17, 0x4d, 0x73, 0x73, 0x71, 0x6c, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, 0x73, + 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x0d, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, 0x6c, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, + 0xf2, 0x02, 0x0a, 0x18, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, + 0x53, 0x75, 0x62, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x54, 0x0a, 0x0f, + 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, + 0x48, 0x00, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x53, 0x75, 0x62, 0x73, + 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x0c, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x73, + 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, + 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, + 0x54, 0x0a, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x64, 0x62, 0x5f, 0x73, 0x75, 0x62, 0x73, + 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x44, + 0x42, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, + 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x64, 0x62, 0x53, + 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x0c, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x5f, 0x73, + 0x75, 0x62, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x73, 0x71, + 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x75, 0x62, + 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x73, 0x73, 0x71, 0x6c, 0x53, 0x75, 0x62, 0x73, + 0x65, 0x74, 0x42, 0x10, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x05, 0xba, + 0x48, 0x02, 0x08, 0x01, 0x22, 0xd0, 0x01, 0x0a, 0x27, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, + 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x62, 0x65, 0x74, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x73, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x48, 0x0a, + 0x21, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, + 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, + 0x42, 0x79, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x73, + 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x50, 0x0a, 0x28, 0x53, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0xde, 0x01, 0x0a, 0x25, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x05, 0x6a, + 0x6f, 0x62, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x26, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x58, 0x0a, 0x25, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x28, 0x0a, 0x26, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, + 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, + 0x01, 0x0a, 0x26, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, 0x6f, 0x62, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, + 0xb0, 0x01, 0x01, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x0c, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x4f, 0x0a, 0x27, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, + 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, + 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x2c, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x73, 0x0a, 0x19, 0x49, 0x73, 0x4a, 0x6f, 0x62, + 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, + 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, + 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x1a, + 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, + 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x69, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x67, 0x0a, + 0x11, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x21, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x05, + 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, + 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x42, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, + 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, + 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, + 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x22, 0x59, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, + 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, + 0x0a, 0x07, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x06, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x22, 0x36, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, - 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, - 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x26, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x58, 0x0a, 0x25, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, - 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x28, 0x0a, 0x26, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x92, 0x01, 0x0a, 0x26, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, - 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x0c, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, + 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, + 0x0a, 0x13, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, + 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, + 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe9, 0x05, 0x0a, 0x03, 0x4a, 0x6f, 0x62, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x12, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x62, 0x79, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x30, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4f, 0x0a, 0x27, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, - 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, - 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x2c, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x73, 0x0a, 0x19, 0x49, 0x73, 0x4a, - 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, - 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, - 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x3f, - 0x0a, 0x1a, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x69, 0x73, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x22, - 0x67, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, - 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x42, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4a, - 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, - 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, - 0x22, 0x59, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, - 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, - 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2e, 0x0a, 0x07, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x06, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, - 0x22, 0x36, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, - 0x01, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x5c, 0x0a, 0x13, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, - 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, - 0x52, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, - 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x16, - 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe9, 0x05, 0x0a, 0x03, 0x4a, 0x6f, 0x62, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, - 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x44, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x28, - 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x73, - 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, - 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0e, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, - 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x12, 0x76, 0x69, - 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, - 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x22, 0x67, 0x0a, 0x0c, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x75, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x28, 0x0a, 0x0d, + 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x73, 0x79, 0x6e, + 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, + 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x12, 0x76, 0x69, 0x72, 0x74, + 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x22, 0x67, 0x0a, 0x0c, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, + 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, + 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x05, + 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, + 0x52, 0x75, 0x6e, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x22, + 0x4f, 0x0a, 0x0b, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x40, + 0x0a, 0x0e, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, - 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x17, 0x47, - 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, - 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x75, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, - 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, - 0x73, 0x22, 0x4f, 0x0a, 0x0b, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, - 0x12, 0x40, 0x0a, 0x0e, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x6e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x22, 0x2e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, - 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, - 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, - 0x49, 0x64, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, - 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x09, - 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x08, 0x6e, 0x65, 0x78, - 0x74, 0x52, 0x75, 0x6e, 0x73, 0x22, 0x2c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, - 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, - 0x62, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x5a, 0x0a, - 0x0f, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x40, 0x0a, 0x15, 0x47, 0x65, 0x74, - 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, - 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x16, 0x47, - 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, - 0x73, 0x22, 0x2b, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xc6, - 0x01, 0x0a, 0x0f, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, - 0x74, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, - 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x22, 0xd7, 0x02, 0x0a, 0x06, 0x4a, 0x6f, 0x62, 0x52, - 0x75, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, + 0x6d, 0x70, 0x52, 0x0c, 0x6e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x22, 0x2e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, + 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, - 0x62, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x42, 0x0a, - 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, - 0x00, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x4d, 0x0a, 0x12, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x11, 0x70, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x22, 0x51, 0x0a, 0x14, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x54, 0x61, 0x73, 0x6b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x52, + 0x75, 0x6e, 0x73, 0x22, 0x2c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, + 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, + 0x64, 0x22, 0x48, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x5a, 0x0a, 0x0f, 0x4a, + 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x15, + 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x40, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x22, + 0x2b, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xc6, 0x01, 0x0a, + 0x0f, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, + 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0c, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x22, 0xd7, 0x02, 0x0a, 0x06, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, + 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x42, 0x0a, 0x0c, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, + 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x4d, 0x0a, 0x12, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x11, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x0f, + 0x0a, 0x0d, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, + 0x51, 0x0a, 0x14, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x22, 0x42, 0x0a, 0x12, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x22, 0x72, 0x0a, 0x13, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x48, 0x0a, 0x0d, 0x73, + 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x11, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x9d, 0x02, 0x0a, 0x0b, 0x4a, 0x6f, 0x62, + 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x0a, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x22, 0x42, 0x0a, 0x12, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x53, 0x79, 0x6e, 0x63, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x72, 0x0a, 0x13, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x48, 0x0a, - 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x53, 0x79, 0x6e, 0x63, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x11, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x9d, 0x02, 0x0a, 0x0b, 0x4a, - 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, - 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, - 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x73, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x5f, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, - 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, - 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x75, 0x0a, 0x17, 0x47, - 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, - 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x65, 0x22, 0x5c, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, - 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, - 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, - 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, - 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x0a, 0x16, 0x54, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x6c, 0x6f, 0x73, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x34, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x5f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4a, + 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x54, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb2, 0x02, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, - 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, - 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, - 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x77, 0x69, - 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x57, 0x69, - 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x54, 0x61, 0x69, 0x6c, 0x12, 0x30, 0x0a, - 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x01, 0x48, 0x00, 0x52, - 0x0b, 0x6d, 0x61, 0x78, 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, - 0x36, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x09, 0x6c, 0x6f, - 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x78, 0x5f, - 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x1b, 0x47, 0x65, - 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, - 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, - 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x22, 0x83, 0x01, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x10, - 0x77, 0x6f, 0x72, 0x66, 0x6b, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x66, 0x6b, 0x6c, 0x6f, 0x77, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x45, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x4a, 0x6f, - 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x77, - 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x73, 0x79, 0x6e, 0x63, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x4a, 0x6f, - 0x62, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0xfc, 0x01, 0x0a, 0x1a, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, - 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, - 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x59, - 0x0a, 0x14, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, - 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x75, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x72, + 0x75, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x69, 0x73, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x22, 0x5c, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, + 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, + 0x52, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, + 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x16, + 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x0a, 0x16, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x27, + 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xb2, 0x02, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, + 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x12, + 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x57, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, + 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x54, 0x61, 0x69, 0x6c, 0x12, 0x30, 0x0a, 0x0d, 0x6d, + 0x61, 0x78, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6d, + 0x61, 0x78, 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, + 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x6f, + 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4a, + 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, + 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4c, 0x69, + 0x6e, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x48, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, + 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, + 0x83, 0x01, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, + 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x10, 0x77, 0x6f, + 0x72, 0x66, 0x6b, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x66, 0x6b, 0x6c, 0x6f, 0x77, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x45, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x77, 0x0a, 0x18, + 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x73, 0x79, 0x6e, 0x63, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, + 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0xfc, 0x01, 0x0a, 0x1a, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x59, 0x0a, 0x14, + 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, + 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, + 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, + 0x69, 0x6e, 0x74, 0x52, 0x12, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, + 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x6b, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x22, 0x27, 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xa5, 0x01, + 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, + 0x0d, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x45, + 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x5b, 0x0a, 0x11, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, + 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x18, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, + 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x66, 0x6f, 0x72, 0x65, 0x69, + 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x72, - 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, - 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x12, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, - 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x6b, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x27, 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, - 0xa5, 0x01, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3f, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, - 0x12, 0x45, 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, - 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x5b, 0x0a, 0x11, 0x56, 0x69, 0x72, 0x74, 0x75, - 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x18, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, - 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x66, 0x6f, 0x72, - 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, - 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, - 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x22, 0x88, 0x01, 0x0a, - 0x0d, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x25, - 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6a, 0x6f, 0x62, - 0x52, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, - 0x26, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x75, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2c, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2d, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5a, 0x0a, 0x14, - 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x5b, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x4b, 0x65, 0x79, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x18, - 0x0a, 0x16, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xad, 0x03, 0x0a, 0x07, 0x4a, 0x6f, 0x62, - 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, - 0x62, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, - 0x64, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x2b, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0d, 0x42, 0x09, 0xba, 0x48, 0x06, 0x2a, 0x04, 0x18, 0x64, 0x28, 0x00, 0x52, 0x08, - 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xdd, 0x01, 0x0a, 0x0a, 0x4e, 0x65, 0x77, - 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, - 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0d, 0x42, 0x09, 0xba, 0x48, 0x06, 0x2a, 0x04, 0x18, 0x64, 0x28, 0x00, 0x52, 0x08, - 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xa5, 0x03, 0x0a, 0x0d, 0x4a, 0x6f, 0x62, - 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x03, 0x73, 0x71, - 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x71, 0x6c, 0x48, 0x6f, 0x6f, 0x6b, - 0x48, 0x00, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x1a, 0xc5, 0x02, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, 0x53, - 0x71, 0x6c, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x1d, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, - 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x06, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x71, 0x6c, 0x48, 0x6f, 0x6f, 0x6b, 0x2e, 0x54, 0x69, - 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x1a, 0xa0, 0x01, 0x0a, - 0x06, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x5f, 0x73, - 0x79, 0x6e, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, - 0x6b, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x00, - 0x52, 0x07, 0x70, 0x72, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x43, 0x0a, 0x09, 0x70, 0x6f, 0x73, - 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, + 0x74, 0x75, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x0a, + 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x22, 0x88, 0x01, 0x0a, 0x0d, 0x52, + 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0a, + 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x52, 0x75, + 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x26, 0x0a, + 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5a, 0x0a, 0x14, 0x53, 0x65, + 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, + 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x5b, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4b, + 0x65, 0x79, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x18, 0x0a, 0x16, + 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xad, 0x03, 0x0a, 0x07, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x6f, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, + 0x34, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x62, 0x79, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2b, 0x0a, + 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, + 0x25, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0d, 0x42, 0x09, 0xba, 0x48, 0x06, 0x2a, 0x04, 0x18, 0x64, 0x28, 0x00, 0x52, 0x08, 0x70, 0x72, + 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xdd, 0x01, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x4a, 0x6f, + 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, + 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x34, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, + 0x25, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x42, 0x09, 0xba, 0x48, 0x06, 0x2a, 0x04, 0x18, 0x64, 0x28, 0x00, 0x52, 0x08, 0x70, 0x72, + 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xa5, 0x03, 0x0a, 0x0d, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x71, 0x6c, 0x48, 0x6f, 0x6f, 0x6b, 0x48, 0x00, + 0x52, 0x03, 0x73, 0x71, 0x6c, 0x1a, 0xc5, 0x02, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, 0x53, 0x71, 0x6c, + 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x1d, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x12, 0x2d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, + 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x46, 0x0a, 0x06, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x71, 0x6c, 0x48, 0x6f, 0x6f, 0x6b, 0x2e, 0x54, 0x69, 0x6d, 0x69, + 0x6e, 0x67, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x1a, 0xa0, 0x01, 0x0a, 0x06, 0x54, + 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x5f, 0x73, 0x79, 0x6e, + 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x54, + 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x00, 0x52, 0x07, + 0x70, 0x72, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x43, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x74, 0x5f, + 0x73, 0x79, 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, + 0x48, 0x00, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x42, 0x0f, 0x0a, 0x06, + 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x42, 0x0f, 0x0a, + 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x16, + 0x0a, 0x14, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x50, + 0x72, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x22, 0x17, 0x0a, 0x15, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, + 0x6b, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x22, + 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, + 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, + 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, + 0x05, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, - 0x48, 0x6f, 0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x79, - 0x6e, 0x63, 0x48, 0x00, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x42, 0x0f, - 0x0a, 0x06, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x42, - 0x0f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, - 0x22, 0x16, 0x0a, 0x14, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x69, 0x6e, - 0x67, 0x50, 0x72, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x22, 0x17, 0x0a, 0x15, 0x4a, 0x6f, 0x62, 0x48, - 0x6f, 0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x79, 0x6e, - 0x63, 0x22, 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, - 0x01, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4a, - 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2c, 0x0a, 0x05, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, + 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x05, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x22, 0x2d, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, + 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x40, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, - 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x05, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x22, 0x2d, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x40, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x5c, - 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x2d, 0x0a, - 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x77, 0x4a, - 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x43, 0x0a, 0x15, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, - 0x6b, 0x22, 0x30, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, - 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, - 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x0a, 0x1d, - 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, - 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, - 0x6f, 0x62, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x1e, 0x49, 0x73, 0x4a, 0x6f, - 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, - 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x69, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x81, 0x02, - 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, - 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, - 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x29, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, - 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xba, 0x48, - 0x06, 0x2a, 0x04, 0x18, 0x64, 0x28, 0x00, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x22, 0x43, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, - 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x6f, - 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, - 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x4e, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, - 0x48, 0x6f, 0x6f, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x47, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, - 0x48, 0x6f, 0x6f, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x5c, 0x0a, 0x14, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x04, 0x68, + 0x6f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x77, 0x4a, 0x6f, 0x62, + 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x22, - 0xde, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, + 0x30, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x0a, 0x1d, 0x49, 0x73, + 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, + 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x1e, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x48, + 0x6f, 0x6f, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x61, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x69, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x81, 0x02, 0x0a, 0x14, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xba, 0x48, + 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, + 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, + 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xba, 0x48, 0x06, 0x2a, + 0x04, 0x18, 0x64, 0x28, 0x00, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, + 0x43, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, + 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x4e, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x6f, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, + 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x22, 0x47, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x6f, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0xde, 0x01, + 0x0a, 0x20, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x6f, 0x6b, 0x73, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x05, 0x6a, 0x6f, + 0x62, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x06, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x05, - 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x06, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, - 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, - 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0x49, 0x0a, 0x06, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, - 0x16, 0x0a, 0x12, 0x54, 0x49, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x49, 0x4d, 0x49, 0x4e, - 0x47, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x54, - 0x49, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x02, - 0x22, 0x51, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, - 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x05, 0x68, 0x6f, - 0x6f, 0x6b, 0x73, 0x2a, 0x6f, 0x0a, 0x09, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x1a, 0x0a, 0x16, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, - 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, - 0x45, 0x44, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x50, 0x41, 0x55, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4a, - 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, - 0x45, 0x44, 0x10, 0x04, 0x2a, 0xa7, 0x01, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, - 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x43, 0x54, 0x49, 0x56, - 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x54, 0x49, - 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x43, 0x48, 0x45, - 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x54, 0x49, 0x56, - 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, - 0x45, 0x44, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, - 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x92, - 0x02, 0x0a, 0x0c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x1e, 0x0a, 0x1a, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x1a, 0x0a, 0x16, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4a, - 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, - 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x4a, 0x4f, 0x42, 0x5f, 0x52, - 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, - 0x54, 0x45, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x1b, - 0x0a, 0x17, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x12, 0x1d, 0x0a, 0x19, 0x4a, - 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, - 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x4a, 0x4f, - 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, - 0x4c, 0x45, 0x44, 0x10, 0x07, 0x12, 0x1c, 0x0a, 0x18, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x44, 0x5f, 0x4f, 0x55, - 0x54, 0x10, 0x08, 0x2a, 0x7c, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x12, 0x22, 0x0a, 0x1e, 0x4c, 0x4f, 0x47, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x4e, - 0x4f, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x4c, 0x4f, 0x47, 0x5f, 0x57, 0x49, 0x4e, 0x44, - 0x4f, 0x57, 0x5f, 0x46, 0x49, 0x46, 0x54, 0x45, 0x45, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x01, - 0x12, 0x17, 0x0a, 0x13, 0x4c, 0x4f, 0x47, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x4f, - 0x4e, 0x45, 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x4f, 0x47, - 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x4f, 0x4e, 0x45, 0x5f, 0x44, 0x41, 0x59, 0x10, - 0x03, 0x2a, 0x77, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, - 0x15, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, - 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x12, 0x0a, - 0x0e, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, - 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x57, - 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, - 0x45, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x32, 0xd1, 0x1e, 0x0a, 0x0a, 0x4a, - 0x6f, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x07, 0x47, 0x65, 0x74, - 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, - 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, 0x69, 0x6d, + 0x69, 0x6e, 0x67, 0x22, 0x49, 0x0a, 0x06, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, + 0x12, 0x54, 0x49, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x49, 0x4d, 0x49, 0x4e, 0x47, 0x5f, + 0x50, 0x52, 0x45, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x49, 0x4d, + 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x02, 0x22, 0x51, + 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x6f, 0x6b, 0x73, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x05, 0x68, 0x6f, 0x6f, 0x6b, + 0x73, 0x2a, 0x6f, 0x0a, 0x09, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, + 0x0a, 0x16, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4a, 0x4f, + 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x50, 0x41, 0x55, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x4f, 0x42, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, + 0x10, 0x04, 0x2a, 0xa7, 0x01, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, + 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, + 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, + 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, + 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x03, + 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x92, 0x02, 0x0a, + 0x0c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, + 0x1a, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, + 0x16, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4a, 0x4f, 0x42, + 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, + 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, + 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, + 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, + 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x12, 0x1d, 0x0a, 0x19, 0x4a, 0x4f, 0x42, + 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x52, 0x4d, + 0x49, 0x4e, 0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x4a, 0x4f, 0x42, 0x5f, + 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x07, 0x12, 0x1c, 0x0a, 0x18, 0x4a, 0x4f, 0x42, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x44, 0x5f, 0x4f, 0x55, 0x54, 0x10, + 0x08, 0x2a, 0x7c, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x22, + 0x0a, 0x1e, 0x4c, 0x4f, 0x47, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x4e, 0x4f, 0x5f, + 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x4c, 0x4f, 0x47, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, + 0x5f, 0x46, 0x49, 0x46, 0x54, 0x45, 0x45, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x17, + 0x0a, 0x13, 0x4c, 0x4f, 0x47, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x4f, 0x4e, 0x45, + 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x4f, 0x47, 0x5f, 0x57, + 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x4f, 0x4e, 0x45, 0x5f, 0x44, 0x41, 0x59, 0x10, 0x03, 0x2a, + 0x77, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x15, 0x4c, + 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, + 0x56, 0x45, 0x4c, 0x5f, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, + 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x02, 0x12, + 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x57, 0x41, 0x52, + 0x4e, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, + 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x32, 0xd1, 0x1e, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x73, 0x12, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, - 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1f, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x09, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, + 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1f, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x50, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1f, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x12, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, - 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x68, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x19, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, - 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, - 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x95, 0x01, 0x0a, - 0x20, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, - 0x73, 0x12, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, - 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x6b, 0x0a, 0x12, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, + 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, + 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x95, 0x01, 0x0a, 0x20, 0x53, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, 0x12, + 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x92, 0x01, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x92, 0x01, 0x0a, 0x1f, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, - 0x08, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, - 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, - 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, - 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, - 0x74, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, - 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, - 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x5f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, - 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x53, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x20, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x08, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, - 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, - 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x09, 0x47, 0x65, 0x74, - 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x63, + 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x5f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, + 0x75, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, + 0x4e, 0x65, 0x78, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, + 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, - 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, - 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, - 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, - 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x70, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, - 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, - 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x30, 0x01, 0x12, 0x74, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x6d, 0x67, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x52, 0x75, 0x6e, 0x12, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, + 0x62, 0x52, 0x75, 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, + 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x59, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, + 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x25, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4a, 0x6f, + 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x4c, + 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, + 0x12, 0x74, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, + 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, - 0x6f, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x4a, - 0x6f, 0x62, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, - 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x79, 0x6e, - 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, - 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x12, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x5c, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x6f, 0x62, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x79, 0x6e, 0x63, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x6e, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x5c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, - 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, - 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x12, 0x56, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, - 0x12, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0a, 0x47, 0x65, 0x74, - 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, - 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, - 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, - 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x12, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, + 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, + 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x0e, + 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x24, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, + 0x56, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x21, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0d, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x23, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x23, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x77, 0x0a, 0x16, 0x49, 0x73, - 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x4e, 0x61, - 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0d, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x23, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x77, 0x0a, 0x16, 0x49, 0x73, 0x4a, 0x6f, + 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x4e, 0x61, 0x6d, 0x65, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, - 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, - 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x68, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, - 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x19, - 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, - 0x73, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x42, 0x79, 0x54, 0x69, 0x6d, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x42, 0x79, 0x54, 0x69, - 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xc4, - 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x42, 0x08, 0x4a, 0x6f, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x63, - 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x2e, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x5c, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, 0x5c, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x49, 0x73, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x5c, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x6f, 0x6b, 0x12, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, + 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x68, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, + 0x74, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x19, 0x47, 0x65, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x42, + 0x79, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xc4, 0x01, 0x0a, + 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x42, 0x08, 0x4a, 0x6f, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x63, 0x6c, 0x65, + 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x2e, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -10994,9 +10967,8 @@ var file_mgmt_v1alpha1_job_proto_goTypes = []any{ (*PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap)(nil), // 157: mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap (*JobHookConfig_JobSqlHook)(nil), // 158: mgmt.v1alpha1.JobHookConfig.JobSqlHook (*JobHookConfig_JobSqlHook_Timing)(nil), // 159: mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing - (TransformerSource)(0), // 160: mgmt.v1alpha1.TransformerSource - (*TransformerConfig)(nil), // 161: mgmt.v1alpha1.TransformerConfig - (*timestamppb.Timestamp)(nil), // 162: google.protobuf.Timestamp + (*TransformerConfig)(nil), // 160: mgmt.v1alpha1.TransformerConfig + (*timestamppb.Timestamp)(nil), // 161: google.protobuf.Timestamp } var file_mgmt_v1alpha1_job_proto_depIdxs = []int32{ 89, // 0: mgmt.v1alpha1.GetJobsResponse.jobs:type_name -> mgmt.v1alpha1.Job @@ -11055,176 +11027,175 @@ var file_mgmt_v1alpha1_job_proto_depIdxs = []int32{ 126, // 53: mgmt.v1alpha1.CreateJobRequest.virtual_foreign_keys:type_name -> mgmt.v1alpha1.VirtualForeignConstraint 52, // 54: mgmt.v1alpha1.ActivityOptions.retry_policy:type_name -> mgmt.v1alpha1.RetryPolicy 89, // 55: mgmt.v1alpha1.CreateJobResponse.job:type_name -> mgmt.v1alpha1.Job - 160, // 56: mgmt.v1alpha1.JobMappingTransformer.source:type_name -> mgmt.v1alpha1.TransformerSource - 161, // 57: mgmt.v1alpha1.JobMappingTransformer.config:type_name -> mgmt.v1alpha1.TransformerConfig - 54, // 58: mgmt.v1alpha1.JobMapping.transformer:type_name -> mgmt.v1alpha1.JobMappingTransformer - 89, // 59: mgmt.v1alpha1.GetJobResponse.job:type_name -> mgmt.v1alpha1.Job - 89, // 60: mgmt.v1alpha1.UpdateJobScheduleResponse.job:type_name -> mgmt.v1alpha1.Job - 89, // 61: mgmt.v1alpha1.PauseJobResponse.job:type_name -> mgmt.v1alpha1.Job - 9, // 62: mgmt.v1alpha1.UpdateJobSourceConnectionRequest.source:type_name -> mgmt.v1alpha1.JobSource - 55, // 63: mgmt.v1alpha1.UpdateJobSourceConnectionRequest.mappings:type_name -> mgmt.v1alpha1.JobMapping - 126, // 64: mgmt.v1alpha1.UpdateJobSourceConnectionRequest.virtual_foreign_keys:type_name -> mgmt.v1alpha1.VirtualForeignConstraint - 89, // 65: mgmt.v1alpha1.UpdateJobSourceConnectionResponse.job:type_name -> mgmt.v1alpha1.Job - 24, // 66: mgmt.v1alpha1.PostgresSourceSchemaSubset.postgres_schemas:type_name -> mgmt.v1alpha1.PostgresSourceSchemaOption - 27, // 67: mgmt.v1alpha1.MysqlSourceSchemaSubset.mysql_schemas:type_name -> mgmt.v1alpha1.MysqlSourceSchemaOption - 22, // 68: mgmt.v1alpha1.DynamoDBSourceSchemaSubset.tables:type_name -> mgmt.v1alpha1.DynamoDBSourceTableOption - 30, // 69: mgmt.v1alpha1.MssqlSourceSchemaSubset.mssql_schemas:type_name -> mgmt.v1alpha1.MssqlSourceSchemaOption - 64, // 70: mgmt.v1alpha1.JobSourceSqlSubetSchemas.postgres_subset:type_name -> mgmt.v1alpha1.PostgresSourceSchemaSubset - 65, // 71: mgmt.v1alpha1.JobSourceSqlSubetSchemas.mysql_subset:type_name -> mgmt.v1alpha1.MysqlSourceSchemaSubset - 66, // 72: mgmt.v1alpha1.JobSourceSqlSubetSchemas.dynamodb_subset:type_name -> mgmt.v1alpha1.DynamoDBSourceSchemaSubset - 67, // 73: mgmt.v1alpha1.JobSourceSqlSubetSchemas.mssql_subset:type_name -> mgmt.v1alpha1.MssqlSourceSchemaSubset - 68, // 74: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest.schemas:type_name -> mgmt.v1alpha1.JobSourceSqlSubetSchemas - 89, // 75: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse.job:type_name -> mgmt.v1alpha1.Job - 33, // 76: mgmt.v1alpha1.UpdateJobDestinationConnectionRequest.options:type_name -> mgmt.v1alpha1.JobDestinationOptions - 89, // 77: mgmt.v1alpha1.UpdateJobDestinationConnectionResponse.job:type_name -> mgmt.v1alpha1.Job - 11, // 78: mgmt.v1alpha1.CreateJobDestinationConnectionsRequest.destinations:type_name -> mgmt.v1alpha1.CreateJobDestination - 89, // 79: mgmt.v1alpha1.CreateJobDestinationConnectionsResponse.job:type_name -> mgmt.v1alpha1.Job - 103, // 80: mgmt.v1alpha1.GetJobRunsResponse.job_runs:type_name -> mgmt.v1alpha1.JobRun - 103, // 81: mgmt.v1alpha1.GetJobRunResponse.job_run:type_name -> mgmt.v1alpha1.JobRun - 162, // 82: mgmt.v1alpha1.Job.created_at:type_name -> google.protobuf.Timestamp - 162, // 83: mgmt.v1alpha1.Job.updated_at:type_name -> google.protobuf.Timestamp - 9, // 84: mgmt.v1alpha1.Job.source:type_name -> mgmt.v1alpha1.JobSource - 12, // 85: mgmt.v1alpha1.Job.destinations:type_name -> mgmt.v1alpha1.JobDestination - 55, // 86: mgmt.v1alpha1.Job.mappings:type_name -> mgmt.v1alpha1.JobMapping - 51, // 87: mgmt.v1alpha1.Job.sync_options:type_name -> mgmt.v1alpha1.ActivityOptions - 50, // 88: mgmt.v1alpha1.Job.workflow_options:type_name -> mgmt.v1alpha1.WorkflowOptions - 126, // 89: mgmt.v1alpha1.Job.virtual_foreign_keys:type_name -> mgmt.v1alpha1.VirtualForeignConstraint - 162, // 90: mgmt.v1alpha1.JobRecentRun.start_time:type_name -> google.protobuf.Timestamp - 90, // 91: mgmt.v1alpha1.GetJobRecentRunsResponse.recent_runs:type_name -> mgmt.v1alpha1.JobRecentRun - 162, // 92: mgmt.v1alpha1.JobNextRuns.next_run_times:type_name -> google.protobuf.Timestamp - 93, // 93: mgmt.v1alpha1.GetJobNextRunsResponse.next_runs:type_name -> mgmt.v1alpha1.JobNextRuns - 0, // 94: mgmt.v1alpha1.GetJobStatusResponse.status:type_name -> mgmt.v1alpha1.JobStatus - 0, // 95: mgmt.v1alpha1.JobStatusRecord.status:type_name -> mgmt.v1alpha1.JobStatus - 98, // 96: mgmt.v1alpha1.GetJobStatusesResponse.statuses:type_name -> mgmt.v1alpha1.JobStatusRecord - 1, // 97: mgmt.v1alpha1.PendingActivity.status:type_name -> mgmt.v1alpha1.ActivityStatus - 101, // 98: mgmt.v1alpha1.PendingActivity.last_failure:type_name -> mgmt.v1alpha1.ActivityFailure - 2, // 99: mgmt.v1alpha1.JobRun.status:type_name -> mgmt.v1alpha1.JobRunStatus - 162, // 100: mgmt.v1alpha1.JobRun.started_at:type_name -> google.protobuf.Timestamp - 162, // 101: mgmt.v1alpha1.JobRun.completed_at:type_name -> google.protobuf.Timestamp - 102, // 102: mgmt.v1alpha1.JobRun.pending_activities:type_name -> mgmt.v1alpha1.PendingActivity - 162, // 103: mgmt.v1alpha1.JobRunEventTask.event_time:type_name -> google.protobuf.Timestamp - 104, // 104: mgmt.v1alpha1.JobRunEventTask.error:type_name -> mgmt.v1alpha1.JobRunEventTaskError - 106, // 105: mgmt.v1alpha1.JobRunEventMetadata.sync_metadata:type_name -> mgmt.v1alpha1.JobRunSyncMetadata - 162, // 106: mgmt.v1alpha1.JobRunEvent.start_time:type_name -> google.protobuf.Timestamp - 162, // 107: mgmt.v1alpha1.JobRunEvent.close_time:type_name -> google.protobuf.Timestamp - 107, // 108: mgmt.v1alpha1.JobRunEvent.metadata:type_name -> mgmt.v1alpha1.JobRunEventMetadata - 105, // 109: mgmt.v1alpha1.JobRunEvent.tasks:type_name -> mgmt.v1alpha1.JobRunEventTask - 108, // 110: mgmt.v1alpha1.GetJobRunEventsResponse.events:type_name -> mgmt.v1alpha1.JobRunEvent - 3, // 111: mgmt.v1alpha1.GetJobRunLogsStreamRequest.window:type_name -> mgmt.v1alpha1.LogWindow - 4, // 112: mgmt.v1alpha1.GetJobRunLogsStreamRequest.log_levels:type_name -> mgmt.v1alpha1.LogLevel - 162, // 113: mgmt.v1alpha1.GetJobRunLogsStreamResponse.timestamp:type_name -> google.protobuf.Timestamp - 50, // 114: mgmt.v1alpha1.SetJobWorkflowOptionsRequest.worfklow_options:type_name -> mgmt.v1alpha1.WorkflowOptions - 89, // 115: mgmt.v1alpha1.SetJobWorkflowOptionsResponse.job:type_name -> mgmt.v1alpha1.Job - 51, // 116: mgmt.v1alpha1.SetJobSyncOptionsRequest.sync_options:type_name -> mgmt.v1alpha1.ActivityOptions - 89, // 117: mgmt.v1alpha1.SetJobSyncOptionsResponse.job:type_name -> mgmt.v1alpha1.Job - 55, // 118: mgmt.v1alpha1.ValidateJobMappingsRequest.mappings:type_name -> mgmt.v1alpha1.JobMapping - 126, // 119: mgmt.v1alpha1.ValidateJobMappingsRequest.virtual_foreign_keys:type_name -> mgmt.v1alpha1.VirtualForeignConstraint - 122, // 120: mgmt.v1alpha1.ValidateJobMappingsResponse.column_errors:type_name -> mgmt.v1alpha1.ColumnError - 123, // 121: mgmt.v1alpha1.ValidateJobMappingsResponse.database_errors:type_name -> mgmt.v1alpha1.DatabaseError - 125, // 122: mgmt.v1alpha1.VirtualForeignConstraint.foreign_key:type_name -> mgmt.v1alpha1.VirtualForeignKey - 127, // 123: mgmt.v1alpha1.GetRunContextRequest.id:type_name -> mgmt.v1alpha1.RunContextKey - 127, // 124: mgmt.v1alpha1.SetRunContextRequest.id:type_name -> mgmt.v1alpha1.RunContextKey - 127, // 125: mgmt.v1alpha1.SetRunContextsRequest.id:type_name -> mgmt.v1alpha1.RunContextKey - 136, // 126: mgmt.v1alpha1.JobHook.config:type_name -> mgmt.v1alpha1.JobHookConfig - 162, // 127: mgmt.v1alpha1.JobHook.created_at:type_name -> google.protobuf.Timestamp - 162, // 128: mgmt.v1alpha1.JobHook.updated_at:type_name -> google.protobuf.Timestamp - 136, // 129: mgmt.v1alpha1.NewJobHook.config:type_name -> mgmt.v1alpha1.JobHookConfig - 158, // 130: mgmt.v1alpha1.JobHookConfig.sql:type_name -> mgmt.v1alpha1.JobHookConfig.JobSqlHook - 134, // 131: mgmt.v1alpha1.GetJobHooksResponse.hooks:type_name -> mgmt.v1alpha1.JobHook - 134, // 132: mgmt.v1alpha1.GetJobHookResponse.hook:type_name -> mgmt.v1alpha1.JobHook - 135, // 133: mgmt.v1alpha1.CreateJobHookRequest.hook:type_name -> mgmt.v1alpha1.NewJobHook - 134, // 134: mgmt.v1alpha1.CreateJobHookResponse.hook:type_name -> mgmt.v1alpha1.JobHook - 136, // 135: mgmt.v1alpha1.UpdateJobHookRequest.config:type_name -> mgmt.v1alpha1.JobHookConfig - 134, // 136: mgmt.v1alpha1.UpdateJobHookResponse.hook:type_name -> mgmt.v1alpha1.JobHook - 134, // 137: mgmt.v1alpha1.SetJobHookEnabledResponse.hook:type_name -> mgmt.v1alpha1.JobHook - 6, // 138: mgmt.v1alpha1.GetActiveJobHooksByTimingRequest.timing:type_name -> mgmt.v1alpha1.GetActiveJobHooksByTimingRequest.Timing - 134, // 139: mgmt.v1alpha1.GetActiveJobHooksByTimingResponse.hooks:type_name -> mgmt.v1alpha1.JobHook - 156, // 140: mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.halt_job:type_name -> mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob - 157, // 141: mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.auto_map:type_name -> mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap - 159, // 142: mgmt.v1alpha1.JobHookConfig.JobSqlHook.timing:type_name -> mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing - 137, // 143: mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing.pre_sync:type_name -> mgmt.v1alpha1.JobHookTimingPreSync - 138, // 144: mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing.post_sync:type_name -> mgmt.v1alpha1.JobHookTimingPostSync - 7, // 145: mgmt.v1alpha1.JobService.GetJobs:input_type -> mgmt.v1alpha1.GetJobsRequest - 56, // 146: mgmt.v1alpha1.JobService.GetJob:input_type -> mgmt.v1alpha1.GetJobRequest - 49, // 147: mgmt.v1alpha1.JobService.CreateJob:input_type -> mgmt.v1alpha1.CreateJobRequest - 77, // 148: mgmt.v1alpha1.JobService.DeleteJob:input_type -> mgmt.v1alpha1.DeleteJobRequest - 79, // 149: mgmt.v1alpha1.JobService.IsJobNameAvailable:input_type -> mgmt.v1alpha1.IsJobNameAvailableRequest - 58, // 150: mgmt.v1alpha1.JobService.UpdateJobSchedule:input_type -> mgmt.v1alpha1.UpdateJobScheduleRequest - 62, // 151: mgmt.v1alpha1.JobService.UpdateJobSourceConnection:input_type -> mgmt.v1alpha1.UpdateJobSourceConnectionRequest - 69, // 152: mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets:input_type -> mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest - 71, // 153: mgmt.v1alpha1.JobService.UpdateJobDestinationConnection:input_type -> mgmt.v1alpha1.UpdateJobDestinationConnectionRequest - 73, // 154: mgmt.v1alpha1.JobService.DeleteJobDestinationConnection:input_type -> mgmt.v1alpha1.DeleteJobDestinationConnectionRequest - 75, // 155: mgmt.v1alpha1.JobService.CreateJobDestinationConnections:input_type -> mgmt.v1alpha1.CreateJobDestinationConnectionsRequest - 60, // 156: mgmt.v1alpha1.JobService.PauseJob:input_type -> mgmt.v1alpha1.PauseJobRequest - 91, // 157: mgmt.v1alpha1.JobService.GetJobRecentRuns:input_type -> mgmt.v1alpha1.GetJobRecentRunsRequest - 94, // 158: mgmt.v1alpha1.JobService.GetJobNextRuns:input_type -> mgmt.v1alpha1.GetJobNextRunsRequest - 96, // 159: mgmt.v1alpha1.JobService.GetJobStatus:input_type -> mgmt.v1alpha1.GetJobStatusRequest - 99, // 160: mgmt.v1alpha1.JobService.GetJobStatuses:input_type -> mgmt.v1alpha1.GetJobStatusesRequest - 81, // 161: mgmt.v1alpha1.JobService.GetJobRuns:input_type -> mgmt.v1alpha1.GetJobRunsRequest - 109, // 162: mgmt.v1alpha1.JobService.GetJobRunEvents:input_type -> mgmt.v1alpha1.GetJobRunEventsRequest - 83, // 163: mgmt.v1alpha1.JobService.GetJobRun:input_type -> mgmt.v1alpha1.GetJobRunRequest - 111, // 164: mgmt.v1alpha1.JobService.DeleteJobRun:input_type -> mgmt.v1alpha1.DeleteJobRunRequest - 85, // 165: mgmt.v1alpha1.JobService.CreateJobRun:input_type -> mgmt.v1alpha1.CreateJobRunRequest - 87, // 166: mgmt.v1alpha1.JobService.CancelJobRun:input_type -> mgmt.v1alpha1.CancelJobRunRequest - 113, // 167: mgmt.v1alpha1.JobService.TerminateJobRun:input_type -> mgmt.v1alpha1.TerminateJobRunRequest - 115, // 168: mgmt.v1alpha1.JobService.GetJobRunLogsStream:input_type -> mgmt.v1alpha1.GetJobRunLogsStreamRequest - 117, // 169: mgmt.v1alpha1.JobService.SetJobWorkflowOptions:input_type -> mgmt.v1alpha1.SetJobWorkflowOptionsRequest - 119, // 170: mgmt.v1alpha1.JobService.SetJobSyncOptions:input_type -> mgmt.v1alpha1.SetJobSyncOptionsRequest - 121, // 171: mgmt.v1alpha1.JobService.ValidateJobMappings:input_type -> mgmt.v1alpha1.ValidateJobMappingsRequest - 128, // 172: mgmt.v1alpha1.JobService.GetRunContext:input_type -> mgmt.v1alpha1.GetRunContextRequest - 130, // 173: mgmt.v1alpha1.JobService.SetRunContext:input_type -> mgmt.v1alpha1.SetRunContextRequest - 132, // 174: mgmt.v1alpha1.JobService.SetRunContexts:input_type -> mgmt.v1alpha1.SetRunContextsRequest - 139, // 175: mgmt.v1alpha1.JobService.GetJobHooks:input_type -> mgmt.v1alpha1.GetJobHooksRequest - 141, // 176: mgmt.v1alpha1.JobService.GetJobHook:input_type -> mgmt.v1alpha1.GetJobHookRequest - 143, // 177: mgmt.v1alpha1.JobService.CreateJobHook:input_type -> mgmt.v1alpha1.CreateJobHookRequest - 145, // 178: mgmt.v1alpha1.JobService.DeleteJobHook:input_type -> mgmt.v1alpha1.DeleteJobHookRequest - 147, // 179: mgmt.v1alpha1.JobService.IsJobHookNameAvailable:input_type -> mgmt.v1alpha1.IsJobHookNameAvailableRequest - 149, // 180: mgmt.v1alpha1.JobService.UpdateJobHook:input_type -> mgmt.v1alpha1.UpdateJobHookRequest - 151, // 181: mgmt.v1alpha1.JobService.SetJobHookEnabled:input_type -> mgmt.v1alpha1.SetJobHookEnabledRequest - 153, // 182: mgmt.v1alpha1.JobService.GetActiveJobHooksByTiming:input_type -> mgmt.v1alpha1.GetActiveJobHooksByTimingRequest - 8, // 183: mgmt.v1alpha1.JobService.GetJobs:output_type -> mgmt.v1alpha1.GetJobsResponse - 57, // 184: mgmt.v1alpha1.JobService.GetJob:output_type -> mgmt.v1alpha1.GetJobResponse - 53, // 185: mgmt.v1alpha1.JobService.CreateJob:output_type -> mgmt.v1alpha1.CreateJobResponse - 78, // 186: mgmt.v1alpha1.JobService.DeleteJob:output_type -> mgmt.v1alpha1.DeleteJobResponse - 80, // 187: mgmt.v1alpha1.JobService.IsJobNameAvailable:output_type -> mgmt.v1alpha1.IsJobNameAvailableResponse - 59, // 188: mgmt.v1alpha1.JobService.UpdateJobSchedule:output_type -> mgmt.v1alpha1.UpdateJobScheduleResponse - 63, // 189: mgmt.v1alpha1.JobService.UpdateJobSourceConnection:output_type -> mgmt.v1alpha1.UpdateJobSourceConnectionResponse - 70, // 190: mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets:output_type -> mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse - 72, // 191: mgmt.v1alpha1.JobService.UpdateJobDestinationConnection:output_type -> mgmt.v1alpha1.UpdateJobDestinationConnectionResponse - 74, // 192: mgmt.v1alpha1.JobService.DeleteJobDestinationConnection:output_type -> mgmt.v1alpha1.DeleteJobDestinationConnectionResponse - 76, // 193: mgmt.v1alpha1.JobService.CreateJobDestinationConnections:output_type -> mgmt.v1alpha1.CreateJobDestinationConnectionsResponse - 61, // 194: mgmt.v1alpha1.JobService.PauseJob:output_type -> mgmt.v1alpha1.PauseJobResponse - 92, // 195: mgmt.v1alpha1.JobService.GetJobRecentRuns:output_type -> mgmt.v1alpha1.GetJobRecentRunsResponse - 95, // 196: mgmt.v1alpha1.JobService.GetJobNextRuns:output_type -> mgmt.v1alpha1.GetJobNextRunsResponse - 97, // 197: mgmt.v1alpha1.JobService.GetJobStatus:output_type -> mgmt.v1alpha1.GetJobStatusResponse - 100, // 198: mgmt.v1alpha1.JobService.GetJobStatuses:output_type -> mgmt.v1alpha1.GetJobStatusesResponse - 82, // 199: mgmt.v1alpha1.JobService.GetJobRuns:output_type -> mgmt.v1alpha1.GetJobRunsResponse - 110, // 200: mgmt.v1alpha1.JobService.GetJobRunEvents:output_type -> mgmt.v1alpha1.GetJobRunEventsResponse - 84, // 201: mgmt.v1alpha1.JobService.GetJobRun:output_type -> mgmt.v1alpha1.GetJobRunResponse - 112, // 202: mgmt.v1alpha1.JobService.DeleteJobRun:output_type -> mgmt.v1alpha1.DeleteJobRunResponse - 86, // 203: mgmt.v1alpha1.JobService.CreateJobRun:output_type -> mgmt.v1alpha1.CreateJobRunResponse - 88, // 204: mgmt.v1alpha1.JobService.CancelJobRun:output_type -> mgmt.v1alpha1.CancelJobRunResponse - 114, // 205: mgmt.v1alpha1.JobService.TerminateJobRun:output_type -> mgmt.v1alpha1.TerminateJobRunResponse - 116, // 206: mgmt.v1alpha1.JobService.GetJobRunLogsStream:output_type -> mgmt.v1alpha1.GetJobRunLogsStreamResponse - 118, // 207: mgmt.v1alpha1.JobService.SetJobWorkflowOptions:output_type -> mgmt.v1alpha1.SetJobWorkflowOptionsResponse - 120, // 208: mgmt.v1alpha1.JobService.SetJobSyncOptions:output_type -> mgmt.v1alpha1.SetJobSyncOptionsResponse - 124, // 209: mgmt.v1alpha1.JobService.ValidateJobMappings:output_type -> mgmt.v1alpha1.ValidateJobMappingsResponse - 129, // 210: mgmt.v1alpha1.JobService.GetRunContext:output_type -> mgmt.v1alpha1.GetRunContextResponse - 131, // 211: mgmt.v1alpha1.JobService.SetRunContext:output_type -> mgmt.v1alpha1.SetRunContextResponse - 133, // 212: mgmt.v1alpha1.JobService.SetRunContexts:output_type -> mgmt.v1alpha1.SetRunContextsResponse - 140, // 213: mgmt.v1alpha1.JobService.GetJobHooks:output_type -> mgmt.v1alpha1.GetJobHooksResponse - 142, // 214: mgmt.v1alpha1.JobService.GetJobHook:output_type -> mgmt.v1alpha1.GetJobHookResponse - 144, // 215: mgmt.v1alpha1.JobService.CreateJobHook:output_type -> mgmt.v1alpha1.CreateJobHookResponse - 146, // 216: mgmt.v1alpha1.JobService.DeleteJobHook:output_type -> mgmt.v1alpha1.DeleteJobHookResponse - 148, // 217: mgmt.v1alpha1.JobService.IsJobHookNameAvailable:output_type -> mgmt.v1alpha1.IsJobHookNameAvailableResponse - 150, // 218: mgmt.v1alpha1.JobService.UpdateJobHook:output_type -> mgmt.v1alpha1.UpdateJobHookResponse - 152, // 219: mgmt.v1alpha1.JobService.SetJobHookEnabled:output_type -> mgmt.v1alpha1.SetJobHookEnabledResponse - 154, // 220: mgmt.v1alpha1.JobService.GetActiveJobHooksByTiming:output_type -> mgmt.v1alpha1.GetActiveJobHooksByTimingResponse - 183, // [183:221] is the sub-list for method output_type - 145, // [145:183] is the sub-list for method input_type - 145, // [145:145] is the sub-list for extension type_name - 145, // [145:145] is the sub-list for extension extendee - 0, // [0:145] is the sub-list for field type_name + 160, // 56: mgmt.v1alpha1.JobMappingTransformer.config:type_name -> mgmt.v1alpha1.TransformerConfig + 54, // 57: mgmt.v1alpha1.JobMapping.transformer:type_name -> mgmt.v1alpha1.JobMappingTransformer + 89, // 58: mgmt.v1alpha1.GetJobResponse.job:type_name -> mgmt.v1alpha1.Job + 89, // 59: mgmt.v1alpha1.UpdateJobScheduleResponse.job:type_name -> mgmt.v1alpha1.Job + 89, // 60: mgmt.v1alpha1.PauseJobResponse.job:type_name -> mgmt.v1alpha1.Job + 9, // 61: mgmt.v1alpha1.UpdateJobSourceConnectionRequest.source:type_name -> mgmt.v1alpha1.JobSource + 55, // 62: mgmt.v1alpha1.UpdateJobSourceConnectionRequest.mappings:type_name -> mgmt.v1alpha1.JobMapping + 126, // 63: mgmt.v1alpha1.UpdateJobSourceConnectionRequest.virtual_foreign_keys:type_name -> mgmt.v1alpha1.VirtualForeignConstraint + 89, // 64: mgmt.v1alpha1.UpdateJobSourceConnectionResponse.job:type_name -> mgmt.v1alpha1.Job + 24, // 65: mgmt.v1alpha1.PostgresSourceSchemaSubset.postgres_schemas:type_name -> mgmt.v1alpha1.PostgresSourceSchemaOption + 27, // 66: mgmt.v1alpha1.MysqlSourceSchemaSubset.mysql_schemas:type_name -> mgmt.v1alpha1.MysqlSourceSchemaOption + 22, // 67: mgmt.v1alpha1.DynamoDBSourceSchemaSubset.tables:type_name -> mgmt.v1alpha1.DynamoDBSourceTableOption + 30, // 68: mgmt.v1alpha1.MssqlSourceSchemaSubset.mssql_schemas:type_name -> mgmt.v1alpha1.MssqlSourceSchemaOption + 64, // 69: mgmt.v1alpha1.JobSourceSqlSubetSchemas.postgres_subset:type_name -> mgmt.v1alpha1.PostgresSourceSchemaSubset + 65, // 70: mgmt.v1alpha1.JobSourceSqlSubetSchemas.mysql_subset:type_name -> mgmt.v1alpha1.MysqlSourceSchemaSubset + 66, // 71: mgmt.v1alpha1.JobSourceSqlSubetSchemas.dynamodb_subset:type_name -> mgmt.v1alpha1.DynamoDBSourceSchemaSubset + 67, // 72: mgmt.v1alpha1.JobSourceSqlSubetSchemas.mssql_subset:type_name -> mgmt.v1alpha1.MssqlSourceSchemaSubset + 68, // 73: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest.schemas:type_name -> mgmt.v1alpha1.JobSourceSqlSubetSchemas + 89, // 74: mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse.job:type_name -> mgmt.v1alpha1.Job + 33, // 75: mgmt.v1alpha1.UpdateJobDestinationConnectionRequest.options:type_name -> mgmt.v1alpha1.JobDestinationOptions + 89, // 76: mgmt.v1alpha1.UpdateJobDestinationConnectionResponse.job:type_name -> mgmt.v1alpha1.Job + 11, // 77: mgmt.v1alpha1.CreateJobDestinationConnectionsRequest.destinations:type_name -> mgmt.v1alpha1.CreateJobDestination + 89, // 78: mgmt.v1alpha1.CreateJobDestinationConnectionsResponse.job:type_name -> mgmt.v1alpha1.Job + 103, // 79: mgmt.v1alpha1.GetJobRunsResponse.job_runs:type_name -> mgmt.v1alpha1.JobRun + 103, // 80: mgmt.v1alpha1.GetJobRunResponse.job_run:type_name -> mgmt.v1alpha1.JobRun + 161, // 81: mgmt.v1alpha1.Job.created_at:type_name -> google.protobuf.Timestamp + 161, // 82: mgmt.v1alpha1.Job.updated_at:type_name -> google.protobuf.Timestamp + 9, // 83: mgmt.v1alpha1.Job.source:type_name -> mgmt.v1alpha1.JobSource + 12, // 84: mgmt.v1alpha1.Job.destinations:type_name -> mgmt.v1alpha1.JobDestination + 55, // 85: mgmt.v1alpha1.Job.mappings:type_name -> mgmt.v1alpha1.JobMapping + 51, // 86: mgmt.v1alpha1.Job.sync_options:type_name -> mgmt.v1alpha1.ActivityOptions + 50, // 87: mgmt.v1alpha1.Job.workflow_options:type_name -> mgmt.v1alpha1.WorkflowOptions + 126, // 88: mgmt.v1alpha1.Job.virtual_foreign_keys:type_name -> mgmt.v1alpha1.VirtualForeignConstraint + 161, // 89: mgmt.v1alpha1.JobRecentRun.start_time:type_name -> google.protobuf.Timestamp + 90, // 90: mgmt.v1alpha1.GetJobRecentRunsResponse.recent_runs:type_name -> mgmt.v1alpha1.JobRecentRun + 161, // 91: mgmt.v1alpha1.JobNextRuns.next_run_times:type_name -> google.protobuf.Timestamp + 93, // 92: mgmt.v1alpha1.GetJobNextRunsResponse.next_runs:type_name -> mgmt.v1alpha1.JobNextRuns + 0, // 93: mgmt.v1alpha1.GetJobStatusResponse.status:type_name -> mgmt.v1alpha1.JobStatus + 0, // 94: mgmt.v1alpha1.JobStatusRecord.status:type_name -> mgmt.v1alpha1.JobStatus + 98, // 95: mgmt.v1alpha1.GetJobStatusesResponse.statuses:type_name -> mgmt.v1alpha1.JobStatusRecord + 1, // 96: mgmt.v1alpha1.PendingActivity.status:type_name -> mgmt.v1alpha1.ActivityStatus + 101, // 97: mgmt.v1alpha1.PendingActivity.last_failure:type_name -> mgmt.v1alpha1.ActivityFailure + 2, // 98: mgmt.v1alpha1.JobRun.status:type_name -> mgmt.v1alpha1.JobRunStatus + 161, // 99: mgmt.v1alpha1.JobRun.started_at:type_name -> google.protobuf.Timestamp + 161, // 100: mgmt.v1alpha1.JobRun.completed_at:type_name -> google.protobuf.Timestamp + 102, // 101: mgmt.v1alpha1.JobRun.pending_activities:type_name -> mgmt.v1alpha1.PendingActivity + 161, // 102: mgmt.v1alpha1.JobRunEventTask.event_time:type_name -> google.protobuf.Timestamp + 104, // 103: mgmt.v1alpha1.JobRunEventTask.error:type_name -> mgmt.v1alpha1.JobRunEventTaskError + 106, // 104: mgmt.v1alpha1.JobRunEventMetadata.sync_metadata:type_name -> mgmt.v1alpha1.JobRunSyncMetadata + 161, // 105: mgmt.v1alpha1.JobRunEvent.start_time:type_name -> google.protobuf.Timestamp + 161, // 106: mgmt.v1alpha1.JobRunEvent.close_time:type_name -> google.protobuf.Timestamp + 107, // 107: mgmt.v1alpha1.JobRunEvent.metadata:type_name -> mgmt.v1alpha1.JobRunEventMetadata + 105, // 108: mgmt.v1alpha1.JobRunEvent.tasks:type_name -> mgmt.v1alpha1.JobRunEventTask + 108, // 109: mgmt.v1alpha1.GetJobRunEventsResponse.events:type_name -> mgmt.v1alpha1.JobRunEvent + 3, // 110: mgmt.v1alpha1.GetJobRunLogsStreamRequest.window:type_name -> mgmt.v1alpha1.LogWindow + 4, // 111: mgmt.v1alpha1.GetJobRunLogsStreamRequest.log_levels:type_name -> mgmt.v1alpha1.LogLevel + 161, // 112: mgmt.v1alpha1.GetJobRunLogsStreamResponse.timestamp:type_name -> google.protobuf.Timestamp + 50, // 113: mgmt.v1alpha1.SetJobWorkflowOptionsRequest.worfklow_options:type_name -> mgmt.v1alpha1.WorkflowOptions + 89, // 114: mgmt.v1alpha1.SetJobWorkflowOptionsResponse.job:type_name -> mgmt.v1alpha1.Job + 51, // 115: mgmt.v1alpha1.SetJobSyncOptionsRequest.sync_options:type_name -> mgmt.v1alpha1.ActivityOptions + 89, // 116: mgmt.v1alpha1.SetJobSyncOptionsResponse.job:type_name -> mgmt.v1alpha1.Job + 55, // 117: mgmt.v1alpha1.ValidateJobMappingsRequest.mappings:type_name -> mgmt.v1alpha1.JobMapping + 126, // 118: mgmt.v1alpha1.ValidateJobMappingsRequest.virtual_foreign_keys:type_name -> mgmt.v1alpha1.VirtualForeignConstraint + 122, // 119: mgmt.v1alpha1.ValidateJobMappingsResponse.column_errors:type_name -> mgmt.v1alpha1.ColumnError + 123, // 120: mgmt.v1alpha1.ValidateJobMappingsResponse.database_errors:type_name -> mgmt.v1alpha1.DatabaseError + 125, // 121: mgmt.v1alpha1.VirtualForeignConstraint.foreign_key:type_name -> mgmt.v1alpha1.VirtualForeignKey + 127, // 122: mgmt.v1alpha1.GetRunContextRequest.id:type_name -> mgmt.v1alpha1.RunContextKey + 127, // 123: mgmt.v1alpha1.SetRunContextRequest.id:type_name -> mgmt.v1alpha1.RunContextKey + 127, // 124: mgmt.v1alpha1.SetRunContextsRequest.id:type_name -> mgmt.v1alpha1.RunContextKey + 136, // 125: mgmt.v1alpha1.JobHook.config:type_name -> mgmt.v1alpha1.JobHookConfig + 161, // 126: mgmt.v1alpha1.JobHook.created_at:type_name -> google.protobuf.Timestamp + 161, // 127: mgmt.v1alpha1.JobHook.updated_at:type_name -> google.protobuf.Timestamp + 136, // 128: mgmt.v1alpha1.NewJobHook.config:type_name -> mgmt.v1alpha1.JobHookConfig + 158, // 129: mgmt.v1alpha1.JobHookConfig.sql:type_name -> mgmt.v1alpha1.JobHookConfig.JobSqlHook + 134, // 130: mgmt.v1alpha1.GetJobHooksResponse.hooks:type_name -> mgmt.v1alpha1.JobHook + 134, // 131: mgmt.v1alpha1.GetJobHookResponse.hook:type_name -> mgmt.v1alpha1.JobHook + 135, // 132: mgmt.v1alpha1.CreateJobHookRequest.hook:type_name -> mgmt.v1alpha1.NewJobHook + 134, // 133: mgmt.v1alpha1.CreateJobHookResponse.hook:type_name -> mgmt.v1alpha1.JobHook + 136, // 134: mgmt.v1alpha1.UpdateJobHookRequest.config:type_name -> mgmt.v1alpha1.JobHookConfig + 134, // 135: mgmt.v1alpha1.UpdateJobHookResponse.hook:type_name -> mgmt.v1alpha1.JobHook + 134, // 136: mgmt.v1alpha1.SetJobHookEnabledResponse.hook:type_name -> mgmt.v1alpha1.JobHook + 6, // 137: mgmt.v1alpha1.GetActiveJobHooksByTimingRequest.timing:type_name -> mgmt.v1alpha1.GetActiveJobHooksByTimingRequest.Timing + 134, // 138: mgmt.v1alpha1.GetActiveJobHooksByTimingResponse.hooks:type_name -> mgmt.v1alpha1.JobHook + 156, // 139: mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.halt_job:type_name -> mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob + 157, // 140: mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.auto_map:type_name -> mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap + 159, // 141: mgmt.v1alpha1.JobHookConfig.JobSqlHook.timing:type_name -> mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing + 137, // 142: mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing.pre_sync:type_name -> mgmt.v1alpha1.JobHookTimingPreSync + 138, // 143: mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing.post_sync:type_name -> mgmt.v1alpha1.JobHookTimingPostSync + 7, // 144: mgmt.v1alpha1.JobService.GetJobs:input_type -> mgmt.v1alpha1.GetJobsRequest + 56, // 145: mgmt.v1alpha1.JobService.GetJob:input_type -> mgmt.v1alpha1.GetJobRequest + 49, // 146: mgmt.v1alpha1.JobService.CreateJob:input_type -> mgmt.v1alpha1.CreateJobRequest + 77, // 147: mgmt.v1alpha1.JobService.DeleteJob:input_type -> mgmt.v1alpha1.DeleteJobRequest + 79, // 148: mgmt.v1alpha1.JobService.IsJobNameAvailable:input_type -> mgmt.v1alpha1.IsJobNameAvailableRequest + 58, // 149: mgmt.v1alpha1.JobService.UpdateJobSchedule:input_type -> mgmt.v1alpha1.UpdateJobScheduleRequest + 62, // 150: mgmt.v1alpha1.JobService.UpdateJobSourceConnection:input_type -> mgmt.v1alpha1.UpdateJobSourceConnectionRequest + 69, // 151: mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets:input_type -> mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest + 71, // 152: mgmt.v1alpha1.JobService.UpdateJobDestinationConnection:input_type -> mgmt.v1alpha1.UpdateJobDestinationConnectionRequest + 73, // 153: mgmt.v1alpha1.JobService.DeleteJobDestinationConnection:input_type -> mgmt.v1alpha1.DeleteJobDestinationConnectionRequest + 75, // 154: mgmt.v1alpha1.JobService.CreateJobDestinationConnections:input_type -> mgmt.v1alpha1.CreateJobDestinationConnectionsRequest + 60, // 155: mgmt.v1alpha1.JobService.PauseJob:input_type -> mgmt.v1alpha1.PauseJobRequest + 91, // 156: mgmt.v1alpha1.JobService.GetJobRecentRuns:input_type -> mgmt.v1alpha1.GetJobRecentRunsRequest + 94, // 157: mgmt.v1alpha1.JobService.GetJobNextRuns:input_type -> mgmt.v1alpha1.GetJobNextRunsRequest + 96, // 158: mgmt.v1alpha1.JobService.GetJobStatus:input_type -> mgmt.v1alpha1.GetJobStatusRequest + 99, // 159: mgmt.v1alpha1.JobService.GetJobStatuses:input_type -> mgmt.v1alpha1.GetJobStatusesRequest + 81, // 160: mgmt.v1alpha1.JobService.GetJobRuns:input_type -> mgmt.v1alpha1.GetJobRunsRequest + 109, // 161: mgmt.v1alpha1.JobService.GetJobRunEvents:input_type -> mgmt.v1alpha1.GetJobRunEventsRequest + 83, // 162: mgmt.v1alpha1.JobService.GetJobRun:input_type -> mgmt.v1alpha1.GetJobRunRequest + 111, // 163: mgmt.v1alpha1.JobService.DeleteJobRun:input_type -> mgmt.v1alpha1.DeleteJobRunRequest + 85, // 164: mgmt.v1alpha1.JobService.CreateJobRun:input_type -> mgmt.v1alpha1.CreateJobRunRequest + 87, // 165: mgmt.v1alpha1.JobService.CancelJobRun:input_type -> mgmt.v1alpha1.CancelJobRunRequest + 113, // 166: mgmt.v1alpha1.JobService.TerminateJobRun:input_type -> mgmt.v1alpha1.TerminateJobRunRequest + 115, // 167: mgmt.v1alpha1.JobService.GetJobRunLogsStream:input_type -> mgmt.v1alpha1.GetJobRunLogsStreamRequest + 117, // 168: mgmt.v1alpha1.JobService.SetJobWorkflowOptions:input_type -> mgmt.v1alpha1.SetJobWorkflowOptionsRequest + 119, // 169: mgmt.v1alpha1.JobService.SetJobSyncOptions:input_type -> mgmt.v1alpha1.SetJobSyncOptionsRequest + 121, // 170: mgmt.v1alpha1.JobService.ValidateJobMappings:input_type -> mgmt.v1alpha1.ValidateJobMappingsRequest + 128, // 171: mgmt.v1alpha1.JobService.GetRunContext:input_type -> mgmt.v1alpha1.GetRunContextRequest + 130, // 172: mgmt.v1alpha1.JobService.SetRunContext:input_type -> mgmt.v1alpha1.SetRunContextRequest + 132, // 173: mgmt.v1alpha1.JobService.SetRunContexts:input_type -> mgmt.v1alpha1.SetRunContextsRequest + 139, // 174: mgmt.v1alpha1.JobService.GetJobHooks:input_type -> mgmt.v1alpha1.GetJobHooksRequest + 141, // 175: mgmt.v1alpha1.JobService.GetJobHook:input_type -> mgmt.v1alpha1.GetJobHookRequest + 143, // 176: mgmt.v1alpha1.JobService.CreateJobHook:input_type -> mgmt.v1alpha1.CreateJobHookRequest + 145, // 177: mgmt.v1alpha1.JobService.DeleteJobHook:input_type -> mgmt.v1alpha1.DeleteJobHookRequest + 147, // 178: mgmt.v1alpha1.JobService.IsJobHookNameAvailable:input_type -> mgmt.v1alpha1.IsJobHookNameAvailableRequest + 149, // 179: mgmt.v1alpha1.JobService.UpdateJobHook:input_type -> mgmt.v1alpha1.UpdateJobHookRequest + 151, // 180: mgmt.v1alpha1.JobService.SetJobHookEnabled:input_type -> mgmt.v1alpha1.SetJobHookEnabledRequest + 153, // 181: mgmt.v1alpha1.JobService.GetActiveJobHooksByTiming:input_type -> mgmt.v1alpha1.GetActiveJobHooksByTimingRequest + 8, // 182: mgmt.v1alpha1.JobService.GetJobs:output_type -> mgmt.v1alpha1.GetJobsResponse + 57, // 183: mgmt.v1alpha1.JobService.GetJob:output_type -> mgmt.v1alpha1.GetJobResponse + 53, // 184: mgmt.v1alpha1.JobService.CreateJob:output_type -> mgmt.v1alpha1.CreateJobResponse + 78, // 185: mgmt.v1alpha1.JobService.DeleteJob:output_type -> mgmt.v1alpha1.DeleteJobResponse + 80, // 186: mgmt.v1alpha1.JobService.IsJobNameAvailable:output_type -> mgmt.v1alpha1.IsJobNameAvailableResponse + 59, // 187: mgmt.v1alpha1.JobService.UpdateJobSchedule:output_type -> mgmt.v1alpha1.UpdateJobScheduleResponse + 63, // 188: mgmt.v1alpha1.JobService.UpdateJobSourceConnection:output_type -> mgmt.v1alpha1.UpdateJobSourceConnectionResponse + 70, // 189: mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets:output_type -> mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse + 72, // 190: mgmt.v1alpha1.JobService.UpdateJobDestinationConnection:output_type -> mgmt.v1alpha1.UpdateJobDestinationConnectionResponse + 74, // 191: mgmt.v1alpha1.JobService.DeleteJobDestinationConnection:output_type -> mgmt.v1alpha1.DeleteJobDestinationConnectionResponse + 76, // 192: mgmt.v1alpha1.JobService.CreateJobDestinationConnections:output_type -> mgmt.v1alpha1.CreateJobDestinationConnectionsResponse + 61, // 193: mgmt.v1alpha1.JobService.PauseJob:output_type -> mgmt.v1alpha1.PauseJobResponse + 92, // 194: mgmt.v1alpha1.JobService.GetJobRecentRuns:output_type -> mgmt.v1alpha1.GetJobRecentRunsResponse + 95, // 195: mgmt.v1alpha1.JobService.GetJobNextRuns:output_type -> mgmt.v1alpha1.GetJobNextRunsResponse + 97, // 196: mgmt.v1alpha1.JobService.GetJobStatus:output_type -> mgmt.v1alpha1.GetJobStatusResponse + 100, // 197: mgmt.v1alpha1.JobService.GetJobStatuses:output_type -> mgmt.v1alpha1.GetJobStatusesResponse + 82, // 198: mgmt.v1alpha1.JobService.GetJobRuns:output_type -> mgmt.v1alpha1.GetJobRunsResponse + 110, // 199: mgmt.v1alpha1.JobService.GetJobRunEvents:output_type -> mgmt.v1alpha1.GetJobRunEventsResponse + 84, // 200: mgmt.v1alpha1.JobService.GetJobRun:output_type -> mgmt.v1alpha1.GetJobRunResponse + 112, // 201: mgmt.v1alpha1.JobService.DeleteJobRun:output_type -> mgmt.v1alpha1.DeleteJobRunResponse + 86, // 202: mgmt.v1alpha1.JobService.CreateJobRun:output_type -> mgmt.v1alpha1.CreateJobRunResponse + 88, // 203: mgmt.v1alpha1.JobService.CancelJobRun:output_type -> mgmt.v1alpha1.CancelJobRunResponse + 114, // 204: mgmt.v1alpha1.JobService.TerminateJobRun:output_type -> mgmt.v1alpha1.TerminateJobRunResponse + 116, // 205: mgmt.v1alpha1.JobService.GetJobRunLogsStream:output_type -> mgmt.v1alpha1.GetJobRunLogsStreamResponse + 118, // 206: mgmt.v1alpha1.JobService.SetJobWorkflowOptions:output_type -> mgmt.v1alpha1.SetJobWorkflowOptionsResponse + 120, // 207: mgmt.v1alpha1.JobService.SetJobSyncOptions:output_type -> mgmt.v1alpha1.SetJobSyncOptionsResponse + 124, // 208: mgmt.v1alpha1.JobService.ValidateJobMappings:output_type -> mgmt.v1alpha1.ValidateJobMappingsResponse + 129, // 209: mgmt.v1alpha1.JobService.GetRunContext:output_type -> mgmt.v1alpha1.GetRunContextResponse + 131, // 210: mgmt.v1alpha1.JobService.SetRunContext:output_type -> mgmt.v1alpha1.SetRunContextResponse + 133, // 211: mgmt.v1alpha1.JobService.SetRunContexts:output_type -> mgmt.v1alpha1.SetRunContextsResponse + 140, // 212: mgmt.v1alpha1.JobService.GetJobHooks:output_type -> mgmt.v1alpha1.GetJobHooksResponse + 142, // 213: mgmt.v1alpha1.JobService.GetJobHook:output_type -> mgmt.v1alpha1.GetJobHookResponse + 144, // 214: mgmt.v1alpha1.JobService.CreateJobHook:output_type -> mgmt.v1alpha1.CreateJobHookResponse + 146, // 215: mgmt.v1alpha1.JobService.DeleteJobHook:output_type -> mgmt.v1alpha1.DeleteJobHookResponse + 148, // 216: mgmt.v1alpha1.JobService.IsJobHookNameAvailable:output_type -> mgmt.v1alpha1.IsJobHookNameAvailableResponse + 150, // 217: mgmt.v1alpha1.JobService.UpdateJobHook:output_type -> mgmt.v1alpha1.UpdateJobHookResponse + 152, // 218: mgmt.v1alpha1.JobService.SetJobHookEnabled:output_type -> mgmt.v1alpha1.SetJobHookEnabledResponse + 154, // 219: mgmt.v1alpha1.JobService.GetActiveJobHooksByTiming:output_type -> mgmt.v1alpha1.GetActiveJobHooksByTimingResponse + 182, // [182:220] is the sub-list for method output_type + 144, // [144:182] is the sub-list for method input_type + 144, // [144:144] is the sub-list for extension type_name + 144, // [144:144] is the sub-list for extension extendee + 0, // [0:144] is the sub-list for field type_name } func init() { file_mgmt_v1alpha1_job_proto_init() } @@ -11246,7 +11217,6 @@ func file_mgmt_v1alpha1_job_proto_init() { file_mgmt_v1alpha1_job_proto_msgTypes[6].OneofWrappers = []any{} file_mgmt_v1alpha1_job_proto_msgTypes[9].OneofWrappers = []any{} file_mgmt_v1alpha1_job_proto_msgTypes[15].OneofWrappers = []any{} - file_mgmt_v1alpha1_job_proto_msgTypes[16].OneofWrappers = []any{} file_mgmt_v1alpha1_job_proto_msgTypes[18].OneofWrappers = []any{} file_mgmt_v1alpha1_job_proto_msgTypes[21].OneofWrappers = []any{} file_mgmt_v1alpha1_job_proto_msgTypes[24].OneofWrappers = []any{} diff --git a/backend/gen/go/protos/mgmt/v1alpha1/metrics.pb.go b/backend/gen/go/protos/mgmt/v1alpha1/metrics.pb.go index e9f4aaf7b4..b1109c5586 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/metrics.pb.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/metrics.pb.go @@ -10,7 +10,6 @@ import ( _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -377,10 +376,6 @@ type GetMetricCountRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // @deprecated - use start_day - Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` - // @deprecated - use end_day - End *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` // The metric to return Metric RangedMetricName `protobuf:"varint,3,opt,name=metric,proto3,enum=mgmt.v1alpha1.RangedMetricName" json:"metric,omitempty"` // Types that are assignable to Identifier: @@ -423,20 +418,6 @@ func (*GetMetricCountRequest) Descriptor() ([]byte, []int) { return file_mgmt_v1alpha1_metrics_proto_rawDescGZIP(), []int{4} } -func (x *GetMetricCountRequest) GetStart() *timestamppb.Timestamp { - if x != nil { - return x.Start - } - return nil -} - -func (x *GetMetricCountRequest) GetEnd() *timestamppb.Timestamp { - if x != nil { - return x.End - } - return nil -} - func (x *GetMetricCountRequest) GetMetric() RangedMetricName { if x != nil { return x.Metric @@ -564,23 +545,44 @@ var file_mgmt_v1alpha1_metrics_proto_rawDesc = []byte{ 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x04, 0x44, 0x61, - 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x0a, 0xba, 0x48, 0x07, 0x2a, 0x05, 0x18, 0x8f, 0x4e, 0x28, 0x00, 0x52, 0x04, 0x79, 0x65, - 0x61, 0x72, 0x12, 0x1f, 0x0a, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x42, 0x09, 0xba, 0x48, 0x06, 0x2a, 0x04, 0x18, 0x1f, 0x28, 0x00, 0x52, 0x05, 0x6d, 0x6f, - 0x6e, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x09, 0xba, 0x48, 0x06, 0x2a, 0x04, 0x18, 0x1f, 0x28, 0x00, 0x52, 0x03, 0x64, 0x61, 0x79, - 0x22, 0xa6, 0x02, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x29, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, - 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x25, 0x0a, 0x03, 0x65, 0x6e, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x03, 0x65, 0x6e, - 0x64, 0x12, 0x37, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x04, 0x44, 0x61, 0x74, + 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, + 0x0a, 0xba, 0x48, 0x07, 0x2a, 0x05, 0x18, 0x8f, 0x4e, 0x28, 0x00, 0x52, 0x04, 0x79, 0x65, 0x61, + 0x72, 0x12, 0x1f, 0x0a, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x42, 0x09, 0xba, 0x48, 0x06, 0x2a, 0x04, 0x18, 0x1f, 0x28, 0x00, 0x52, 0x05, 0x6d, 0x6f, 0x6e, + 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, + 0x09, 0xba, 0x48, 0x06, 0x2a, 0x04, 0x18, 0x1f, 0x28, 0x00, 0x52, 0x03, 0x64, 0x61, 0x79, 0x22, + 0xa6, 0x02, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x25, 0x0a, 0x03, 0x65, 0x6e, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x03, 0x65, 0x6e, 0x64, + 0x12, 0x37, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x29, 0x0a, 0x0a, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, + 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, + 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, + 0x01, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x51, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, + 0x61, 0x69, 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x79, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x4a, 0x0a, 0x09, 0x44, + 0x61, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xbb, 0x02, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x37, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x29, 0x0a, 0x0a, 0x61, 0x63, @@ -590,79 +592,51 @@ var file_mgmt_v1alpha1_metrics_proto_rawDesc = []byte{ 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, - 0x01, 0x01, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x51, 0x0a, 0x1b, 0x47, 0x65, 0x74, - 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x79, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x4a, 0x0a, 0x09, - 0x44, 0x61, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8f, 0x03, 0x0a, 0x15, 0x47, 0x65, 0x74, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, - 0x6e, 0x64, 0x12, 0x37, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, - 0x61, 0x6d, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x29, 0x0a, 0x0a, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x09, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, - 0x48, 0x00, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x75, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, - 0xb0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x09, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x44, 0x61, 0x74, 0x65, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x79, 0x12, 0x2c, - 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x44, 0x61, 0x74, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x79, 0x42, 0x0c, 0x0a, 0x0a, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x2e, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2a, 0x5d, 0x0a, 0x10, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, - 0x0a, 0x1e, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, - 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x25, 0x0a, 0x21, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x54, - 0x52, 0x49, 0x43, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x52, - 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, 0x10, 0x01, 0x32, 0xe1, 0x01, 0x0a, 0x0e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x01, 0x01, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x09, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, + 0x61, 0x74, 0x65, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x79, 0x12, 0x2c, 0x0a, + 0x07, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, + 0x61, 0x74, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, + 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x2e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2a, 0x5d, 0x0a, 0x10, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x41, 0x4e, + 0x47, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x25, 0x0a, + 0x21, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x4e, + 0x41, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, + 0x45, 0x44, 0x10, 0x01, 0x32, 0xe1, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x44, 0x61, + 0x69, 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xc8, 0x01, - 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x42, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6e, 0x75, 0x63, 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, - 0x6d, 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, - 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, - 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, - 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x69, + 0x6c, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xc8, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0c, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x63, 0x6c, 0x65, + 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x2e, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -687,7 +661,6 @@ var file_mgmt_v1alpha1_metrics_proto_goTypes = []any{ (*DayResult)(nil), // 4: mgmt.v1alpha1.DayResult (*GetMetricCountRequest)(nil), // 5: mgmt.v1alpha1.GetMetricCountRequest (*GetMetricCountResponse)(nil), // 6: mgmt.v1alpha1.GetMetricCountResponse - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp } var file_mgmt_v1alpha1_metrics_proto_depIdxs = []int32{ 1, // 0: mgmt.v1alpha1.GetDailyMetricCountRequest.start:type_name -> mgmt.v1alpha1.Date @@ -695,20 +668,18 @@ var file_mgmt_v1alpha1_metrics_proto_depIdxs = []int32{ 0, // 2: mgmt.v1alpha1.GetDailyMetricCountRequest.metric:type_name -> mgmt.v1alpha1.RangedMetricName 4, // 3: mgmt.v1alpha1.GetDailyMetricCountResponse.results:type_name -> mgmt.v1alpha1.DayResult 1, // 4: mgmt.v1alpha1.DayResult.date:type_name -> mgmt.v1alpha1.Date - 7, // 5: mgmt.v1alpha1.GetMetricCountRequest.start:type_name -> google.protobuf.Timestamp - 7, // 6: mgmt.v1alpha1.GetMetricCountRequest.end:type_name -> google.protobuf.Timestamp - 0, // 7: mgmt.v1alpha1.GetMetricCountRequest.metric:type_name -> mgmt.v1alpha1.RangedMetricName - 1, // 8: mgmt.v1alpha1.GetMetricCountRequest.start_day:type_name -> mgmt.v1alpha1.Date - 1, // 9: mgmt.v1alpha1.GetMetricCountRequest.end_day:type_name -> mgmt.v1alpha1.Date - 2, // 10: mgmt.v1alpha1.MetricsService.GetDailyMetricCount:input_type -> mgmt.v1alpha1.GetDailyMetricCountRequest - 5, // 11: mgmt.v1alpha1.MetricsService.GetMetricCount:input_type -> mgmt.v1alpha1.GetMetricCountRequest - 3, // 12: mgmt.v1alpha1.MetricsService.GetDailyMetricCount:output_type -> mgmt.v1alpha1.GetDailyMetricCountResponse - 6, // 13: mgmt.v1alpha1.MetricsService.GetMetricCount:output_type -> mgmt.v1alpha1.GetMetricCountResponse - 12, // [12:14] is the sub-list for method output_type - 10, // [10:12] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 0, // 5: mgmt.v1alpha1.GetMetricCountRequest.metric:type_name -> mgmt.v1alpha1.RangedMetricName + 1, // 6: mgmt.v1alpha1.GetMetricCountRequest.start_day:type_name -> mgmt.v1alpha1.Date + 1, // 7: mgmt.v1alpha1.GetMetricCountRequest.end_day:type_name -> mgmt.v1alpha1.Date + 2, // 8: mgmt.v1alpha1.MetricsService.GetDailyMetricCount:input_type -> mgmt.v1alpha1.GetDailyMetricCountRequest + 5, // 9: mgmt.v1alpha1.MetricsService.GetMetricCount:input_type -> mgmt.v1alpha1.GetMetricCountRequest + 3, // 10: mgmt.v1alpha1.MetricsService.GetDailyMetricCount:output_type -> mgmt.v1alpha1.GetDailyMetricCountResponse + 6, // 11: mgmt.v1alpha1.MetricsService.GetMetricCount:output_type -> mgmt.v1alpha1.GetMetricCountResponse + 10, // [10:12] is the sub-list for method output_type + 8, // [8:10] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_mgmt_v1alpha1_metrics_proto_init() } diff --git a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/auth.connect.go b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/auth.connect.go index dfac97794e..05366758d1 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/auth.connect.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/auth.connect.go @@ -39,9 +39,6 @@ const ( AuthServiceRefreshCliProcedure = "/mgmt.v1alpha1.AuthService/RefreshCli" // AuthServiceCheckTokenProcedure is the fully-qualified name of the AuthService's CheckToken RPC. AuthServiceCheckTokenProcedure = "/mgmt.v1alpha1.AuthService/CheckToken" - // AuthServiceGetCliIssuerProcedure is the fully-qualified name of the AuthService's GetCliIssuer - // RPC. - AuthServiceGetCliIssuerProcedure = "/mgmt.v1alpha1.AuthService/GetCliIssuer" // AuthServiceGetAuthorizeUrlProcedure is the fully-qualified name of the AuthService's // GetAuthorizeUrl RPC. AuthServiceGetAuthorizeUrlProcedure = "/mgmt.v1alpha1.AuthService/GetAuthorizeUrl" @@ -56,7 +53,6 @@ var ( authServiceLoginCliMethodDescriptor = authServiceServiceDescriptor.Methods().ByName("LoginCli") authServiceRefreshCliMethodDescriptor = authServiceServiceDescriptor.Methods().ByName("RefreshCli") authServiceCheckTokenMethodDescriptor = authServiceServiceDescriptor.Methods().ByName("CheckToken") - authServiceGetCliIssuerMethodDescriptor = authServiceServiceDescriptor.Methods().ByName("GetCliIssuer") authServiceGetAuthorizeUrlMethodDescriptor = authServiceServiceDescriptor.Methods().ByName("GetAuthorizeUrl") authServiceGetAuthStatusMethodDescriptor = authServiceServiceDescriptor.Methods().ByName("GetAuthStatus") ) @@ -70,9 +66,6 @@ type AuthServiceClient interface { RefreshCli(context.Context, *connect.Request[v1alpha1.RefreshCliRequest]) (*connect.Response[v1alpha1.RefreshCliResponse], error) // Empty endpoint to simply check if the provided access token is valid CheckToken(context.Context, *connect.Request[v1alpha1.CheckTokenRequest]) (*connect.Response[v1alpha1.CheckTokenResponse], error) - // Used by the CLI to retrieve Auth Issuer information - // @deprecated - GetCliIssuer(context.Context, *connect.Request[v1alpha1.GetCliIssuerRequest]) (*connect.Response[v1alpha1.GetCliIssuerResponse], error) // Used by the CLI to retrieve an Authorize URL for use with OAuth login. GetAuthorizeUrl(context.Context, *connect.Request[v1alpha1.GetAuthorizeUrlRequest]) (*connect.Response[v1alpha1.GetAuthorizeUrlResponse], error) // Returns the auth status of the API server. Whether or not the backend has authentication enabled. @@ -108,12 +101,6 @@ func NewAuthServiceClient(httpClient connect.HTTPClient, baseURL string, opts .. connect.WithSchema(authServiceCheckTokenMethodDescriptor), connect.WithClientOptions(opts...), ), - getCliIssuer: connect.NewClient[v1alpha1.GetCliIssuerRequest, v1alpha1.GetCliIssuerResponse]( - httpClient, - baseURL+AuthServiceGetCliIssuerProcedure, - connect.WithSchema(authServiceGetCliIssuerMethodDescriptor), - connect.WithClientOptions(opts...), - ), getAuthorizeUrl: connect.NewClient[v1alpha1.GetAuthorizeUrlRequest, v1alpha1.GetAuthorizeUrlResponse]( httpClient, baseURL+AuthServiceGetAuthorizeUrlProcedure, @@ -134,7 +121,6 @@ type authServiceClient struct { loginCli *connect.Client[v1alpha1.LoginCliRequest, v1alpha1.LoginCliResponse] refreshCli *connect.Client[v1alpha1.RefreshCliRequest, v1alpha1.RefreshCliResponse] checkToken *connect.Client[v1alpha1.CheckTokenRequest, v1alpha1.CheckTokenResponse] - getCliIssuer *connect.Client[v1alpha1.GetCliIssuerRequest, v1alpha1.GetCliIssuerResponse] getAuthorizeUrl *connect.Client[v1alpha1.GetAuthorizeUrlRequest, v1alpha1.GetAuthorizeUrlResponse] getAuthStatus *connect.Client[v1alpha1.GetAuthStatusRequest, v1alpha1.GetAuthStatusResponse] } @@ -154,11 +140,6 @@ func (c *authServiceClient) CheckToken(ctx context.Context, req *connect.Request return c.checkToken.CallUnary(ctx, req) } -// GetCliIssuer calls mgmt.v1alpha1.AuthService.GetCliIssuer. -func (c *authServiceClient) GetCliIssuer(ctx context.Context, req *connect.Request[v1alpha1.GetCliIssuerRequest]) (*connect.Response[v1alpha1.GetCliIssuerResponse], error) { - return c.getCliIssuer.CallUnary(ctx, req) -} - // GetAuthorizeUrl calls mgmt.v1alpha1.AuthService.GetAuthorizeUrl. func (c *authServiceClient) GetAuthorizeUrl(ctx context.Context, req *connect.Request[v1alpha1.GetAuthorizeUrlRequest]) (*connect.Response[v1alpha1.GetAuthorizeUrlResponse], error) { return c.getAuthorizeUrl.CallUnary(ctx, req) @@ -178,9 +159,6 @@ type AuthServiceHandler interface { RefreshCli(context.Context, *connect.Request[v1alpha1.RefreshCliRequest]) (*connect.Response[v1alpha1.RefreshCliResponse], error) // Empty endpoint to simply check if the provided access token is valid CheckToken(context.Context, *connect.Request[v1alpha1.CheckTokenRequest]) (*connect.Response[v1alpha1.CheckTokenResponse], error) - // Used by the CLI to retrieve Auth Issuer information - // @deprecated - GetCliIssuer(context.Context, *connect.Request[v1alpha1.GetCliIssuerRequest]) (*connect.Response[v1alpha1.GetCliIssuerResponse], error) // Used by the CLI to retrieve an Authorize URL for use with OAuth login. GetAuthorizeUrl(context.Context, *connect.Request[v1alpha1.GetAuthorizeUrlRequest]) (*connect.Response[v1alpha1.GetAuthorizeUrlResponse], error) // Returns the auth status of the API server. Whether or not the backend has authentication enabled. @@ -212,12 +190,6 @@ func NewAuthServiceHandler(svc AuthServiceHandler, opts ...connect.HandlerOption connect.WithSchema(authServiceCheckTokenMethodDescriptor), connect.WithHandlerOptions(opts...), ) - authServiceGetCliIssuerHandler := connect.NewUnaryHandler( - AuthServiceGetCliIssuerProcedure, - svc.GetCliIssuer, - connect.WithSchema(authServiceGetCliIssuerMethodDescriptor), - connect.WithHandlerOptions(opts...), - ) authServiceGetAuthorizeUrlHandler := connect.NewUnaryHandler( AuthServiceGetAuthorizeUrlProcedure, svc.GetAuthorizeUrl, @@ -238,8 +210,6 @@ func NewAuthServiceHandler(svc AuthServiceHandler, opts ...connect.HandlerOption authServiceRefreshCliHandler.ServeHTTP(w, r) case AuthServiceCheckTokenProcedure: authServiceCheckTokenHandler.ServeHTTP(w, r) - case AuthServiceGetCliIssuerProcedure: - authServiceGetCliIssuerHandler.ServeHTTP(w, r) case AuthServiceGetAuthorizeUrlProcedure: authServiceGetAuthorizeUrlHandler.ServeHTTP(w, r) case AuthServiceGetAuthStatusProcedure: @@ -265,10 +235,6 @@ func (UnimplementedAuthServiceHandler) CheckToken(context.Context, *connect.Requ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.AuthService.CheckToken is not implemented")) } -func (UnimplementedAuthServiceHandler) GetCliIssuer(context.Context, *connect.Request[v1alpha1.GetCliIssuerRequest]) (*connect.Response[v1alpha1.GetCliIssuerResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.AuthService.GetCliIssuer is not implemented")) -} - func (UnimplementedAuthServiceHandler) GetAuthorizeUrl(context.Context, *connect.Request[v1alpha1.GetAuthorizeUrlRequest]) (*connect.Response[v1alpha1.GetAuthorizeUrlResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.AuthService.GetAuthorizeUrl is not implemented")) } diff --git a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/connection_data.connect.go b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/connection_data.connect.go index 2b6fd0ccb1..b8562bca92 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/connection_data.connect.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/connection_data.connect.go @@ -48,18 +48,9 @@ const ( // ConnectionDataServiceGetConnectionTableConstraintsProcedure is the fully-qualified name of the // ConnectionDataService's GetConnectionTableConstraints RPC. ConnectionDataServiceGetConnectionTableConstraintsProcedure = "/mgmt.v1alpha1.ConnectionDataService/GetConnectionTableConstraints" - // ConnectionDataServiceGetConnectionForeignConstraintsProcedure is the fully-qualified name of the - // ConnectionDataService's GetConnectionForeignConstraints RPC. - ConnectionDataServiceGetConnectionForeignConstraintsProcedure = "/mgmt.v1alpha1.ConnectionDataService/GetConnectionForeignConstraints" - // ConnectionDataServiceGetConnectionPrimaryConstraintsProcedure is the fully-qualified name of the - // ConnectionDataService's GetConnectionPrimaryConstraints RPC. - ConnectionDataServiceGetConnectionPrimaryConstraintsProcedure = "/mgmt.v1alpha1.ConnectionDataService/GetConnectionPrimaryConstraints" // ConnectionDataServiceGetConnectionInitStatementsProcedure is the fully-qualified name of the // ConnectionDataService's GetConnectionInitStatements RPC. ConnectionDataServiceGetConnectionInitStatementsProcedure = "/mgmt.v1alpha1.ConnectionDataService/GetConnectionInitStatements" - // ConnectionDataServiceGetConnectionUniqueConstraintsProcedure is the fully-qualified name of the - // ConnectionDataService's GetConnectionUniqueConstraints RPC. - ConnectionDataServiceGetConnectionUniqueConstraintsProcedure = "/mgmt.v1alpha1.ConnectionDataService/GetConnectionUniqueConstraints" // ConnectionDataServiceGetAiGeneratedDataProcedure is the fully-qualified name of the // ConnectionDataService's GetAiGeneratedData RPC. ConnectionDataServiceGetAiGeneratedDataProcedure = "/mgmt.v1alpha1.ConnectionDataService/GetAiGeneratedData" @@ -70,18 +61,15 @@ const ( // These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. var ( - connectionDataServiceServiceDescriptor = v1alpha1.File_mgmt_v1alpha1_connection_data_proto.Services().ByName("ConnectionDataService") - connectionDataServiceGetConnectionDataStreamMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionDataStream") - connectionDataServiceGetConnectionSchemaMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionSchema") - connectionDataServiceGetConnectionSchemaMapMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionSchemaMap") - connectionDataServiceGetConnectionSchemaMapsMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionSchemaMaps") - connectionDataServiceGetConnectionTableConstraintsMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionTableConstraints") - connectionDataServiceGetConnectionForeignConstraintsMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionForeignConstraints") - connectionDataServiceGetConnectionPrimaryConstraintsMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionPrimaryConstraints") - connectionDataServiceGetConnectionInitStatementsMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionInitStatements") - connectionDataServiceGetConnectionUniqueConstraintsMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionUniqueConstraints") - connectionDataServiceGetAiGeneratedDataMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetAiGeneratedData") - connectionDataServiceGetTableRowCountMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetTableRowCount") + connectionDataServiceServiceDescriptor = v1alpha1.File_mgmt_v1alpha1_connection_data_proto.Services().ByName("ConnectionDataService") + connectionDataServiceGetConnectionDataStreamMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionDataStream") + connectionDataServiceGetConnectionSchemaMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionSchema") + connectionDataServiceGetConnectionSchemaMapMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionSchemaMap") + connectionDataServiceGetConnectionSchemaMapsMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionSchemaMaps") + connectionDataServiceGetConnectionTableConstraintsMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionTableConstraints") + connectionDataServiceGetConnectionInitStatementsMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetConnectionInitStatements") + connectionDataServiceGetAiGeneratedDataMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetAiGeneratedData") + connectionDataServiceGetTableRowCountMethodDescriptor = connectionDataServiceServiceDescriptor.Methods().ByName("GetTableRowCount") ) // ConnectionDataServiceClient is a client for the mgmt.v1alpha1.ConnectionDataService service. @@ -97,17 +85,9 @@ type ConnectionDataServiceClient interface { GetConnectionSchemaMaps(context.Context, *connect.Request[v1alpha1.GetConnectionSchemaMapsRequest]) (*connect.Response[v1alpha1.GetConnectionSchemaMapsResponse], error) // For a specific connection, returns the table constraints. Mostly useful for SQL-based Connections. GetConnectionTableConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionTableConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionTableConstraintsResponse], error) - // For a specific connection, returns the foreign key constraints. Mostly useful for SQL-based Connections. - // Used primarily by the CLI sync command to determine stream order. - GetConnectionForeignConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionForeignConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionForeignConstraintsResponse], error) - // For a specific connection, returns the primary key constraints. Mostly useful for SQL-based Connections. - // Used primarily by the CLI sync command to determine stream order. - GetConnectionPrimaryConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionPrimaryConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionPrimaryConstraintsResponse], error) // For a specific connection, returns the init table statements. Mostly useful for SQL-based Connections. // Used primarily by the CLI sync command to create table schema init statement. GetConnectionInitStatements(context.Context, *connect.Request[v1alpha1.GetConnectionInitStatementsRequest]) (*connect.Response[v1alpha1.GetConnectionInitStatementsResponse], error) - // For a specific connection, returns the unique constraints. Mostly useful for SQL-based connections. - GetConnectionUniqueConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionUniqueConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionUniqueConstraintsResponse], error) // Query an AI connection by providing the necessary values. Typically used for generating preview data GetAiGeneratedData(context.Context, *connect.Request[v1alpha1.GetAiGeneratedDataRequest]) (*connect.Response[v1alpha1.GetAiGeneratedDataResponse], error) // Query table with subset to get row count @@ -154,30 +134,12 @@ func NewConnectionDataServiceClient(httpClient connect.HTTPClient, baseURL strin connect.WithSchema(connectionDataServiceGetConnectionTableConstraintsMethodDescriptor), connect.WithClientOptions(opts...), ), - getConnectionForeignConstraints: connect.NewClient[v1alpha1.GetConnectionForeignConstraintsRequest, v1alpha1.GetConnectionForeignConstraintsResponse]( - httpClient, - baseURL+ConnectionDataServiceGetConnectionForeignConstraintsProcedure, - connect.WithSchema(connectionDataServiceGetConnectionForeignConstraintsMethodDescriptor), - connect.WithClientOptions(opts...), - ), - getConnectionPrimaryConstraints: connect.NewClient[v1alpha1.GetConnectionPrimaryConstraintsRequest, v1alpha1.GetConnectionPrimaryConstraintsResponse]( - httpClient, - baseURL+ConnectionDataServiceGetConnectionPrimaryConstraintsProcedure, - connect.WithSchema(connectionDataServiceGetConnectionPrimaryConstraintsMethodDescriptor), - connect.WithClientOptions(opts...), - ), getConnectionInitStatements: connect.NewClient[v1alpha1.GetConnectionInitStatementsRequest, v1alpha1.GetConnectionInitStatementsResponse]( httpClient, baseURL+ConnectionDataServiceGetConnectionInitStatementsProcedure, connect.WithSchema(connectionDataServiceGetConnectionInitStatementsMethodDescriptor), connect.WithClientOptions(opts...), ), - getConnectionUniqueConstraints: connect.NewClient[v1alpha1.GetConnectionUniqueConstraintsRequest, v1alpha1.GetConnectionUniqueConstraintsResponse]( - httpClient, - baseURL+ConnectionDataServiceGetConnectionUniqueConstraintsProcedure, - connect.WithSchema(connectionDataServiceGetConnectionUniqueConstraintsMethodDescriptor), - connect.WithClientOptions(opts...), - ), getAiGeneratedData: connect.NewClient[v1alpha1.GetAiGeneratedDataRequest, v1alpha1.GetAiGeneratedDataResponse]( httpClient, baseURL+ConnectionDataServiceGetAiGeneratedDataProcedure, @@ -195,17 +157,14 @@ func NewConnectionDataServiceClient(httpClient connect.HTTPClient, baseURL strin // connectionDataServiceClient implements ConnectionDataServiceClient. type connectionDataServiceClient struct { - getConnectionDataStream *connect.Client[v1alpha1.GetConnectionDataStreamRequest, v1alpha1.GetConnectionDataStreamResponse] - getConnectionSchema *connect.Client[v1alpha1.GetConnectionSchemaRequest, v1alpha1.GetConnectionSchemaResponse] - getConnectionSchemaMap *connect.Client[v1alpha1.GetConnectionSchemaMapRequest, v1alpha1.GetConnectionSchemaMapResponse] - getConnectionSchemaMaps *connect.Client[v1alpha1.GetConnectionSchemaMapsRequest, v1alpha1.GetConnectionSchemaMapsResponse] - getConnectionTableConstraints *connect.Client[v1alpha1.GetConnectionTableConstraintsRequest, v1alpha1.GetConnectionTableConstraintsResponse] - getConnectionForeignConstraints *connect.Client[v1alpha1.GetConnectionForeignConstraintsRequest, v1alpha1.GetConnectionForeignConstraintsResponse] - getConnectionPrimaryConstraints *connect.Client[v1alpha1.GetConnectionPrimaryConstraintsRequest, v1alpha1.GetConnectionPrimaryConstraintsResponse] - getConnectionInitStatements *connect.Client[v1alpha1.GetConnectionInitStatementsRequest, v1alpha1.GetConnectionInitStatementsResponse] - getConnectionUniqueConstraints *connect.Client[v1alpha1.GetConnectionUniqueConstraintsRequest, v1alpha1.GetConnectionUniqueConstraintsResponse] - getAiGeneratedData *connect.Client[v1alpha1.GetAiGeneratedDataRequest, v1alpha1.GetAiGeneratedDataResponse] - getTableRowCount *connect.Client[v1alpha1.GetTableRowCountRequest, v1alpha1.GetTableRowCountResponse] + getConnectionDataStream *connect.Client[v1alpha1.GetConnectionDataStreamRequest, v1alpha1.GetConnectionDataStreamResponse] + getConnectionSchema *connect.Client[v1alpha1.GetConnectionSchemaRequest, v1alpha1.GetConnectionSchemaResponse] + getConnectionSchemaMap *connect.Client[v1alpha1.GetConnectionSchemaMapRequest, v1alpha1.GetConnectionSchemaMapResponse] + getConnectionSchemaMaps *connect.Client[v1alpha1.GetConnectionSchemaMapsRequest, v1alpha1.GetConnectionSchemaMapsResponse] + getConnectionTableConstraints *connect.Client[v1alpha1.GetConnectionTableConstraintsRequest, v1alpha1.GetConnectionTableConstraintsResponse] + getConnectionInitStatements *connect.Client[v1alpha1.GetConnectionInitStatementsRequest, v1alpha1.GetConnectionInitStatementsResponse] + getAiGeneratedData *connect.Client[v1alpha1.GetAiGeneratedDataRequest, v1alpha1.GetAiGeneratedDataResponse] + getTableRowCount *connect.Client[v1alpha1.GetTableRowCountRequest, v1alpha1.GetTableRowCountResponse] } // GetConnectionDataStream calls mgmt.v1alpha1.ConnectionDataService.GetConnectionDataStream. @@ -234,30 +193,12 @@ func (c *connectionDataServiceClient) GetConnectionTableConstraints(ctx context. return c.getConnectionTableConstraints.CallUnary(ctx, req) } -// GetConnectionForeignConstraints calls -// mgmt.v1alpha1.ConnectionDataService.GetConnectionForeignConstraints. -func (c *connectionDataServiceClient) GetConnectionForeignConstraints(ctx context.Context, req *connect.Request[v1alpha1.GetConnectionForeignConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionForeignConstraintsResponse], error) { - return c.getConnectionForeignConstraints.CallUnary(ctx, req) -} - -// GetConnectionPrimaryConstraints calls -// mgmt.v1alpha1.ConnectionDataService.GetConnectionPrimaryConstraints. -func (c *connectionDataServiceClient) GetConnectionPrimaryConstraints(ctx context.Context, req *connect.Request[v1alpha1.GetConnectionPrimaryConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionPrimaryConstraintsResponse], error) { - return c.getConnectionPrimaryConstraints.CallUnary(ctx, req) -} - // GetConnectionInitStatements calls // mgmt.v1alpha1.ConnectionDataService.GetConnectionInitStatements. func (c *connectionDataServiceClient) GetConnectionInitStatements(ctx context.Context, req *connect.Request[v1alpha1.GetConnectionInitStatementsRequest]) (*connect.Response[v1alpha1.GetConnectionInitStatementsResponse], error) { return c.getConnectionInitStatements.CallUnary(ctx, req) } -// GetConnectionUniqueConstraints calls -// mgmt.v1alpha1.ConnectionDataService.GetConnectionUniqueConstraints. -func (c *connectionDataServiceClient) GetConnectionUniqueConstraints(ctx context.Context, req *connect.Request[v1alpha1.GetConnectionUniqueConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionUniqueConstraintsResponse], error) { - return c.getConnectionUniqueConstraints.CallUnary(ctx, req) -} - // GetAiGeneratedData calls mgmt.v1alpha1.ConnectionDataService.GetAiGeneratedData. func (c *connectionDataServiceClient) GetAiGeneratedData(ctx context.Context, req *connect.Request[v1alpha1.GetAiGeneratedDataRequest]) (*connect.Response[v1alpha1.GetAiGeneratedDataResponse], error) { return c.getAiGeneratedData.CallUnary(ctx, req) @@ -282,17 +223,9 @@ type ConnectionDataServiceHandler interface { GetConnectionSchemaMaps(context.Context, *connect.Request[v1alpha1.GetConnectionSchemaMapsRequest]) (*connect.Response[v1alpha1.GetConnectionSchemaMapsResponse], error) // For a specific connection, returns the table constraints. Mostly useful for SQL-based Connections. GetConnectionTableConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionTableConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionTableConstraintsResponse], error) - // For a specific connection, returns the foreign key constraints. Mostly useful for SQL-based Connections. - // Used primarily by the CLI sync command to determine stream order. - GetConnectionForeignConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionForeignConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionForeignConstraintsResponse], error) - // For a specific connection, returns the primary key constraints. Mostly useful for SQL-based Connections. - // Used primarily by the CLI sync command to determine stream order. - GetConnectionPrimaryConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionPrimaryConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionPrimaryConstraintsResponse], error) // For a specific connection, returns the init table statements. Mostly useful for SQL-based Connections. // Used primarily by the CLI sync command to create table schema init statement. GetConnectionInitStatements(context.Context, *connect.Request[v1alpha1.GetConnectionInitStatementsRequest]) (*connect.Response[v1alpha1.GetConnectionInitStatementsResponse], error) - // For a specific connection, returns the unique constraints. Mostly useful for SQL-based connections. - GetConnectionUniqueConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionUniqueConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionUniqueConstraintsResponse], error) // Query an AI connection by providing the necessary values. Typically used for generating preview data GetAiGeneratedData(context.Context, *connect.Request[v1alpha1.GetAiGeneratedDataRequest]) (*connect.Response[v1alpha1.GetAiGeneratedDataResponse], error) // Query table with subset to get row count @@ -335,30 +268,12 @@ func NewConnectionDataServiceHandler(svc ConnectionDataServiceHandler, opts ...c connect.WithSchema(connectionDataServiceGetConnectionTableConstraintsMethodDescriptor), connect.WithHandlerOptions(opts...), ) - connectionDataServiceGetConnectionForeignConstraintsHandler := connect.NewUnaryHandler( - ConnectionDataServiceGetConnectionForeignConstraintsProcedure, - svc.GetConnectionForeignConstraints, - connect.WithSchema(connectionDataServiceGetConnectionForeignConstraintsMethodDescriptor), - connect.WithHandlerOptions(opts...), - ) - connectionDataServiceGetConnectionPrimaryConstraintsHandler := connect.NewUnaryHandler( - ConnectionDataServiceGetConnectionPrimaryConstraintsProcedure, - svc.GetConnectionPrimaryConstraints, - connect.WithSchema(connectionDataServiceGetConnectionPrimaryConstraintsMethodDescriptor), - connect.WithHandlerOptions(opts...), - ) connectionDataServiceGetConnectionInitStatementsHandler := connect.NewUnaryHandler( ConnectionDataServiceGetConnectionInitStatementsProcedure, svc.GetConnectionInitStatements, connect.WithSchema(connectionDataServiceGetConnectionInitStatementsMethodDescriptor), connect.WithHandlerOptions(opts...), ) - connectionDataServiceGetConnectionUniqueConstraintsHandler := connect.NewUnaryHandler( - ConnectionDataServiceGetConnectionUniqueConstraintsProcedure, - svc.GetConnectionUniqueConstraints, - connect.WithSchema(connectionDataServiceGetConnectionUniqueConstraintsMethodDescriptor), - connect.WithHandlerOptions(opts...), - ) connectionDataServiceGetAiGeneratedDataHandler := connect.NewUnaryHandler( ConnectionDataServiceGetAiGeneratedDataProcedure, svc.GetAiGeneratedData, @@ -383,14 +298,8 @@ func NewConnectionDataServiceHandler(svc ConnectionDataServiceHandler, opts ...c connectionDataServiceGetConnectionSchemaMapsHandler.ServeHTTP(w, r) case ConnectionDataServiceGetConnectionTableConstraintsProcedure: connectionDataServiceGetConnectionTableConstraintsHandler.ServeHTTP(w, r) - case ConnectionDataServiceGetConnectionForeignConstraintsProcedure: - connectionDataServiceGetConnectionForeignConstraintsHandler.ServeHTTP(w, r) - case ConnectionDataServiceGetConnectionPrimaryConstraintsProcedure: - connectionDataServiceGetConnectionPrimaryConstraintsHandler.ServeHTTP(w, r) case ConnectionDataServiceGetConnectionInitStatementsProcedure: connectionDataServiceGetConnectionInitStatementsHandler.ServeHTTP(w, r) - case ConnectionDataServiceGetConnectionUniqueConstraintsProcedure: - connectionDataServiceGetConnectionUniqueConstraintsHandler.ServeHTTP(w, r) case ConnectionDataServiceGetAiGeneratedDataProcedure: connectionDataServiceGetAiGeneratedDataHandler.ServeHTTP(w, r) case ConnectionDataServiceGetTableRowCountProcedure: @@ -424,22 +333,10 @@ func (UnimplementedConnectionDataServiceHandler) GetConnectionTableConstraints(c return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.ConnectionDataService.GetConnectionTableConstraints is not implemented")) } -func (UnimplementedConnectionDataServiceHandler) GetConnectionForeignConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionForeignConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionForeignConstraintsResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.ConnectionDataService.GetConnectionForeignConstraints is not implemented")) -} - -func (UnimplementedConnectionDataServiceHandler) GetConnectionPrimaryConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionPrimaryConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionPrimaryConstraintsResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.ConnectionDataService.GetConnectionPrimaryConstraints is not implemented")) -} - func (UnimplementedConnectionDataServiceHandler) GetConnectionInitStatements(context.Context, *connect.Request[v1alpha1.GetConnectionInitStatementsRequest]) (*connect.Response[v1alpha1.GetConnectionInitStatementsResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.ConnectionDataService.GetConnectionInitStatements is not implemented")) } -func (UnimplementedConnectionDataServiceHandler) GetConnectionUniqueConstraints(context.Context, *connect.Request[v1alpha1.GetConnectionUniqueConstraintsRequest]) (*connect.Response[v1alpha1.GetConnectionUniqueConstraintsResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.ConnectionDataService.GetConnectionUniqueConstraints is not implemented")) -} - func (UnimplementedConnectionDataServiceHandler) GetAiGeneratedData(context.Context, *connect.Request[v1alpha1.GetAiGeneratedDataRequest]) (*connect.Response[v1alpha1.GetAiGeneratedDataResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgmt.v1alpha1.ConnectionDataService.GetAiGeneratedData is not implemented")) } diff --git a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_AuthServiceClient.go b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_AuthServiceClient.go index f656547217..91cdf8512a 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_AuthServiceClient.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_AuthServiceClient.go @@ -201,65 +201,6 @@ func (_c *MockAuthServiceClient_GetAuthorizeUrl_Call) RunAndReturn(run func(cont return _c } -// GetCliIssuer provides a mock function with given fields: _a0, _a1 -func (_m *MockAuthServiceClient) GetCliIssuer(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetCliIssuerRequest]) (*connect.Response[mgmtv1alpha1.GetCliIssuerResponse], error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetCliIssuer") - } - - var r0 *connect.Response[mgmtv1alpha1.GetCliIssuerResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetCliIssuerRequest]) (*connect.Response[mgmtv1alpha1.GetCliIssuerResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetCliIssuerRequest]) *connect.Response[mgmtv1alpha1.GetCliIssuerResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetCliIssuerResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetCliIssuerRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAuthServiceClient_GetCliIssuer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCliIssuer' -type MockAuthServiceClient_GetCliIssuer_Call struct { - *mock.Call -} - -// GetCliIssuer is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.GetCliIssuerRequest] -func (_e *MockAuthServiceClient_Expecter) GetCliIssuer(_a0 interface{}, _a1 interface{}) *MockAuthServiceClient_GetCliIssuer_Call { - return &MockAuthServiceClient_GetCliIssuer_Call{Call: _e.mock.On("GetCliIssuer", _a0, _a1)} -} - -func (_c *MockAuthServiceClient_GetCliIssuer_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetCliIssuerRequest])) *MockAuthServiceClient_GetCliIssuer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetCliIssuerRequest])) - }) - return _c -} - -func (_c *MockAuthServiceClient_GetCliIssuer_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetCliIssuerResponse], _a1 error) *MockAuthServiceClient_GetCliIssuer_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAuthServiceClient_GetCliIssuer_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetCliIssuerRequest]) (*connect.Response[mgmtv1alpha1.GetCliIssuerResponse], error)) *MockAuthServiceClient_GetCliIssuer_Call { - _c.Call.Return(run) - return _c -} - // LoginCli provides a mock function with given fields: _a0, _a1 func (_m *MockAuthServiceClient) LoginCli(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.LoginCliRequest]) (*connect.Response[mgmtv1alpha1.LoginCliResponse], error) { ret := _m.Called(_a0, _a1) diff --git a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_ConnectionServiceHandler.go b/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_ConnectionServiceHandler.go deleted file mode 100644 index 6bf840c195..0000000000 --- a/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect/mock_ConnectionServiceHandler.go +++ /dev/null @@ -1,688 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mgmtv1alpha1connect - -import ( - context "context" - - connect "connectrpc.com/connect" - - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - mock "github.com/stretchr/testify/mock" -) - -// MockConnectionServiceHandler is an autogenerated mock type for the ConnectionServiceHandler type -type MockConnectionServiceHandler struct { - mock.Mock -} - -type MockConnectionServiceHandler_Expecter struct { - mock *mock.Mock -} - -func (_m *MockConnectionServiceHandler) EXPECT() *MockConnectionServiceHandler_Expecter { - return &MockConnectionServiceHandler_Expecter{mock: &_m.Mock} -} - -// CheckConnectionConfig provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) CheckConnectionConfig(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CheckConnectionConfigRequest]) (*connect.Response[mgmtv1alpha1.CheckConnectionConfigResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.CheckConnectionConfigResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CheckConnectionConfigRequest]) (*connect.Response[mgmtv1alpha1.CheckConnectionConfigResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CheckConnectionConfigRequest]) *connect.Response[mgmtv1alpha1.CheckConnectionConfigResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.CheckConnectionConfigResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.CheckConnectionConfigRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_CheckConnectionConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckConnectionConfig' -type MockConnectionServiceHandler_CheckConnectionConfig_Call struct { - *mock.Call -} - -// CheckConnectionConfig is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.CheckConnectionConfigRequest] -func (_e *MockConnectionServiceHandler_Expecter) CheckConnectionConfig(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_CheckConnectionConfig_Call { - return &MockConnectionServiceHandler_CheckConnectionConfig_Call{Call: _e.mock.On("CheckConnectionConfig", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_CheckConnectionConfig_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CheckConnectionConfigRequest])) *MockConnectionServiceHandler_CheckConnectionConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.CheckConnectionConfigRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_CheckConnectionConfig_Call) Return(_a0 *connect.Response[mgmtv1alpha1.CheckConnectionConfigResponse], _a1 error) *MockConnectionServiceHandler_CheckConnectionConfig_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_CheckConnectionConfig_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.CheckConnectionConfigRequest]) (*connect.Response[mgmtv1alpha1.CheckConnectionConfigResponse], error)) *MockConnectionServiceHandler_CheckConnectionConfig_Call { - _c.Call.Return(run) - return _c -} - -// CheckSqlQuery provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) CheckSqlQuery(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CheckSqlQueryRequest]) (*connect.Response[mgmtv1alpha1.CheckSqlQueryResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.CheckSqlQueryResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CheckSqlQueryRequest]) (*connect.Response[mgmtv1alpha1.CheckSqlQueryResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CheckSqlQueryRequest]) *connect.Response[mgmtv1alpha1.CheckSqlQueryResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.CheckSqlQueryResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.CheckSqlQueryRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_CheckSqlQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckSqlQuery' -type MockConnectionServiceHandler_CheckSqlQuery_Call struct { - *mock.Call -} - -// CheckSqlQuery is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.CheckSqlQueryRequest] -func (_e *MockConnectionServiceHandler_Expecter) CheckSqlQuery(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_CheckSqlQuery_Call { - return &MockConnectionServiceHandler_CheckSqlQuery_Call{Call: _e.mock.On("CheckSqlQuery", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_CheckSqlQuery_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CheckSqlQueryRequest])) *MockConnectionServiceHandler_CheckSqlQuery_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.CheckSqlQueryRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_CheckSqlQuery_Call) Return(_a0 *connect.Response[mgmtv1alpha1.CheckSqlQueryResponse], _a1 error) *MockConnectionServiceHandler_CheckSqlQuery_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_CheckSqlQuery_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.CheckSqlQueryRequest]) (*connect.Response[mgmtv1alpha1.CheckSqlQueryResponse], error)) *MockConnectionServiceHandler_CheckSqlQuery_Call { - _c.Call.Return(run) - return _c -} - -// CreateConnection provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) CreateConnection(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CreateConnectionRequest]) (*connect.Response[mgmtv1alpha1.CreateConnectionResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.CreateConnectionResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateConnectionRequest]) (*connect.Response[mgmtv1alpha1.CreateConnectionResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateConnectionRequest]) *connect.Response[mgmtv1alpha1.CreateConnectionResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.CreateConnectionResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.CreateConnectionRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_CreateConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateConnection' -type MockConnectionServiceHandler_CreateConnection_Call struct { - *mock.Call -} - -// CreateConnection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.CreateConnectionRequest] -func (_e *MockConnectionServiceHandler_Expecter) CreateConnection(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_CreateConnection_Call { - return &MockConnectionServiceHandler_CreateConnection_Call{Call: _e.mock.On("CreateConnection", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_CreateConnection_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.CreateConnectionRequest])) *MockConnectionServiceHandler_CreateConnection_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.CreateConnectionRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_CreateConnection_Call) Return(_a0 *connect.Response[mgmtv1alpha1.CreateConnectionResponse], _a1 error) *MockConnectionServiceHandler_CreateConnection_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_CreateConnection_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.CreateConnectionRequest]) (*connect.Response[mgmtv1alpha1.CreateConnectionResponse], error)) *MockConnectionServiceHandler_CreateConnection_Call { - _c.Call.Return(run) - return _c -} - -// DeleteConnection provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) DeleteConnection(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.DeleteConnectionRequest]) (*connect.Response[mgmtv1alpha1.DeleteConnectionResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.DeleteConnectionResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteConnectionRequest]) (*connect.Response[mgmtv1alpha1.DeleteConnectionResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteConnectionRequest]) *connect.Response[mgmtv1alpha1.DeleteConnectionResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.DeleteConnectionResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.DeleteConnectionRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_DeleteConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteConnection' -type MockConnectionServiceHandler_DeleteConnection_Call struct { - *mock.Call -} - -// DeleteConnection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.DeleteConnectionRequest] -func (_e *MockConnectionServiceHandler_Expecter) DeleteConnection(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_DeleteConnection_Call { - return &MockConnectionServiceHandler_DeleteConnection_Call{Call: _e.mock.On("DeleteConnection", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_DeleteConnection_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.DeleteConnectionRequest])) *MockConnectionServiceHandler_DeleteConnection_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.DeleteConnectionRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_DeleteConnection_Call) Return(_a0 *connect.Response[mgmtv1alpha1.DeleteConnectionResponse], _a1 error) *MockConnectionServiceHandler_DeleteConnection_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_DeleteConnection_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.DeleteConnectionRequest]) (*connect.Response[mgmtv1alpha1.DeleteConnectionResponse], error)) *MockConnectionServiceHandler_DeleteConnection_Call { - _c.Call.Return(run) - return _c -} - -// GetConnection provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) GetConnection(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.GetConnectionResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionRequest]) *connect.Response[mgmtv1alpha1.GetConnectionResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetConnectionResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_GetConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnection' -type MockConnectionServiceHandler_GetConnection_Call struct { - *mock.Call -} - -// GetConnection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.GetConnectionRequest] -func (_e *MockConnectionServiceHandler_Expecter) GetConnection(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_GetConnection_Call { - return &MockConnectionServiceHandler_GetConnection_Call{Call: _e.mock.On("GetConnection", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_GetConnection_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionRequest])) *MockConnectionServiceHandler_GetConnection_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetConnectionRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnection_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetConnectionResponse], _a1 error) *MockConnectionServiceHandler_GetConnection_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnection_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionResponse], error)) *MockConnectionServiceHandler_GetConnection_Call { - _c.Call.Return(run) - return _c -} - -// GetConnectionDataStream provides a mock function with given fields: _a0, _a1, _a2 -func (_m *MockConnectionServiceHandler) GetConnectionDataStream(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionDataStreamRequest], _a2 *connect.ServerStream[mgmtv1alpha1.GetConnectionDataStreamResponse]) error { - ret := _m.Called(_a0, _a1, _a2) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionDataStreamRequest], *connect.ServerStream[mgmtv1alpha1.GetConnectionDataStreamResponse]) error); ok { - r0 = rf(_a0, _a1, _a2) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockConnectionServiceHandler_GetConnectionDataStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnectionDataStream' -type MockConnectionServiceHandler_GetConnectionDataStream_Call struct { - *mock.Call -} - -// GetConnectionDataStream is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.GetConnectionDataStreamRequest] -// - _a2 *connect.ServerStream[mgmtv1alpha1.GetConnectionDataStreamResponse] -func (_e *MockConnectionServiceHandler_Expecter) GetConnectionDataStream(_a0 interface{}, _a1 interface{}, _a2 interface{}) *MockConnectionServiceHandler_GetConnectionDataStream_Call { - return &MockConnectionServiceHandler_GetConnectionDataStream_Call{Call: _e.mock.On("GetConnectionDataStream", _a0, _a1, _a2)} -} - -func (_c *MockConnectionServiceHandler_GetConnectionDataStream_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionDataStreamRequest], _a2 *connect.ServerStream[mgmtv1alpha1.GetConnectionDataStreamResponse])) *MockConnectionServiceHandler_GetConnectionDataStream_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetConnectionDataStreamRequest]), args[2].(*connect.ServerStream[mgmtv1alpha1.GetConnectionDataStreamResponse])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnectionDataStream_Call) Return(_a0 error) *MockConnectionServiceHandler_GetConnectionDataStream_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnectionDataStream_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionDataStreamRequest], *connect.ServerStream[mgmtv1alpha1.GetConnectionDataStreamResponse]) error) *MockConnectionServiceHandler_GetConnectionDataStream_Call { - _c.Call.Return(run) - return _c -} - -// GetConnectionForeignConstraints provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) GetConnectionForeignConstraints(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionForeignConstraintsResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.GetConnectionForeignConstraintsResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionForeignConstraintsResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest]) *connect.Response[mgmtv1alpha1.GetConnectionForeignConstraintsResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetConnectionForeignConstraintsResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_GetConnectionForeignConstraints_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnectionForeignConstraints' -type MockConnectionServiceHandler_GetConnectionForeignConstraints_Call struct { - *mock.Call -} - -// GetConnectionForeignConstraints is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest] -func (_e *MockConnectionServiceHandler_Expecter) GetConnectionForeignConstraints(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_GetConnectionForeignConstraints_Call { - return &MockConnectionServiceHandler_GetConnectionForeignConstraints_Call{Call: _e.mock.On("GetConnectionForeignConstraints", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_GetConnectionForeignConstraints_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest])) *MockConnectionServiceHandler_GetConnectionForeignConstraints_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnectionForeignConstraints_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetConnectionForeignConstraintsResponse], _a1 error) *MockConnectionServiceHandler_GetConnectionForeignConstraints_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnectionForeignConstraints_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionForeignConstraintsResponse], error)) *MockConnectionServiceHandler_GetConnectionForeignConstraints_Call { - _c.Call.Return(run) - return _c -} - -// GetConnectionInitStatements provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) GetConnectionInitStatements(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionInitStatementsRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionInitStatementsResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.GetConnectionInitStatementsResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionInitStatementsRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionInitStatementsResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionInitStatementsRequest]) *connect.Response[mgmtv1alpha1.GetConnectionInitStatementsResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetConnectionInitStatementsResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionInitStatementsRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_GetConnectionInitStatements_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnectionInitStatements' -type MockConnectionServiceHandler_GetConnectionInitStatements_Call struct { - *mock.Call -} - -// GetConnectionInitStatements is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.GetConnectionInitStatementsRequest] -func (_e *MockConnectionServiceHandler_Expecter) GetConnectionInitStatements(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_GetConnectionInitStatements_Call { - return &MockConnectionServiceHandler_GetConnectionInitStatements_Call{Call: _e.mock.On("GetConnectionInitStatements", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_GetConnectionInitStatements_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionInitStatementsRequest])) *MockConnectionServiceHandler_GetConnectionInitStatements_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetConnectionInitStatementsRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnectionInitStatements_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetConnectionInitStatementsResponse], _a1 error) *MockConnectionServiceHandler_GetConnectionInitStatements_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnectionInitStatements_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionInitStatementsRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionInitStatementsResponse], error)) *MockConnectionServiceHandler_GetConnectionInitStatements_Call { - _c.Call.Return(run) - return _c -} - -// GetConnectionSchema provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) GetConnectionSchema(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionSchemaRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionSchemaResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.GetConnectionSchemaResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionSchemaRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionSchemaResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionSchemaRequest]) *connect.Response[mgmtv1alpha1.GetConnectionSchemaResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetConnectionSchemaResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionSchemaRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_GetConnectionSchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnectionSchema' -type MockConnectionServiceHandler_GetConnectionSchema_Call struct { - *mock.Call -} - -// GetConnectionSchema is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.GetConnectionSchemaRequest] -func (_e *MockConnectionServiceHandler_Expecter) GetConnectionSchema(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_GetConnectionSchema_Call { - return &MockConnectionServiceHandler_GetConnectionSchema_Call{Call: _e.mock.On("GetConnectionSchema", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_GetConnectionSchema_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionSchemaRequest])) *MockConnectionServiceHandler_GetConnectionSchema_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetConnectionSchemaRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnectionSchema_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetConnectionSchemaResponse], _a1 error) *MockConnectionServiceHandler_GetConnectionSchema_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnectionSchema_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionSchemaRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionSchemaResponse], error)) *MockConnectionServiceHandler_GetConnectionSchema_Call { - _c.Call.Return(run) - return _c -} - -// GetConnections provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) GetConnections(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionsRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionsResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.GetConnectionsResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionsRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionsResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionsRequest]) *connect.Response[mgmtv1alpha1.GetConnectionsResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.GetConnectionsResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionsRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_GetConnections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnections' -type MockConnectionServiceHandler_GetConnections_Call struct { - *mock.Call -} - -// GetConnections is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.GetConnectionsRequest] -func (_e *MockConnectionServiceHandler_Expecter) GetConnections(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_GetConnections_Call { - return &MockConnectionServiceHandler_GetConnections_Call{Call: _e.mock.On("GetConnections", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_GetConnections_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.GetConnectionsRequest])) *MockConnectionServiceHandler_GetConnections_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.GetConnectionsRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnections_Call) Return(_a0 *connect.Response[mgmtv1alpha1.GetConnectionsResponse], _a1 error) *MockConnectionServiceHandler_GetConnections_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_GetConnections_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.GetConnectionsRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionsResponse], error)) *MockConnectionServiceHandler_GetConnections_Call { - _c.Call.Return(run) - return _c -} - -// IsConnectionNameAvailable provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) IsConnectionNameAvailable(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.IsConnectionNameAvailableRequest]) (*connect.Response[mgmtv1alpha1.IsConnectionNameAvailableResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.IsConnectionNameAvailableResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.IsConnectionNameAvailableRequest]) (*connect.Response[mgmtv1alpha1.IsConnectionNameAvailableResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.IsConnectionNameAvailableRequest]) *connect.Response[mgmtv1alpha1.IsConnectionNameAvailableResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.IsConnectionNameAvailableResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.IsConnectionNameAvailableRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_IsConnectionNameAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsConnectionNameAvailable' -type MockConnectionServiceHandler_IsConnectionNameAvailable_Call struct { - *mock.Call -} - -// IsConnectionNameAvailable is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.IsConnectionNameAvailableRequest] -func (_e *MockConnectionServiceHandler_Expecter) IsConnectionNameAvailable(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_IsConnectionNameAvailable_Call { - return &MockConnectionServiceHandler_IsConnectionNameAvailable_Call{Call: _e.mock.On("IsConnectionNameAvailable", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_IsConnectionNameAvailable_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.IsConnectionNameAvailableRequest])) *MockConnectionServiceHandler_IsConnectionNameAvailable_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.IsConnectionNameAvailableRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_IsConnectionNameAvailable_Call) Return(_a0 *connect.Response[mgmtv1alpha1.IsConnectionNameAvailableResponse], _a1 error) *MockConnectionServiceHandler_IsConnectionNameAvailable_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_IsConnectionNameAvailable_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.IsConnectionNameAvailableRequest]) (*connect.Response[mgmtv1alpha1.IsConnectionNameAvailableResponse], error)) *MockConnectionServiceHandler_IsConnectionNameAvailable_Call { - _c.Call.Return(run) - return _c -} - -// UpdateConnection provides a mock function with given fields: _a0, _a1 -func (_m *MockConnectionServiceHandler) UpdateConnection(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.UpdateConnectionRequest]) (*connect.Response[mgmtv1alpha1.UpdateConnectionResponse], error) { - ret := _m.Called(_a0, _a1) - - var r0 *connect.Response[mgmtv1alpha1.UpdateConnectionResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateConnectionRequest]) (*connect.Response[mgmtv1alpha1.UpdateConnectionResponse], error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateConnectionRequest]) *connect.Response[mgmtv1alpha1.UpdateConnectionResponse]); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*connect.Response[mgmtv1alpha1.UpdateConnectionResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *connect.Request[mgmtv1alpha1.UpdateConnectionRequest]) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionServiceHandler_UpdateConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateConnection' -type MockConnectionServiceHandler_UpdateConnection_Call struct { - *mock.Call -} - -// UpdateConnection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *connect.Request[mgmtv1alpha1.UpdateConnectionRequest] -func (_e *MockConnectionServiceHandler_Expecter) UpdateConnection(_a0 interface{}, _a1 interface{}) *MockConnectionServiceHandler_UpdateConnection_Call { - return &MockConnectionServiceHandler_UpdateConnection_Call{Call: _e.mock.On("UpdateConnection", _a0, _a1)} -} - -func (_c *MockConnectionServiceHandler_UpdateConnection_Call) Run(run func(_a0 context.Context, _a1 *connect.Request[mgmtv1alpha1.UpdateConnectionRequest])) *MockConnectionServiceHandler_UpdateConnection_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*connect.Request[mgmtv1alpha1.UpdateConnectionRequest])) - }) - return _c -} - -func (_c *MockConnectionServiceHandler_UpdateConnection_Call) Return(_a0 *connect.Response[mgmtv1alpha1.UpdateConnectionResponse], _a1 error) *MockConnectionServiceHandler_UpdateConnection_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionServiceHandler_UpdateConnection_Call) RunAndReturn(run func(context.Context, *connect.Request[mgmtv1alpha1.UpdateConnectionRequest]) (*connect.Response[mgmtv1alpha1.UpdateConnectionResponse], error)) *MockConnectionServiceHandler_UpdateConnection_Call { - _c.Call.Return(run) - return _c -} - -// NewMockConnectionServiceHandler creates a new instance of MockConnectionServiceHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockConnectionServiceHandler(t interface { - mock.TestingT - Cleanup(func()) -}) *MockConnectionServiceHandler { - mock := &MockConnectionServiceHandler{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/backend/gen/go/protos/mgmt/v1alpha1/transformer.pb.go b/backend/gen/go/protos/mgmt/v1alpha1/transformer.pb.go index 02ae328613..5a825cb699 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/transformer.pb.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/transformer.pb.go @@ -927,11 +927,9 @@ type CreateUserDefinedTransformerRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // @deprecated - Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Source TransformerSource `protobuf:"varint,5,opt,name=source,proto3,enum=mgmt.v1alpha1.TransformerSource" json:"source,omitempty"` TransformerConfig *TransformerConfig `protobuf:"bytes,6,opt,name=transformer_config,json=transformerConfig,proto3" json:"transformer_config,omitempty"` } @@ -987,13 +985,6 @@ func (x *CreateUserDefinedTransformerRequest) GetDescription() string { return "" } -func (x *CreateUserDefinedTransformerRequest) GetType() string { - if x != nil { - return x.Type - } - return "" -} - func (x *CreateUserDefinedTransformerRequest) GetSource() TransformerSource { if x != nil { return x.Source @@ -4241,9 +4232,7 @@ type ValidateUserJavascriptCodeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // @deprecated - an account isn't required to validate js code - AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` } func (x *ValidateUserJavascriptCodeRequest) Reset() { @@ -4276,13 +4265,6 @@ func (*ValidateUserJavascriptCodeRequest) Descriptor() ([]byte, []int) { return file_mgmt_v1alpha1_transformer_proto_rawDescGZIP(), []int{61} } -func (x *ValidateUserJavascriptCodeRequest) GetAccountId() string { - if x != nil { - return x.AccountId - } - return "" -} - func (x *ValidateUserJavascriptCodeRequest) GetCode() string { if x != nil { return x.Code @@ -4476,8 +4458,6 @@ type ValidateUserRegexCodeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // @deprecated - an account isn't required to validate js code - AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` UserProvidedRegex string `protobuf:"bytes,2,opt,name=user_provided_regex,json=userProvidedRegex,proto3" json:"user_provided_regex,omitempty"` } @@ -4511,13 +4491,6 @@ func (*ValidateUserRegexCodeRequest) Descriptor() ([]byte, []int) { return file_mgmt_v1alpha1_transformer_proto_rawDescGZIP(), []int{66} } -func (x *ValidateUserRegexCodeRequest) GetAccountId() string { - if x != nil { - return x.AccountId - } - return "" -} - func (x *ValidateUserRegexCodeRequest) GetUserProvidedRegex() string { if x != nil { return x.UserProvidedRegex @@ -5036,7 +5009,7 @@ var file_mgmt_v1alpha1_transformer_proto_rawDesc = []byte{ 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, - 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x22, 0xbe, 0x02, 0x0a, + 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x22, 0xb0, 0x02, 0x0a, 0x23, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, @@ -5046,689 +5019,685 @@ var file_mgmt_v1alpha1_transformer_proto_rawDesc = []byte{ 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x12, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, - 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x6f, 0x0a, - 0x24, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, - 0x72, 0x6d, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, - 0x72, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x22, 0x56, - 0x0a, 0x23, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, - 0x72, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, - 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, - 0x72, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x22, 0x26, 0x0a, 0x24, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf8, - 0x01, 0x0a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, - 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, - 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, + 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, - 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x6f, 0x0a, 0x24, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x0b, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x22, 0x92, 0x01, 0x0a, 0x21, 0x49, - 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x10, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x0f, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, - 0x47, 0x0a, 0x22, 0x49, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x61, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xf5, 0x03, 0x0a, 0x16, 0x55, 0x73, 0x65, + 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, + 0x6f, 0x0a, 0x24, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, - 0x6d, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x6d, 0x65, 0x72, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, + 0x22, 0x56, 0x0a, 0x23, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x22, 0x26, 0x0a, 0x24, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xf8, 0x01, 0x0a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, + 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, + 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, + 0x7d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x12, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, - 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x41, 0x0a, - 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x6f, 0x0a, 0x24, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, + 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x22, 0x92, 0x01, 0x0a, + 0x21, 0x49, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x10, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xba, 0x48, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, + 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x33, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, + 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x47, 0x0a, 0x22, 0x49, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, + 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xf5, 0x03, 0x0a, 0x16, 0x55, + 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, + 0x72, 0x6d, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, + 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x38, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x41, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x44, + 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x22, 0x92, 0x03, 0x0a, 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, + 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x44, 0x61, 0x74, - 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x22, 0x92, 0x03, 0x0a, 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x09, - 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, - 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x38, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, - 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x41, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x13, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x64, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0e, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x11, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xfa, 0x22, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x52, 0x0a, 0x15, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x48, 0x00, 0x52, 0x13, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x55, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x48, 0x00, - 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, - 0x6c, 0x48, 0x00, 0x52, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, - 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1b, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, + 0x6d, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x64, 0x61, 0x74, + 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x13, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x11, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4a, + 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xfa, 0x22, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x52, 0x0a, + 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x18, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x14, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x48, 0x00, 0x52, 0x13, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x55, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x48, 0x00, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x14, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x42, + 0x6f, 0x6f, 0x6c, 0x48, 0x00, 0x52, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x42, + 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1b, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x18, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, + 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, + 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x69, 0x74, 0x79, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x43, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x12, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x43, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, + 0x0a, 0x21, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x31, 0x36, 0x34, 0x5f, + 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x43, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x43, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, 0x0a, 0x21, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x31, 0x36, 0x34, 0x5f, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x74, 0x65, 0x45, 0x31, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x1d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x31, 0x36, + 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, + 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x17, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, + 0x61, 0x74, 0x36, 0x34, 0x48, 0x00, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, + 0x1c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6c, 0x6c, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x19, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x19, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x45, 0x31, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x1d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x31, 0x36, 0x34, 0x50, + 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x16, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x55, 0x0a, 0x16, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x67, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x75, 0x0a, 0x22, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, + 0x74, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x1e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x5f, 0x0a, 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x72, - 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x69, 0x72, - 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x58, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x6c, - 0x6f, 0x61, 0x74, 0x36, 0x34, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x61, 0x74, - 0x36, 0x34, 0x48, 0x00, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x6c, - 0x6f, 0x61, 0x74, 0x36, 0x34, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, 0x1c, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x19, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x19, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x66, - 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x75, - 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x16, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x55, 0x0a, 0x16, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x75, 0x0a, 0x22, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, - 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x1e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x50, 0x68, 0x6f, - 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x52, - 0x0a, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x48, 0x00, 0x52, 0x13, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x19, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x61, - 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x16, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x61, 0x0a, 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x68, 0x61, - 0x32, 0x35, 0x36, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, - 0x32, 0x35, 0x36, 0x48, 0x61, 0x73, 0x68, 0x48, 0x00, 0x52, 0x18, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x68, 0x61, 0x73, 0x68, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, - 0x73, 0x73, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4e, 0x48, 0x00, 0x52, 0x11, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x73, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x52, 0x0a, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, - 0x52, 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6b, 0x0a, 0x1e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x1b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, - 0x74, 0x72, 0x65, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x78, 0x0a, 0x23, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x68, - 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x1f, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x68, 0x6f, 0x6e, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x16, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x14, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x6a, 0x0a, 0x1d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, - 0x75, 0x6e, 0x69, 0x78, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x48, 0x00, 0x52, 0x1b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x78, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x5b, 0x0a, 0x18, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, - 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x16, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, - 0x6d, 0x65, 0x48, 0x00, 0x52, 0x16, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x67, 0x0a, 0x1c, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x74, 0x63, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x74, 0x63, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x55, 0x74, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x18, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x75, 0x69, 0x64, - 0x48, 0x00, 0x52, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x75, 0x69, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x7a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x12, 0x52, 0x0a, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x48, 0x00, 0x52, + 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x19, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x5a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x5a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x75, 0x0a, 0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x65, 0x31, - 0x36, 0x34, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x31, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x1e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, - 0x72, 0x6d, 0x45, 0x31, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1b, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x48, - 0x00, 0x52, 0x18, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x69, 0x72, 0x73, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, 0x18, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x48, 0x00, - 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x6c, 0x6f, 0x61, 0x74, - 0x36, 0x34, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x1a, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x48, 0x00, - 0x52, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x75, 0x6c, 0x6c, 0x4e, - 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x78, 0x0a, 0x23, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x1f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x74, - 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x74, - 0x36, 0x34, 0x48, 0x00, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, - 0x6e, 0x74, 0x36, 0x34, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x1a, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x4c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x16, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x61, 0x0a, 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, + 0x68, 0x61, 0x32, 0x35, 0x36, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, + 0x68, 0x61, 0x32, 0x35, 0x36, 0x48, 0x61, 0x73, 0x68, 0x48, 0x00, 0x52, 0x18, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x68, 0x61, 0x73, 0x68, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x73, 0x73, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4e, 0x48, 0x00, + 0x52, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x73, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x52, 0x0a, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x48, 0x00, 0x52, 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6b, 0x0a, 0x1e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x1b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x78, 0x0a, 0x23, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x1f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x68, 0x6f, + 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, + 0x0a, 0x16, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, + 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6a, 0x0a, 0x1d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x48, 0x00, 0x52, 0x1b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x6e, + 0x69, 0x78, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x5b, 0x0a, 0x18, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x16, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x6e, 0x61, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x16, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x67, + 0x0a, 0x1c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x74, 0x63, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x74, 0x63, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x1a, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x74, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x75, + 0x69, 0x64, 0x48, 0x00, 0x52, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x75, + 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x7a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x5a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x15, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x5a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x75, 0x0a, 0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, + 0x65, 0x31, 0x36, 0x34, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x48, 0x00, 0x52, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x61, 0x73, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x68, 0x0a, 0x1d, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x21, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x68, 0x6f, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x1a, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, - 0x72, 0x6d, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x6f, 0x72, 0x6d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x4b, 0x0a, 0x12, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x73, 0x73, - 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x48, 0x00, 0x52, 0x11, 0x70, 0x61, 0x73, 0x73, 0x74, - 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x0a, 0x0a, - 0x6e, 0x75, 0x6c, 0x6c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, 0x1f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x66, 0x69, - 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, - 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x1c, 0x75, 0x73, 0x65, - 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, - 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x17, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x15, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x64, 0x0a, 0x1b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x5f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x31, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x1e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x31, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x48, 0x00, 0x52, 0x18, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x69, + 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, + 0x18, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, + 0x36, 0x34, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, + 0x48, 0x00, 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x6c, 0x6f, + 0x61, 0x74, 0x36, 0x34, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x1a, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, + 0x48, 0x00, 0x52, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x75, 0x6c, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x78, 0x0a, 0x23, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, - 0x72, 0x6d, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x19, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x64, 0x0a, 0x1b, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x63, 0x61, - 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x63, - 0x61, 0x6c, 0x48, 0x00, 0x52, 0x19, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x7a, 0x0a, 0x23, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x63, 0x68, 0x61, - 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x72, 0x6d, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x48, 0x00, 0x52, 0x1f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, + 0x72, 0x6d, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x48, 0x00, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, + 0x6d, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x1a, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x48, 0x00, 0x52, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4c, + 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x68, 0x0a, + 0x1d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x21, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x68, + 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x1a, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, + 0x72, 0x6d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x15, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x4b, 0x0a, 0x12, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x48, 0x00, 0x52, 0x11, 0x70, 0x61, 0x73, + 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, + 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x24, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, 0x1f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x1c, 0x75, + 0x73, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x17, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x15, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x64, 0x0a, 0x1b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, + 0x72, 0x6d, 0x5f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x48, 0x00, + 0x52, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4a, 0x61, 0x76, 0x61, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x64, 0x0a, 0x1b, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, + 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x69, 0x63, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x19, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x7a, 0x0a, 0x23, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x63, + 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, + 0x72, 0x53, 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, - 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x6f, 0x72, 0x6d, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x63, 0x72, - 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x61, 0x0a, 0x1a, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x48, 0x00, 0x52, 0x18, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4a, 0x61, - 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, - 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x48, - 0x00, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x70, 0x69, 0x69, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x69, 0x69, 0x54, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x16, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x69, 0x69, 0x54, 0x65, 0x78, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x68, 0x0a, 0x1d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x4e, 0x61, - 0x6d, 0x65, 0x48, 0x00, 0x52, 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x42, 0x75, - 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x5f, 0x0a, 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x2e, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x70, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x0f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x05, 0xba, 0x48, 0x02, - 0x08, 0x01, 0x22, 0xf6, 0x02, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x50, 0x69, 0x69, 0x54, 0x65, 0x78, 0x74, 0x12, 0x38, 0x0a, 0x0f, 0x73, 0x63, 0x6f, 0x72, 0x65, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, - 0x42, 0x0f, 0xba, 0x48, 0x0c, 0x0a, 0x0a, 0x1d, 0x00, 0x00, 0x80, 0x3f, 0x2d, 0x00, 0x00, 0x00, - 0x00, 0x52, 0x0e, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x12, 0x4b, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x61, 0x6e, 0x6f, - 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x69, - 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x11, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x4b, - 0x0a, 0x10, 0x64, 0x65, 0x6e, 0x79, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, - 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x69, 0x44, 0x65, 0x6e, 0x79, - 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x0f, 0x64, 0x65, 0x6e, 0x79, - 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x10, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, - 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x12, 0x1f, 0x0a, - 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x70, 0x0a, 0x11, 0x50, - 0x69, 0x69, 0x44, 0x65, 0x6e, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x72, - 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, - 0xba, 0x48, 0x17, 0x72, 0x15, 0x32, 0x13, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, - 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x2b, 0x0a, 0x0a, 0x64, 0x65, 0x6e, 0x79, 0x5f, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6e, 0x79, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x22, 0xad, 0x05, - 0x0a, 0x0d, 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x12, - 0x40, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x52, - 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, - 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x2e, - 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, - 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x73, - 0x6b, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x37, 0x0a, 0x04, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, - 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x48, 0x00, 0x52, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x1a, 0x2e, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x1a, 0x08, 0x0a, 0x06, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x1a, 0xa7, 0x01, 0x0a, - 0x04, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x26, 0x0a, 0x0c, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, - 0x5f, 0x63, 0x68, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6d, - 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x72, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, - 0x0d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x72, 0x73, 0x54, 0x6f, 0x4d, - 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, - 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x07, 0x66, 0x72, 0x6f, 0x6d, - 0x45, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x69, - 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x63, 0x68, 0x61, 0x72, - 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x66, 0x72, - 0x6f, 0x6d, 0x5f, 0x65, 0x6e, 0x64, 0x1a, 0xba, 0x01, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x43, 0x0a, 0x04, 0x61, 0x6c, 0x67, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x69, - 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x48, 0x61, 0x73, 0x68, - 0x2e, 0x48, 0x61, 0x73, 0x68, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x61, 0x6c, 0x67, - 0x6f, 0x88, 0x01, 0x01, 0x22, 0x64, 0x0a, 0x08, 0x48, 0x61, 0x73, 0x68, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x19, 0x0a, 0x15, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x48, - 0x41, 0x53, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x44, 0x35, 0x10, 0x01, 0x12, 0x14, - 0x0a, 0x10, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x48, 0x41, 0x32, - 0x35, 0x36, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x03, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, - 0x6c, 0x67, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x64, 0x0a, - 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x44, - 0x0a, 0x0a, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, - 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x54, 0x79, 0x70, - 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x22, 0x87, 0x03, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, - 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, - 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x44, 0x0a, - 0x0a, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x54, - 0x79, 0x70, 0x65, 0x48, 0x02, 0x52, 0x09, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x54, 0x79, 0x70, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x58, 0x0a, 0x14, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x03, 0x52, 0x12, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x45, - 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, - 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x0e, 0x0a, - 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x22, 0x47, 0x0a, - 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x6c, 0x75, 0x68, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x4c, 0x75, 0x68, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x5f, 0x6c, 0x75, 0x68, 0x6e, 0x22, 0x0e, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x43, 0x69, 0x74, 0x79, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x57, 0x0a, 0x17, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x31, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, - 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, - 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, - 0x61, 0x78, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x69, - 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x12, 0x2a, 0x0a, 0x0e, 0x72, - 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, - 0x53, 0x69, 0x67, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, - 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52, 0x03, 0x6d, - 0x61, 0x78, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x61, 0x6e, - 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, - 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, - 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6c, 0x6c, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x44, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x47, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0a, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, - 0x69, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x62, - 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, - 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x8c, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x64, - 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x00, 0x52, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x53, 0x69, 0x67, - 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, - 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, - 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, - 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, - 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x4c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x48, 0x61, 0x73, 0x68, 0x22, - 0x0d, 0x0a, 0x0b, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4e, 0x22, 0x59, - 0x0a, 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x31, 0x0a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x10, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x88, - 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, - 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x22, 0x59, 0x0a, 0x19, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x03, - 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, - 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x22, 0x4e, 0x0a, - 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, - 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x03, - 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, - 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x22, 0x17, 0x0a, - 0x15, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x74, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x22, 0x50, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x75, - 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x68, 0x79, - 0x70, 0x68, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x48, 0x79, 0x70, 0x68, 0x65, 0x6e, 0x73, 0x88, 0x01, 0x01, - 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x68, 0x79, 0x70, - 0x68, 0x65, 0x6e, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x5a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x5c, 0x0a, 0x18, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x31, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x56, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, - 0x72, 0x6d, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x70, + 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x61, 0x0a, + 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x2a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x18, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x58, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x2b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, + 0x79, 0x48, 0x00, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x19, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x70, 0x69, 0x69, 0x5f, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x69, 0x69, 0x54, 0x65, 0x78, 0x74, 0x48, 0x00, + 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x69, 0x69, 0x54, 0x65, + 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x68, 0x0a, 0x1d, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, + 0x4e, 0x61, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x69, + 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x2e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x17, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0x0f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x05, 0xba, + 0x48, 0x02, 0x08, 0x01, 0x22, 0xf6, 0x02, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, + 0x72, 0x6d, 0x50, 0x69, 0x69, 0x54, 0x65, 0x78, 0x74, 0x12, 0x38, 0x0a, 0x0f, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x02, 0x42, 0x0f, 0xba, 0x48, 0x0c, 0x0a, 0x0a, 0x1d, 0x00, 0x00, 0x80, 0x3f, 0x2d, 0x00, + 0x00, 0x00, 0x00, 0x52, 0x0e, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x12, 0x4b, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x61, + 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x11, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, + 0x12, 0x4b, 0x0a, 0x10, 0x64, 0x65, 0x6e, 0x79, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, + 0x7a, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x69, 0x44, 0x65, + 0x6e, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x0f, 0x64, 0x65, + 0x6e, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, + 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x5f, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x12, + 0x1f, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x70, 0x0a, + 0x11, 0x50, 0x69, 0x69, 0x44, 0x65, 0x6e, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, + 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x1a, 0xba, 0x48, 0x17, 0x72, 0x15, 0x32, 0x13, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, + 0x39, 0x2d, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x31, 0x30, 0x30, 0x7d, 0x24, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0a, 0x64, 0x65, 0x6e, 0x79, 0x5f, 0x77, 0x6f, 0x72, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6e, 0x79, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x22, + 0xad, 0x05, 0x0a, 0x0d, 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, + 0x72, 0x12, 0x40, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x64, 0x61, + 0x63, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x4d, + 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x37, 0x0a, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, + 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x48, 0x00, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x1a, 0x2e, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x08, 0x0a, 0x06, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x1a, 0xa7, + 0x01, 0x0a, 0x04, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x26, 0x0a, 0x0c, 0x6d, 0x61, 0x73, 0x6b, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x72, 0x88, 0x01, 0x01, 0x12, + 0x27, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x72, 0x73, 0x54, + 0x6f, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x07, 0x66, 0x72, + 0x6f, 0x6d, 0x45, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x63, 0x68, + 0x61, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, 0x6e, 0x64, 0x1a, 0xba, 0x01, 0x0a, 0x04, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x43, 0x0a, 0x04, 0x61, 0x6c, 0x67, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x69, 0x69, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x48, 0x61, + 0x73, 0x68, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x61, + 0x6c, 0x67, 0x6f, 0x88, 0x01, 0x01, 0x22, 0x64, 0x0a, 0x08, 0x48, 0x61, 0x73, 0x68, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, + 0x0d, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x44, 0x35, 0x10, 0x01, + 0x12, 0x14, 0x0a, 0x10, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x48, + 0x41, 0x32, 0x35, 0x36, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x03, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0x64, 0x0a, 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x44, 0x0a, 0x0a, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x54, + 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x87, 0x03, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x44, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x01, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, + 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, + 0x44, 0x0a, 0x0a, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x02, 0x52, 0x09, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x54, 0x79, + 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x58, 0x0a, 0x14, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x03, 0x52, 0x12, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, + 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x64, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x0e, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x22, + 0x47, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x61, 0x72, 0x64, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x6c, + 0x75, 0x68, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x4c, 0x75, 0x68, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x5f, 0x6c, 0x75, 0x68, 0x6e, 0x22, 0x0e, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x43, 0x69, 0x74, 0x79, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x57, 0x0a, 0x17, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x31, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, + 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, + 0x78, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, + 0x5f, 0x6d, 0x61, 0x78, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x46, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x0f, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x12, 0x2a, 0x0a, + 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, + 0x7a, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, + 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52, + 0x03, 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x09, 0x70, 0x72, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, + 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x06, 0x0a, + 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x75, + 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x44, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x47, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0a, 0x61, 0x62, 0x62, 0x72, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0a, + 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x65, 0x22, 0x1a, 0x0a, 0x18, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x50, 0x68, 0x6f, + 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x8c, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x61, + 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x53, + 0x69, 0x67, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, + 0x03, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x03, 0x6d, 0x61, + 0x78, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, + 0x7a, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, + 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x48, 0x61, 0x73, + 0x68, 0x22, 0x0d, 0x0a, 0x0b, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4e, + 0x22, 0x59, 0x0a, 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x31, 0x0a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x75, + 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x10, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0x59, 0x0a, 0x19, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x42, + 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x22, + 0x4e, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x42, + 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x22, + 0x17, 0x0a, 0x15, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, 0x14, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x55, 0x74, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0x50, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x55, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, + 0x68, 0x79, 0x70, 0x68, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x48, 0x79, 0x70, 0x68, 0x65, 0x6e, 0x73, 0x88, + 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x68, + 0x79, 0x70, 0x68, 0x65, 0x6e, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x5a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x5c, 0x0a, 0x18, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x31, 0x36, 0x34, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, + 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x56, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, + 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, + 0xc4, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x6c, 0x6f, + 0x61, 0x74, 0x36, 0x34, 0x12, 0x3b, 0x0a, 0x17, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x15, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x69, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x01, 0x48, 0x01, 0x52, 0x15, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x42, 0x1a, + 0x0a, 0x18, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x72, + 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x22, 0x55, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x01, - 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x6c, 0x6f, 0x61, 0x74, - 0x36, 0x34, 0x12, 0x3b, 0x0a, 0x17, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x15, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x5d, 0x0a, + 0x19, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x50, + 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc2, 0x01, 0x0a, + 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x3b, 0x0a, 0x17, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, - 0x48, 0x01, 0x52, 0x15, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, - 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x72, 0x61, 0x6e, - 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x5f, 0x6d, 0x61, 0x78, 0x22, 0x55, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, - 0x6d, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x5d, 0x0a, 0x19, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x50, 0x68, 0x6f, - 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc2, 0x01, 0x0a, 0x0e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x3b, 0x0a, - 0x17, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, - 0x52, 0x15, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x72, 0x61, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x00, 0x52, 0x15, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, + 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, + 0x15, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x15, 0x72, - 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x4d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x72, 0x61, 0x6e, 0x64, - 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x6d, 0x69, 0x6e, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x22, - 0x55, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, - 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x58, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x6f, 0x72, 0x6d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, - 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, - 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0x53, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, - 0x6f, 0x75, 0x67, 0x68, 0x22, 0x06, 0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x22, 0x29, 0x0a, 0x13, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, + 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, + 0x78, 0x22, 0x55, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x61, + 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x58, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, + 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0x53, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, + 0x52, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x61, 0x73, 0x73, 0x74, + 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x22, 0x06, 0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x22, 0x29, + 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4a, 0x61, 0x76, 0x61, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x38, 0x0a, 0x1c, 0x55, 0x73, 0x65, + 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, + 0x6d, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x21, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x3a, 0x0a, 0x22, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4a, 0x61, 0x76, 0x61, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x12, 0x23, + 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x22, 0x69, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x43, + 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c, 0x65, + 0x12, 0x33, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x64, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x11, 0x75, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x52, 0x65, 0x67, + 0x65, 0x78, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x22, 0x28, 0x0a, + 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x38, 0x0a, 0x1c, 0x55, 0x73, 0x65, 0x72, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x5f, 0x0a, 0x21, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x22, 0x3a, 0x0a, 0x22, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x49, - 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, - 0x72, 0x69, 0x63, 0x61, 0x6c, 0x12, 0x23, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, - 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x63, - 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x69, 0x0a, 0x1a, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, - 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x12, 0x33, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x75, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x64, 0x52, 0x65, 0x67, 0x65, 0x78, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, - 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x5f, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x4a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x6d, - 0x0a, 0x1c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x67, 0x65, 0x78, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, - 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x5f, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x75, 0x73, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x52, 0x65, 0x67, 0x65, 0x78, 0x22, 0x35, 0x0a, + 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x54, 0x0a, 0x1c, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x65, 0x78, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x75, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x64, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x65, 0x78, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, diff --git a/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.go b/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.go index d01189e7e6..42ba877e05 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.go @@ -139,10 +139,6 @@ type AccountStatus int32 const ( // Default value, should be used when no reason is specified AccountStatus_ACCOUNT_STATUS_REASON_UNSPECIFIED AccountStatus = 0 - // @deprecated - Current usage exceeds allowed limit - AccountStatus_ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT AccountStatus = 1 - // @deprecated - Adding requested records exceeds the allowed limit - AccountStatus_ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT AccountStatus = 2 // Account is currently in an expired state AccountStatus_ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE AccountStatus = 3 // The account is currently in an active trial period @@ -155,16 +151,12 @@ const ( var ( AccountStatus_name = map[int32]string{ 0: "ACCOUNT_STATUS_REASON_UNSPECIFIED", - 1: "ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT", - 2: "ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT", 3: "ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE", 4: "ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE", 5: "ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED", } AccountStatus_value = map[string]int32{ "ACCOUNT_STATUS_REASON_UNSPECIFIED": 0, - "ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT": 1, - "ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT": 2, "ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE": 3, "ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE": 4, "ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED": 5, @@ -2007,8 +1999,11 @@ type GetSystemInformationResponse struct { // The Go compiler flag that was used to build this version of Neosync Compiler string `protobuf:"bytes,3,opt,name=compiler,proto3" json:"compiler,omitempty"` // The Go platform flag that was used to build this version of Neosync - Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"` + Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"` + // The time when the build was created BuildDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"` + // The license information for the system + License *SystemLicense `protobuf:"bytes,6,opt,name=license,proto3" json:"license,omitempty"` } func (x *GetSystemInformationResponse) Reset() { @@ -2076,6 +2071,77 @@ func (x *GetSystemInformationResponse) GetBuildDate() *timestamppb.Timestamp { return nil } +func (x *GetSystemInformationResponse) GetLicense() *SystemLicense { + if x != nil { + return x.License + } + return nil +} + +type SystemLicense struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether or not a valid license was found + IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` + // The time when the license expires + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + // Whether or not the license is for NeosyncCloud + IsNeosyncCloud bool `protobuf:"varint,3,opt,name=is_neosync_cloud,json=isNeosyncCloud,proto3" json:"is_neosync_cloud,omitempty"` +} + +func (x *SystemLicense) Reset() { + *x = SystemLicense{} + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SystemLicense) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SystemLicense) ProtoMessage() {} + +func (x *SystemLicense) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SystemLicense.ProtoReflect.Descriptor instead. +func (*SystemLicense) Descriptor() ([]byte, []int) { + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{36} +} + +func (x *SystemLicense) GetIsValid() bool { + if x != nil { + return x.IsValid + } + return false +} + +func (x *SystemLicense) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *SystemLicense) GetIsNeosyncCloud() bool { + if x != nil { + return x.IsNeosyncCloud + } + return false +} + type GetAccountOnboardingConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2086,7 +2152,7 @@ type GetAccountOnboardingConfigRequest struct { func (x *GetAccountOnboardingConfigRequest) Reset() { *x = GetAccountOnboardingConfigRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[36] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2098,7 +2164,7 @@ func (x *GetAccountOnboardingConfigRequest) String() string { func (*GetAccountOnboardingConfigRequest) ProtoMessage() {} func (x *GetAccountOnboardingConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[36] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2111,7 +2177,7 @@ func (x *GetAccountOnboardingConfigRequest) ProtoReflect() protoreflect.Message // Deprecated: Use GetAccountOnboardingConfigRequest.ProtoReflect.Descriptor instead. func (*GetAccountOnboardingConfigRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{36} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{37} } func (x *GetAccountOnboardingConfigRequest) GetAccountId() string { @@ -2131,7 +2197,7 @@ type GetAccountOnboardingConfigResponse struct { func (x *GetAccountOnboardingConfigResponse) Reset() { *x = GetAccountOnboardingConfigResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[37] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2143,7 +2209,7 @@ func (x *GetAccountOnboardingConfigResponse) String() string { func (*GetAccountOnboardingConfigResponse) ProtoMessage() {} func (x *GetAccountOnboardingConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[37] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2156,7 +2222,7 @@ func (x *GetAccountOnboardingConfigResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetAccountOnboardingConfigResponse.ProtoReflect.Descriptor instead. func (*GetAccountOnboardingConfigResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{37} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{38} } func (x *GetAccountOnboardingConfigResponse) GetConfig() *AccountOnboardingConfig { @@ -2177,7 +2243,7 @@ type SetAccountOnboardingConfigRequest struct { func (x *SetAccountOnboardingConfigRequest) Reset() { *x = SetAccountOnboardingConfigRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[38] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2189,7 +2255,7 @@ func (x *SetAccountOnboardingConfigRequest) String() string { func (*SetAccountOnboardingConfigRequest) ProtoMessage() {} func (x *SetAccountOnboardingConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[38] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2202,7 +2268,7 @@ func (x *SetAccountOnboardingConfigRequest) ProtoReflect() protoreflect.Message // Deprecated: Use SetAccountOnboardingConfigRequest.ProtoReflect.Descriptor instead. func (*SetAccountOnboardingConfigRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{38} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{39} } func (x *SetAccountOnboardingConfigRequest) GetAccountId() string { @@ -2229,7 +2295,7 @@ type SetAccountOnboardingConfigResponse struct { func (x *SetAccountOnboardingConfigResponse) Reset() { *x = SetAccountOnboardingConfigResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[39] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2241,7 +2307,7 @@ func (x *SetAccountOnboardingConfigResponse) String() string { func (*SetAccountOnboardingConfigResponse) ProtoMessage() {} func (x *SetAccountOnboardingConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[39] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2254,7 +2320,7 @@ func (x *SetAccountOnboardingConfigResponse) ProtoReflect() protoreflect.Message // Deprecated: Use SetAccountOnboardingConfigResponse.ProtoReflect.Descriptor instead. func (*SetAccountOnboardingConfigResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{39} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{40} } func (x *SetAccountOnboardingConfigResponse) GetConfig() *AccountOnboardingConfig { @@ -2269,20 +2335,12 @@ type AccountOnboardingConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // @deprecated - use has_completed_onboarding - HasCreatedSourceConnection bool `protobuf:"varint,1,opt,name=has_created_source_connection,json=hasCreatedSourceConnection,proto3" json:"has_created_source_connection,omitempty"` - // @deprecated - use has_completed_onboarding - HasCreatedDestinationConnection bool `protobuf:"varint,2,opt,name=has_created_destination_connection,json=hasCreatedDestinationConnection,proto3" json:"has_created_destination_connection,omitempty"` - // @deprecated - use has_completed_onboarding - HasCreatedJob bool `protobuf:"varint,3,opt,name=has_created_job,json=hasCreatedJob,proto3" json:"has_created_job,omitempty"` - // @deprecated - use has_completed_onboarding - HasInvitedMembers bool `protobuf:"varint,4,opt,name=has_invited_members,json=hasInvitedMembers,proto3" json:"has_invited_members,omitempty"` HasCompletedOnboarding bool `protobuf:"varint,5,opt,name=has_completed_onboarding,json=hasCompletedOnboarding,proto3" json:"has_completed_onboarding,omitempty"` } func (x *AccountOnboardingConfig) Reset() { *x = AccountOnboardingConfig{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[40] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2294,7 +2352,7 @@ func (x *AccountOnboardingConfig) String() string { func (*AccountOnboardingConfig) ProtoMessage() {} func (x *AccountOnboardingConfig) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[40] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2307,35 +2365,7 @@ func (x *AccountOnboardingConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountOnboardingConfig.ProtoReflect.Descriptor instead. func (*AccountOnboardingConfig) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{40} -} - -func (x *AccountOnboardingConfig) GetHasCreatedSourceConnection() bool { - if x != nil { - return x.HasCreatedSourceConnection - } - return false -} - -func (x *AccountOnboardingConfig) GetHasCreatedDestinationConnection() bool { - if x != nil { - return x.HasCreatedDestinationConnection - } - return false -} - -func (x *AccountOnboardingConfig) GetHasCreatedJob() bool { - if x != nil { - return x.HasCreatedJob - } - return false -} - -func (x *AccountOnboardingConfig) GetHasInvitedMembers() bool { - if x != nil { - return x.HasInvitedMembers - } - return false + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{41} } func (x *AccountOnboardingConfig) GetHasCompletedOnboarding() bool { @@ -2355,7 +2385,7 @@ type GetAccountStatusRequest struct { func (x *GetAccountStatusRequest) Reset() { *x = GetAccountStatusRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[41] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2367,7 +2397,7 @@ func (x *GetAccountStatusRequest) String() string { func (*GetAccountStatusRequest) ProtoMessage() {} func (x *GetAccountStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[41] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2380,7 +2410,7 @@ func (x *GetAccountStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAccountStatusRequest.ProtoReflect.Descriptor instead. func (*GetAccountStatusRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{41} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{42} } func (x *GetAccountStatusRequest) GetAccountId() string { @@ -2406,7 +2436,7 @@ type GetAccountStatusResponse struct { func (x *GetAccountStatusResponse) Reset() { *x = GetAccountStatusResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[42] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2418,7 +2448,7 @@ func (x *GetAccountStatusResponse) String() string { func (*GetAccountStatusResponse) ProtoMessage() {} func (x *GetAccountStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[42] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2431,7 +2461,7 @@ func (x *GetAccountStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAccountStatusResponse.ProtoReflect.Descriptor instead. func (*GetAccountStatusResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{42} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{43} } func (x *GetAccountStatusResponse) GetUsedRecordCount() uint64 { @@ -2467,7 +2497,7 @@ type IsAccountStatusValidRequest struct { func (x *IsAccountStatusValidRequest) Reset() { *x = IsAccountStatusValidRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[43] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2479,7 +2509,7 @@ func (x *IsAccountStatusValidRequest) String() string { func (*IsAccountStatusValidRequest) ProtoMessage() {} func (x *IsAccountStatusValidRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[43] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2492,7 +2522,7 @@ func (x *IsAccountStatusValidRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use IsAccountStatusValidRequest.ProtoReflect.Descriptor instead. func (*IsAccountStatusValidRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{43} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{44} } func (x *IsAccountStatusValidRequest) GetAccountId() string { @@ -2519,13 +2549,6 @@ type IsAccountStatusValidResponse struct { Reason *string `protobuf:"bytes,2,opt,name=reason,proto3,oneof" json:"reason,omitempty"` // Whether or not the process should decide to continue polling for validitiy updates ShouldPoll bool `protobuf:"varint,3,opt,name=should_poll,json=shouldPoll,proto3" json:"should_poll,omitempty"` - // A count of the currently used records for the current billing period. - // This may go over the allowed record count depending on when the record count is polled by the metric system. - // @deprecated - UsedRecordCount uint64 `protobuf:"varint,4,opt,name=used_record_count,json=usedRecordCount,proto3" json:"used_record_count,omitempty"` - // The allowed record count. It will be null if there is no limit. - // @deprecated - AllowedRecordCount *uint64 `protobuf:"varint,5,opt,name=allowed_record_count,json=allowedRecordCount,proto3,oneof" json:"allowed_record_count,omitempty"` // The current status of the account. Default is valid. AccountStatus AccountStatus `protobuf:"varint,6,opt,name=account_status,json=accountStatus,proto3,enum=mgmt.v1alpha1.AccountStatus" json:"account_status,omitempty"` // The time when the trial expires @@ -2534,7 +2557,7 @@ type IsAccountStatusValidResponse struct { func (x *IsAccountStatusValidResponse) Reset() { *x = IsAccountStatusValidResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[44] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2546,7 +2569,7 @@ func (x *IsAccountStatusValidResponse) String() string { func (*IsAccountStatusValidResponse) ProtoMessage() {} func (x *IsAccountStatusValidResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[44] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2559,7 +2582,7 @@ func (x *IsAccountStatusValidResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use IsAccountStatusValidResponse.ProtoReflect.Descriptor instead. func (*IsAccountStatusValidResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{44} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{45} } func (x *IsAccountStatusValidResponse) GetIsValid() bool { @@ -2583,20 +2606,6 @@ func (x *IsAccountStatusValidResponse) GetShouldPoll() bool { return false } -func (x *IsAccountStatusValidResponse) GetUsedRecordCount() uint64 { - if x != nil { - return x.UsedRecordCount - } - return 0 -} - -func (x *IsAccountStatusValidResponse) GetAllowedRecordCount() uint64 { - if x != nil && x.AllowedRecordCount != nil { - return *x.AllowedRecordCount - } - return 0 -} - func (x *IsAccountStatusValidResponse) GetAccountStatus() AccountStatus { if x != nil { return x.AccountStatus @@ -2621,7 +2630,7 @@ type GetAccountBillingCheckoutSessionRequest struct { func (x *GetAccountBillingCheckoutSessionRequest) Reset() { *x = GetAccountBillingCheckoutSessionRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[45] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2633,7 +2642,7 @@ func (x *GetAccountBillingCheckoutSessionRequest) String() string { func (*GetAccountBillingCheckoutSessionRequest) ProtoMessage() {} func (x *GetAccountBillingCheckoutSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[45] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2646,7 +2655,7 @@ func (x *GetAccountBillingCheckoutSessionRequest) ProtoReflect() protoreflect.Me // Deprecated: Use GetAccountBillingCheckoutSessionRequest.ProtoReflect.Descriptor instead. func (*GetAccountBillingCheckoutSessionRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{45} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{46} } func (x *GetAccountBillingCheckoutSessionRequest) GetAccountId() string { @@ -2667,7 +2676,7 @@ type GetAccountBillingCheckoutSessionResponse struct { func (x *GetAccountBillingCheckoutSessionResponse) Reset() { *x = GetAccountBillingCheckoutSessionResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[46] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2679,7 +2688,7 @@ func (x *GetAccountBillingCheckoutSessionResponse) String() string { func (*GetAccountBillingCheckoutSessionResponse) ProtoMessage() {} func (x *GetAccountBillingCheckoutSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[46] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2692,7 +2701,7 @@ func (x *GetAccountBillingCheckoutSessionResponse) ProtoReflect() protoreflect.M // Deprecated: Use GetAccountBillingCheckoutSessionResponse.ProtoReflect.Descriptor instead. func (*GetAccountBillingCheckoutSessionResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{46} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{47} } func (x *GetAccountBillingCheckoutSessionResponse) GetCheckoutSessionUrl() string { @@ -2712,7 +2721,7 @@ type GetAccountBillingPortalSessionRequest struct { func (x *GetAccountBillingPortalSessionRequest) Reset() { *x = GetAccountBillingPortalSessionRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[47] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2724,7 +2733,7 @@ func (x *GetAccountBillingPortalSessionRequest) String() string { func (*GetAccountBillingPortalSessionRequest) ProtoMessage() {} func (x *GetAccountBillingPortalSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[47] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2737,7 +2746,7 @@ func (x *GetAccountBillingPortalSessionRequest) ProtoReflect() protoreflect.Mess // Deprecated: Use GetAccountBillingPortalSessionRequest.ProtoReflect.Descriptor instead. func (*GetAccountBillingPortalSessionRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{47} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{48} } func (x *GetAccountBillingPortalSessionRequest) GetAccountId() string { @@ -2758,7 +2767,7 @@ type GetAccountBillingPortalSessionResponse struct { func (x *GetAccountBillingPortalSessionResponse) Reset() { *x = GetAccountBillingPortalSessionResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[48] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2770,7 +2779,7 @@ func (x *GetAccountBillingPortalSessionResponse) String() string { func (*GetAccountBillingPortalSessionResponse) ProtoMessage() {} func (x *GetAccountBillingPortalSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[48] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2783,7 +2792,7 @@ func (x *GetAccountBillingPortalSessionResponse) ProtoReflect() protoreflect.Mes // Deprecated: Use GetAccountBillingPortalSessionResponse.ProtoReflect.Descriptor instead. func (*GetAccountBillingPortalSessionResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{48} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{49} } func (x *GetAccountBillingPortalSessionResponse) GetPortalSessionUrl() string { @@ -2804,7 +2813,7 @@ type GetBillingAccountsRequest struct { func (x *GetBillingAccountsRequest) Reset() { *x = GetBillingAccountsRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[49] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2816,7 +2825,7 @@ func (x *GetBillingAccountsRequest) String() string { func (*GetBillingAccountsRequest) ProtoMessage() {} func (x *GetBillingAccountsRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[49] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2829,7 +2838,7 @@ func (x *GetBillingAccountsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBillingAccountsRequest.ProtoReflect.Descriptor instead. func (*GetBillingAccountsRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{49} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{50} } func (x *GetBillingAccountsRequest) GetAccountIds() []string { @@ -2849,7 +2858,7 @@ type GetBillingAccountsResponse struct { func (x *GetBillingAccountsResponse) Reset() { *x = GetBillingAccountsResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[50] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2861,7 +2870,7 @@ func (x *GetBillingAccountsResponse) String() string { func (*GetBillingAccountsResponse) ProtoMessage() {} func (x *GetBillingAccountsResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[50] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2874,7 +2883,7 @@ func (x *GetBillingAccountsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBillingAccountsResponse.ProtoReflect.Descriptor instead. func (*GetBillingAccountsResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{50} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{51} } func (x *GetBillingAccountsResponse) GetAccounts() []*UserAccount { @@ -2903,7 +2912,7 @@ type SetBillingMeterEventRequest struct { func (x *SetBillingMeterEventRequest) Reset() { *x = SetBillingMeterEventRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[51] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2915,7 +2924,7 @@ func (x *SetBillingMeterEventRequest) String() string { func (*SetBillingMeterEventRequest) ProtoMessage() {} func (x *SetBillingMeterEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[51] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2928,7 +2937,7 @@ func (x *SetBillingMeterEventRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetBillingMeterEventRequest.ProtoReflect.Descriptor instead. func (*SetBillingMeterEventRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{51} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{52} } func (x *SetBillingMeterEventRequest) GetAccountId() string { @@ -2974,7 +2983,7 @@ type SetBillingMeterEventResponse struct { func (x *SetBillingMeterEventResponse) Reset() { *x = SetBillingMeterEventResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[52] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2986,7 +2995,7 @@ func (x *SetBillingMeterEventResponse) String() string { func (*SetBillingMeterEventResponse) ProtoMessage() {} func (x *SetBillingMeterEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[52] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2999,7 +3008,7 @@ func (x *SetBillingMeterEventResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetBillingMeterEventResponse.ProtoReflect.Descriptor instead. func (*SetBillingMeterEventResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{52} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{53} } type SetUserRoleRequest struct { @@ -3017,7 +3026,7 @@ type SetUserRoleRequest struct { func (x *SetUserRoleRequest) Reset() { *x = SetUserRoleRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[53] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3029,7 +3038,7 @@ func (x *SetUserRoleRequest) String() string { func (*SetUserRoleRequest) ProtoMessage() {} func (x *SetUserRoleRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[53] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3042,7 +3051,7 @@ func (x *SetUserRoleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetUserRoleRequest.ProtoReflect.Descriptor instead. func (*SetUserRoleRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{53} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{54} } func (x *SetUserRoleRequest) GetAccountId() string { @@ -3074,7 +3083,7 @@ type SetUserRoleResponse struct { func (x *SetUserRoleResponse) Reset() { *x = SetUserRoleResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[54] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3086,7 +3095,7 @@ func (x *SetUserRoleResponse) String() string { func (*SetUserRoleResponse) ProtoMessage() {} func (x *SetUserRoleResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[54] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3099,7 +3108,7 @@ func (x *SetUserRoleResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetUserRoleResponse.ProtoReflect.Descriptor instead. func (*SetUserRoleResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{54} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{55} } var File_mgmt_v1alpha1_user_account_proto protoreflect.FileDescriptor @@ -3316,7 +3325,7 @@ var file_mgmt_v1alpha1_user_account_proto_rawDesc = []byte{ 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0xc3, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, + 0x22, 0xfb, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x63, @@ -3328,411 +3337,403 @@ var file_mgmt_v1alpha1_user_account_proto_rawDesc = []byte{ 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x22, 0x4c, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01, 0x0a, 0x21, 0x53, - 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4c, 0x69, + 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x8f, + 0x01, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, 0x6e, 0x65, 0x6f, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0e, 0x69, 0x73, 0x4e, 0x65, 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x22, 0x4c, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, + 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x64, + 0x0a, 0x22, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01, 0x0a, 0x21, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, + 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x64, 0x0a, 0x22, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x64, 0x0a, 0x22, 0x53, 0x65, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, - 0xbb, 0x02, 0x0a, 0x17, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x1d, 0x68, - 0x61, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x1a, 0x68, 0x61, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, - 0x0a, 0x22, 0x68, 0x61, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x68, 0x61, 0x73, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x68, - 0x61, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x68, 0x61, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x4a, 0x6f, 0x62, 0x12, 0x2e, 0x0a, 0x13, 0x68, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x11, 0x68, 0x61, 0x73, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x68, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x68, 0x61, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x42, 0x0a, - 0x17, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, - 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x64, 0x22, 0xe5, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, - 0x0a, 0x11, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x64, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x14, 0x61, 0x6c, + 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x6b, 0x0a, 0x17, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x18, 0x68, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x68, 0x61, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x4a, 0x04, + 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, + 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x42, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, + 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xe5, 0x01, 0x0a, 0x18, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x64, 0x5f, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x00, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x13, 0x73, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x12, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x4d, 0x0a, 0x13, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, - 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x12, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x1b, 0x49, 0x73, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, - 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x39, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, - 0x17, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa3, 0x03, 0x0a, 0x1c, 0x49, 0x73, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, - 0x01, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x50, 0x6f, - 0x6c, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x75, - 0x73, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, - 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x12, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, + 0x6e, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x1b, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x16, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x14, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0xb3, 0x02, 0x0a, 0x1c, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x1b, 0x0a, + 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, + 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x50, 0x6f, 0x6c, 0x6c, 0x12, 0x43, 0x0a, 0x0e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x49, 0x0a, 0x10, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0e, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x74, 0x72, 0x69, 0x61, 0x6c, + 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, + 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x52, 0x0a, 0x27, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x5c, 0x0a, 0x28, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x50, 0x0a, 0x25, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x56, 0x0a, 0x26, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x55, 0x72, 0x6c, 0x22, 0x3c, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x73, 0x22, 0x54, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x36, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0xe2, 0x01, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x42, + 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x26, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x1e, 0x0a, 0x1c, + 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x90, 0x01, 0x0a, + 0x12, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, + 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, + 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x2e, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x74, 0x72, - 0x69, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x48, 0x02, 0x52, 0x0e, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, - 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x74, 0x72, - 0x69, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x22, 0x52, - 0x0a, 0x27, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, - 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, - 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x22, 0x5c, 0x0a, 0x28, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, - 0x0a, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, - 0x22, 0x50, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, - 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, - 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x22, 0x56, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, - 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x75, - 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x3c, 0x0a, 0x19, 0x47, 0x65, - 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, - 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0xe2, - 0x01, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, - 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, - 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, - 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x21, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x22, 0x1e, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, - 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, - 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x92, 0x01, - 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, - 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, - 0x41, 0x4c, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, - 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x02, - 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x50, 0x52, 0x49, 0x53, 0x45, - 0x10, 0x03, 0x2a, 0xa9, 0x01, 0x0a, 0x0d, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, - 0x1a, 0x0a, 0x16, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x42, - 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, - 0x49, 0x41, 0x4c, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, - 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, - 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x8c, - 0x02, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x25, 0x0a, 0x21, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x28, 0x0a, 0x24, 0x41, 0x43, 0x43, 0x4f, 0x55, - 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, - 0x53, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, - 0x01, 0x12, 0x2a, 0x0a, 0x26, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x45, 0x58, - 0x43, 0x45, 0x45, 0x44, 0x53, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x12, 0x2b, 0x0a, - 0x27, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, - 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x27, 0x0a, 0x23, 0x41, 0x43, - 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, - 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, - 0x45, 0x10, 0x04, 0x12, 0x28, 0x0a, 0x24, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x52, - 0x49, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x05, 0x2a, 0x9f, 0x01, - 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1c, 0x0a, - 0x18, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, - 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, - 0x4e, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, - 0x4f, 0x4c, 0x45, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x56, 0x45, 0x4c, 0x4f, 0x50, 0x45, - 0x52, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, - 0x4f, 0x4c, 0x45, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x45, 0x52, 0x10, 0x03, - 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, - 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x10, 0x04, 0x32, - 0xf8, 0x16, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, - 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, - 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x89, 0x01, 0x0a, 0x1c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, - 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x32, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, - 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, 0x72, 0x73, - 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x11, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x49, 0x73, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x49, 0x73, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x18, 0x47, 0x65, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, - 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, - 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x65, - 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x12, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, + 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x92, 0x01, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x55, 0x53, + 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, + 0x1a, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x1a, 0x0a, + 0x16, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53, 0x45, + 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, + 0x4e, 0x54, 0x45, 0x52, 0x50, 0x52, 0x49, 0x53, 0x45, 0x10, 0x03, 0x2a, 0xa9, 0x01, 0x0a, 0x0d, + 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, + 0x1a, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, + 0x15, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x49, 0x4c, 0x4c, + 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x45, 0x58, + 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x90, 0x02, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x21, 0x41, 0x43, 0x43, + 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x2b, 0x0a, 0x27, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x58, + 0x50, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x27, 0x0a, + 0x23, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x12, 0x28, 0x0a, 0x24, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, + 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, + 0x5f, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x05, + 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x2a, 0x24, 0x41, 0x43, + 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x43, + 0x45, 0x45, 0x44, 0x53, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x4d, + 0x49, 0x54, 0x2a, 0x26, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x45, 0x58, 0x43, + 0x45, 0x45, 0x44, 0x53, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x2a, 0x9f, 0x01, 0x0a, 0x0b, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x43, + 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x43, 0x4f, + 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, + 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, + 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x56, 0x45, 0x4c, 0x4f, 0x50, 0x45, 0x52, 0x10, 0x02, + 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, + 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x45, 0x52, 0x10, 0x03, 0x12, 0x1d, 0x0a, + 0x19, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4a, 0x4f, + 0x42, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x10, 0x04, 0x32, 0xf8, 0x16, 0x0a, + 0x12, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, - 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, - 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, - 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x49, 0x6e, 0x76, - 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, - 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, - 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x12, 0x2b, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4a, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, - 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x6b, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, + 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x89, 0x01, 0x0a, + 0x1c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, + 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x32, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x54, + 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x33, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, + 0x6c, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, + 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x49, 0x73, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, + 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, + 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, + 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, + 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x54, 0x65, + 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x54, 0x65, 0x61, + 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x74, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, - 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x41, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, - 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x83, 0x01, 0x0a, 0x1a, 0x47, 0x65, - 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, - 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, + 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x74, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x83, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x83, 0x01, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, - 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x31, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, - 0x74, 0x0a, 0x14, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x95, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, - 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, - 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, - 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x34, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, - 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x83, 0x01, 0x0a, + 0x1a, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, + 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x68, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x6e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x74, 0x0a, 0x14, + 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x12, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, + 0x02, 0x01, 0x12, 0x95, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, + 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x37, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, - 0x71, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, - 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, - 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, - 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, - 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xcc, 0x01, 0x0a, 0x11, 0x63, - 0x6f, 0x6d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6e, 0x75, 0x63, 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, - 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, - 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, - 0x67, 0x6d, 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, - 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, - 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, - 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x74, 0x73, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x71, 0x0a, 0x14, + 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, + 0x65, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x56, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x21, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xcc, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, + 0x63, 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, + 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3748,7 +3749,7 @@ func file_mgmt_v1alpha1_user_account_proto_rawDescGZIP() []byte { } var file_mgmt_v1alpha1_user_account_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_mgmt_v1alpha1_user_account_proto_msgTypes = make([]protoimpl.MessageInfo, 55) +var file_mgmt_v1alpha1_user_account_proto_msgTypes = make([]protoimpl.MessageInfo, 56) var file_mgmt_v1alpha1_user_account_proto_goTypes = []any{ (UserAccountType)(0), // 0: mgmt.v1alpha1.UserAccountType (BillingStatus)(0), // 1: mgmt.v1alpha1.BillingStatus @@ -3790,26 +3791,27 @@ var file_mgmt_v1alpha1_user_account_proto_goTypes = []any{ (*AcceptTeamAccountInviteResponse)(nil), // 37: mgmt.v1alpha1.AcceptTeamAccountInviteResponse (*GetSystemInformationRequest)(nil), // 38: mgmt.v1alpha1.GetSystemInformationRequest (*GetSystemInformationResponse)(nil), // 39: mgmt.v1alpha1.GetSystemInformationResponse - (*GetAccountOnboardingConfigRequest)(nil), // 40: mgmt.v1alpha1.GetAccountOnboardingConfigRequest - (*GetAccountOnboardingConfigResponse)(nil), // 41: mgmt.v1alpha1.GetAccountOnboardingConfigResponse - (*SetAccountOnboardingConfigRequest)(nil), // 42: mgmt.v1alpha1.SetAccountOnboardingConfigRequest - (*SetAccountOnboardingConfigResponse)(nil), // 43: mgmt.v1alpha1.SetAccountOnboardingConfigResponse - (*AccountOnboardingConfig)(nil), // 44: mgmt.v1alpha1.AccountOnboardingConfig - (*GetAccountStatusRequest)(nil), // 45: mgmt.v1alpha1.GetAccountStatusRequest - (*GetAccountStatusResponse)(nil), // 46: mgmt.v1alpha1.GetAccountStatusResponse - (*IsAccountStatusValidRequest)(nil), // 47: mgmt.v1alpha1.IsAccountStatusValidRequest - (*IsAccountStatusValidResponse)(nil), // 48: mgmt.v1alpha1.IsAccountStatusValidResponse - (*GetAccountBillingCheckoutSessionRequest)(nil), // 49: mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest - (*GetAccountBillingCheckoutSessionResponse)(nil), // 50: mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse - (*GetAccountBillingPortalSessionRequest)(nil), // 51: mgmt.v1alpha1.GetAccountBillingPortalSessionRequest - (*GetAccountBillingPortalSessionResponse)(nil), // 52: mgmt.v1alpha1.GetAccountBillingPortalSessionResponse - (*GetBillingAccountsRequest)(nil), // 53: mgmt.v1alpha1.GetBillingAccountsRequest - (*GetBillingAccountsResponse)(nil), // 54: mgmt.v1alpha1.GetBillingAccountsResponse - (*SetBillingMeterEventRequest)(nil), // 55: mgmt.v1alpha1.SetBillingMeterEventRequest - (*SetBillingMeterEventResponse)(nil), // 56: mgmt.v1alpha1.SetBillingMeterEventResponse - (*SetUserRoleRequest)(nil), // 57: mgmt.v1alpha1.SetUserRoleRequest - (*SetUserRoleResponse)(nil), // 58: mgmt.v1alpha1.SetUserRoleResponse - (*timestamppb.Timestamp)(nil), // 59: google.protobuf.Timestamp + (*SystemLicense)(nil), // 40: mgmt.v1alpha1.SystemLicense + (*GetAccountOnboardingConfigRequest)(nil), // 41: mgmt.v1alpha1.GetAccountOnboardingConfigRequest + (*GetAccountOnboardingConfigResponse)(nil), // 42: mgmt.v1alpha1.GetAccountOnboardingConfigResponse + (*SetAccountOnboardingConfigRequest)(nil), // 43: mgmt.v1alpha1.SetAccountOnboardingConfigRequest + (*SetAccountOnboardingConfigResponse)(nil), // 44: mgmt.v1alpha1.SetAccountOnboardingConfigResponse + (*AccountOnboardingConfig)(nil), // 45: mgmt.v1alpha1.AccountOnboardingConfig + (*GetAccountStatusRequest)(nil), // 46: mgmt.v1alpha1.GetAccountStatusRequest + (*GetAccountStatusResponse)(nil), // 47: mgmt.v1alpha1.GetAccountStatusResponse + (*IsAccountStatusValidRequest)(nil), // 48: mgmt.v1alpha1.IsAccountStatusValidRequest + (*IsAccountStatusValidResponse)(nil), // 49: mgmt.v1alpha1.IsAccountStatusValidResponse + (*GetAccountBillingCheckoutSessionRequest)(nil), // 50: mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest + (*GetAccountBillingCheckoutSessionResponse)(nil), // 51: mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse + (*GetAccountBillingPortalSessionRequest)(nil), // 52: mgmt.v1alpha1.GetAccountBillingPortalSessionRequest + (*GetAccountBillingPortalSessionResponse)(nil), // 53: mgmt.v1alpha1.GetAccountBillingPortalSessionResponse + (*GetBillingAccountsRequest)(nil), // 54: mgmt.v1alpha1.GetBillingAccountsRequest + (*GetBillingAccountsResponse)(nil), // 55: mgmt.v1alpha1.GetBillingAccountsResponse + (*SetBillingMeterEventRequest)(nil), // 56: mgmt.v1alpha1.SetBillingMeterEventRequest + (*SetBillingMeterEventResponse)(nil), // 57: mgmt.v1alpha1.SetBillingMeterEventResponse + (*SetUserRoleRequest)(nil), // 58: mgmt.v1alpha1.SetUserRoleRequest + (*SetUserRoleResponse)(nil), // 59: mgmt.v1alpha1.SetUserRoleResponse + (*timestamppb.Timestamp)(nil), // 60: google.protobuf.Timestamp } var file_mgmt_v1alpha1_user_account_proto_depIdxs = []int32{ 10, // 0: mgmt.v1alpha1.GetUserAccountsResponse.accounts:type_name -> mgmt.v1alpha1.UserAccount @@ -3820,77 +3822,79 @@ var file_mgmt_v1alpha1_user_account_proto_depIdxs = []int32{ 3, // 5: mgmt.v1alpha1.AccountUser.role:type_name -> mgmt.v1alpha1.AccountRole 24, // 6: mgmt.v1alpha1.GetTeamAccountMembersResponse.users:type_name -> mgmt.v1alpha1.AccountUser 3, // 7: mgmt.v1alpha1.InviteUserToTeamAccountRequest.role:type_name -> mgmt.v1alpha1.AccountRole - 59, // 8: mgmt.v1alpha1.AccountInvite.created_at:type_name -> google.protobuf.Timestamp - 59, // 9: mgmt.v1alpha1.AccountInvite.updated_at:type_name -> google.protobuf.Timestamp - 59, // 10: mgmt.v1alpha1.AccountInvite.expires_at:type_name -> google.protobuf.Timestamp + 60, // 8: mgmt.v1alpha1.AccountInvite.created_at:type_name -> google.protobuf.Timestamp + 60, // 9: mgmt.v1alpha1.AccountInvite.updated_at:type_name -> google.protobuf.Timestamp + 60, // 10: mgmt.v1alpha1.AccountInvite.expires_at:type_name -> google.protobuf.Timestamp 3, // 11: mgmt.v1alpha1.AccountInvite.role:type_name -> mgmt.v1alpha1.AccountRole 30, // 12: mgmt.v1alpha1.InviteUserToTeamAccountResponse.invite:type_name -> mgmt.v1alpha1.AccountInvite 30, // 13: mgmt.v1alpha1.GetTeamAccountInvitesResponse.invites:type_name -> mgmt.v1alpha1.AccountInvite 10, // 14: mgmt.v1alpha1.AcceptTeamAccountInviteResponse.account:type_name -> mgmt.v1alpha1.UserAccount - 59, // 15: mgmt.v1alpha1.GetSystemInformationResponse.build_date:type_name -> google.protobuf.Timestamp - 44, // 16: mgmt.v1alpha1.GetAccountOnboardingConfigResponse.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig - 44, // 17: mgmt.v1alpha1.SetAccountOnboardingConfigRequest.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig - 44, // 18: mgmt.v1alpha1.SetAccountOnboardingConfigResponse.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig - 1, // 19: mgmt.v1alpha1.GetAccountStatusResponse.subscription_status:type_name -> mgmt.v1alpha1.BillingStatus - 2, // 20: mgmt.v1alpha1.IsAccountStatusValidResponse.account_status:type_name -> mgmt.v1alpha1.AccountStatus - 59, // 21: mgmt.v1alpha1.IsAccountStatusValidResponse.trial_expires_at:type_name -> google.protobuf.Timestamp - 10, // 22: mgmt.v1alpha1.GetBillingAccountsResponse.accounts:type_name -> mgmt.v1alpha1.UserAccount - 3, // 23: mgmt.v1alpha1.SetUserRoleRequest.role:type_name -> mgmt.v1alpha1.AccountRole - 4, // 24: mgmt.v1alpha1.UserAccountService.GetUser:input_type -> mgmt.v1alpha1.GetUserRequest - 6, // 25: mgmt.v1alpha1.UserAccountService.SetUser:input_type -> mgmt.v1alpha1.SetUserRequest - 8, // 26: mgmt.v1alpha1.UserAccountService.GetUserAccounts:input_type -> mgmt.v1alpha1.GetUserAccountsRequest - 13, // 27: mgmt.v1alpha1.UserAccountService.SetPersonalAccount:input_type -> mgmt.v1alpha1.SetPersonalAccountRequest - 11, // 28: mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount:input_type -> mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest - 22, // 29: mgmt.v1alpha1.UserAccountService.CreateTeamAccount:input_type -> mgmt.v1alpha1.CreateTeamAccountRequest - 15, // 30: mgmt.v1alpha1.UserAccountService.IsUserInAccount:input_type -> mgmt.v1alpha1.IsUserInAccountRequest - 17, // 31: mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig:input_type -> mgmt.v1alpha1.GetAccountTemporalConfigRequest - 19, // 32: mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig:input_type -> mgmt.v1alpha1.SetAccountTemporalConfigRequest - 25, // 33: mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers:input_type -> mgmt.v1alpha1.GetTeamAccountMembersRequest - 27, // 34: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember:input_type -> mgmt.v1alpha1.RemoveTeamAccountMemberRequest - 29, // 35: mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount:input_type -> mgmt.v1alpha1.InviteUserToTeamAccountRequest - 32, // 36: mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites:input_type -> mgmt.v1alpha1.GetTeamAccountInvitesRequest - 34, // 37: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite:input_type -> mgmt.v1alpha1.RemoveTeamAccountInviteRequest - 36, // 38: mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite:input_type -> mgmt.v1alpha1.AcceptTeamAccountInviteRequest - 38, // 39: mgmt.v1alpha1.UserAccountService.GetSystemInformation:input_type -> mgmt.v1alpha1.GetSystemInformationRequest - 40, // 40: mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig:input_type -> mgmt.v1alpha1.GetAccountOnboardingConfigRequest - 42, // 41: mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig:input_type -> mgmt.v1alpha1.SetAccountOnboardingConfigRequest - 45, // 42: mgmt.v1alpha1.UserAccountService.GetAccountStatus:input_type -> mgmt.v1alpha1.GetAccountStatusRequest - 47, // 43: mgmt.v1alpha1.UserAccountService.IsAccountStatusValid:input_type -> mgmt.v1alpha1.IsAccountStatusValidRequest - 49, // 44: mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession:input_type -> mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest - 51, // 45: mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession:input_type -> mgmt.v1alpha1.GetAccountBillingPortalSessionRequest - 53, // 46: mgmt.v1alpha1.UserAccountService.GetBillingAccounts:input_type -> mgmt.v1alpha1.GetBillingAccountsRequest - 55, // 47: mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent:input_type -> mgmt.v1alpha1.SetBillingMeterEventRequest - 57, // 48: mgmt.v1alpha1.UserAccountService.SetUserRole:input_type -> mgmt.v1alpha1.SetUserRoleRequest - 5, // 49: mgmt.v1alpha1.UserAccountService.GetUser:output_type -> mgmt.v1alpha1.GetUserResponse - 7, // 50: mgmt.v1alpha1.UserAccountService.SetUser:output_type -> mgmt.v1alpha1.SetUserResponse - 9, // 51: mgmt.v1alpha1.UserAccountService.GetUserAccounts:output_type -> mgmt.v1alpha1.GetUserAccountsResponse - 14, // 52: mgmt.v1alpha1.UserAccountService.SetPersonalAccount:output_type -> mgmt.v1alpha1.SetPersonalAccountResponse - 12, // 53: mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount:output_type -> mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse - 23, // 54: mgmt.v1alpha1.UserAccountService.CreateTeamAccount:output_type -> mgmt.v1alpha1.CreateTeamAccountResponse - 16, // 55: mgmt.v1alpha1.UserAccountService.IsUserInAccount:output_type -> mgmt.v1alpha1.IsUserInAccountResponse - 18, // 56: mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig:output_type -> mgmt.v1alpha1.GetAccountTemporalConfigResponse - 20, // 57: mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig:output_type -> mgmt.v1alpha1.SetAccountTemporalConfigResponse - 26, // 58: mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers:output_type -> mgmt.v1alpha1.GetTeamAccountMembersResponse - 28, // 59: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember:output_type -> mgmt.v1alpha1.RemoveTeamAccountMemberResponse - 31, // 60: mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount:output_type -> mgmt.v1alpha1.InviteUserToTeamAccountResponse - 33, // 61: mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites:output_type -> mgmt.v1alpha1.GetTeamAccountInvitesResponse - 35, // 62: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite:output_type -> mgmt.v1alpha1.RemoveTeamAccountInviteResponse - 37, // 63: mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite:output_type -> mgmt.v1alpha1.AcceptTeamAccountInviteResponse - 39, // 64: mgmt.v1alpha1.UserAccountService.GetSystemInformation:output_type -> mgmt.v1alpha1.GetSystemInformationResponse - 41, // 65: mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig:output_type -> mgmt.v1alpha1.GetAccountOnboardingConfigResponse - 43, // 66: mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig:output_type -> mgmt.v1alpha1.SetAccountOnboardingConfigResponse - 46, // 67: mgmt.v1alpha1.UserAccountService.GetAccountStatus:output_type -> mgmt.v1alpha1.GetAccountStatusResponse - 48, // 68: mgmt.v1alpha1.UserAccountService.IsAccountStatusValid:output_type -> mgmt.v1alpha1.IsAccountStatusValidResponse - 50, // 69: mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession:output_type -> mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse - 52, // 70: mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession:output_type -> mgmt.v1alpha1.GetAccountBillingPortalSessionResponse - 54, // 71: mgmt.v1alpha1.UserAccountService.GetBillingAccounts:output_type -> mgmt.v1alpha1.GetBillingAccountsResponse - 56, // 72: mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent:output_type -> mgmt.v1alpha1.SetBillingMeterEventResponse - 58, // 73: mgmt.v1alpha1.UserAccountService.SetUserRole:output_type -> mgmt.v1alpha1.SetUserRoleResponse - 49, // [49:74] is the sub-list for method output_type - 24, // [24:49] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 60, // 15: mgmt.v1alpha1.GetSystemInformationResponse.build_date:type_name -> google.protobuf.Timestamp + 40, // 16: mgmt.v1alpha1.GetSystemInformationResponse.license:type_name -> mgmt.v1alpha1.SystemLicense + 60, // 17: mgmt.v1alpha1.SystemLicense.expires_at:type_name -> google.protobuf.Timestamp + 45, // 18: mgmt.v1alpha1.GetAccountOnboardingConfigResponse.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig + 45, // 19: mgmt.v1alpha1.SetAccountOnboardingConfigRequest.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig + 45, // 20: mgmt.v1alpha1.SetAccountOnboardingConfigResponse.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig + 1, // 21: mgmt.v1alpha1.GetAccountStatusResponse.subscription_status:type_name -> mgmt.v1alpha1.BillingStatus + 2, // 22: mgmt.v1alpha1.IsAccountStatusValidResponse.account_status:type_name -> mgmt.v1alpha1.AccountStatus + 60, // 23: mgmt.v1alpha1.IsAccountStatusValidResponse.trial_expires_at:type_name -> google.protobuf.Timestamp + 10, // 24: mgmt.v1alpha1.GetBillingAccountsResponse.accounts:type_name -> mgmt.v1alpha1.UserAccount + 3, // 25: mgmt.v1alpha1.SetUserRoleRequest.role:type_name -> mgmt.v1alpha1.AccountRole + 4, // 26: mgmt.v1alpha1.UserAccountService.GetUser:input_type -> mgmt.v1alpha1.GetUserRequest + 6, // 27: mgmt.v1alpha1.UserAccountService.SetUser:input_type -> mgmt.v1alpha1.SetUserRequest + 8, // 28: mgmt.v1alpha1.UserAccountService.GetUserAccounts:input_type -> mgmt.v1alpha1.GetUserAccountsRequest + 13, // 29: mgmt.v1alpha1.UserAccountService.SetPersonalAccount:input_type -> mgmt.v1alpha1.SetPersonalAccountRequest + 11, // 30: mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount:input_type -> mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest + 22, // 31: mgmt.v1alpha1.UserAccountService.CreateTeamAccount:input_type -> mgmt.v1alpha1.CreateTeamAccountRequest + 15, // 32: mgmt.v1alpha1.UserAccountService.IsUserInAccount:input_type -> mgmt.v1alpha1.IsUserInAccountRequest + 17, // 33: mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig:input_type -> mgmt.v1alpha1.GetAccountTemporalConfigRequest + 19, // 34: mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig:input_type -> mgmt.v1alpha1.SetAccountTemporalConfigRequest + 25, // 35: mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers:input_type -> mgmt.v1alpha1.GetTeamAccountMembersRequest + 27, // 36: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember:input_type -> mgmt.v1alpha1.RemoveTeamAccountMemberRequest + 29, // 37: mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount:input_type -> mgmt.v1alpha1.InviteUserToTeamAccountRequest + 32, // 38: mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites:input_type -> mgmt.v1alpha1.GetTeamAccountInvitesRequest + 34, // 39: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite:input_type -> mgmt.v1alpha1.RemoveTeamAccountInviteRequest + 36, // 40: mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite:input_type -> mgmt.v1alpha1.AcceptTeamAccountInviteRequest + 38, // 41: mgmt.v1alpha1.UserAccountService.GetSystemInformation:input_type -> mgmt.v1alpha1.GetSystemInformationRequest + 41, // 42: mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig:input_type -> mgmt.v1alpha1.GetAccountOnboardingConfigRequest + 43, // 43: mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig:input_type -> mgmt.v1alpha1.SetAccountOnboardingConfigRequest + 46, // 44: mgmt.v1alpha1.UserAccountService.GetAccountStatus:input_type -> mgmt.v1alpha1.GetAccountStatusRequest + 48, // 45: mgmt.v1alpha1.UserAccountService.IsAccountStatusValid:input_type -> mgmt.v1alpha1.IsAccountStatusValidRequest + 50, // 46: mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession:input_type -> mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest + 52, // 47: mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession:input_type -> mgmt.v1alpha1.GetAccountBillingPortalSessionRequest + 54, // 48: mgmt.v1alpha1.UserAccountService.GetBillingAccounts:input_type -> mgmt.v1alpha1.GetBillingAccountsRequest + 56, // 49: mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent:input_type -> mgmt.v1alpha1.SetBillingMeterEventRequest + 58, // 50: mgmt.v1alpha1.UserAccountService.SetUserRole:input_type -> mgmt.v1alpha1.SetUserRoleRequest + 5, // 51: mgmt.v1alpha1.UserAccountService.GetUser:output_type -> mgmt.v1alpha1.GetUserResponse + 7, // 52: mgmt.v1alpha1.UserAccountService.SetUser:output_type -> mgmt.v1alpha1.SetUserResponse + 9, // 53: mgmt.v1alpha1.UserAccountService.GetUserAccounts:output_type -> mgmt.v1alpha1.GetUserAccountsResponse + 14, // 54: mgmt.v1alpha1.UserAccountService.SetPersonalAccount:output_type -> mgmt.v1alpha1.SetPersonalAccountResponse + 12, // 55: mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount:output_type -> mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse + 23, // 56: mgmt.v1alpha1.UserAccountService.CreateTeamAccount:output_type -> mgmt.v1alpha1.CreateTeamAccountResponse + 16, // 57: mgmt.v1alpha1.UserAccountService.IsUserInAccount:output_type -> mgmt.v1alpha1.IsUserInAccountResponse + 18, // 58: mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig:output_type -> mgmt.v1alpha1.GetAccountTemporalConfigResponse + 20, // 59: mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig:output_type -> mgmt.v1alpha1.SetAccountTemporalConfigResponse + 26, // 60: mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers:output_type -> mgmt.v1alpha1.GetTeamAccountMembersResponse + 28, // 61: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember:output_type -> mgmt.v1alpha1.RemoveTeamAccountMemberResponse + 31, // 62: mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount:output_type -> mgmt.v1alpha1.InviteUserToTeamAccountResponse + 33, // 63: mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites:output_type -> mgmt.v1alpha1.GetTeamAccountInvitesResponse + 35, // 64: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite:output_type -> mgmt.v1alpha1.RemoveTeamAccountInviteResponse + 37, // 65: mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite:output_type -> mgmt.v1alpha1.AcceptTeamAccountInviteResponse + 39, // 66: mgmt.v1alpha1.UserAccountService.GetSystemInformation:output_type -> mgmt.v1alpha1.GetSystemInformationResponse + 42, // 67: mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig:output_type -> mgmt.v1alpha1.GetAccountOnboardingConfigResponse + 44, // 68: mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig:output_type -> mgmt.v1alpha1.SetAccountOnboardingConfigResponse + 47, // 69: mgmt.v1alpha1.UserAccountService.GetAccountStatus:output_type -> mgmt.v1alpha1.GetAccountStatusResponse + 49, // 70: mgmt.v1alpha1.UserAccountService.IsAccountStatusValid:output_type -> mgmt.v1alpha1.IsAccountStatusValidResponse + 51, // 71: mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession:output_type -> mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse + 53, // 72: mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession:output_type -> mgmt.v1alpha1.GetAccountBillingPortalSessionResponse + 55, // 73: mgmt.v1alpha1.UserAccountService.GetBillingAccounts:output_type -> mgmt.v1alpha1.GetBillingAccountsResponse + 57, // 74: mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent:output_type -> mgmt.v1alpha1.SetBillingMeterEventResponse + 59, // 75: mgmt.v1alpha1.UserAccountService.SetUserRole:output_type -> mgmt.v1alpha1.SetUserRoleResponse + 51, // [51:76] is the sub-list for method output_type + 26, // [26:51] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_mgmt_v1alpha1_user_account_proto_init() } @@ -3902,17 +3906,17 @@ func file_mgmt_v1alpha1_user_account_proto_init() { file_mgmt_v1alpha1_user_account_proto_msgTypes[8].OneofWrappers = []any{} file_mgmt_v1alpha1_user_account_proto_msgTypes[19].OneofWrappers = []any{} file_mgmt_v1alpha1_user_account_proto_msgTypes[25].OneofWrappers = []any{} - file_mgmt_v1alpha1_user_account_proto_msgTypes[42].OneofWrappers = []any{} file_mgmt_v1alpha1_user_account_proto_msgTypes[43].OneofWrappers = []any{} file_mgmt_v1alpha1_user_account_proto_msgTypes[44].OneofWrappers = []any{} - file_mgmt_v1alpha1_user_account_proto_msgTypes[51].OneofWrappers = []any{} + file_mgmt_v1alpha1_user_account_proto_msgTypes[45].OneofWrappers = []any{} + file_mgmt_v1alpha1_user_account_proto_msgTypes[52].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mgmt_v1alpha1_user_account_proto_rawDesc, NumEnums: 4, - NumMessages: 55, + NumMessages: 56, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.json.go b/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.json.go index d20e7714d1..3a311e35eb 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.json.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.json.go @@ -367,6 +367,16 @@ func (msg *GetSystemInformationResponse) UnmarshalJSON(b []byte) error { return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } +// MarshalJSON implements json.Marshaler +func (msg *SystemLicense) MarshalJSON() ([]byte, error) { + return protojson.MarshalOptions{}.Marshal(msg) +} + +// UnmarshalJSON implements json.Unmarshaler +func (msg *SystemLicense) UnmarshalJSON(b []byte) error { + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) +} + // MarshalJSON implements json.Marshaler func (msg *GetAccountOnboardingConfigRequest) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{}.Marshal(msg) diff --git a/backend/internal/auth/apikey/client.go b/backend/internal/auth/apikey/client.go index d6849f81c1..bd79ab4e85 100644 --- a/backend/internal/auth/apikey/client.go +++ b/backend/internal/auth/apikey/client.go @@ -11,6 +11,7 @@ import ( db_queries "github.com/nucleuscloud/neosync/backend/gen/go/db" "github.com/nucleuscloud/neosync/backend/internal/apikey" nucleuserrors "github.com/nucleuscloud/neosync/backend/internal/errors" + "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" "github.com/nucleuscloud/neosync/backend/internal/utils" pkg_utils "github.com/nucleuscloud/neosync/backend/pkg/utils" ) @@ -62,8 +63,10 @@ func (c *Client) InjectTokenCtx(ctx context.Context, header http.Header, spec co token, ) apiKey, err := c.q.GetAccountApiKeyByKeyValue(ctx, c.db, hashedKeyValue) - if err != nil { + if err != nil && !neosyncdb.IsNoRows(err) { return nil, err + } else if err != nil && neosyncdb.IsNoRows(err) { + return nil, InvalidApiKeyErr } if time.Now().After(apiKey.ExpiresAt.Time) { diff --git a/backend/internal/cmds/mgmt/serve/connect/cmd.go b/backend/internal/cmds/mgmt/serve/connect/cmd.go index 551678b2b1..2626764608 100644 --- a/backend/internal/cmds/mgmt/serve/connect/cmd.go +++ b/backend/internal/cmds/mgmt/serve/connect/cmd.go @@ -71,6 +71,7 @@ import ( "github.com/nucleuscloud/neosync/internal/ee/license" presidioapi "github.com/nucleuscloud/neosync/internal/ee/presidio" neomigrate "github.com/nucleuscloud/neosync/internal/migrate" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" neosyncotel "github.com/nucleuscloud/neosync/internal/otel" "github.com/spf13/cobra" @@ -145,6 +146,10 @@ func serve(ctx context.Context) error { mgmtv1alpha1connect.AnonymizationServiceName, } + if shouldEnableMetricsService() && !cascadelicense.IsValid() { + return errors.New("metrics service is enabled but no license is present") + } + if shouldEnableMetricsService() { services = append(services, mgmtv1alpha1connect.MetricsServiceName) } @@ -335,6 +340,10 @@ func serve(ctx context.Context) error { isAuthEnabled := viper.GetBool("AUTH_ENABLED") if isAuthEnabled { + slogger.Debug("auth is enabled") + if !cascadelicense.IsValid() { + return errors.New("auth is enabled but no license is present") + } jwtcfg, err := getJwtClientConfig() if err != nil { return err @@ -350,8 +359,6 @@ func serve(ctx context.Context) error { mgmtv1alpha1connect.JobServiceSetRunContextsProcedure, mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, mgmtv1alpha1connect.TransformersServiceGetUserDefinedTransformerByIdProcedure, - mgmtv1alpha1connect.ConnectionDataServiceGetConnectionForeignConstraintsProcedure, - mgmtv1alpha1connect.ConnectionDataServiceGetConnectionPrimaryConstraintsProcedure, mgmtv1alpha1connect.ConnectionDataServiceGetConnectionInitStatementsProcedure, mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, mgmtv1alpha1connect.UserAccountServiceGetBillingAccountsProcedure, @@ -384,7 +391,6 @@ func serve(ctx context.Context) error { []string{ mgmtv1alpha1connect.AuthServiceGetAuthStatusProcedure, mgmtv1alpha1connect.AuthServiceGetAuthorizeUrlProcedure, - mgmtv1alpha1connect.AuthServiceGetCliIssuerProcedure, mgmtv1alpha1connect.AuthServiceLoginCliProcedure, mgmtv1alpha1connect.AuthServiceRefreshCliProcedure, }, @@ -475,7 +481,7 @@ func serve(ctx context.Context) error { IsAuthEnabled: isAuthEnabled, IsNeosyncCloud: ncloudlicense.IsValid(), DefaultMaxAllowedRecords: getDefaultMaxAllowedRecords(), - }, db, temporalConfigProvider, authclient, authadminclient, billingClient, rbacclient) + }, db, temporalConfigProvider, authclient, authadminclient, billingClient, rbacclient, cascadelicense) api.Handle( mgmtv1alpha1connect.NewUserAccountServiceHandler( useraccountService, @@ -485,7 +491,7 @@ func serve(ctx context.Context) error { connect.WithRecover(recoverHandler), ), ) - userdataclient := userdata.NewClient(useraccountService, rbacclient) + userdataclient := userdata.NewClient(useraccountService, rbacclient, cascadelicense) apiKeyService := v1alpha1_apikeyservice.New(&v1alpha1_apikeyservice.Config{ IsAuthEnabled: isAuthEnabled, @@ -534,7 +540,7 @@ func serve(ctx context.Context) error { ) jobhookOpts := []jobhooks.Option{} - if ncloudlicense.IsValid() || eelicense.IsValid() { + if cascadelicense.IsValid() { jobhookOpts = append(jobhookOpts, jobhooks.WithEnabled()) } @@ -548,6 +554,9 @@ func serve(ctx context.Context) error { if err != nil { return err } + if runLogConfig != nil && runLogConfig.IsEnabled && !cascadelicense.IsValid() { + return errors.New("run logs are enabled but no license is present") + } jobServiceConfig := &v1alpha1_jobservice.Config{ IsAuthEnabled: isAuthEnabled, @@ -626,6 +635,7 @@ func serve(ctx context.Context) error { ), ) + neosynctyperegistry := neosynctypes.NewTypeRegistry(slogger) gcpmanager := neosync_gcp.NewManager() connectionDataService := v1alpha1_connectiondataservice.New( &v1alpha1_connectiondataservice.Config{}, @@ -638,6 +648,7 @@ func serve(ctx context.Context) error { mongoconnector, sqlmanager, gcpmanager, + neosynctyperegistry, ) api.Handle( mgmtv1alpha1connect.NewConnectionDataServiceHandler( diff --git a/backend/internal/ee/rbac/policy.go b/backend/internal/ee/rbac/policy.go index 72053fc0c0..03c5ca4aee 100644 --- a/backend/internal/ee/rbac/policy.go +++ b/backend/internal/ee/rbac/policy.go @@ -328,7 +328,7 @@ func (r *Rbac) EnforceJob( return err } if !ok { - return nucleuserrors.NewForbidden(fmt.Sprintf("user does not have permission to %s job", action)) + return nucleuserrors.NewUnauthorized(fmt.Sprintf("user does not have permission to %s job", action)) } return nil } @@ -355,7 +355,7 @@ func (r *Rbac) EnforceConnection( return err } if !ok { - return nucleuserrors.NewForbidden(fmt.Sprintf("user does not have permission to %s connection", action)) + return nucleuserrors.NewUnauthorized(fmt.Sprintf("user does not have permission to %s connection", action)) } return nil } @@ -380,7 +380,7 @@ func (r *Rbac) EnforceAccount( return err } if !ok { - return nucleuserrors.NewForbidden(fmt.Sprintf("user does not have permission to %s account", action)) + return nucleuserrors.NewUnauthorized(fmt.Sprintf("user does not have permission to %s account", action)) } return nil } diff --git a/backend/internal/errors/errors.go b/backend/internal/errors/errors.go index 1df913067e..7a4a173e9c 100644 --- a/backend/internal/errors/errors.go +++ b/backend/internal/errors/errors.go @@ -37,17 +37,17 @@ func NewAlreadyExists(message string) error { return connect.NewError(connect.CodeAlreadyExists, errors.New(message)) } +// Identical to NewUnauthorized func NewForbidden(message string) error { - return connect.NewError(connect.CodePermissionDenied, errors.New(message)) + return NewUnauthorized(message) } func NewUnauthenticated(message string) error { return connect.NewError(connect.CodeUnauthenticated, errors.New(message)) } -// Identical to NewUnauthenticated func NewUnauthorized(message string) error { - return NewUnauthenticated(message) + return connect.NewError(connect.CodePermissionDenied, errors.New(message)) } func NewNotImplemented(message string) error { diff --git a/backend/internal/userdata/client.go b/backend/internal/userdata/client.go index a2f53581e1..ff3c5f4ea3 100644 --- a/backend/internal/userdata/client.go +++ b/backend/internal/userdata/client.go @@ -9,6 +9,7 @@ import ( auth_apikey "github.com/nucleuscloud/neosync/backend/internal/auth/apikey" "github.com/nucleuscloud/neosync/backend/internal/ee/rbac" "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" + "github.com/nucleuscloud/neosync/internal/ee/license" ) type UserServiceClient interface { @@ -19,6 +20,7 @@ type UserServiceClient interface { type Client struct { userServiceClient UserServiceClient enforcer rbac.EntityEnforcer + license license.EEInterface } type Interface interface { @@ -32,10 +34,12 @@ type GetUserResponse struct { func NewClient( userServiceClient UserServiceClient, enforcer rbac.EntityEnforcer, + eeLicense license.EEInterface, ) *Client { return &Client{ userServiceClient: userServiceClient, enforcer: enforcer, + license: eeLicense, } } @@ -55,12 +59,13 @@ func (c *Client) GetUser(ctx context.Context) (*User, error) { id: pguuid, apiKeyData: apiKeyData, userAccountServiceClient: c.userServiceClient, + license: c.license, } user.EntityEnforcer = &UserEntityEnforcer{ enforcer: c.enforcer, user: rbac.NewUserIdEntity(resp.Msg.GetUserId()), enforceAccountAccess: func(ctx context.Context, accountId string) error { - return EnforceAccountAccess(ctx, user, accountId) + return enforceAccountAccess(ctx, user, accountId) }, isApiKey: user.IsApiKey(), } diff --git a/backend/internal/userdata/user.go b/backend/internal/userdata/user.go index 70fc1d157e..ee1edb5be0 100644 --- a/backend/internal/userdata/user.go +++ b/backend/internal/userdata/user.go @@ -11,6 +11,7 @@ import ( auth_apikey "github.com/nucleuscloud/neosync/backend/internal/auth/apikey" nucleuserrors "github.com/nucleuscloud/neosync/backend/internal/errors" "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" + "github.com/nucleuscloud/neosync/internal/ee/license" ) type UserAccountServiceClient interface { @@ -25,6 +26,8 @@ type User struct { userAccountServiceClient UserAccountServiceClient EntityEnforcer + + license license.EEInterface } func (u *User) Id() string { @@ -42,7 +45,39 @@ func (u *User) IsApiKey() bool { return u.apiKeyData != nil } -func EnforceAccountAccess(ctx context.Context, user *User, accountId string) error { +func (u *User) EnforceAccountAccess(ctx context.Context, accountId string) error { + return enforceAccountAccess(ctx, u, accountId) +} + +func (u *User) EnforceLicense(ctx context.Context, accountId string) error { + ok, err := u.IsLicensed(ctx, accountId) + if err != nil { + return err + } + if !ok { + return nucleuserrors.NewUnauthorized("account does not have an active license") + } + return nil +} + +func (u *User) IsLicensed(ctx context.Context, accountId string) (bool, error) { + if err := u.EnforceAccountAccess(ctx, accountId); err != nil { + return false, err + } + + // todo: check account type for Neosync Cloud Cloud? + // if: personal, then check if free trial is active + // if: pro, then no? or maybe still do a trial check? + // if: enterprise, then check for valid license + + if u.license == nil { + return false, nil + } + + return u.license.IsValid(), nil +} + +func enforceAccountAccess(ctx context.Context, user *User, accountId string) error { if user.IsApiKey() { if user.IsWorkerApiKey() { return nil @@ -50,7 +85,7 @@ func EnforceAccountAccess(ctx context.Context, user *User, accountId string) err // We first want to check to make sure the api key is valid and that it says it's in the account // However, we still want to make a DB request to ensure the DB still says it's in the account if user.apiKeyData.ApiKey == nil || neosyncdb.UUIDString(user.apiKeyData.ApiKey.AccountID) != accountId { - return nucleuserrors.NewForbidden("api key is not valid for account") + return nucleuserrors.NewUnauthorized("api key is not valid for account") } } @@ -60,7 +95,7 @@ func EnforceAccountAccess(ctx context.Context, user *User, accountId string) err return fmt.Errorf("unable to check if user is in account: %w", err) } if !inAccountResp.Msg.GetOk() { - return nucleuserrors.NewForbidden("user is not in account") + return nucleuserrors.NewUnauthorized("user is not in account") } return nil } diff --git a/backend/pkg/integration-test/clients.go b/backend/pkg/integration-test/clients.go new file mode 100644 index 0000000000..a33810a1b0 --- /dev/null +++ b/backend/pkg/integration-test/clients.go @@ -0,0 +1,75 @@ +package integrationtests_test + +import ( + "net/http" + + "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + http_client "github.com/nucleuscloud/neosync/internal/http/client" +) + +type NeosyncClients struct { + httpUrl string +} + +func newNeosyncClients(httpUrl string) *NeosyncClients { + return &NeosyncClients{ + httpUrl: httpUrl, + } +} + +type clientConfig struct { + userId string +} + +type ClientConfigOption func(*clientConfig) + +func WithUserId(userId string) ClientConfigOption { + return func(c *clientConfig) { + c.userId = userId + } +} + +func (s *NeosyncClients) Users(opts ...ClientConfigOption) mgmtv1alpha1connect.UserAccountServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewUserAccountServiceClient(getHttpClient(config), s.httpUrl) +} + +func (s *NeosyncClients) Connections(opts ...ClientConfigOption) mgmtv1alpha1connect.ConnectionServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewConnectionServiceClient(getHttpClient(config), s.httpUrl) +} + +func (s *NeosyncClients) Anonymize(opts ...ClientConfigOption) mgmtv1alpha1connect.AnonymizationServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewAnonymizationServiceClient(getHttpClient(config), s.httpUrl) +} + +func (s *NeosyncClients) Jobs(opts ...ClientConfigOption) mgmtv1alpha1connect.JobServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewJobServiceClient(getHttpClient(config), s.httpUrl) +} + +func (s *NeosyncClients) Transformers(opts ...ClientConfigOption) mgmtv1alpha1connect.TransformersServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewTransformersServiceClient(getHttpClient(config), s.httpUrl) +} + +func (s *NeosyncClients) ConnectionData(opts ...ClientConfigOption) mgmtv1alpha1connect.ConnectionDataServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewConnectionDataServiceClient(getHttpClient(config), s.httpUrl) +} + +func getHydratedClientConfig(opts ...ClientConfigOption) *clientConfig { + config := &clientConfig{} + for _, opt := range opts { + opt(config) + } + return config +} + +func getHttpClient(config *clientConfig) *http.Client { + if config.userId != "" { + return http_client.WithBearerAuth(&http.Client{}, &config.userId) + } + return &http.Client{} +} diff --git a/backend/pkg/integration-test/integration-test-util.go b/backend/pkg/integration-test/integration-test-util.go index 6af841741e..bb7899508e 100644 --- a/backend/pkg/integration-test/integration-test-util.go +++ b/backend/pkg/integration-test/integration-test-util.go @@ -76,6 +76,34 @@ func CreateMysqlConnection( return resp.Msg.GetConnection() } +func CreateMssqlConnection( + ctx context.Context, + t *testing.T, + connclient mgmtv1alpha1connect.ConnectionServiceClient, + accountId string, + name string, + mssqlurl string, +) *mgmtv1alpha1.Connection { + resp, err := connclient.CreateConnection( + ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: name, + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_MssqlConfig{ + MssqlConfig: &mgmtv1alpha1.MssqlConnectionConfig{ + ConnectionConfig: &mgmtv1alpha1.MssqlConnectionConfig_Url{ + Url: mssqlurl, + }, + }, + }, + }, + }), + ) + RequireNoErrResp(t, resp, err) + return resp.Msg.GetConnection() +} + func CreateS3Connection( ctx context.Context, t *testing.T, @@ -106,6 +134,58 @@ func CreateS3Connection( return resp.Msg.GetConnection() } +func CreateDynamoDBConnection( + ctx context.Context, + t *testing.T, + connclient mgmtv1alpha1connect.ConnectionServiceClient, + accountId, name, endpoint string, + credentials *mgmtv1alpha1.AwsS3Credentials, +) *mgmtv1alpha1.Connection { + resp, err := connclient.CreateConnection( + ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: name, + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_DynamodbConfig{ + DynamodbConfig: &mgmtv1alpha1.DynamoDBConnectionConfig{ + Credentials: credentials, + Endpoint: &endpoint, + }, + }, + }, + }), + ) + RequireNoErrResp(t, resp, err) + return resp.Msg.GetConnection() +} + +func CreateMongodbConnection( + ctx context.Context, + t *testing.T, + connclient mgmtv1alpha1connect.ConnectionServiceClient, + accountId, name, url string, +) *mgmtv1alpha1.Connection { + resp, err := connclient.CreateConnection( + ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: name, + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_MongoConfig{ + MongoConfig: &mgmtv1alpha1.MongoConnectionConfig{ + ConnectionConfig: &mgmtv1alpha1.MongoConnectionConfig_Url{ + Url: url, + }, + }, + }, + }, + }), + ) + RequireNoErrResp(t, resp, err) + return resp.Msg.GetConnection() +} + func SetUser(ctx context.Context, t *testing.T, client mgmtv1alpha1connect.UserAccountServiceClient) string { resp, err := client.SetUser(ctx, connect.NewRequest(&mgmtv1alpha1.SetUserRequest{})) RequireNoErrResp(t, resp, err) diff --git a/backend/pkg/integration-test/integration-test.go b/backend/pkg/integration-test/integration-test.go index da3106f13b..097c694163 100644 --- a/backend/pkg/integration-test/integration-test.go +++ b/backend/pkg/integration-test/integration-test.go @@ -7,40 +7,15 @@ import ( "net/http/httptest" "testing" - "connectrpc.com/connect" - "github.com/jackc/pgx/v5/stdlib" db_queries "github.com/nucleuscloud/neosync/backend/gen/go/db" - mysql_queries "github.com/nucleuscloud/neosync/backend/gen/go/db/dbschemas/mysql" pg_queries "github.com/nucleuscloud/neosync/backend/gen/go/db/dbschemas/postgresql" - "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" - "github.com/nucleuscloud/neosync/backend/internal/apikey" - auth_apikey "github.com/nucleuscloud/neosync/backend/internal/auth/apikey" auth_client "github.com/nucleuscloud/neosync/backend/internal/auth/client" - auth_jwt "github.com/nucleuscloud/neosync/backend/internal/auth/jwt" "github.com/nucleuscloud/neosync/backend/internal/authmgmt" - auth_interceptor "github.com/nucleuscloud/neosync/backend/internal/connect/interceptors/auth" - jobhooks "github.com/nucleuscloud/neosync/backend/internal/ee/hooks/jobs" - "github.com/nucleuscloud/neosync/backend/internal/ee/rbac" - "github.com/nucleuscloud/neosync/backend/internal/ee/rbac/enforcer" - neosync_gcp "github.com/nucleuscloud/neosync/backend/internal/gcp" - "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" clientmanager "github.com/nucleuscloud/neosync/backend/internal/temporal/clientmanager" - "github.com/nucleuscloud/neosync/backend/internal/userdata" - "github.com/nucleuscloud/neosync/backend/internal/utils" - "github.com/nucleuscloud/neosync/backend/pkg/mongoconnect" - "github.com/nucleuscloud/neosync/backend/pkg/sqlconnect" "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager" - v1alpha_anonymizationservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/anonymization-service" - v1alpha1_connectiondataservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/connection-data-service" - v1alpha1_connectionservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/connection-service" - v1alpha1_jobservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/job-service" - v1alpha1_transformersservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/transformers-service" - v1alpha1_useraccountservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/user-account-service" - awsmanager "github.com/nucleuscloud/neosync/internal/aws" "github.com/nucleuscloud/neosync/internal/billing" connectionmanager "github.com/nucleuscloud/neosync/internal/connection-manager" presidioapi "github.com/nucleuscloud/neosync/internal/ee/presidio" - http_client "github.com/nucleuscloud/neosync/internal/http/client" neomigrate "github.com/nucleuscloud/neosync/internal/migrate" promapiv1mock "github.com/nucleuscloud/neosync/internal/mocks/github.com/prometheus/client_golang/api/prometheus/v1" "github.com/nucleuscloud/neosync/internal/testutil" @@ -48,19 +23,6 @@ import ( "github.com/stretchr/testify/mock" ) -var ( - validAuthUser = &authmgmt.User{Name: "foo", Email: "bar", Picture: "baz"} -) - -type UnauthdClients struct { - Users mgmtv1alpha1connect.UserAccountServiceClient - Transformers mgmtv1alpha1connect.TransformersServiceClient - Connections mgmtv1alpha1connect.ConnectionServiceClient - ConnectionData mgmtv1alpha1connect.ConnectionDataServiceClient - Jobs mgmtv1alpha1connect.JobServiceClient - Anonymize mgmtv1alpha1connect.AnonymizationServiceClient -} - type Mocks struct { TemporalClientManager *clientmanager.MockInterface TemporalConfigProvider *clientmanager.MockConfigProvider @@ -86,9 +48,14 @@ type NeosyncApiTestClient struct { httpsrv *httptest.Server - UnauthdClients *UnauthdClients - NeosyncCloudClients *NeosyncCloudClients - AuthdClients *AuthdClients + // OSS, Unauthenticated, Licensed + OSSUnauthenticatedLicensedClients *NeosyncClients + // OSS, Authenticated, Licensed + OSSAuthenticatedLicensedClients *NeosyncClients + // OSS, Unauthenticated, Unlicensed + OSSUnauthenticatedUnlicensedClients *NeosyncClients + // NeoCloud, Authenticated, Licensed + NeosyncCloudAuthenticatedLicensedClients *NeosyncClients Mocks *Mocks } @@ -117,39 +84,6 @@ func WithMigrationsDirectory(directoryPath string) Option { } } -type NeosyncCloudClients struct { - httpsrv *httptest.Server - basepath string -} - -func (s *NeosyncCloudClients) GetUserClient(authUserId string) mgmtv1alpha1connect.UserAccountServiceClient { - return mgmtv1alpha1connect.NewUserAccountServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+s.basepath) -} - -func (s *NeosyncCloudClients) GetConnectionClient(authUserId string) mgmtv1alpha1connect.ConnectionServiceClient { - return mgmtv1alpha1connect.NewConnectionServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+s.basepath) -} - -func (s *NeosyncCloudClients) GetAnonymizeClient(authUserId string) mgmtv1alpha1connect.AnonymizationServiceClient { - return mgmtv1alpha1connect.NewAnonymizationServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+s.basepath) -} - -func (s *NeosyncCloudClients) GetJobClient(authUserId string) mgmtv1alpha1connect.JobServiceClient { - return mgmtv1alpha1connect.NewJobServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+s.basepath) -} - -type AuthdClients struct { - httpsrv *httptest.Server -} - -func (s *AuthdClients) GetUserClient(authUserId string) mgmtv1alpha1connect.UserAccountServiceClient { - return mgmtv1alpha1connect.NewUserAccountServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+"/auth") -} - -func (s *AuthdClients) GetConnectionClient(authUserId string) mgmtv1alpha1connect.ConnectionServiceClient { - return mgmtv1alpha1connect.NewConnectionServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+"/auth") -} - func (s *NeosyncApiTestClient) Setup(ctx context.Context, t testing.TB) error { pgcontainer, err := tcpostgres.NewPostgresTestContainer(ctx) if err != nil { @@ -179,251 +113,45 @@ func (s *NeosyncApiTestClient) Setup(ctx context.Context, t testing.TB) error { return err } - permissiveRbacClient := rbac.NewAllowAllClient() + rootmux := http.NewServeMux() - rbacenforcer, err := enforcer.NewActiveEnforcer(ctx, stdlib.OpenDBFromPool(pgcontainer.DB), "neosync_api.casbin_rule") + logger := testutil.GetConcurrentTestLogger(t) + + ossUnauthLicensedMux, err := s.setupOssUnauthenticatedLicensedMux(ctx, pgcontainer, logger) if err != nil { - return fmt.Errorf("unable to create rbac enforcer: %w", err) + return fmt.Errorf("unable to setup oss unauthenticated licensed mux: %w", err) } - rbacenforcer.EnableAutoSave(true) - err = rbacenforcer.LoadPolicy() + rootmux.Handle(openSourceUnauthenticatedLicensedPostfix+"/", http.StripPrefix(openSourceUnauthenticatedLicensedPostfix, ossUnauthLicensedMux)) + + ossAuthLicensedMux, err := s.setupOssLicensedAuthMux(ctx, pgcontainer, logger) if err != nil { - return fmt.Errorf("unable to load rbac policies: %w", err) + return fmt.Errorf("unable to setup oss authenticated licensed mux: %w", err) } - enforcedRbacClient := rbac.New(rbacenforcer) - - maxAllowed := int64(10000) - unauthdUserService := v1alpha1_useraccountservice.New( - &v1alpha1_useraccountservice.Config{IsAuthEnabled: false, IsNeosyncCloud: false, DefaultMaxAllowedRecords: &maxAllowed}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.TemporalConfigProvider, - s.Mocks.Authclient, - s.Mocks.Authmanagerclient, - nil, // billing client - permissiveRbacClient, // rbac client - ) - unauthdUserClient := userdata.NewClient(unauthdUserService, permissiveRbacClient) - - authdUserService := v1alpha1_useraccountservice.New( - &v1alpha1_useraccountservice.Config{IsAuthEnabled: true, IsNeosyncCloud: false}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.TemporalConfigProvider, - s.Mocks.Authclient, - s.Mocks.Authmanagerclient, - nil, // billing client - enforcedRbacClient, // rbac client - ) - - sqlmanagerclient := NewTestSqlManagerClient() - - authdUserDataClient := userdata.NewClient(authdUserService, enforcedRbacClient) - - authdConnectionService := v1alpha1_connectionservice.New( - &v1alpha1_connectionservice.Config{}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - authdUserDataClient, - mongoconnect.NewConnector(), - awsmanager.New(), - sqlmanagerclient, - &sqlconnect.SqlOpenConnector{}, - ) - - neoCloudAuthdUserService := v1alpha1_useraccountservice.New( - &v1alpha1_useraccountservice.Config{IsAuthEnabled: true, IsNeosyncCloud: true}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.TemporalConfigProvider, - s.Mocks.Authclient, - s.Mocks.Authmanagerclient, - s.Mocks.Billingclient, - enforcedRbacClient, // rbac client - ) - neoCloudUserDataClient := userdata.NewClient(neoCloudAuthdUserService, enforcedRbacClient) - neoCloudAuthdAnonymizeService := v1alpha_anonymizationservice.New( - &v1alpha_anonymizationservice.Config{IsAuthEnabled: true, IsNeosyncCloud: true, IsPresidioEnabled: false}, - nil, // meter - neoCloudUserDataClient, - neoCloudAuthdUserService, - s.Mocks.Presidio.Analyzer, - s.Mocks.Presidio.Anonymizer, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - ) - - neoCloudConnectionService := v1alpha1_connectionservice.New( - &v1alpha1_connectionservice.Config{}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - neoCloudUserDataClient, - mongoconnect.NewConnector(), - awsmanager.New(), - sqlmanagerclient, - &sqlconnect.SqlOpenConnector{}, - ) - neoCloudJobHookService := jobhooks.New( - neosyncdb.New(pgcontainer.DB, db_queries.New()), - neoCloudUserDataClient, - jobhooks.WithEnabled(), - ) - neoCloudJobService := v1alpha1_jobservice.New( - &v1alpha1_jobservice.Config{IsNeosyncCloud: true, IsAuthEnabled: true}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.TemporalClientManager, - neoCloudConnectionService, - sqlmanagerclient, - neoCloudJobHookService, - neoCloudUserDataClient, - ) - - unauthdTransformersService := v1alpha1_transformersservice.New( - &v1alpha1_transformersservice.Config{ - IsPresidioEnabled: true, - IsNeosyncCloud: false, - }, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.Presidio.Entities, - unauthdUserClient, - ) - - unauthdConnectionsService := v1alpha1_connectionservice.New( - &v1alpha1_connectionservice.Config{}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - unauthdUserClient, - mongoconnect.NewConnector(), - awsmanager.New(), - sqlmanagerclient, - &sqlconnect.SqlOpenConnector{}, - ) - - unAuthdjobhookService := jobhooks.New( - neosyncdb.New(pgcontainer.DB, db_queries.New()), - unauthdUserClient, - ) - - unauthdJobsService := v1alpha1_jobservice.New( - &v1alpha1_jobservice.Config{}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.TemporalClientManager, - unauthdConnectionsService, - sqlmanagerclient, - unAuthdjobhookService, - unauthdUserClient, - ) - - unauthdConnectionDataService := v1alpha1_connectiondataservice.New( - &v1alpha1_connectiondataservice.Config{}, - unauthdConnectionsService, - unauthdJobsService, - awsmanager.New(), - &sqlconnect.SqlOpenConnector{}, - pg_queries.New(), - mysql_queries.New(), - mongoconnect.NewConnector(), - sqlmanagerclient, - neosync_gcp.NewManager(), - ) - - var presAnalyzeClient presidioapi.AnalyzeInterface - var presAnonClient presidioapi.AnonymizeInterface + rootmux.Handle(openSourceAuthenticatedLicensedPostfix+"/", http.StripPrefix(openSourceAuthenticatedLicensedPostfix, ossAuthLicensedMux)) - unauthdAnonymizationService := v1alpha_anonymizationservice.New( - &v1alpha_anonymizationservice.Config{IsPresidioEnabled: false}, - nil, // meter - unauthdUserClient, - unauthdUserService, - presAnalyzeClient, presAnonClient, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - ) - - rootmux := http.NewServeMux() - - unauthmux := http.NewServeMux() - unauthmux.Handle(mgmtv1alpha1connect.NewUserAccountServiceHandler( - unauthdUserService, - )) - unauthmux.Handle(mgmtv1alpha1connect.NewTransformersServiceHandler( - unauthdTransformersService, - )) - unauthmux.Handle(mgmtv1alpha1connect.NewConnectionServiceHandler( - unauthdConnectionsService, - )) - unauthmux.Handle(mgmtv1alpha1connect.NewJobServiceHandler( - unauthdJobsService, - )) - unauthmux.Handle(mgmtv1alpha1connect.NewAnonymizationServiceHandler( - unauthdAnonymizationService, - )) - unauthmux.Handle(mgmtv1alpha1connect.NewConnectionDataServiceHandler( - unauthdConnectionDataService, - )) - rootmux.Handle("/unauth/", http.StripPrefix("/unauth", unauthmux)) - - authinterceptors := connect.WithInterceptors( - auth_interceptor.NewInterceptor(func(ctx context.Context, header http.Header, spec connect.Spec) (context.Context, error) { - // will need to further fill this out as the tests grow - authuserid, err := utils.GetBearerTokenFromHeader(header, "Authorization") - if err != nil { - return nil, err - } - if apikey.IsValidV1WorkerKey(authuserid) { - return auth_apikey.SetTokenData(ctx, &auth_apikey.TokenContextData{ - RawToken: authuserid, - ApiKey: nil, - ApiKeyType: apikey.WorkerApiKey, - }), nil - } - return auth_jwt.SetTokenData(ctx, &auth_jwt.TokenContextData{ - AuthUserId: authuserid, - Claims: &auth_jwt.CustomClaims{Email: &validAuthUser.Email}, - }), nil - }), - ) - - authmux := http.NewServeMux() - authmux.Handle(mgmtv1alpha1connect.NewUserAccountServiceHandler( - authdUserService, - authinterceptors, - )) - authmux.Handle(mgmtv1alpha1connect.NewConnectionServiceHandler( - authdConnectionService, - authinterceptors, - )) - rootmux.Handle("/auth/", http.StripPrefix("/auth", authmux)) + ossUnauthUnlicensedMux, err := s.setupOssUnlicensedMux(pgcontainer, logger) + if err != nil { + return fmt.Errorf("unable to setup oss unauthenticated unlicensed mux: %w", err) + } + rootmux.Handle(openSourceUnauthenticatedUnlicensedPostfix+"/", http.StripPrefix(openSourceUnauthenticatedUnlicensedPostfix, ossUnauthUnlicensedMux)) - ncauthmux := http.NewServeMux() - ncauthmux.Handle(mgmtv1alpha1connect.NewUserAccountServiceHandler( - neoCloudAuthdUserService, - authinterceptors, - )) - ncauthmux.Handle(mgmtv1alpha1connect.NewAnonymizationServiceHandler( - neoCloudAuthdAnonymizeService, - authinterceptors, - )) - ncauthmux.Handle(mgmtv1alpha1connect.NewConnectionServiceHandler( - neoCloudConnectionService, - authinterceptors, - )) - ncauthmux.Handle(mgmtv1alpha1connect.NewJobServiceHandler( - neoCloudJobService, - authinterceptors, - )) - rootmux.Handle("/ncauth/", http.StripPrefix("/ncauth", ncauthmux)) + neoCloudAuthdMux, err := s.setupNeoCloudMux(ctx, pgcontainer, logger) + if err != nil { + return fmt.Errorf("unable to setup neo cloud authenticated mux: %w", err) + } + rootmux.Handle(neoCloudAuthenticatedLicensedPostfix+"/", http.StripPrefix(neoCloudAuthenticatedLicensedPostfix, neoCloudAuthdMux)) s.httpsrv = startHTTPServer(t, rootmux) + rootmux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + t.Logf("404 for URL: %s\n", r.URL.Path) + http.NotFound(w, r) + }) - s.UnauthdClients = &UnauthdClients{ - Users: mgmtv1alpha1connect.NewUserAccountServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - Transformers: mgmtv1alpha1connect.NewTransformersServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - Connections: mgmtv1alpha1connect.NewConnectionServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - ConnectionData: mgmtv1alpha1connect.NewConnectionDataServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - Jobs: mgmtv1alpha1connect.NewJobServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - Anonymize: mgmtv1alpha1connect.NewAnonymizationServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - } + s.OSSUnauthenticatedLicensedClients = newNeosyncClients(s.httpsrv.URL + openSourceUnauthenticatedLicensedPostfix) + s.OSSAuthenticatedLicensedClients = newNeosyncClients(s.httpsrv.URL + openSourceAuthenticatedLicensedPostfix) + s.OSSUnauthenticatedUnlicensedClients = newNeosyncClients(s.httpsrv.URL + openSourceUnauthenticatedUnlicensedPostfix) + s.NeosyncCloudAuthenticatedLicensedClients = newNeosyncClients(s.httpsrv.URL + neoCloudAuthenticatedLicensedPostfix) - s.AuthdClients = &AuthdClients{ - httpsrv: s.httpsrv, - } - s.NeosyncCloudClients = &NeosyncCloudClients{ - httpsrv: s.httpsrv, - basepath: "/ncauth", - } return nil } diff --git a/backend/pkg/integration-test/mux.go b/backend/pkg/integration-test/mux.go new file mode 100644 index 0000000000..62da17f2f0 --- /dev/null +++ b/backend/pkg/integration-test/mux.go @@ -0,0 +1,279 @@ +package integrationtests_test + +import ( + "context" + "fmt" + "log/slog" + "net/http" + + "connectrpc.com/connect" + "github.com/jackc/pgx/v5/stdlib" + db_queries "github.com/nucleuscloud/neosync/backend/gen/go/db" + mysql_queries "github.com/nucleuscloud/neosync/backend/gen/go/db/dbschemas/mysql" + pg_queries "github.com/nucleuscloud/neosync/backend/gen/go/db/dbschemas/postgresql" + "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + "github.com/nucleuscloud/neosync/backend/internal/apikey" + auth_apikey "github.com/nucleuscloud/neosync/backend/internal/auth/apikey" + auth_jwt "github.com/nucleuscloud/neosync/backend/internal/auth/jwt" + "github.com/nucleuscloud/neosync/backend/internal/authmgmt" + auth_interceptor "github.com/nucleuscloud/neosync/backend/internal/connect/interceptors/auth" + jobhooks "github.com/nucleuscloud/neosync/backend/internal/ee/hooks/jobs" + "github.com/nucleuscloud/neosync/backend/internal/ee/rbac" + "github.com/nucleuscloud/neosync/backend/internal/ee/rbac/enforcer" + neosync_gcp "github.com/nucleuscloud/neosync/backend/internal/gcp" + "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" + "github.com/nucleuscloud/neosync/backend/internal/userdata" + "github.com/nucleuscloud/neosync/backend/internal/utils" + "github.com/nucleuscloud/neosync/backend/pkg/mongoconnect" + "github.com/nucleuscloud/neosync/backend/pkg/sqlconnect" + v1alpha_anonymizationservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/anonymization-service" + v1alpha1_connectiondataservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/connection-data-service" + v1alpha1_connectionservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/connection-service" + v1alpha1_jobservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/job-service" + v1alpha1_transformersservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/transformers-service" + v1alpha1_useraccountservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/user-account-service" + awsmanager "github.com/nucleuscloud/neosync/internal/aws" + "github.com/nucleuscloud/neosync/internal/billing" + presidioapi "github.com/nucleuscloud/neosync/internal/ee/presidio" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" + "github.com/nucleuscloud/neosync/internal/testutil" + tcpostgres "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/postgres" +) + +var ( + validAuthUser = &authmgmt.User{Name: "foo", Email: "bar", Picture: "baz"} + + authinterceptor = auth_interceptor.NewInterceptor(func(ctx context.Context, header http.Header, spec connect.Spec) (context.Context, error) { + // will need to further fill this out as the tests grow + authuserid, err := utils.GetBearerTokenFromHeader(header, "Authorization") + if err != nil { + return nil, err + } + if apikey.IsValidV1WorkerKey(authuserid) { + return auth_apikey.SetTokenData(ctx, &auth_apikey.TokenContextData{ + RawToken: authuserid, + ApiKey: nil, + ApiKeyType: apikey.WorkerApiKey, + }), nil + } + return auth_jwt.SetTokenData(ctx, &auth_jwt.TokenContextData{ + AuthUserId: authuserid, + Claims: &auth_jwt.CustomClaims{Email: &validAuthUser.Email}, + }), nil + }) +) + +const ( + // OSS, Unauthenticated, Licensed + openSourceUnauthenticatedLicensedPostfix = "/oss-unauthenticated-licensed" + // OSS, Authenticated, Licensed + openSourceAuthenticatedLicensedPostfix = "/oss-authenticated-licensed" + // OSS, Unauthenticated, Unlicensed + openSourceUnauthenticatedUnlicensedPostfix = "/oss-unauthenticated-unlicensed" + // NeoCloud, Licensed, Authenticated + neoCloudAuthenticatedLicensedPostfix = "/neosynccloud-authenticated" +) + +func (s *NeosyncApiTestClient) setupOssUnauthenticatedLicensedMux(ctx context.Context, pgcontainer *tcpostgres.PostgresTestContainer, logger *slog.Logger) (*http.ServeMux, error) { + isLicensed := true + isAuthEnabled := false + isNeosyncCloud := false + enforcedRbacClient, err := s.getEnforcedRbacClient(ctx, pgcontainer) + if err != nil { + return nil, fmt.Errorf("unable to get enforced rbac client: %w", err) + } + return s.setupMux(pgcontainer, isAuthEnabled, isLicensed, isNeosyncCloud, enforcedRbacClient, logger) +} + +func (s *NeosyncApiTestClient) setupOssLicensedAuthMux(ctx context.Context, pgcontainer *tcpostgres.PostgresTestContainer, logger *slog.Logger) (*http.ServeMux, error) { + isLicensed := true + isAuthEnabled := true + isNeosyncCloud := false + enforcedRbacClient, err := s.getEnforcedRbacClient(ctx, pgcontainer) + if err != nil { + return nil, fmt.Errorf("unable to get enforced rbac client: %w", err) + } + return s.setupMux(pgcontainer, isAuthEnabled, isLicensed, isNeosyncCloud, enforcedRbacClient, logger) +} + +func (s *NeosyncApiTestClient) setupOssUnlicensedMux(pgcontainer *tcpostgres.PostgresTestContainer, logger *slog.Logger) (*http.ServeMux, error) { + isLicensed := false + isAuthEnabled := false + isNeosyncCloud := false + permissiveRbacClient := rbac.NewAllowAllClient() + return s.setupMux(pgcontainer, isAuthEnabled, isLicensed, isNeosyncCloud, permissiveRbacClient, logger) +} + +func (s *NeosyncApiTestClient) setupNeoCloudMux(ctx context.Context, pgcontainer *tcpostgres.PostgresTestContainer, logger *slog.Logger) (*http.ServeMux, error) { + isLicensed := true + isAuthEnabled := true + isNeosyncCloud := true + enforcedRbacClient, err := s.getEnforcedRbacClient(ctx, pgcontainer) + if err != nil { + return nil, fmt.Errorf("unable to get enforced rbac client: %w", err) + } + return s.setupMux(pgcontainer, isAuthEnabled, isLicensed, isNeosyncCloud, enforcedRbacClient, logger) +} + +func (s *NeosyncApiTestClient) setupMux( + pgcontainer *tcpostgres.PostgresTestContainer, + isAuthEnabled bool, + isLicensed bool, + isNeosyncCloud bool, + rbacClient rbac.Interface, + logger *slog.Logger, +) (*http.ServeMux, error) { + isPresidioEnabled := false + if isLicensed || isNeosyncCloud { + isPresidioEnabled = true + } + + maxAllowed := int64(10000) + var license *testutil.FakeEELicense + if isLicensed { + license = testutil.NewFakeEELicense(testutil.WithIsValid()) + } else { + license = testutil.NewFakeEELicense() + } + + neosyncDb := neosyncdb.New(pgcontainer.DB, db_queries.New()) + + var billingclient billing.Interface + if isNeosyncCloud { + billingclient = s.Mocks.Billingclient + } else { + billingclient = nil + } + + userService := v1alpha1_useraccountservice.New( + &v1alpha1_useraccountservice.Config{IsAuthEnabled: isAuthEnabled, IsNeosyncCloud: isNeosyncCloud, DefaultMaxAllowedRecords: &maxAllowed}, + neosyncdb.New(pgcontainer.DB, db_queries.New()), + s.Mocks.TemporalConfigProvider, + s.Mocks.Authclient, + s.Mocks.Authmanagerclient, + billingclient, + rbacClient, // rbac client + license, + ) + userclient := userdata.NewClient(userService, rbacClient, license) + + transformerService := v1alpha1_transformersservice.New( + &v1alpha1_transformersservice.Config{ + IsPresidioEnabled: isPresidioEnabled, + IsNeosyncCloud: isNeosyncCloud, + }, + neosyncdb.New(pgcontainer.DB, db_queries.New()), + s.Mocks.Presidio.Entities, + userclient, + ) + + sqlmanagerclient := NewTestSqlManagerClient() + + connectionService := v1alpha1_connectionservice.New( + &v1alpha1_connectionservice.Config{}, + neosyncDb, + userclient, + mongoconnect.NewConnector(), + awsmanager.New(), + sqlmanagerclient, + &sqlconnect.SqlOpenConnector{}, + ) + + var jobhookService *jobhooks.Service + if isLicensed { + jobhookService = jobhooks.New( + neosyncDb, + userclient, + jobhooks.WithEnabled(), + ) + } else { + jobhookService = jobhooks.New( + neosyncDb, + userclient, + ) + } + + jobService := v1alpha1_jobservice.New( + &v1alpha1_jobservice.Config{IsAuthEnabled: isAuthEnabled, IsNeosyncCloud: isNeosyncCloud}, + neosyncDb, + s.Mocks.TemporalClientManager, + connectionService, + sqlmanagerclient, + jobhookService, + userclient, + ) + + var presAnalyzeClient presidioapi.AnalyzeInterface + var presAnonClient presidioapi.AnonymizeInterface + + anonymizationService := v1alpha_anonymizationservice.New( + &v1alpha_anonymizationservice.Config{IsPresidioEnabled: isPresidioEnabled, IsAuthEnabled: isAuthEnabled, IsNeosyncCloud: isNeosyncCloud}, + nil, // meter + userclient, + userService, + presAnalyzeClient, presAnonClient, + neosyncDb, + ) + + connectionDataService := v1alpha1_connectiondataservice.New( + &v1alpha1_connectiondataservice.Config{}, + connectionService, + jobService, + awsmanager.New(), + &sqlconnect.SqlOpenConnector{}, + pg_queries.New(), + mysql_queries.New(), + mongoconnect.NewConnector(), + sqlmanagerclient, + neosync_gcp.NewManager(), + neosynctypes.NewTypeRegistry(logger), + ) + + mux := http.NewServeMux() + + interceptors := []connect.Interceptor{} + + if isAuthEnabled { + interceptors = append(interceptors, authinterceptor) + } + + mux.Handle(mgmtv1alpha1connect.NewUserAccountServiceHandler( + userService, + connect.WithInterceptors(interceptors...), + )) + mux.Handle(mgmtv1alpha1connect.NewTransformersServiceHandler( + transformerService, + connect.WithInterceptors(interceptors...), + )) + mux.Handle(mgmtv1alpha1connect.NewConnectionServiceHandler( + connectionService, + connect.WithInterceptors(interceptors...), + )) + mux.Handle(mgmtv1alpha1connect.NewJobServiceHandler( + jobService, + connect.WithInterceptors(interceptors...), + )) + mux.Handle(mgmtv1alpha1connect.NewAnonymizationServiceHandler( + anonymizationService, + connect.WithInterceptors(interceptors...), + )) + mux.Handle(mgmtv1alpha1connect.NewConnectionDataServiceHandler( + connectionDataService, + connect.WithInterceptors(interceptors...), + )) + + return mux, nil +} + +func (s *NeosyncApiTestClient) getEnforcedRbacClient(ctx context.Context, pgcontainer *tcpostgres.PostgresTestContainer) (rbac.Interface, error) { + rbacenforcer, err := enforcer.NewActiveEnforcer(ctx, stdlib.OpenDBFromPool(pgcontainer.DB), "neosync_api.casbin_rule") + if err != nil { + return nil, fmt.Errorf("unable to create rbac enforcer: %w", err) + } + rbacenforcer.EnableAutoSave(true) + err = rbacenforcer.LoadPolicy() + if err != nil { + return nil, fmt.Errorf("unable to load rbac policies: %w", err) + } + return rbac.New(rbacenforcer), nil +} diff --git a/backend/pkg/mssql-querier/system.sql.go b/backend/pkg/mssql-querier/system.sql.go index 20645de67f..c1c22338be 100644 --- a/backend/pkg/mssql-querier/system.sql.go +++ b/backend/pkg/mssql-querier/system.sql.go @@ -29,7 +29,15 @@ SELECT CASE WHEN c.is_computed = 1 THEN cc.definition ELSE NULL - END AS generation_expression + END AS generation_expression, + CASE + WHEN c.is_identity = 1 THEN CAST(IDENT_SEED(s.name + '.' + t.name) AS VARCHAR(50)) + ELSE NULL + END AS identity_seed, + CASE + WHEN c.is_identity = 1 THEN CAST(IDENT_INCR(s.name + '.' + t.name) AS VARCHAR(50)) + ELSE NULL + END AS identity_increment FROM sys.schemas s INNER JOIN sys.tables t ON s.schema_id = t.schema_id @@ -58,6 +66,8 @@ type GetDatabaseSchemaRow struct { IsIdentity bool IsComputed bool GenerationExpression sql.NullString + IdentitySeed sql.NullInt32 + IdentityIncrement sql.NullInt32 } func (q *Queries) GetDatabaseSchema(ctx context.Context, db mysql_queries.DBTX) ([]*GetDatabaseSchemaRow, error) { @@ -83,6 +93,8 @@ func (q *Queries) GetDatabaseSchema(ctx context.Context, db mysql_queries.DBTX) &i.IsIdentity, &i.IsComputed, &i.GenerationExpression, + &i.IdentitySeed, + &i.IdentityIncrement, ); err != nil { return nil, err } @@ -108,6 +120,7 @@ SELECT tp.name AS data_type, CASE WHEN tp.name IN ('nchar', 'nvarchar') AND c.max_length != -1 THEN c.max_length / 2 WHEN tp.name IN ('char', 'varchar') AND c.max_length != -1 THEN c.max_length + WHEN tp.name IN ('binary', 'varbinary') AND c.max_length != -1 THEN c.max_length ELSE NULL END AS character_maximum_length, c.precision AS numeric_precision, diff --git a/backend/pkg/sqlmanager/mssql/mssql-manager.go b/backend/pkg/sqlmanager/mssql/mssql-manager.go index ee2420d56a..ff5e79053b 100644 --- a/backend/pkg/sqlmanager/mssql/mssql-manager.go +++ b/backend/pkg/sqlmanager/mssql/mssql-manager.go @@ -3,9 +3,7 @@ package sqlmanager_mssql import ( "context" "fmt" - "regexp" "slices" - "strconv" "strings" "github.com/doug-martin/goqu/v9" @@ -64,6 +62,18 @@ func (m *Manager) GetDatabaseSchema(ctx context.Context) ([]*sqlmanager_shared.D generatedType = &row.GenerationExpression.String } + var identitySeed *int + if row.IdentitySeed.Valid { + seed := int(row.IdentitySeed.Int32) + identitySeed = &seed + } + + var identityIncrement *int + if row.IdentityIncrement.Valid { + increment := int(row.IdentityIncrement.Int32) + identityIncrement = &increment + } + output = append(output, &sqlmanager_shared.DatabaseSchemaRow{ TableSchema: row.TableSchema, TableName: row.TableName, @@ -77,6 +87,8 @@ func (m *Manager) GetDatabaseSchema(ctx context.Context) ([]*sqlmanager_shared.D NumericPrecision: numericPrecision, NumericScale: numericScale, IdentityGeneration: identityGeneration, + IdentitySeed: identitySeed, + IdentityIncrement: identityIncrement, }) } @@ -290,19 +302,10 @@ func BuildMssqlDeleteStatement( // Resets current identity value back to the initial count func BuildMssqlIdentityColumnResetStatement( - schema, table, identityGeneration string, + schema, table string, identitySeed, identityIncrement *int, ) string { - re := regexp.MustCompile(`IDENTITY\((\d+),\d+\)`) - match := re.FindStringSubmatch(identityGeneration) - if len(match) > 1 { - StartValue, err := strconv.Atoi(match[1]) - if err != nil { - StartValue = 0 - } - if StartValue > 0 { - StartValue-- - } - return fmt.Sprintf("DBCC CHECKIDENT ('%s.%s', RESEED, %d);", schema, table, StartValue) + if identitySeed != nil && identityIncrement != nil { + return fmt.Sprintf("DBCC CHECKIDENT ('%s.%s', RESEED, %d);", schema, table, *identitySeed) } return BuildMssqlIdentityColumnResetCurrent(schema, table) } diff --git a/backend/pkg/sqlmanager/shared/types.go b/backend/pkg/sqlmanager/shared/types.go index 6a923197aa..9827a5d217 100644 --- a/backend/pkg/sqlmanager/shared/types.go +++ b/backend/pkg/sqlmanager/shared/types.go @@ -22,6 +22,8 @@ type DatabaseSchemaRow struct { OrdinalPosition int GeneratedType *string IdentityGeneration *string + IdentitySeed *int + IdentityIncrement *int } func (d *DatabaseSchemaRow) NullableString() string { diff --git a/backend/protos/mgmt/v1alpha1/auth.proto b/backend/protos/mgmt/v1alpha1/auth.proto index 58cc3a48a5..7ec05cb274 100644 --- a/backend/protos/mgmt/v1alpha1/auth.proto +++ b/backend/protos/mgmt/v1alpha1/auth.proto @@ -52,14 +52,6 @@ message GetAuthorizeUrlResponse { string url = 1; } -message GetCliIssuerRequest {} -message GetCliIssuerResponse { - // The backing authentication issuer url - string issuer_url = 1; - // The audience that will be used in the access token. This corresponds to the "aud" claim - string audience = 2; -} - message RefreshCliRequest { // The token used to retrieve a new access token. string refresh_token = 1 [(buf.validate.field).string.min_len = 1]; @@ -82,9 +74,7 @@ service AuthService { rpc RefreshCli(RefreshCliRequest) returns (RefreshCliResponse) {} // Empty endpoint to simply check if the provided access token is valid rpc CheckToken(CheckTokenRequest) returns (CheckTokenResponse) {} - // Used by the CLI to retrieve Auth Issuer information - // @deprecated - rpc GetCliIssuer(GetCliIssuerRequest) returns (GetCliIssuerResponse) {} + // Used by the CLI to retrieve an Authorize URL for use with OAuth login. rpc GetAuthorizeUrl(GetAuthorizeUrlRequest) returns (GetAuthorizeUrlResponse) {} diff --git a/backend/protos/mgmt/v1alpha1/connection.proto b/backend/protos/mgmt/v1alpha1/connection.proto index 88630eba02..af368f00fc 100644 --- a/backend/protos/mgmt/v1alpha1/connection.proto +++ b/backend/protos/mgmt/v1alpha1/connection.proto @@ -310,7 +310,7 @@ message MysqlConnectionConfig { } message AwsS3ConnectionConfig { - string bucket_arn = 1 [deprecated = true]; + reserved 1; // Was: string bucket_arn = 1 [deprecated = true]; optional string path_prefix = 2; optional AwsS3Credentials credentials = 3; optional string region = 4; diff --git a/backend/protos/mgmt/v1alpha1/connection_data.proto b/backend/protos/mgmt/v1alpha1/connection_data.proto index dd05d286a1..7591aa960a 100644 --- a/backend/protos/mgmt/v1alpha1/connection_data.proto +++ b/backend/protos/mgmt/v1alpha1/connection_data.proto @@ -42,8 +42,9 @@ message GetConnectionDataStreamRequest { // Each stream response is a single row in the requested schema and table message GetConnectionDataStreamResponse { - // A map of column name to the bytes value of the data that was found for that column and row - map row = 1; + reserved 1; // Was: map row = 1; + // A map of column name to column value, where the value is serialized as bytes. The value represents a map[string]any structure. + bytes row_bytes = 2; } message PostgresSchemaConfig {} @@ -129,22 +130,15 @@ message GetConnectionSchemaMapsResponse { repeated string connection_ids = 2; } -message GetConnectionForeignConstraintsRequest { - string connection_id = 1 [(buf.validate.field).string.uuid = true]; -} - message ForeignKey { string table = 1; - // @deprecated - use columns - string column = 2; + reserved 2; // Was: string column = 2; repeated string columns = 3; } message ForeignConstraint { - // @deprecated - use columns - string column = 1; - // @deprecated - use not_nullable - bool is_nullable = 2; + reserved 1; // Was: string column = 1; + reserved 2; // Was: bool is_nullable = 2; ForeignKey foreign_key = 3; repeated string columns = 4; repeated bool not_nullable = 5; @@ -154,12 +148,6 @@ message ForeignConstraintTables { repeated ForeignConstraint constraints = 1; } -// Dependency constraints for a specific table -message GetConnectionForeignConstraintsResponse { - // the key here is .
and the list of tables that it depends on, also `.
` format. - map table_constraints = 1; -} - message InitStatementOptions { bool init_schema = 1; bool truncate_before_insert = 2; @@ -188,26 +176,6 @@ message PrimaryConstraint { repeated string columns = 1; } -// Primary constraints for a specific table -message GetConnectionPrimaryConstraintsRequest { - string connection_id = 1 [(buf.validate.field).string.uuid = true]; -} - -message GetConnectionPrimaryConstraintsResponse { - // the key here is .
and value is the primary constraint - map table_constraints = 1; -} - -// Unique constraints for a specific table -message GetConnectionUniqueConstraintsRequest { - string connection_id = 1 [(buf.validate.field).string.uuid = true]; -} - -message GetConnectionUniqueConstraintsResponse { - // the key here is .
and value is the unique constraint - map table_constraints = 1; -} - message UniqueConstraint { repeated string columns = 1; } @@ -276,17 +244,9 @@ service ConnectionDataService { rpc GetConnectionSchemaMaps(GetConnectionSchemaMapsRequest) returns (GetConnectionSchemaMapsResponse) {} // For a specific connection, returns the table constraints. Mostly useful for SQL-based Connections. rpc GetConnectionTableConstraints(GetConnectionTableConstraintsRequest) returns (GetConnectionTableConstraintsResponse) {} - // For a specific connection, returns the foreign key constraints. Mostly useful for SQL-based Connections. - // Used primarily by the CLI sync command to determine stream order. - rpc GetConnectionForeignConstraints(GetConnectionForeignConstraintsRequest) returns (GetConnectionForeignConstraintsResponse) {} - // For a specific connection, returns the primary key constraints. Mostly useful for SQL-based Connections. - // Used primarily by the CLI sync command to determine stream order. - rpc GetConnectionPrimaryConstraints(GetConnectionPrimaryConstraintsRequest) returns (GetConnectionPrimaryConstraintsResponse) {} // For a specific connection, returns the init table statements. Mostly useful for SQL-based Connections. // Used primarily by the CLI sync command to create table schema init statement. rpc GetConnectionInitStatements(GetConnectionInitStatementsRequest) returns (GetConnectionInitStatementsResponse) {} - // For a specific connection, returns the unique constraints. Mostly useful for SQL-based connections. - rpc GetConnectionUniqueConstraints(GetConnectionUniqueConstraintsRequest) returns (GetConnectionUniqueConstraintsResponse) {} // Query an AI connection by providing the necessary values. Typically used for generating preview data rpc GetAiGeneratedData(GetAiGeneratedDataRequest) returns (GetAiGeneratedDataResponse) {} // Query table with subset to get row count diff --git a/backend/protos/mgmt/v1alpha1/job.proto b/backend/protos/mgmt/v1alpha1/job.proto index dde8b6c31d..a596fc490d 100644 --- a/backend/protos/mgmt/v1alpha1/job.proto +++ b/backend/protos/mgmt/v1alpha1/job.proto @@ -130,8 +130,7 @@ message DynamoDBSourceTableOption { } message PostgresSourceConnectionOptions { - // @deprecated - Use new_column_addition_strategy instead - optional bool halt_on_new_column_addition = 1; + reserved 1; // Was: optional bool halt_on_new_column_addition = 1; repeated PostgresSourceSchemaOption schemas = 2; string connection_id = 3 [(buf.validate.field).string.uuid = true]; bool subset_by_foreign_key_constraints = 4; @@ -140,7 +139,7 @@ message PostgresSourceConnectionOptions { message NewColumnAdditionStrategy { oneof strategy { - // halt job if a new column is detected. This is equiavlent to the deprecated halt_on_new_column_addition + // halt job if a new column is detected. HaltJob halt_job = 1; // automatically handle unmapped columns. It handles this by using the DBs default/nullable values. // If this doesn't exist, will fall back to configuring generators for supported datatypes. @@ -385,8 +384,8 @@ message CreateJobResponse { } message JobMappingTransformer { - // @deprecated - This is no longer used in favor just providing the TransformerConfig - TransformerSource source = 1; + reserved 1; // Was: TransformerSource source = 1; + TransformerConfig config = 3; } diff --git a/backend/protos/mgmt/v1alpha1/metrics.proto b/backend/protos/mgmt/v1alpha1/metrics.proto index d0cb09d063..620ed5e85d 100644 --- a/backend/protos/mgmt/v1alpha1/metrics.proto +++ b/backend/protos/mgmt/v1alpha1/metrics.proto @@ -3,7 +3,6 @@ syntax = "proto3"; package mgmt.v1alpha1; import "buf/validate/validate.proto"; -import "google/protobuf/timestamp.proto"; // Represents a whole or partial calendar date, such as a birthday. The time of // day and time zone are either specified elsewhere or are insignificant. The @@ -89,10 +88,8 @@ message DayResult { } message GetMetricCountRequest { - // @deprecated - use start_day - google.protobuf.Timestamp start = 1; - // @deprecated - use end_day - google.protobuf.Timestamp end = 2; + reserved 1; // Was: google.protobuf.Timestamp start = 1; + reserved 2; // Was: google.protobuf.Timestamp end = 2; // The metric to return RangedMetricName metric = 3; diff --git a/backend/protos/mgmt/v1alpha1/transformer.proto b/backend/protos/mgmt/v1alpha1/transformer.proto index 440ac8d487..9556152d76 100644 --- a/backend/protos/mgmt/v1alpha1/transformer.proto +++ b/backend/protos/mgmt/v1alpha1/transformer.proto @@ -39,8 +39,7 @@ message CreateUserDefinedTransformerRequest { string account_id = 1 [(buf.validate.field).string.uuid = true]; string name = 2 [(buf.validate.field).string.pattern = "^[a-z0-9-]{3,100}$"]; string description = 3; - // @deprecated - string type = 4; + reserved 4; // Was: string type = 4; TransformerSource source = 5; TransformerConfig transformer_config = 6; } @@ -474,8 +473,7 @@ message UserDefinedTransformerConfig { } message ValidateUserJavascriptCodeRequest { - // @deprecated - an account isn't required to validate js code - string account_id = 1; + reserved 1; // Was: string account_id = 1; string code = 2 [(buf.validate.field).string.min_len = 1]; } @@ -497,8 +495,7 @@ message GenerateJavascript { } message ValidateUserRegexCodeRequest { - // @deprecated - an account isn't required to validate js code - string account_id = 1; + reserved 1; // Was: string account_id = 1; string user_provided_regex = 2; } diff --git a/backend/protos/mgmt/v1alpha1/user_account.proto b/backend/protos/mgmt/v1alpha1/user_account.proto index 5bcc7f269a..dda504d4b2 100644 --- a/backend/protos/mgmt/v1alpha1/user_account.proto +++ b/backend/protos/mgmt/v1alpha1/user_account.proto @@ -175,7 +175,19 @@ message GetSystemInformationResponse { string compiler = 3; // The Go platform flag that was used to build this version of Neosync string platform = 4; + // The time when the build was created google.protobuf.Timestamp build_date = 5; + // The license information for the system + SystemLicense license = 6; +} + +message SystemLicense { + // Whether or not a valid license was found + bool is_valid = 1; + // The time when the license expires + google.protobuf.Timestamp expires_at = 2; + // Whether or not the license is for NeosyncCloud + bool is_neosync_cloud = 3; } message GetAccountOnboardingConfigRequest { @@ -194,14 +206,10 @@ message SetAccountOnboardingConfigResponse { } message AccountOnboardingConfig { - // @deprecated - use has_completed_onboarding - bool has_created_source_connection = 1; - // @deprecated - use has_completed_onboarding - bool has_created_destination_connection = 2; - // @deprecated - use has_completed_onboarding - bool has_created_job = 3; - // @deprecated - use has_completed_onboarding - bool has_invited_members = 4; + reserved 1; // Was: bool has_created_source_connection = 1; + reserved 2; // Was: bool has_created_destination_connection = 2; + reserved 3; // Was: bool has_created_job = 3; + reserved 4; // Was: bool has_invited_members = 4; bool has_completed_onboarding = 5; } @@ -247,11 +255,9 @@ message IsAccountStatusValidResponse { bool should_poll = 3; // A count of the currently used records for the current billing period. // This may go over the allowed record count depending on when the record count is polled by the metric system. - // @deprecated - uint64 used_record_count = 4; + reserved 4; // Was: uint64 used_record_count = 4; // The allowed record count. It will be null if there is no limit. - // @deprecated - optional uint64 allowed_record_count = 5; + reserved 5; // Was: optional uint64 allowed_record_count = 5; // The current status of the account. Default is valid. AccountStatus account_status = 6; // The time when the trial expires @@ -261,10 +267,8 @@ message IsAccountStatusValidResponse { enum AccountStatus { // Default value, should be used when no reason is specified ACCOUNT_STATUS_REASON_UNSPECIFIED = 0; - // @deprecated - Current usage exceeds allowed limit - ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT = 1; - // @deprecated - Adding requested records exceeds the allowed limit - ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT = 2; + reserved 1, 2; + reserved "ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT", "ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT"; // Account is currently in an expired state ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE = 3; // The account is currently in an active trial period diff --git a/backend/services/mgmt/v1alpha1/anonymization-service/anonymization.go b/backend/services/mgmt/v1alpha1/anonymization-service/anonymization.go index 3765c362c0..264a083e6c 100644 --- a/backend/services/mgmt/v1alpha1/anonymization-service/anonymization.go +++ b/backend/services/mgmt/v1alpha1/anonymization-service/anonymization.go @@ -12,7 +12,6 @@ import ( "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" nucleuserrors "github.com/nucleuscloud/neosync/backend/internal/errors" "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" - "github.com/nucleuscloud/neosync/backend/internal/userdata" "github.com/nucleuscloud/neosync/backend/pkg/metrics" jsonanonymizer "github.com/nucleuscloud/neosync/internal/json-anonymizer" "go.opentelemetry.io/otel/attribute" @@ -40,7 +39,7 @@ func (s *Service) AnonymizeMany( if err != nil { return nil, err } - err = userdata.EnforceAccountAccess(ctx, user, req.Msg.GetAccountId()) + err = user.EnforceAccountAccess(ctx, req.Msg.GetAccountId()) if err != nil { return nil, err } @@ -140,7 +139,7 @@ func (s *Service) AnonymizeSingle( if err != nil { return nil, err } - err = userdata.EnforceAccountAccess(ctx, user, req.Msg.GetAccountId()) + err = user.EnforceAccountAccess(ctx, req.Msg.GetAccountId()) if err != nil { return nil, err } diff --git a/backend/services/mgmt/v1alpha1/auth-service/tokens.go b/backend/services/mgmt/v1alpha1/auth-service/tokens.go index 9aa5a163bc..06c0a711bd 100644 --- a/backend/services/mgmt/v1alpha1/auth-service/tokens.go +++ b/backend/services/mgmt/v1alpha1/auth-service/tokens.go @@ -112,16 +112,6 @@ func (s *Service) GetAuthorizeUrl( }), nil } -func (s *Service) GetCliIssuer( - ctx context.Context, - req *connect.Request[mgmtv1alpha1.GetCliIssuerRequest], -) (*connect.Response[mgmtv1alpha1.GetCliIssuerResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.GetCliIssuerResponse{ - Audience: s.cfg.CliAudience, - IssuerUrl: s.cfg.IssuerUrl, - }), nil -} - func (s *Service) CheckToken( ctx context.Context, req *connect.Request[mgmtv1alpha1.CheckTokenRequest], diff --git a/backend/services/mgmt/v1alpha1/connection-data-service/connection-data.go b/backend/services/mgmt/v1alpha1/connection-data-service/connection-data.go index 6a272d2cf7..5a1b6e0aa5 100644 --- a/backend/services/mgmt/v1alpha1/connection-data-service/connection-data.go +++ b/backend/services/mgmt/v1alpha1/connection-data-service/connection-data.go @@ -1,8 +1,10 @@ package v1alpha1_connectiondataservice import ( + "bytes" "compress/gzip" "context" + "encoding/gob" "encoding/json" "errors" "fmt" @@ -30,12 +32,20 @@ import ( sqlmanager_shared "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager/shared" connectionmanager "github.com/nucleuscloud/neosync/internal/connection-manager" neosync_dynamodb "github.com/nucleuscloud/neosync/internal/dynamodb" + neosyncgob "github.com/nucleuscloud/neosync/internal/gob" + myutil "github.com/nucleuscloud/neosync/internal/mysql" + pgutil "github.com/nucleuscloud/neosync/internal/postgres" querybuilder "github.com/nucleuscloud/neosync/worker/pkg/query-builder" + "go.mongodb.org/mongo-driver/bson" "golang.org/x/sync/errgroup" "google.golang.org/protobuf/types/known/structpb" ) +func init() { + neosyncgob.RegisterGobTypes() +} + type DatabaseSchema struct { TableSchema string `db:"table_schema,omitempty"` TableName string `db:"table_name,omitempty"` @@ -61,6 +71,9 @@ func (ds *DateScanner) Scan(input any) error { } } +// GetConnectionDataStream streams data from a connection source (e.g. MySQL, Postgres, S3, etc) +// The data is first converted from its native format into Go types, then encoded using gob encoding +// before being streamed back to the client. func (s *Service) GetConnectionDataStream( ctx context.Context, req *connect.Request[mgmtv1alpha1.GetConnectionDataStreamRequest], @@ -85,7 +98,7 @@ func (s *Service) GetConnectionDataStream( return err } - conn, err := s.sqlConnector.NewDbFromConnectionConfig(connection.ConnectionConfig, logger, sqlconnect.WithConnectionTimeout(connectionTimeout), sqlconnect.WithMysqlParseTimeDisabled()) + conn, err := s.sqlConnector.NewDbFromConnectionConfig(connection.ConnectionConfig, logger, sqlconnect.WithConnectionTimeout(connectionTimeout)) if err != nil { return err } @@ -97,7 +110,7 @@ func (s *Service) GetConnectionDataStream( table := sqlmanager_shared.BuildTable(req.Msg.Schema, req.Msg.Table) // used to get column names - query, err := querybuilder.BuildSelectLimitQuery("mysql", table, 1) + query, err := querybuilder.BuildSelectLimitQuery("mysql", table, 0) if err != nil { return err } @@ -121,21 +134,16 @@ func (s *Service) GetConnectionDataStream( } for rows.Next() { - values := make([][]byte, len(columnNames)) - valuesWrapped := make([]any, 0, len(columnNames)) - for i := range values { - valuesWrapped = append(valuesWrapped, &values[i]) - } - if err := rows.Scan(valuesWrapped...); err != nil { - return err + r, err := myutil.MysqlSqlRowToMap(rows) + if err != nil { + return fmt.Errorf("unable to convert mysql row to map: %w", err) } - row := map[string][]byte{} - for i, v := range values { - col := columnNames[i] - row[col] = v + var rowbytes bytes.Buffer + enc := gob.NewEncoder(&rowbytes) + if err := enc.Encode(r); err != nil { + return fmt.Errorf("unable to encode mysql row: %w", err) } - - if err := stream.Send(&mgmtv1alpha1.GetConnectionDataStreamResponse{Row: row}); err != nil { + if err := stream.Send(&mgmtv1alpha1.GetConnectionDataStreamResponse{RowBytes: rowbytes.Bytes()}); err != nil { return err } } @@ -158,7 +166,7 @@ func (s *Service) GetConnectionDataStream( table := sqlmanager_shared.BuildTable(req.Msg.Schema, req.Msg.Table) // used to get column names - query, err := querybuilder.BuildSelectLimitQuery(sqlmanager_shared.GoquPostgresDriver, table, 1) + query, err := querybuilder.BuildSelectLimitQuery(sqlmanager_shared.GoquPostgresDriver, table, 0) if err != nil { return err } @@ -183,23 +191,17 @@ func (s *Service) GetConnectionDataStream( } defer rows.Close() - // todo: this is probably way fucking broken now for rows.Next() { - values := make([][]byte, len(columnNames)) - valuesWrapped := make([]any, 0, len(columnNames)) - for i := range values { - valuesWrapped = append(valuesWrapped, &values[i]) - } - if err := rows.Scan(valuesWrapped...); err != nil { - return err + r, err := pgutil.SqlRowToPgTypesMap(rows) + if err != nil { + return fmt.Errorf("unable to convert postgres row to map: %w", err) } - row := map[string][]byte{} - for i, v := range values { - col := columnNames[i] - row[col] = v + var rowbytes bytes.Buffer + enc := gob.NewEncoder(&rowbytes) + if err := enc.Encode(r); err != nil { + return fmt.Errorf("unable to encode postgres row using gob: %w", err) } - - if err := stream.Send(&mgmtv1alpha1.GetConnectionDataStreamResponse{Row: row}); err != nil { + if err := stream.Send(&mgmtv1alpha1.GetConnectionDataStreamResponse{RowBytes: rowbytes.Bytes()}); err != nil { return err } } @@ -282,10 +284,9 @@ func (s *Service) GetConnectionDataStream( decoder := json.NewDecoder(gzr) for { - var data map[string]any - + var rowData map[string]any // Decode the next JSON object - err = decoder.Decode(&data) + err = decoder.Decode(&rowData) if err != nil && err == io.EOF { break // End of file, stop the loop } else if err != nil { @@ -293,29 +294,25 @@ func (s *Service) GetConnectionDataStream( gzr.Close() return err } - rowMap := make(map[string][]byte) - for key, value := range data { - var byteValue []byte - switch v := value.(type) { - case string: - // try converting string directly to []byte - // prevents quoted strings - byteValue = []byte(v) - default: - // if not a string use JSON encoding - byteValue, err = json.Marshal(v) - if err != nil { - result.Body.Close() - gzr.Close() - return err - } - if string(byteValue) == "null" { - byteValue = nil - } + + for k, v := range rowData { + newVal, err := s.neosynctyperegistry.Unmarshal(v) + if err != nil { + return fmt.Errorf("unable to unmarshal row value using neosync type registry: %w", err) } - rowMap[key] = byteValue + rowData[k] = newVal + } + + // Encode the row data using gob + var rowbytes bytes.Buffer + enc := gob.NewEncoder(&rowbytes) + if err := enc.Encode(rowData); err != nil { + result.Body.Close() + gzr.Close() + return fmt.Errorf("unable to encode S3 row data using gob: %w", err) } - if err := stream.Send(&mgmtv1alpha1.GetConnectionDataStreamResponse{Row: rowMap}); err != nil { + + if err := stream.Send(&mgmtv1alpha1.GetConnectionDataStreamResponse{RowBytes: rowbytes.Bytes()}); err != nil { result.Body.Close() gzr.Close() return err @@ -357,7 +354,12 @@ func (s *Service) GetConnectionDataStream( } onRecord := func(record map[string][]byte) error { - return stream.Send(&mgmtv1alpha1.GetConnectionDataStreamResponse{Row: record}) + var rowbytes bytes.Buffer + enc := gob.NewEncoder(&rowbytes) + if err := enc.Encode(record); err != nil { + return fmt.Errorf("unable to encode gcp record using gob: %w", err) + } + return stream.Send(&mgmtv1alpha1.GetConnectionDataStreamResponse{RowBytes: rowbytes.Bytes()}) } tablePath := neosync_gcp.GetWorkflowActivityDataPrefix(jobRunId, sqlmanager_shared.BuildTable(req.Msg.Schema, req.Msg.Table), gcpConfig.PathPrefix) err = gcpclient.GetRecordStreamFromPrefix(ctx, gcpConfig.GetBucket(), tablePath, onRecord) @@ -378,14 +380,17 @@ func (s *Service) GetConnectionDataStream( } for _, item := range output.Items { - row := make(map[string][]byte) - - itemBits, err := neosync_dynamodb.ConvertMapToJSONBytes(item) + itemBits, err := neosync_dynamodb.ConvertDynamoItemToGoMap(item) if err != nil { return err } - row["item"] = itemBits - if err := stream.Send(&mgmtv1alpha1.GetConnectionDataStreamResponse{Row: row}); err != nil { + + var itemBytes bytes.Buffer + enc := gob.NewEncoder(&itemBytes) + if err := enc.Encode(itemBits); err != nil { + return fmt.Errorf("unable to encode dynamodb item using gob: %w", err) + } + if err := stream.Send(&mgmtv1alpha1.GetConnectionDataStreamResponse{RowBytes: itemBytes.Bytes()}); err != nil { return fmt.Errorf("failed to send stream response: %w", err) } } @@ -733,113 +738,6 @@ func (s *Service) GetConnectionSchema( } } -func (s *Service) GetConnectionForeignConstraints( - ctx context.Context, - req *connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest], -) (*connect.Response[mgmtv1alpha1.GetConnectionForeignConstraintsResponse], error) { - logger := logger_interceptor.GetLoggerFromContextOrDefault(ctx) - connection, err := s.connectionService.GetConnection(ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionRequest{ - Id: req.Msg.ConnectionId, - })) - if err != nil { - return nil, err - } - - schemaResp, err := s.getConnectionSchema(ctx, connection.Msg.Connection, &schemaOpts{}) - if err != nil { - return nil, err - } - - schemaMap := map[string]struct{}{} - for _, s := range schemaResp { - schemaMap[s.Schema] = struct{}{} - } - schemas := []string{} - for s := range schemaMap { - schemas = append(schemas, s) - } - - db, err := s.sqlmanager.NewSqlConnection(ctx, connectionmanager.NewUniqueSession(), connection.Msg.GetConnection(), logger) - if err != nil { - return nil, err - } - defer db.Db().Close() - constraints, err := db.Db().GetTableConstraintsBySchema(ctx, schemas) - if err != nil { - return nil, err - } - - tableConstraints := map[string]*mgmtv1alpha1.ForeignConstraintTables{} - for tableName, d := range constraints.ForeignKeyConstraints { - tableConstraints[tableName] = &mgmtv1alpha1.ForeignConstraintTables{ - Constraints: []*mgmtv1alpha1.ForeignConstraint{}, - } - for _, constraint := range d { - for idx, col := range constraint.Columns { - tableConstraints[tableName].Constraints = append(tableConstraints[tableName].Constraints, &mgmtv1alpha1.ForeignConstraint{ - Column: col, IsNullable: !constraint.NotNullable[idx], ForeignKey: &mgmtv1alpha1.ForeignKey{ - Table: constraint.ForeignKey.Table, - Column: constraint.ForeignKey.Columns[idx], - }, - }) - } - } - } - - return connect.NewResponse(&mgmtv1alpha1.GetConnectionForeignConstraintsResponse{ - TableConstraints: tableConstraints, - }), nil -} - -func (s *Service) GetConnectionPrimaryConstraints( - ctx context.Context, - req *connect.Request[mgmtv1alpha1.GetConnectionPrimaryConstraintsRequest], -) (*connect.Response[mgmtv1alpha1.GetConnectionPrimaryConstraintsResponse], error) { - logger := logger_interceptor.GetLoggerFromContextOrDefault(ctx) - connection, err := s.connectionService.GetConnection(ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionRequest{ - Id: req.Msg.ConnectionId, - })) - if err != nil { - return nil, err - } - - schemaResp, err := s.getConnectionSchema(ctx, connection.Msg.Connection, &schemaOpts{}) - if err != nil { - return nil, err - } - - schemaMap := map[string]struct{}{} - for _, s := range schemaResp { - schemaMap[s.Schema] = struct{}{} - } - schemas := []string{} - for s := range schemaMap { - schemas = append(schemas, s) - } - - db, err := s.sqlmanager.NewSqlConnection(ctx, connectionmanager.NewUniqueSession(), connection.Msg.GetConnection(), logger) - if err != nil { - return nil, err - } - defer db.Db().Close() - - constraints, err := db.Db().GetTableConstraintsBySchema(ctx, schemas) - if err != nil { - return nil, err - } - - tableConstraints := map[string]*mgmtv1alpha1.PrimaryConstraint{} - for tableName, cols := range constraints.PrimaryKeyConstraints { - tableConstraints[tableName] = &mgmtv1alpha1.PrimaryConstraint{ - Columns: cols, - } - } - - return connect.NewResponse(&mgmtv1alpha1.GetConnectionPrimaryConstraintsResponse{ - TableConstraints: tableConstraints, - }), nil -} - func (s *Service) GetConnectionInitStatements( ctx context.Context, req *connect.Request[mgmtv1alpha1.GetConnectionInitStatementsRequest], @@ -1178,60 +1076,6 @@ func isValidSchema(schema string, columns []*mgmtv1alpha1.DatabaseColumn) bool { return false } -func (s *Service) GetConnectionUniqueConstraints( - ctx context.Context, - req *connect.Request[mgmtv1alpha1.GetConnectionUniqueConstraintsRequest], -) (*connect.Response[mgmtv1alpha1.GetConnectionUniqueConstraintsResponse], error) { - logger := logger_interceptor.GetLoggerFromContextOrDefault(ctx) - connection, err := s.connectionService.GetConnection(ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionRequest{ - Id: req.Msg.ConnectionId, - })) - if err != nil { - return nil, err - } - - schemaResp, err := s.getConnectionSchema(ctx, connection.Msg.Connection, &schemaOpts{}) - if err != nil { - return nil, err - } - - schemaMap := map[string]struct{}{} - for _, s := range schemaResp { - schemaMap[s.Schema] = struct{}{} - } - schemas := []string{} - for s := range schemaMap { - schemas = append(schemas, s) - } - - db, err := s.sqlmanager.NewSqlConnection(ctx, connectionmanager.NewUniqueSession(), connection.Msg.GetConnection(), logger) - if err != nil { - return nil, err - } - defer db.Db().Close() - - constraints, err := db.Db().GetTableConstraintsBySchema(ctx, schemas) - if err != nil { - return nil, err - } - - tableConstraints := map[string]*mgmtv1alpha1.UniqueConstraint{} - for tableName, uc := range constraints.UniqueConstraints { - columns := []string{} - for _, c := range uc { - columns = append(columns, c...) - } - tableConstraints[tableName] = &mgmtv1alpha1.UniqueConstraint{ - // TODO: this doesn't fully represent unique constraints - Columns: columns, - } - } - - return connect.NewResponse(&mgmtv1alpha1.GetConnectionUniqueConstraintsResponse{ - TableConstraints: tableConstraints, - }), nil -} - type completionResponse struct { Data []map[string]any `json:"data"` } diff --git a/backend/services/mgmt/v1alpha1/connection-data-service/connection-data_test.go b/backend/services/mgmt/v1alpha1/connection-data-service/connection-data_test.go index fc6b15f9e1..2928cf662c 100644 --- a/backend/services/mgmt/v1alpha1/connection-data-service/connection-data_test.go +++ b/backend/services/mgmt/v1alpha1/connection-data-service/connection-data_test.go @@ -30,6 +30,8 @@ import ( "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager" sqlmanager_shared "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager/shared" awsmanager "github.com/nucleuscloud/neosync/internal/aws" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" + "github.com/nucleuscloud/neosync/internal/testutil" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) @@ -259,186 +261,6 @@ func Test_GetConnectionSchema_Error(t *testing.T) { require.Nil(t, resp) } -// GetConnectionForeignConstraints -func Test_GetConnectionForeignConstraints_Mysql(t *testing.T) { - m := createServiceMock(t) - defer m.SqlDbMock.Close() - - connection := getConnectionMock(mockAccountId, mockConnectionName, mockConnectionId, MysqlMock) - m.ConnectionServiceMock.On("GetConnection", mock.Anything, mock.Anything).Return(connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: connection, - }), nil) - m.SqlManagerMock.On("NewSqlConnection", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Twice().Return( - sqlmanager.NewMysqlSqlConnection(m.DbMock), nil, - ) - m.DbMock.On("Close").Return(nil) - m.DbMock.On("GetDatabaseSchema", mock.Anything).Return([]*sqlmanager_shared.DatabaseSchemaRow{ - { - TableSchema: "public", - TableName: "users", - ColumnName: "id", - DataType: "integer", - }, - { - TableSchema: "public", - TableName: "users", - ColumnName: "name", - DataType: "character varying", - }}, nil) - m.DbMock.On("GetTableConstraintsBySchema", mock.Anything, mock.Anything).Return(&sqlmanager_shared.TableConstraints{ - ForeignKeyConstraints: map[string][]*sqlmanager_shared.ForeignConstraint{ - "public.user_account_associations": {{Columns: []string{"user_id"}, NotNullable: []bool{true}, ForeignKey: &sqlmanager_shared.ForeignKey{Table: "public.users", Columns: []string{"id"}}}}, - }, - }, nil) - - resp, err := m.Service.GetConnectionForeignConstraints(context.Background(), &connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest]{ - Msg: &mgmtv1alpha1.GetConnectionForeignConstraintsRequest{ - ConnectionId: mockConnectionId, - }, - }) - - require.Nil(t, err) - require.Len(t, resp.Msg.TableConstraints, 1) - require.EqualValues(t, map[string]*mgmtv1alpha1.ForeignConstraintTables{ - "public.user_account_associations": {Constraints: []*mgmtv1alpha1.ForeignConstraint{ - {Column: "user_id", IsNullable: false, ForeignKey: &mgmtv1alpha1.ForeignKey{Table: "public.users", Column: "id"}}, - }}, - }, resp.Msg.TableConstraints) -} - -func Test_GetConnectionForeignConstraints_Postgres(t *testing.T) { - m := createServiceMock(t) - defer m.SqlDbMock.Close() - - m.SqlManagerMock.On("NewSqlConnection", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Twice().Return( - sqlmanager.NewPostgresSqlConnection(m.DbMock), nil, - ) - m.DbMock.On("Close").Return(nil) - connection := getConnectionMock(mockAccountId, mockConnectionName, mockConnectionId, PostgresMock) - m.ConnectionServiceMock.On("GetConnection", mock.Anything, mock.Anything).Return(connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: connection, - }), nil) - m.DbMock.On("GetDatabaseSchema", mock.Anything).Return([]*sqlmanager_shared.DatabaseSchemaRow{ - { - TableSchema: "public", - TableName: "users", - ColumnName: "id", - DataType: "integer", - }, - { - TableSchema: "public", - TableName: "users", - ColumnName: "name", - DataType: "character varying", - }}, nil) - m.DbMock.On("GetTableConstraintsBySchema", mock.Anything, mock.Anything).Return(&sqlmanager_shared.TableConstraints{ - ForeignKeyConstraints: map[string][]*sqlmanager_shared.ForeignConstraint{ - "public.user_account_associations": {{Columns: []string{"user_id"}, NotNullable: []bool{true}, ForeignKey: &sqlmanager_shared.ForeignKey{Table: "public.users", Columns: []string{"id"}}}}, - }, - }, nil) - - resp, err := m.Service.GetConnectionForeignConstraints(context.Background(), &connect.Request[mgmtv1alpha1.GetConnectionForeignConstraintsRequest]{ - Msg: &mgmtv1alpha1.GetConnectionForeignConstraintsRequest{ - ConnectionId: mockConnectionId, - }, - }) - - require.NoError(t, err) - require.NotNil(t, resp) - require.Len(t, resp.Msg.TableConstraints, 1) - require.EqualValues(t, map[string]*mgmtv1alpha1.ForeignConstraintTables{ - "public.user_account_associations": {Constraints: []*mgmtv1alpha1.ForeignConstraint{ - {Column: "user_id", IsNullable: false, ForeignKey: &mgmtv1alpha1.ForeignKey{Table: "public.users", Column: "id"}}, - }}, - }, resp.Msg.TableConstraints) -} - -// GetConnectionPrimaryConstraints -func Test_GetConnectionPrimaryConstraints_Mysql(t *testing.T) { - m := createServiceMock(t) - defer m.SqlDbMock.Close() - - connection := getConnectionMock(mockAccountId, mockConnectionName, mockConnectionId, MysqlMock) - m.ConnectionServiceMock.On("GetConnection", mock.Anything, mock.Anything).Return(connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: connection, - }), nil) - m.SqlManagerMock.On("NewSqlConnection", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Twice().Return( - sqlmanager.NewPostgresSqlConnection(m.DbMock), nil, - ) - m.DbMock.On("Close").Return(nil) - m.DbMock.On("GetDatabaseSchema", mock.Anything).Return([]*sqlmanager_shared.DatabaseSchemaRow{ - { - TableSchema: "public", - TableName: "users", - ColumnName: "id", - DataType: "integer", - }, - { - TableSchema: "public", - TableName: "users", - ColumnName: "name", - DataType: "character varying", - }}, nil) - m.DbMock.On("GetTableConstraintsBySchema", mock.Anything, mock.Anything).Return(&sqlmanager_shared.TableConstraints{ - PrimaryKeyConstraints: map[string][]string{"public.users": {"id"}}, - }, nil) - - resp, err := m.Service.GetConnectionPrimaryConstraints(context.Background(), &connect.Request[mgmtv1alpha1.GetConnectionPrimaryConstraintsRequest]{ - Msg: &mgmtv1alpha1.GetConnectionPrimaryConstraintsRequest{ - ConnectionId: mockConnectionId, - }, - }) - - require.Nil(t, err) - require.Len(t, resp.Msg.TableConstraints, 1) - require.EqualValues(t, map[string]*mgmtv1alpha1.PrimaryConstraint{ - "public.users": {Columns: []string{"id"}}, - }, resp.Msg.TableConstraints) -} - -func Test_GetConnectionPrimaryConstraints_Postgres(t *testing.T) { - m := createServiceMock(t) - defer m.SqlDbMock.Close() - - connection := getConnectionMock(mockAccountId, mockConnectionName, mockConnectionId, PostgresMock) - m.ConnectionServiceMock.On("GetConnection", mock.Anything, mock.Anything).Return(connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: connection, - }), nil) - - m.SqlManagerMock.On("NewSqlConnection", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Twice().Return( - sqlmanager.NewPostgresSqlConnection(m.DbMock), nil, - ) - m.DbMock.On("Close").Return(nil) - m.DbMock.On("GetDatabaseSchema", mock.Anything).Return([]*sqlmanager_shared.DatabaseSchemaRow{ - { - TableSchema: "public", - TableName: "users", - ColumnName: "id", - DataType: "integer", - }, - { - TableSchema: "public", - TableName: "users", - ColumnName: "name", - DataType: "character varying", - }}, nil) - m.DbMock.On("GetTableConstraintsBySchema", mock.Anything, mock.Anything).Return(&sqlmanager_shared.TableConstraints{ - PrimaryKeyConstraints: map[string][]string{"public.users": {"id"}}, - }, nil) - - resp, err := m.Service.GetConnectionPrimaryConstraints(context.Background(), &connect.Request[mgmtv1alpha1.GetConnectionPrimaryConstraintsRequest]{ - Msg: &mgmtv1alpha1.GetConnectionPrimaryConstraintsRequest{ - ConnectionId: mockConnectionId, - }, - }) - - require.Nil(t, err) - require.Len(t, resp.Msg.TableConstraints, 1) - require.EqualValues(t, map[string]*mgmtv1alpha1.PrimaryConstraint{ - "public.users": {Columns: []string{"id"}}, - }, resp.Msg.TableConstraints) -} - func Test_GetConnectionInitStatements_Mysql_Create(t *testing.T) { m := createServiceMock(t) defer m.SqlDbMock.Close() @@ -679,6 +501,7 @@ func createServiceMock(t *testing.T) *serviceMocks { mockMongoConnector, mockSqlManager, mockGcpManager, + neosynctypes.NewTypeRegistry(testutil.GetTestLogger(t)), ) return &serviceMocks{ @@ -879,93 +702,3 @@ func Test_isValidSchema(t *testing.T) { }) } } - -// GetConnectionPrimaryConstraints -func Test_GetConnectionUniqueConstraints_Mysql(t *testing.T) { - m := createServiceMock(t) - defer m.SqlDbMock.Close() - - connection := getConnectionMock(mockAccountId, mockConnectionName, mockConnectionId, MysqlMock) - m.ConnectionServiceMock.On("GetConnection", mock.Anything, mock.Anything).Return(connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: connection, - }), nil) - m.SqlManagerMock.On("NewSqlConnection", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Twice().Return( - sqlmanager.NewMysqlSqlConnection(m.DbMock), nil, - ) - m.DbMock.On("Close").Return(nil) - - m.DbMock.On("GetDatabaseSchema", mock.Anything).Return([]*sqlmanager_shared.DatabaseSchemaRow{ - { - TableSchema: "public", - TableName: "users", - ColumnName: "id", - DataType: "integer", - }, - { - TableSchema: "public", - TableName: "users", - ColumnName: "name", - DataType: "character varying", - }}, nil) - - m.DbMock.On("GetTableConstraintsBySchema", mock.Anything, mock.Anything).Return(&sqlmanager_shared.TableConstraints{ - UniqueConstraints: map[string][][]string{"public.users": {{"id"}}}, - }, nil) - - resp, err := m.Service.GetConnectionUniqueConstraints(context.Background(), &connect.Request[mgmtv1alpha1.GetConnectionUniqueConstraintsRequest]{ - Msg: &mgmtv1alpha1.GetConnectionUniqueConstraintsRequest{ - ConnectionId: mockConnectionId, - }, - }) - - require.Nil(t, err) - require.Len(t, resp.Msg.TableConstraints, 1) - require.EqualValues(t, map[string]*mgmtv1alpha1.UniqueConstraint{ - "public.users": {Columns: []string{"id"}}, - }, resp.Msg.TableConstraints) -} - -func Test_GetConnectionUniqueConstraints_Postgres(t *testing.T) { - m := createServiceMock(t) - defer m.SqlDbMock.Close() - - connection := getConnectionMock(mockAccountId, mockConnectionName, mockConnectionId, PostgresMock) - m.ConnectionServiceMock.On("GetConnection", mock.Anything, mock.Anything).Return(connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: connection, - }), nil) - - m.SqlManagerMock.On("NewSqlConnection", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Twice().Return( - sqlmanager.NewPostgresSqlConnection(m.DbMock), nil, - ) - m.DbMock.On("Close").Return(nil) - - m.DbMock.On("GetDatabaseSchema", mock.Anything).Return([]*sqlmanager_shared.DatabaseSchemaRow{ - { - TableSchema: "public", - TableName: "users", - ColumnName: "id", - DataType: "integer", - }, - { - TableSchema: "public", - TableName: "users", - ColumnName: "name", - DataType: "character varying", - }}, nil) - - m.DbMock.On("GetTableConstraintsBySchema", mock.Anything, mock.Anything).Return(&sqlmanager_shared.TableConstraints{ - UniqueConstraints: map[string][][]string{"public.users": {{"id"}}}, - }, nil) - - resp, err := m.Service.GetConnectionUniqueConstraints(context.Background(), &connect.Request[mgmtv1alpha1.GetConnectionUniqueConstraintsRequest]{ - Msg: &mgmtv1alpha1.GetConnectionUniqueConstraintsRequest{ - ConnectionId: mockConnectionId, - }, - }) - - require.Nil(t, err) - require.Len(t, resp.Msg.TableConstraints, 1) - require.EqualValues(t, map[string]*mgmtv1alpha1.UniqueConstraint{ - "public.users": {Columns: []string{"id"}}, - }, resp.Msg.TableConstraints) -} diff --git a/backend/services/mgmt/v1alpha1/connection-data-service/service.go b/backend/services/mgmt/v1alpha1/connection-data-service/service.go index bc7ca36713..399fa4e5b9 100644 --- a/backend/services/mgmt/v1alpha1/connection-data-service/service.go +++ b/backend/services/mgmt/v1alpha1/connection-data-service/service.go @@ -9,6 +9,7 @@ import ( "github.com/nucleuscloud/neosync/backend/pkg/sqlconnect" sql_manager "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager" awsmanager "github.com/nucleuscloud/neosync/internal/aws" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" ) type Service struct { @@ -25,6 +26,8 @@ type Service struct { mongoconnector mongoconnect.Interface gcpmanager neosync_gcp.ManagerInterface + + neosynctyperegistry neosynctypes.NeosyncTypeRegistry } type Config struct { @@ -43,17 +46,19 @@ func New( mongoconnector mongoconnect.Interface, sqlmanager sql_manager.SqlManagerClient, gcpmanager neosync_gcp.ManagerInterface, + neosynctyperegistry neosynctypes.NeosyncTypeRegistry, ) *Service { return &Service{ - cfg: cfg, - connectionService: connectionService, - jobService: jobService, - awsManager: awsManager, - sqlConnector: sqlConnector, - pgquerier: pgquerier, - mysqlquerier: mysqlquerier, - sqlmanager: sqlmanager, - mongoconnector: mongoconnector, - gcpmanager: gcpmanager, + cfg: cfg, + connectionService: connectionService, + jobService: jobService, + awsManager: awsManager, + sqlConnector: sqlConnector, + pgquerier: pgquerier, + mysqlquerier: mysqlquerier, + sqlmanager: sqlmanager, + mongoconnector: mongoconnector, + gcpmanager: gcpmanager, + neosynctyperegistry: neosynctyperegistry, } } diff --git a/backend/services/mgmt/v1alpha1/connection-service/connection.go b/backend/services/mgmt/v1alpha1/connection-service/connection.go index 1ff26c4033..0c46f2246b 100644 --- a/backend/services/mgmt/v1alpha1/connection-service/connection.go +++ b/backend/services/mgmt/v1alpha1/connection-service/connection.go @@ -342,7 +342,7 @@ func (s *Service) CreateConnection( req *connect.Request[mgmtv1alpha1.CreateConnectionRequest], ) (*connect.Response[mgmtv1alpha1.CreateConnectionResponse], error) { cc := &pg_models.ConnectionConfig{} - if err := cc.FromDto(req.Msg.ConnectionConfig); err != nil { + if err := cc.FromDto(req.Msg.GetConnectionConfig()); err != nil { return nil, err } @@ -350,6 +350,14 @@ func (s *Service) CreateConnection( if err != nil { return nil, err } + + switch req.Msg.GetConnectionConfig().GetConfig().(type) { + case *mgmtv1alpha1.ConnectionConfig_AwsS3Config, *mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig: + if err := user.EnforceLicense(ctx, req.Msg.GetAccountId()); err != nil { + return nil, err + } + } + accountUuid, err := neosyncdb.ToUuid(req.Msg.GetAccountId()) if err != nil { return nil, err @@ -360,7 +368,7 @@ func (s *Service) CreateConnection( connection, err := s.db.Q.CreateConnection(ctx, s.db.Db, db_queries.CreateConnectionParams{ AccountID: accountUuid, - Name: req.Msg.Name, + Name: req.Msg.GetName(), ConnectionConfig: cc, CreatedByID: user.PgId(), UpdatedByID: user.PgId(), @@ -396,6 +404,12 @@ func (s *Service) UpdateConnection( if err != nil { return nil, err } + switch req.Msg.GetConnectionConfig().GetConfig().(type) { + case *mgmtv1alpha1.ConnectionConfig_AwsS3Config, *mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig: + if err := user.EnforceLicense(ctx, neosyncdb.UUIDString(connection.AccountID)); err != nil { + return nil, err + } + } if err := user.EnforceConnection(ctx, userdata.NewDbDomainEntity(connection.AccountID, connection.ID), rbac.ConnectionAction_Edit); err != nil { return nil, err @@ -461,13 +475,13 @@ func (s *Service) CheckSqlQuery( req *connect.Request[mgmtv1alpha1.CheckSqlQueryRequest], ) (*connect.Response[mgmtv1alpha1.CheckSqlQueryResponse], error) { logger := logger_interceptor.GetLoggerFromContextOrDefault(ctx) - logger = logger.With("connectionId", req.Msg.Id) - connection, err := s.GetConnection(ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionRequest{Id: req.Msg.Id})) + logger = logger.With("connectionId", req.Msg.GetId()) + connection, err := s.GetConnection(ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionRequest{Id: req.Msg.GetId()})) if err != nil { return nil, err } - conn, err := s.sqlConnector.NewDbFromConnectionConfig(connection.Msg.Connection.ConnectionConfig, logger, sqlconnect.WithConnectionTimeout(10)) + conn, err := s.sqlConnector.NewDbFromConnectionConfig(connection.Msg.GetConnection().GetConnectionConfig(), logger, sqlconnect.WithConnectionTimeout(10)) if err != nil { return nil, err } @@ -487,7 +501,7 @@ func (s *Service) CheckSqlQuery( } defer neosyncdb.HandleSqlRollback(tx, logger) - _, err = tx.PrepareContext(ctx, req.Msg.Query) + _, err = tx.PrepareContext(ctx, req.Msg.GetQuery()) var errorMsg *string if err != nil { msg := err.Error() diff --git a/backend/services/mgmt/v1alpha1/integration_tests/anonymization-service_integration_test.go b/backend/services/mgmt/v1alpha1/integration_tests/anonymization-service_integration_test.go index cd841063d5..5abdd7779e 100644 --- a/backend/services/mgmt/v1alpha1/integration_tests/anonymization-service_integration_test.go +++ b/backend/services/mgmt/v1alpha1/integration_tests/anonymization-service_integration_test.go @@ -8,6 +8,7 @@ import ( "connectrpc.com/connect" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + integrationtests_test "github.com/nucleuscloud/neosync/backend/pkg/integration-test" "github.com/nucleuscloud/neosync/internal/gotypeutil" "github.com/stretchr/testify/require" "github.com/stripe/stripe-go/v79" @@ -17,10 +18,10 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeMany() { t := s.T() t.Run("OSS-fail", func(t *testing.T) { - userclient := s.UnauthdClients.Users + userclient := s.OSSUnauthenticatedLicensedClients.Users() s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) - resp, err := s.UnauthdClients.Anonymize.AnonymizeMany( + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeMany( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeManyRequest{ AccountId: accountId, @@ -35,8 +36,8 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeMany() { }) t.Run("cloud-personal-fail", func(t *testing.T) { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) - anonclient := s.NeosyncCloudClients.GetAnonymizeClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + anonclient := s.NeosyncCloudAuthenticatedLicensedClients.Anonymize(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) resp, err := anonclient.AnonymizeMany( @@ -87,8 +88,8 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeMany() { }`, } - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) - anonclient := s.NeosyncCloudClients.GetAnonymizeClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + anonclient := s.NeosyncCloudAuthenticatedLicensedClients.Anonymize(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createBilledTeamAccount(s.ctx, userclient, "team1", "foo") @@ -170,8 +171,8 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle() { "sports": ["basketball", "golf", "swimming"] }` - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - resp, err := s.UnauthdClients.Anonymize.AnonymizeSingle( + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeSingle( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeSingleRequest{ AccountId: accountId, @@ -228,11 +229,11 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle_ForbiddenTr t := s.T() t.Run("OSS", func(t *testing.T) { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) t.Run("transformpiitext", func(t *testing.T) { t.Run("mappings", func(t *testing.T) { - resp, err := s.UnauthdClients.Anonymize.AnonymizeSingle( + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeSingle( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeSingleRequest{ AccountId: accountId, @@ -252,7 +253,7 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle_ForbiddenTr t.Run("defaults", func(t *testing.T) { t.Run("Bool", func(t *testing.T) { - resp, err := s.UnauthdClients.Anonymize.AnonymizeSingle( + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeSingle( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeSingleRequest{ AccountId: accountId, @@ -268,7 +269,7 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle_ForbiddenTr requireConnectError(t, err, connect.CodePermissionDenied) }) t.Run("S", func(t *testing.T) { - resp, err := s.UnauthdClients.Anonymize.AnonymizeSingle( + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeSingle( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeSingleRequest{ AccountId: accountId, @@ -284,7 +285,7 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle_ForbiddenTr requireConnectError(t, err, connect.CodePermissionDenied) }) t.Run("N", func(t *testing.T) { - resp, err := s.UnauthdClients.Anonymize.AnonymizeSingle( + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeSingle( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeSingleRequest{ AccountId: accountId, @@ -304,8 +305,8 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle_ForbiddenTr }) t.Run("cloud-personal", func(t *testing.T) { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) - anonclient := s.NeosyncCloudClients.GetAnonymizeClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + anonclient := s.NeosyncCloudAuthenticatedLicensedClients.Anonymize(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) diff --git a/backend/services/mgmt/v1alpha1/integration_tests/connection-service_integration_test.go b/backend/services/mgmt/v1alpha1/integration_tests/connection-service_integration_test.go index fee2e210da..2554568e8b 100644 --- a/backend/services/mgmt/v1alpha1/integration_tests/connection-service_integration_test.go +++ b/backend/services/mgmt/v1alpha1/integration_tests/connection-service_integration_test.go @@ -4,14 +4,16 @@ import ( "testing" "connectrpc.com/connect" + "github.com/google/uuid" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + integrationtests_test "github.com/nucleuscloud/neosync/backend/pkg/integration-test" "github.com/stretchr/testify/require" ) func (s *IntegrationTestSuite) Test_ConnectionService_IsConnectionNameAvailable_Available() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Connections.IsConnectionNameAvailable( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().IsConnectionNameAvailable( s.ctx, connect.NewRequest(&mgmtv1alpha1.IsConnectionNameAvailableRequest{ AccountId: accountId, @@ -23,10 +25,10 @@ func (s *IntegrationTestSuite) Test_ConnectionService_IsConnectionNameAvailable_ } func (s *IntegrationTestSuite) Test_ConnectionService_IsConnectionNameAvailable_NotAvailable() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", "test-url") + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", "test-url") - resp, err := s.UnauthdClients.Connections.IsConnectionNameAvailable( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().IsConnectionNameAvailable( s.ctx, connect.NewRequest(&mgmtv1alpha1.IsConnectionNameAvailableRequest{ AccountId: accountId, @@ -39,14 +41,14 @@ func (s *IntegrationTestSuite) Test_ConnectionService_IsConnectionNameAvailable_ func (s *IntegrationTestSuite) Test_ConnectionService_CheckConnectionConfig() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - conn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + conn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", s.Pgcontainer.URL) t.Run("valid-pg-connstr", func(t *testing.T) { t.Parallel() - resp, err := s.UnauthdClients.Connections.CheckConnectionConfig( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().CheckConnectionConfig( s.ctx, connect.NewRequest(&mgmtv1alpha1.CheckConnectionConfigRequest{ ConnectionConfig: conn.GetConnectionConfig(), @@ -60,40 +62,233 @@ func (s *IntegrationTestSuite) Test_ConnectionService_CheckConnectionConfig() { func (s *IntegrationTestSuite) Test_ConnectionService_CreateConnection() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - t.Run("postgres-success", func(t *testing.T) { - s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + t.Run("OSS Unauthenticated Licensed", func(t *testing.T) { + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + client := s.OSSUnauthenticatedLicensedClients.Connections() + t.Run("postgres-success", func(t *testing.T) { + resp, err := client.CreateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: uuid.NewString(), + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ + PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ + ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ + Url: s.Pgcontainer.URL, + }, + }, + }, + }, + }), + ) + requireNoErrResp(t, resp, err) + }) + }) + t.Run("OSS Authenticated Licensed", func(t *testing.T) { + userclient := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + integrationtests_test.SetUser(s.ctx, t, userclient) + accountId := s.createPersonalAccount(s.ctx, userclient) + client := s.OSSAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)) + t.Run("postgres-success", func(t *testing.T) { + resp, err := client.CreateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: uuid.NewString(), + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ + PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ + ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ + Url: s.Pgcontainer.URL, + }, + }, + }, + }, + }), + ) + requireNoErrResp(t, resp, err) + }) + }) + t.Run("OSS Unauthenticated Unlicensed", func(t *testing.T) { + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedUnlicensedClients.Users()) + client := s.OSSUnauthenticatedUnlicensedClients.Connections() + t.Run("postgres-success", func(t *testing.T) { + resp, err := client.CreateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: uuid.NewString(), + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ + PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ + ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ + Url: s.Pgcontainer.URL, + }, + }, + }, + }, + }), + ) + requireNoErrResp(t, resp, err) + }) + t.Run("aws-s3-failure", func(t *testing.T) { + resp, err := client.CreateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: uuid.NewString(), + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_AwsS3Config{ + AwsS3Config: &mgmtv1alpha1.AwsS3ConnectionConfig{ + Bucket: "foo", + }, + }, + }, + }), + ) + requireErrResp(t, resp, err) + requireConnectError(t, err, connect.CodePermissionDenied) + }) + t.Run("gcp-cloudstorage-failure", func(t *testing.T) { + resp, err := client.CreateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: uuid.NewString(), + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig{ + GcpCloudstorageConfig: &mgmtv1alpha1.GcpCloudStorageConnectionConfig{ + Bucket: "foo", + }, + }, + }, + }), + ) + requireErrResp(t, resp, err) + requireConnectError(t, err, connect.CodePermissionDenied) + }) }) } func (s *IntegrationTestSuite) Test_ConnectionService_UpdateConnection() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - t.Run("postgres-success", func(t *testing.T) { - conn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + t.Run("OSS Unauthenticated Licensed", func(t *testing.T) { + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + client := s.OSSUnauthenticatedLicensedClients.Connections() + t.Run("postgres-success", func(t *testing.T) { + conn := s.createPostgresConnection(client, accountId, uuid.NewString(), s.Pgcontainer.URL) - resp, err := s.UnauthdClients.Connections.UpdateConnection( - s.ctx, - connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ - Id: conn.GetId(), - Name: "foo2", - ConnectionConfig: conn.GetConnectionConfig(), - }), - ) - requireNoErrResp(t, resp, err) - require.Equal(t, "foo2", resp.Msg.GetConnection().GetName()) + updatedName := uuid.NewString() + resp, err := client.UpdateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ + Id: conn.GetId(), + Name: updatedName, + ConnectionConfig: conn.GetConnectionConfig(), + }), + ) + requireNoErrResp(t, resp, err) + require.Equal(t, updatedName, resp.Msg.GetConnection().GetName()) + }) + }) + + t.Run("OSS Authenticated Licensed", func(t *testing.T) { + userclient := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + integrationtests_test.SetUser(s.ctx, t, userclient) + accountId := s.createPersonalAccount(s.ctx, userclient) + client := s.OSSAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)) + t.Run("postgres-success", func(t *testing.T) { + conn := s.createPostgresConnection(client, accountId, uuid.NewString(), s.Pgcontainer.URL) + + updatedName := uuid.NewString() + resp, err := client.UpdateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ + Id: conn.GetId(), + Name: updatedName, + ConnectionConfig: conn.GetConnectionConfig(), + }), + ) + requireNoErrResp(t, resp, err) + require.Equal(t, updatedName, resp.Msg.GetConnection().GetName()) + }) + }) + + t.Run("OSS Unauthenticated Unlicensed", func(t *testing.T) { + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedUnlicensedClients.Users()) + client := s.OSSUnauthenticatedUnlicensedClients.Connections() + t.Run("postgres-success", func(t *testing.T) { + conn := s.createPostgresConnection(client, accountId, uuid.NewString(), s.Pgcontainer.URL) + + updatedName := uuid.NewString() + resp, err := client.UpdateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ + Id: conn.GetId(), + Name: updatedName, + ConnectionConfig: conn.GetConnectionConfig(), + }), + ) + requireNoErrResp(t, resp, err) + require.Equal(t, updatedName, resp.Msg.GetConnection().GetName()) + }) + + t.Run("aws-s3-failure", func(t *testing.T) { + conn := s.createPostgresConnection(client, accountId, uuid.NewString(), s.Pgcontainer.URL) + + conn.ConnectionConfig = &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_AwsS3Config{ + AwsS3Config: &mgmtv1alpha1.AwsS3ConnectionConfig{ + Bucket: "foo", + }, + }, + } + + resp, err := client.UpdateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ + Id: conn.GetId(), + ConnectionConfig: conn.GetConnectionConfig(), + }), + ) + requireErrResp(t, resp, err) + requireConnectError(t, err, connect.CodePermissionDenied) + }) + + t.Run("aws-gcp-cloudstorage-failure", func(t *testing.T) { + conn := s.createPostgresConnection(client, accountId, uuid.NewString(), s.Pgcontainer.URL) + + conn.ConnectionConfig = &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig{ + GcpCloudstorageConfig: &mgmtv1alpha1.GcpCloudStorageConnectionConfig{ + Bucket: "foo", + }, + }, + } + + resp, err := client.UpdateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ + Id: conn.GetId(), + ConnectionConfig: conn.GetConnectionConfig(), + }), + ) + requireErrResp(t, resp, err) + requireConnectError(t, err, connect.CodePermissionDenied) + }) }) } func (s *IntegrationTestSuite) Test_ConnectionService_GetConnection() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - conn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + conn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", s.Pgcontainer.URL) - resp, err := s.UnauthdClients.Connections.GetConnection( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().GetConnection( s.ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionRequest{ Id: conn.GetId(), @@ -105,11 +300,11 @@ func (s *IntegrationTestSuite) Test_ConnectionService_GetConnection() { func (s *IntegrationTestSuite) Test_ConnectionService_GetConnections() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", s.Pgcontainer.URL) - resp, err := s.UnauthdClients.Connections.GetConnections( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().GetConnections( s.ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionsRequest{ AccountId: accountId, @@ -121,11 +316,11 @@ func (s *IntegrationTestSuite) Test_ConnectionService_GetConnections() { func (s *IntegrationTestSuite) Test_ConnectionService_DeleteConnection() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - conn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + conn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", s.Pgcontainer.URL) - resp, err := s.UnauthdClients.Connections.GetConnections( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().GetConnections( s.ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionsRequest{ AccountId: accountId, @@ -134,7 +329,7 @@ func (s *IntegrationTestSuite) Test_ConnectionService_DeleteConnection() { requireNoErrResp(t, resp, err) require.NotEmpty(t, resp.Msg.GetConnections()) - resp2, err := s.UnauthdClients.Connections.DeleteConnection( + resp2, err := s.OSSUnauthenticatedLicensedClients.Connections().DeleteConnection( s.ctx, connect.NewRequest(&mgmtv1alpha1.DeleteConnectionRequest{ Id: conn.GetId(), @@ -143,7 +338,7 @@ func (s *IntegrationTestSuite) Test_ConnectionService_DeleteConnection() { requireNoErrResp(t, resp2, err) // again to test idempotency - resp2, err = s.UnauthdClients.Connections.DeleteConnection( + resp2, err = s.OSSUnauthenticatedLicensedClients.Connections().DeleteConnection( s.ctx, connect.NewRequest(&mgmtv1alpha1.DeleteConnectionRequest{ Id: conn.GetId(), @@ -154,11 +349,11 @@ func (s *IntegrationTestSuite) Test_ConnectionService_DeleteConnection() { func (s *IntegrationTestSuite) Test_ConnectionService_CheckSqlQuery() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - conn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + conn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", s.Pgcontainer.URL) - resp, err := s.UnauthdClients.Connections.CheckSqlQuery( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().CheckSqlQuery( s.ctx, connect.NewRequest(&mgmtv1alpha1.CheckSqlQueryRequest{ Id: conn.GetId(), diff --git a/backend/services/mgmt/v1alpha1/integration_tests/jobs-service_integration_test.go b/backend/services/mgmt/v1alpha1/integration_tests/jobs-service_integration_test.go index 1b4b2e6d9d..20dee84211 100644 --- a/backend/services/mgmt/v1alpha1/integration_tests/jobs-service_integration_test.go +++ b/backend/services/mgmt/v1alpha1/integration_tests/jobs-service_integration_test.go @@ -9,13 +9,14 @@ import ( "github.com/google/uuid" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + integrationtests_test "github.com/nucleuscloud/neosync/backend/pkg/integration-test" "github.com/stretchr/testify/require" ) func (s *IntegrationTestSuite) Test_GetJobs_Empty() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Jobs.GetJobs(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetJobsRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Jobs().GetJobs(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetJobsRequest{ AccountId: accountId, })) requireNoErrResp(s.T(), resp, err) @@ -24,13 +25,13 @@ func (s *IntegrationTestSuite) Test_GetJobs_Empty() { } func (s *IntegrationTestSuite) Test_CreateJob_Ok() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - srcconn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "source", "test") - destconn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "dest", "test2") + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + srcconn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "source", "test") + destconn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "dest", "test2") s.MockTemporalForCreateJob("test-id") - resp, err := s.UnauthdClients.Jobs.CreateJob(s.ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Jobs().CreateJob(s.ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ AccountId: accountId, JobName: "test", Mappings: []*mgmtv1alpha1.JobMapping{}, @@ -62,8 +63,8 @@ func (s *IntegrationTestSuite) Test_JobService_JobHooks() { t := s.T() ctx := s.ctx - t.Run("OSS-unimplemented", func(t *testing.T) { - client := s.UnauthdClients.Jobs + t.Run("OSS-unlicensed-unimplemented", func(t *testing.T) { + client := s.OSSUnauthenticatedUnlicensedClients.Jobs() t.Run("GetJobHooks", func(t *testing.T) { resp, err := client.GetJobHooks(ctx, connect.NewRequest(&mgmtv1alpha1.GetJobHooksRequest{})) requireErrResp(t, resp, err) @@ -102,12 +103,12 @@ func (s *IntegrationTestSuite) Test_JobService_JobHooks() { }) t.Run("Cloud", func(t *testing.T) { - client := s.NeosyncCloudClients.GetJobClient(testAuthUserId) - s.setUser(ctx, s.NeosyncCloudClients.GetUserClient(testAuthUserId)) - accountId := s.createPersonalAccount(ctx, s.NeosyncCloudClients.GetUserClient(testAuthUserId)) + client := s.NeosyncCloudAuthenticatedLicensedClients.Jobs(integrationtests_test.WithUserId(testAuthUserId)) + s.setUser(ctx, s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId))) + accountId := s.createPersonalAccount(ctx, s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId))) - srcconn := s.createPostgresConnection(s.NeosyncCloudClients.GetConnectionClient(testAuthUserId), accountId, "source", "test") - destconn := s.createPostgresConnection(s.NeosyncCloudClients.GetConnectionClient(testAuthUserId), accountId, "dest", "test2") + srcconn := s.createPostgresConnection(s.NeosyncCloudAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)), accountId, "source", "test") + destconn := s.createPostgresConnection(s.NeosyncCloudAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)), accountId, "dest", "test2") s.MockTemporalForCreateJob("test-id") jobResp, err := client.CreateJob(ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ diff --git a/backend/services/mgmt/v1alpha1/integration_tests/transformers-service_integration_test.go b/backend/services/mgmt/v1alpha1/integration_tests/transformers-service_integration_test.go index 65fdd83285..deb4fef818 100644 --- a/backend/services/mgmt/v1alpha1/integration_tests/transformers-service_integration_test.go +++ b/backend/services/mgmt/v1alpha1/integration_tests/transformers-service_integration_test.go @@ -11,7 +11,7 @@ import ( ) func (s *IntegrationTestSuite) Test_TransformersService_GetSystemTransformers() { - resp, err := s.UnauthdClients.Transformers.GetSystemTransformers(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformersRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Transformers().GetSystemTransformers(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformersRequest{})) requireNoErrResp(s.T(), resp, err) require.NotEmpty(s.T(), resp.Msg.GetTransformers()) } @@ -19,7 +19,7 @@ func (s *IntegrationTestSuite) Test_TransformersService_GetSystemTransformers() func (s *IntegrationTestSuite) Test_TransformersService_GetSystemTransformersBySource() { t := s.T() t.Run("ok", func(t *testing.T) { - resp, err := s.UnauthdClients.Transformers.GetSystemTransformerBySource(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformerBySourceRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Transformers().GetSystemTransformerBySource(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformerBySourceRequest{ Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_GENERATE_BOOL, })) requireNoErrResp(t, resp, err) @@ -28,7 +28,7 @@ func (s *IntegrationTestSuite) Test_TransformersService_GetSystemTransformersByS require.Equal(t, transformer.GetSource(), mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_GENERATE_BOOL) }) t.Run("not_found", func(t *testing.T) { - resp, err := s.UnauthdClients.Transformers.GetSystemTransformerBySource(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformerBySourceRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Transformers().GetSystemTransformerBySource(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformerBySourceRequest{ Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_UNSPECIFIED, })) requireErrResp(t, resp, err) @@ -47,8 +47,8 @@ func (s *IntegrationTestSuite) Test_TransformersService_GetTransformPiiRecognize JSON200: &allowed, }, nil) - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - resp, err := s.UnauthdClients.Transformers.GetTransformPiiEntities(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTransformPiiEntitiesRequest{ + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + resp, err := s.OSSUnauthenticatedLicensedClients.Transformers().GetTransformPiiEntities(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTransformPiiEntitiesRequest{ AccountId: accountId, })) requireNoErrResp(t, resp, err) diff --git a/backend/services/mgmt/v1alpha1/integration_tests/user-account-service_integration_test.go b/backend/services/mgmt/v1alpha1/integration_tests/user-account-service_integration_test.go index 2981cbec78..9282a64179 100644 --- a/backend/services/mgmt/v1alpha1/integration_tests/user-account-service_integration_test.go +++ b/backend/services/mgmt/v1alpha1/integration_tests/user-account-service_integration_test.go @@ -14,6 +14,7 @@ import ( "github.com/nucleuscloud/neosync/backend/internal/authmgmt" nucleuserrors "github.com/nucleuscloud/neosync/backend/internal/errors" "github.com/nucleuscloud/neosync/backend/internal/temporal/clientmanager" + integrationtests_test "github.com/nucleuscloud/neosync/backend/pkg/integration-test" pg_models "github.com/nucleuscloud/neosync/backend/sql/postgresql/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -28,9 +29,9 @@ var ( ) func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountOnboardingConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.GetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountOnboardingConfigRequest{AccountId: accountId})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountOnboardingConfigRequest{AccountId: accountId})) requireNoErrResp(s.T(), resp, err) onboardingConfig := resp.Msg.GetConfig() require.NotNil(s.T(), onboardingConfig) @@ -39,21 +40,21 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountOnboardingConfi } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountOnboardingConfig_NoAccount() { - resp, err := s.UnauthdClients.Users.GetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountOnboardingConfigRequest{AccountId: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountOnboardingConfigRequest{AccountId: uuid.NewString()})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountOnboardingConfig_NoAccount() { - resp, err := s.UnauthdClients.Users.SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{AccountId: uuid.NewString(), Config: &mgmtv1alpha1.AccountOnboardingConfig{}})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{AccountId: uuid.NewString(), Config: &mgmtv1alpha1.AccountOnboardingConfig{}})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountOnboardingConfig_NoConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{AccountId: accountId, Config: nil})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{AccountId: accountId, Config: nil})) requireNoErrResp(s.T(), resp, err) onboardingConfig := resp.Msg.GetConfig() require.NotNil(s.T(), onboardingConfig) @@ -62,9 +63,9 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountOnboardingConfi } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountOnboardingConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{ AccountId: accountId, Config: &mgmtv1alpha1.AccountOnboardingConfig{ HasCompletedOnboarding: true, }}, @@ -91,12 +92,12 @@ var ( ) func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountTemporalConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) s.Mocks.TemporalConfigProvider.On("GetConfig", mock.Anything, mock.Anything). Return(validTemporalConfig, nil) - resp, err := s.UnauthdClients.Users.GetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountTemporalConfigRequest{AccountId: accountId})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountTemporalConfigRequest{AccountId: accountId})) requireNoErrResp(s.T(), resp, err) tc := resp.Msg.GetConfig() @@ -108,13 +109,13 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountTemporalConfig( } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountTemporalConfig_NoAccount() { - resp, err := s.UnauthdClients.Users.GetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountTemporalConfigRequest{AccountId: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountTemporalConfigRequest{AccountId: uuid.NewString()})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountTemporalConfig_NeosyncCloud() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -124,13 +125,13 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountTemporalConfig_ } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig_NoAccount() { - resp, err := s.UnauthdClients.Users.SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{AccountId: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{AccountId: uuid.NewString()})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig_NeosyncCloud() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -140,12 +141,12 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig_ } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig_NoConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) s.Mocks.TemporalConfigProvider.On("GetConfig", mock.Anything, mock.Anything). Return(validTemporalConfig, nil) - resp, err := s.UnauthdClients.Users.SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{AccountId: accountId, Config: nil})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{AccountId: accountId, Config: nil})) requireNoErrResp(s.T(), resp, err) tc := resp.Msg.GetConfig() @@ -157,13 +158,13 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig_ } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) // kind of a bad test since we are mocking this client wholesale, but it at least verifies we can write the config s.Mocks.TemporalConfigProvider.On("GetConfig", mock.Anything, mock.Anything). Return(validTemporalConfig, nil) - resp, err := s.UnauthdClients.Users.SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{ AccountId: accountId, Config: &mgmtv1alpha1.AccountTemporalConfig{ Url: "test", Namespace: "test", @@ -180,7 +181,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig( } func (s *IntegrationTestSuite) Test_UserAccountService_GetUser_Auth() { - client := s.AuthdClients.GetUserClient("test-user1") + client := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId("test-user1")) userId := s.setUser(s.ctx, client) resp, err := client.GetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserRequest{})) @@ -189,21 +190,21 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetUser_Auth() { } func (s *IntegrationTestSuite) Test_UserAccountService_GetUser_Auth_NotFound() { - client := s.AuthdClients.GetUserClient(testAuthUserId) + client := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId("test-user1")) resp, err := client.GetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserRequest{})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodeNotFound) } func (s *IntegrationTestSuite) Test_UserAccountService_SetUser_Auth() { - client := s.AuthdClients.GetUserClient(testAuthUserId) + client := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) userId := s.setUser(s.ctx, client) require.NotEmpty(s.T(), userId) require.NotEqual(s.T(), "00000000-0000-0000-0000-000000000000", userId) } func (s *IntegrationTestSuite) Test_UserAccountService_CreateTeamAccount_Auth() { - client := s.AuthdClients.GetUserClient(testAuthUserId) + client := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, client) resp, err := client.CreateTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.CreateTeamAccountRequest{Name: "test-name"})) @@ -212,7 +213,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_CreateTeamAccount_Auth() } func (s *IntegrationTestSuite) Test_UserAccountService_CreateTeamAccount_NeosyncCloud() { - client := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + client := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, client) s.Mocks.Billingclient.On("NewCustomer", mock.Anything).Once(). @@ -227,7 +228,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_CreateTeamAccount_Neosync } func (s *IntegrationTestSuite) Test_UserAccountService_GetTeamAccountMembers_Auth() { - client := s.AuthdClients.GetUserClient(testAuthUserId) + client := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) userId := s.setUser(s.ctx, client) accountId := s.createTeamAccount(s.ctx, client, "test-team") @@ -261,7 +262,7 @@ func (s *IntegrationTestSuite) createTeamAccount(ctx context.Context, client mgm } func (s *IntegrationTestSuite) Test_UserAccountService_GetUser() { - resp, err := s.UnauthdClients.Users.GetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserRequest{})) requireNoErrResp(s.T(), resp, err) userId := resp.Msg.GetUserId() @@ -269,7 +270,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetUser() { } func (s *IntegrationTestSuite) Test_UserAccountService_SetUser() { - resp, err := s.UnauthdClients.Users.SetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetUserRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetUserRequest{})) requireNoErrResp(s.T(), resp, err) userId := resp.Msg.UserId @@ -278,7 +279,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetUser() { } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccounts_Empty() { - resp, err := s.UnauthdClients.Users.GetUserAccounts(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserAccountsRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetUserAccounts(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserAccountsRequest{})) requireNoErrResp(s.T(), resp, err) accounts := resp.Msg.GetAccounts() @@ -286,7 +287,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccounts_Empty() { } func (s *IntegrationTestSuite) Test_UserAccountService_SetPersonalAccount() { - resp, err := s.UnauthdClients.Users.SetPersonalAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetPersonalAccountRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetPersonalAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetPersonalAccountRequest{})) requireNoErrResp(s.T(), resp, err) accountId := resp.Msg.GetAccountId() @@ -294,9 +295,9 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetPersonalAccount() { } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccounts_NotEmpty() { - s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - accResp, err := s.UnauthdClients.Users.GetUserAccounts(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserAccountsRequest{})) + accResp, err := s.OSSUnauthenticatedLicensedClients.Users().GetUserAccounts(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserAccountsRequest{})) requireNoErrResp(s.T(), accResp, err) accounts := accResp.Msg.GetAccounts() @@ -305,15 +306,15 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccounts_NotEmpty() { } func (s *IntegrationTestSuite) Test_UserAccountService_IsUserInAccount() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.IsUserInAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.IsUserInAccountRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Users().IsUserInAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.IsUserInAccountRequest{ AccountId: accountId, })) requireNoErrResp(s.T(), resp, err) require.True(s.T(), resp.Msg.GetOk()) - resp, err = s.UnauthdClients.Users.IsUserInAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.IsUserInAccountRequest{ + resp, err = s.OSSUnauthenticatedLicensedClients.Users().IsUserInAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.IsUserInAccountRequest{ AccountId: uuid.NewString(), })) requireNoErrResp(s.T(), resp, err) @@ -321,63 +322,63 @@ func (s *IntegrationTestSuite) Test_UserAccountService_IsUserInAccount() { } func (s *IntegrationTestSuite) Test_UserAccountService_CreateTeamAccount_NoAuth() { - s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.CreateTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.CreateTeamAccountRequest{Name: "test-name"})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().CreateTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.CreateTeamAccountRequest{Name: "test-name"})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_GetTeamAccountMembers_NoAuth_Personal() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.GetTeamAccountMembers(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTeamAccountMembersRequest{AccountId: accountId})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetTeamAccountMembers(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTeamAccountMembersRequest{AccountId: accountId})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_RemoveTeamAccountMember_NoAuth_Personal() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.RemoveTeamAccountMember(s.ctx, connect.NewRequest(&mgmtv1alpha1.RemoveTeamAccountMemberRequest{AccountId: accountId, UserId: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().RemoveTeamAccountMember(s.ctx, connect.NewRequest(&mgmtv1alpha1.RemoveTeamAccountMemberRequest{AccountId: accountId, UserId: uuid.NewString()})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_InviteUserToTeamAccount_NoAuth_Personal() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.InviteUserToTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.InviteUserToTeamAccountRequest{AccountId: accountId, Email: "test@example.com"})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().InviteUserToTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.InviteUserToTeamAccountRequest{AccountId: accountId, Email: "test@example.com"})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_GetTeamAccountInvites_NoAuth_Personal() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.GetTeamAccountInvites(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTeamAccountInvitesRequest{AccountId: accountId})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetTeamAccountInvites(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTeamAccountInvitesRequest{AccountId: accountId})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_RemoveTeamAccountInvite_NoAuth_Personal() { - resp, err := s.UnauthdClients.Users.RemoveTeamAccountInvite(s.ctx, connect.NewRequest(&mgmtv1alpha1.RemoveTeamAccountInviteRequest{Id: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().RemoveTeamAccountInvite(s.ctx, connect.NewRequest(&mgmtv1alpha1.RemoveTeamAccountInviteRequest{Id: uuid.NewString()})) requireNoErrResp(s.T(), resp, err) } func (s *IntegrationTestSuite) Test_UserAccountService_AcceptTeamAccountInvite_NoAuth_Personal() { - resp, err := s.UnauthdClients.Users.AcceptTeamAccountInvite(s.ctx, connect.NewRequest(&mgmtv1alpha1.AcceptTeamAccountInviteRequest{Token: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().AcceptTeamAccountInvite(s.ctx, connect.NewRequest(&mgmtv1alpha1.AcceptTeamAccountInviteRequest{Token: uuid.NewString()})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodeUnauthenticated) } func (s *IntegrationTestSuite) Test_UserAccountService_GetSystemInformation() { - resp, err := s.UnauthdClients.Users.GetSystemInformation(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemInformationRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetSystemInformation(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemInformationRequest{})) requireNoErrResp(s.T(), resp, err) } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountStatus_NeosyncCloud_Personal() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -407,7 +408,7 @@ func (t *testSubscriptionIter) Err() error { } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountStatus_NeosyncCloud_Billed() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) t := s.T() @@ -449,9 +450,9 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountStatus_NeosyncC } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountStatus_OSS_Personal() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.GetAccountStatus(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountStatusRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountStatus(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountStatusRequest{ AccountId: accountId, })) requireNoErrResp(s.T(), resp, err) @@ -460,7 +461,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountStatus_OSS_Pers } func (s *IntegrationTestSuite) Test_UserAccountService_IsAccountStatusValid_NeosyncCloud_Personal() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -475,7 +476,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_IsAccountStatusValid_Neos } func (s *IntegrationTestSuite) Test_UserAccountService_IsAccountStatusValid_NeosyncCloud_Billed() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) t := s.T() @@ -564,7 +565,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_IsAccountStatusValid_Neos } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountBillingCheckoutSession() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) t := s.T() @@ -591,7 +592,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountBillingCheckout }) t.Run("non-neosynccloud - disallowed", func(t *testing.T) { - personalAccountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + personalAccountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) resp, err := userclient.GetAccountBillingCheckoutSession(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountBillingCheckoutSessionRequest{ AccountId: personalAccountId, })) @@ -600,7 +601,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountBillingCheckout } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountBillingPortalSession() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) t := s.T() @@ -627,8 +628,8 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountBillingPortalSe }) t.Run("non-neosynccloud - disallowed", func(t *testing.T) { - personalAccountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - resp, err := s.UnauthdClients.Users.GetAccountBillingPortalSession(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountBillingPortalSessionRequest{ + personalAccountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountBillingPortalSession(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountBillingPortalSessionRequest{ AccountId: personalAccountId, })) requireErrResp(s.T(), resp, err) @@ -644,14 +645,14 @@ func (s *IntegrationTestSuite) createBilledTeamAccount(ctx context.Context, clie } func (s *IntegrationTestSuite) Test_GetBillingAccounts() { - userclient1 := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient1 := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient1) - userclient2 := s.NeosyncCloudClients.GetUserClient(testAuthUserId2) + userclient2 := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId2)) s.setUser(s.ctx, userclient2) workerapikey := apikey.NewV1WorkerKey() - workeruserclient := s.NeosyncCloudClients.GetUserClient(workerapikey) + workeruserclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(workerapikey)) t := s.T() @@ -697,8 +698,8 @@ func (s *IntegrationTestSuite) Test_ConvertPersonalToTeamAccount() { t := s.T() t.Run("OSS unauth", func(t *testing.T) { - s.setUser(s.ctx, s.UnauthdClients.Users) - resp, err := s.UnauthdClients.Users.ConvertPersonalToTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.ConvertPersonalToTeamAccountRequest{ + s.setUser(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().ConvertPersonalToTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.ConvertPersonalToTeamAccountRequest{ Name: "unauthteamname", })) requireErrResp(t, resp, err) @@ -706,7 +707,7 @@ func (s *IntegrationTestSuite) Test_ConvertPersonalToTeamAccount() { }) t.Run("OSS auth success", func(t *testing.T) { - userclient := s.AuthdClients.GetUserClient(testAuthUserId) + userclient := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -719,7 +720,7 @@ func (s *IntegrationTestSuite) Test_ConvertPersonalToTeamAccount() { }) t.Run("cloud billing success", func(t *testing.T) { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -737,7 +738,7 @@ func (s *IntegrationTestSuite) Test_ConvertPersonalToTeamAccount() { }) t.Run("cloud success unspecified account", func(t *testing.T) { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) stripeCustomerId := "foo" @@ -753,11 +754,11 @@ func (s *IntegrationTestSuite) Test_ConvertPersonalToTeamAccount() { } func (s *IntegrationTestSuite) Test_SetBillingMeterEvent() { - userclient1 := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient1 := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient1) workerapikey := apikey.NewV1WorkerKey() - workeruserclient := s.NeosyncCloudClients.GetUserClient(workerapikey) + workeruserclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(workerapikey)) t := s.T() diff --git a/backend/services/mgmt/v1alpha1/user-account-service/account-onboarding.go b/backend/services/mgmt/v1alpha1/user-account-service/account-onboarding.go index 36d7720e94..d1881c0f24 100644 --- a/backend/services/mgmt/v1alpha1/user-account-service/account-onboarding.go +++ b/backend/services/mgmt/v1alpha1/user-account-service/account-onboarding.go @@ -16,7 +16,7 @@ func (s *Service) GetAccountOnboardingConfig( ctx context.Context, req *connect.Request[mgmtv1alpha1.GetAccountOnboardingConfigRequest], ) (*connect.Response[mgmtv1alpha1.GetAccountOnboardingConfigResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -45,7 +45,7 @@ func (s *Service) SetAccountOnboardingConfig( ctx context.Context, req *connect.Request[mgmtv1alpha1.SetAccountOnboardingConfigRequest], ) (*connect.Response[mgmtv1alpha1.SetAccountOnboardingConfigResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err diff --git a/backend/services/mgmt/v1alpha1/user-account-service/account-temporal-config.go b/backend/services/mgmt/v1alpha1/user-account-service/account-temporal-config.go index 8c50a81179..8efe9769a4 100644 --- a/backend/services/mgmt/v1alpha1/user-account-service/account-temporal-config.go +++ b/backend/services/mgmt/v1alpha1/user-account-service/account-temporal-config.go @@ -20,7 +20,7 @@ func (s *Service) GetAccountTemporalConfig( if s.cfg.IsNeosyncCloud { return nil, nucleuserrors.NewNotImplemented("not enabled in Neosync Cloud") } - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -47,7 +47,7 @@ func (s *Service) SetAccountTemporalConfig( if s.cfg.IsNeosyncCloud { return nil, nucleuserrors.NewNotImplemented("not enabled in Neosync Cloud") } - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err diff --git a/backend/services/mgmt/v1alpha1/user-account-service/billing.go b/backend/services/mgmt/v1alpha1/user-account-service/billing.go index 0fe63dd5f2..681c3aa100 100644 --- a/backend/services/mgmt/v1alpha1/user-account-service/billing.go +++ b/backend/services/mgmt/v1alpha1/user-account-service/billing.go @@ -34,7 +34,7 @@ func (s *Service) GetAccountStatus( ) (*connect.Response[mgmtv1alpha1.GetAccountStatusResponse], error) { logger := logger_interceptor.GetLoggerFromContextOrDefault(ctx) - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -225,7 +225,7 @@ func (s *Service) GetAccountBillingCheckoutSession( return nil, nucleuserrors.NewNotImplemented(fmt.Sprintf("%s is not implemented", strings.TrimPrefix(mgmtv1alpha1connect.UserAccountServiceGetAccountBillingCheckoutSessionProcedure, "/"))) } logger = logger.With("accountId", req.Msg.GetAccountId()) - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -275,7 +275,7 @@ func (s *Service) GetAccountBillingPortalSession( if !s.cfg.IsNeosyncCloud || s.billingclient == nil { return nil, nucleuserrors.NewNotImplemented(fmt.Sprintf("%s is not implemented", strings.TrimPrefix(mgmtv1alpha1connect.UserAccountServiceGetAccountBillingPortalSessionProcedure, "/"))) } - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -312,7 +312,7 @@ func (s *Service) GetBillingAccounts( ctx context.Context, req *connect.Request[mgmtv1alpha1.GetBillingAccountsRequest], ) (*connect.Response[mgmtv1alpha1.GetBillingAccountsResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -350,7 +350,7 @@ func (s *Service) SetBillingMeterEvent( if s.billingclient == nil { return nil, nucleuserrors.NewUnauthorized("billing is not currently enabled") } - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err diff --git a/backend/services/mgmt/v1alpha1/user-account-service/service.go b/backend/services/mgmt/v1alpha1/user-account-service/service.go index e401ea2d67..6b79b858a2 100644 --- a/backend/services/mgmt/v1alpha1/user-account-service/service.go +++ b/backend/services/mgmt/v1alpha1/user-account-service/service.go @@ -6,7 +6,9 @@ import ( "github.com/nucleuscloud/neosync/backend/internal/ee/rbac" "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" "github.com/nucleuscloud/neosync/backend/internal/temporal/clientmanager" + "github.com/nucleuscloud/neosync/backend/internal/userdata" "github.com/nucleuscloud/neosync/internal/billing" + "github.com/nucleuscloud/neosync/internal/ee/license" ) type Service struct { @@ -17,6 +19,7 @@ type Service struct { authadminclient authmgmt.Interface billingclient billing.Interface rbacClient rbac.Interface + licenseclient license.EEInterface } type Config struct { @@ -33,6 +36,7 @@ func New( authadminclient authmgmt.Interface, billingclient billing.Interface, rbacClient rbac.Interface, + licenseclient license.EEInterface, ) *Service { return &Service{ cfg: cfg, @@ -42,5 +46,10 @@ func New( authadminclient: authadminclient, billingclient: billingclient, rbacClient: rbacClient, + licenseclient: licenseclient, } } + +func (s *Service) UserDataClient() userdata.Interface { + return userdata.NewClient(s, s.rbacClient, s.licenseclient) +} diff --git a/backend/services/mgmt/v1alpha1/user-account-service/users.go b/backend/services/mgmt/v1alpha1/user-account-service/users.go index e126300ffd..8b112b2943 100644 --- a/backend/services/mgmt/v1alpha1/user-account-service/users.go +++ b/backend/services/mgmt/v1alpha1/user-account-service/users.go @@ -455,7 +455,7 @@ func (s *Service) GetTeamAccountMembers( ) (*connect.Response[mgmtv1alpha1.GetTeamAccountMembersResponse], error) { logger := logger_interceptor.GetLoggerFromContextOrDefault(ctx) - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -532,7 +532,7 @@ func (s *Service) RemoveTeamAccountMember( ctx context.Context, req *connect.Request[mgmtv1alpha1.RemoveTeamAccountMemberRequest], ) (*connect.Response[mgmtv1alpha1.RemoveTeamAccountMemberResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -572,7 +572,7 @@ func (s *Service) InviteUserToTeamAccount( ctx context.Context, req *connect.Request[mgmtv1alpha1.InviteUserToTeamAccountRequest], ) (*connect.Response[mgmtv1alpha1.InviteUserToTeamAccountResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -615,7 +615,7 @@ func (s *Service) GetTeamAccountInvites( ctx context.Context, req *connect.Request[mgmtv1alpha1.GetTeamAccountInvitesRequest], ) (*connect.Response[mgmtv1alpha1.GetTeamAccountInvitesResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := userdata.NewClient(s, s.rbacClient, s.licenseclient) user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -667,7 +667,7 @@ func (s *Service) RemoveTeamAccountInvite( return connect.NewResponse(&mgmtv1alpha1.RemoveTeamAccountInviteResponse{}), nil } - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -754,7 +754,7 @@ func (s *Service) SetUserRole( ctx context.Context, req *connect.Request[mgmtv1alpha1.SetUserRoleRequest], ) (*connect.Response[mgmtv1alpha1.SetUserRoleResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -808,7 +808,7 @@ func (s *Service) GetSystemInformation(ctx context.Context, req *connect.Request versionInfo := version.Get() builtDate, err := time.Parse(time.RFC3339, versionInfo.BuildDate) if err != nil { - return nil, err + return nil, fmt.Errorf("unable to parse build date: %w", err) } return connect.NewResponse(&mgmtv1alpha1.GetSystemInformationResponse{ Version: versionInfo.GitVersion, @@ -816,5 +816,10 @@ func (s *Service) GetSystemInformation(ctx context.Context, req *connect.Request Compiler: versionInfo.Compiler, Platform: versionInfo.Platform, BuildDate: timestamppb.New(builtDate), + License: &mgmtv1alpha1.SystemLicense{ + IsValid: s.licenseclient.IsValid(), + ExpiresAt: timestamppb.New(s.licenseclient.ExpiresAt()), + IsNeosyncCloud: s.cfg.IsNeosyncCloud, + }, }), nil } diff --git a/backend/sql/postgresql/models/models.go b/backend/sql/postgresql/models/models.go index 71e8fc7e37..a8013fa67e 100644 --- a/backend/sql/postgresql/models/models.go +++ b/backend/sql/postgresql/models/models.go @@ -1150,12 +1150,6 @@ func (s *PostgresSourceOptions) FromDto(dto *mgmtv1alpha1.PostgresSourceConnecti if dto.GetNewColumnAdditionStrategy().GetStrategy() != nil { s.NewColumnAdditionStrategy = &PostgresNewColumnAdditionStrategy{} s.NewColumnAdditionStrategy.FromDto(dto.GetNewColumnAdditionStrategy()) - } else if dto.GetHaltOnNewColumnAddition() { - // halt on new column addition is deprecated, so if the new column strategy is nil but the deprecated value is true, - // we are going to store it in the new strategy format. - s.NewColumnAdditionStrategy = &PostgresNewColumnAdditionStrategy{ - HaltJob: &PostgresHaltJobStrategy{}, - } } } diff --git a/buf.gen.yaml b/buf.gen.yaml index 01560b2f8e..b88a68cc7d 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -17,21 +17,12 @@ plugins: out: backend/gen/go/protos opt: paths=source_relative - - remote: buf.build/bufbuild/es:v1.10.0 - out: frontend/packages/sdk/src/client - opt: - - target=ts - - import_extension=.js - - remote: buf.build/connectrpc/es:v1.5.0 - out: frontend/packages/sdk/src/client - opt: - - target=ts - - import_extension=.js - - remote: buf.build/connectrpc/query-es:v1.4.2 + - remote: buf.build/bufbuild/es:v2.2.3 out: frontend/packages/sdk/src/client opt: - target=ts - import_extension=.js + include_imports: true - remote: buf.build/community/pseudomuto-doc:v1.5.1 out: docs/protos diff --git a/charts/neosync/README.md b/charts/neosync/README.md index 718bb32716..b7ed3c62f6 100644 --- a/charts/neosync/README.md +++ b/charts/neosync/README.md @@ -87,7 +87,7 @@ A Helm chart for Neosync that contains the api, app, and worker | api.resources.limits.memory | string | `"512Mi"` | Sets the max Memory amount | | api.resources.requests.cpu | string | `"100m"` | Sets the CPU amount to be requested | | api.resources.requests.memory | string | `"128Mi"` | Sets the Memory amount to be requested | -| api.runLogs.enabled | bool | `true` | Independently set so that configuration can exist but logs can still be independently disabled. Defaults to true with k8s-pods configuration for backwards compat and because this is a helm chart this is defacto kubernetes | +| api.runLogs.enabled | bool | `false` | Enable this if planning to surface logs within Neosync API and UI (requires a valid license). | | api.runLogs.lokiConfig.baseUrl | string | `nil` | The base url to the loki instance | | api.runLogs.lokiConfig.keepLabels | string | `nil` | List format. | | api.runLogs.lokiConfig.labelsQuery | string | `nil` | LogQL labels query (without the {} as those are provided by the system) | diff --git a/cli/internal/cmds/neosync/connections/connections_integration_test.go b/cli/internal/cmds/neosync/connections/connections_integration_test.go index a194c071cf..c0de902e9d 100644 --- a/cli/internal/cmds/neosync/connections/connections_integration_test.go +++ b/cli/internal/cmds/neosync/connections/connections_integration_test.go @@ -5,6 +5,7 @@ import ( "testing" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + integrationtests_test "github.com/nucleuscloud/neosync/backend/pkg/integration-test" tcneosyncapi "github.com/nucleuscloud/neosync/backend/pkg/integration-test" "github.com/nucleuscloud/neosync/internal/testutil" "github.com/stretchr/testify/require" @@ -27,19 +28,19 @@ func Test_Connections(t *testing.T) { postgresUrl := "postgresql://postgres:foofar@localhost:5434/neosync" t.Run("list_unauthed", func(t *testing.T) { - accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, neosyncApi.UnauthdClients.Users) - conn1 := tcneosyncapi.CreatePostgresConnection(ctx, t, neosyncApi.UnauthdClients.Connections, accountId, "conn1", postgresUrl) - conn2 := tcneosyncapi.CreatePostgresConnection(ctx, t, neosyncApi.UnauthdClients.Connections, accountId, "conn2", postgresUrl) + accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Users()) + conn1 := tcneosyncapi.CreatePostgresConnection(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Connections(), accountId, "conn1", postgresUrl) + conn2 := tcneosyncapi.CreatePostgresConnection(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Connections(), accountId, "conn2", postgresUrl) conns := []*mgmtv1alpha1.Connection{conn1, conn2} - connections, err := getConnections(ctx, neosyncApi.UnauthdClients.Connections, accountId) + connections, err := getConnections(ctx, neosyncApi.OSSUnauthenticatedLicensedClients.Connections(), accountId) require.NoError(t, err) require.Len(t, connections, len(conns)) }) t.Run("list_auth", func(t *testing.T) { testAuthUserId := "c3b32842-9b70-4f4e-ad45-9cab26c6f2f1" - userclient := neosyncApi.AuthdClients.GetUserClient(testAuthUserId) - connclient := neosyncApi.AuthdClients.GetConnectionClient(testAuthUserId) + userclient := neosyncApi.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + connclient := neosyncApi.OSSAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)) tcneosyncapi.SetUser(ctx, t, userclient) accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, userclient) conn1 := tcneosyncapi.CreatePostgresConnection(ctx, t, connclient, accountId, "conn1", postgresUrl) @@ -52,8 +53,8 @@ func Test_Connections(t *testing.T) { t.Run("list_cloud", func(t *testing.T) { testAuthUserId := "34f3e404-c995-452b-89e4-9c486b491dab" - userclient := neosyncApi.NeosyncCloudClients.GetUserClient(testAuthUserId) - connclient := neosyncApi.NeosyncCloudClients.GetConnectionClient(testAuthUserId) + userclient := neosyncApi.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + connclient := neosyncApi.NeosyncCloudAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)) tcneosyncapi.SetUser(ctx, t, userclient) accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, userclient) conn1 := tcneosyncapi.CreatePostgresConnection(ctx, t, connclient, accountId, "conn1", postgresUrl) diff --git a/cli/internal/cmds/neosync/sync/config.go b/cli/internal/cmds/neosync/sync/config.go index 94897ed236..36993ba671 100644 --- a/cli/internal/cmds/neosync/sync/config.go +++ b/cli/internal/cmds/neosync/sync/config.go @@ -9,6 +9,7 @@ import ( mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" "github.com/nucleuscloud/neosync/cli/internal/output" + benthosbuilder_shared "github.com/nucleuscloud/neosync/internal/benthos/benthos-builder/shared" "github.com/spf13/cobra" "gopkg.in/yaml.v2" ) @@ -213,23 +214,23 @@ func newCobraCmdConfig( return config, nil } -func isConfigValid(cmd *cmdConfig, logger *slog.Logger, sourceConnection *mgmtv1alpha1.Connection, sourceConnectionType ConnectionType) error { - if sourceConnectionType == awsS3Connection && (cmd.Source.ConnectionOpts.JobId == nil || *cmd.Source.ConnectionOpts.JobId == "") && (cmd.Source.ConnectionOpts.JobRunId == nil || *cmd.Source.ConnectionOpts.JobRunId == "") { +func isConfigValid(cmd *cmdConfig, logger *slog.Logger, sourceConnection *mgmtv1alpha1.Connection, sourceConnectionType benthosbuilder_shared.ConnectionType) error { + if sourceConnectionType == benthosbuilder_shared.ConnectionTypeAwsS3 && (cmd.Source.ConnectionOpts.JobId == nil || *cmd.Source.ConnectionOpts.JobId == "") && (cmd.Source.ConnectionOpts.JobRunId == nil || *cmd.Source.ConnectionOpts.JobRunId == "") { return errors.New("S3 source connection type requires job-id or job-run-id.") } - if sourceConnectionType == gcpCloudStorageConnection && (cmd.Source.ConnectionOpts.JobId == nil || *cmd.Source.ConnectionOpts.JobId == "") && (cmd.Source.ConnectionOpts.JobRunId == nil || *cmd.Source.ConnectionOpts.JobRunId == "") { + if sourceConnectionType == benthosbuilder_shared.ConnectionTypeGCP && (cmd.Source.ConnectionOpts.JobId == nil || *cmd.Source.ConnectionOpts.JobId == "") && (cmd.Source.ConnectionOpts.JobRunId == nil || *cmd.Source.ConnectionOpts.JobRunId == "") { return errors.New("GCP Cloud Storage source connection type requires job-id or job-run-id") } - if (sourceConnectionType == awsS3Connection || sourceConnectionType == gcpCloudStorageConnection) && cmd.Destination.InitSchema { + if (sourceConnectionType == benthosbuilder_shared.ConnectionTypeAwsS3 || sourceConnectionType == benthosbuilder_shared.ConnectionTypeGCP) && cmd.Destination.InitSchema { return errors.New("init schema is only supported when source is a SQL Database") } - if cmd.Destination.TruncateCascade && cmd.Destination.Driver == mysqlDriver { + if cmd.Destination != nil && cmd.Destination.TruncateCascade && cmd.Destination.Driver == mysqlDriver { return fmt.Errorf("truncate cascade is only supported in postgres") } - if sourceConnectionType == mysqlConnection || sourceConnectionType == postgresConnection { + if sourceConnectionType == benthosbuilder_shared.ConnectionTypeMysql || sourceConnectionType == benthosbuilder_shared.ConnectionTypePostgres { if cmd.Destination.Driver == "" { return fmt.Errorf("must provide destination-driver") } @@ -242,7 +243,7 @@ func isConfigValid(cmd *cmdConfig, logger *slog.Logger, sourceConnection *mgmtv1 } } - if sourceConnectionType == awsDynamoDBConnection { + if sourceConnectionType == benthosbuilder_shared.ConnectionTypeDynamodb { if cmd.AwsDynamoDbDestination == nil { return fmt.Errorf("must provide destination aws credentials") } @@ -256,8 +257,12 @@ func isConfigValid(cmd *cmdConfig, logger *slog.Logger, sourceConnection *mgmtv1 return fmt.Errorf("Connection not found. AccountId: %s", *cmd.AccountId) } + var destinationDriver *DriverType + if cmd.Destination != nil { + destinationDriver = &cmd.Destination.Driver + } logger.Debug("Checking if source and destination are compatible") - err := areSourceAndDestCompatible(sourceConnection, cmd.Destination.Driver) + err := areSourceAndDestCompatible(sourceConnection, destinationDriver) if err != nil { return err } diff --git a/cli/internal/cmds/neosync/sync/job.go b/cli/internal/cmds/neosync/sync/job.go index 9616ea12f4..4fb34e8f1b 100644 --- a/cli/internal/cmds/neosync/sync/job.go +++ b/cli/internal/cmds/neosync/sync/job.go @@ -21,6 +21,10 @@ func toJob( if cmd.Source.ConnectionOpts != nil && cmd.Source.ConnectionOpts.JobId != nil && *cmd.Source.ConnectionOpts.JobId != "" { jobId = *cmd.Source.ConnectionOpts.JobId } + tables := map[string]string{} + for _, m := range sourceSchema { + tables[m.Table] = m.Table + } return &mgmtv1alpha1.Job{ Id: jobId, Name: "cli-sync", @@ -28,16 +32,16 @@ func toJob( Source: &mgmtv1alpha1.JobSource{ Options: sourceConnOpts, }, - Destinations: []*mgmtv1alpha1.JobDestination{toJobDestination(cmd, destinationConnection)}, + Destinations: []*mgmtv1alpha1.JobDestination{toJobDestination(cmd, destinationConnection, tables)}, Mappings: toJobMappings(sourceSchema), }, nil } -func toJobDestination(cmd *cmdConfig, destinationConnection *mgmtv1alpha1.Connection) *mgmtv1alpha1.JobDestination { +func toJobDestination(cmd *cmdConfig, destinationConnection *mgmtv1alpha1.Connection, tables map[string]string) *mgmtv1alpha1.JobDestination { return &mgmtv1alpha1.JobDestination{ ConnectionId: destinationConnection.Id, Id: uuid.NewString(), - Options: cmdConfigToDestinationConnectionOptions(cmd), + Options: cmdConfigToDestinationConnectionOptions(cmd, tables), } } @@ -67,6 +71,14 @@ func toJobSourceOption(sourceConnection *mgmtv1alpha1.Connection) (*mgmtv1alpha1 }, }, }, nil + case *mgmtv1alpha1.ConnectionConfig_DynamodbConfig: + return &mgmtv1alpha1.JobSourceOptions{ + Config: &mgmtv1alpha1.JobSourceOptions_Dynamodb{ + Dynamodb: &mgmtv1alpha1.DynamoDBSourceConnectionOptions{ + ConnectionId: sourceConnection.Id, + }, + }, + }, nil default: return nil, fmt.Errorf("unsupported connection type") } diff --git a/cli/internal/cmds/neosync/sync/sync.go b/cli/internal/cmds/neosync/sync/sync.go index 5913627672..3109ac7944 100644 --- a/cli/internal/cmds/neosync/sync/sync.go +++ b/cli/internal/cmds/neosync/sync/sync.go @@ -25,6 +25,7 @@ import ( cli_logger "github.com/nucleuscloud/neosync/cli/internal/logger" "github.com/nucleuscloud/neosync/cli/internal/output" benthosbuilder "github.com/nucleuscloud/neosync/internal/benthos/benthos-builder" + benthosbuilder_shared "github.com/nucleuscloud/neosync/internal/benthos/benthos-builder/shared" connectionmanager "github.com/nucleuscloud/neosync/internal/connection-manager" pool_sql_provider "github.com/nucleuscloud/neosync/internal/connection-manager/pool/providers/sql" "github.com/nucleuscloud/neosync/internal/connection-manager/providers/sqlprovider" @@ -44,7 +45,7 @@ import ( "github.com/warpstreamlabs/bento/public/service" ) -type ConnectionType string +// TODO: remove this. should use connection type type DriverType string const ( @@ -52,12 +53,6 @@ const ( mysqlDriver DriverType = "mysql" mssqlDriver DriverType = "mssql" - awsS3Connection ConnectionType = "awsS3" - gcpCloudStorageConnection ConnectionType = "gcpCloudStorage" - postgresConnection ConnectionType = "postgres" - mysqlConnection ConnectionType = "mysql" - awsDynamoDBConnection ConnectionType = "awsDynamoDB" - batchSize = 20 ) @@ -331,7 +326,7 @@ func (c *clisync) configureAndRunSync() error { } func (c *clisync) configureSync() ([][]*benthosbuilder.BenthosConfigResponse, error) { - sourceConnectionType, err := getConnectionType(c.sourceConnection) + sourceConnectionType, err := benthosbuilder_shared.GetConnectionType(c.sourceConnection) if err != nil { return nil, err } @@ -624,6 +619,7 @@ func cmdConfigToDestinationConnection(cmd *cmdConfig) *mgmtv1alpha1.Connection { Config: &mgmtv1alpha1.ConnectionConfig_DynamodbConfig{ DynamodbConfig: &mgmtv1alpha1.DynamoDBConnectionConfig{ Credentials: creds, + Endpoint: cmd.AwsDynamoDbDestination.AwsCredConfig.Endpoint, }, }, }, @@ -632,7 +628,7 @@ func cmdConfigToDestinationConnection(cmd *cmdConfig) *mgmtv1alpha1.Connection { return &mgmtv1alpha1.Connection{} } -func cmdConfigToDestinationConnectionOptions(cmd *cmdConfig) *mgmtv1alpha1.JobDestinationOptions { +func cmdConfigToDestinationConnectionOptions(cmd *cmdConfig, tables map[string]string) *mgmtv1alpha1.JobDestinationOptions { if cmd.Destination != nil { switch cmd.Destination.Driver { case postgresDriver: @@ -670,9 +666,18 @@ func cmdConfigToDestinationConnectionOptions(cmd *cmdConfig) *mgmtv1alpha1.JobDe } } } else if cmd.AwsDynamoDbDestination != nil { + dynamoTableMappings := []*mgmtv1alpha1.DynamoDBDestinationTableMapping{} + for _, table := range tables { + dynamoTableMappings = append(dynamoTableMappings, &mgmtv1alpha1.DynamoDBDestinationTableMapping{ + SourceTable: table, + DestinationTable: table, + }) + } return &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_AwsS3Options{ - AwsS3Options: &mgmtv1alpha1.AwsS3DestinationConnectionOptions{}, + Config: &mgmtv1alpha1.JobDestinationOptions_DynamodbOptions{ + DynamodbOptions: &mgmtv1alpha1.DynamoDBDestinationConnectionOptions{ + TableMappings: dynamoTableMappings, + }, }, } } @@ -698,6 +703,9 @@ func (c *clisync) runDestinationInitStatements( ) error { dependencyMap := buildDependencyMap(syncConfigs) destConnection := cmdConfigToDestinationConnection(c.cmd) + if _, ok := destConnection.ConnectionConfig.Config.(*mgmtv1alpha1.ConnectionConfig_DynamodbConfig); ok { + return nil + } db, err := c.sqlmanagerclient.NewSqlConnection(c.ctx, c.session, destConnection, c.logger) if err != nil { return err @@ -897,16 +905,18 @@ func (c *clisync) getSourceConnectionSchemaConfig( return nil }) - errgrp.Go(func() error { - initStatementsResp, err := getTableInitStatementMap(errctx, c.logger, c.connectiondataclient, c.cmd.Source.ConnectionId, c.cmd.Destination) - if err != nil { - return err - } - initTableStatementsMap = initStatementsResp.GetTableInitStatements() - truncateTableStatementsMap = initStatementsResp.GetTableTruncateStatements() - initSchemaStatements = initStatementsResp.GetSchemaInitStatements() - return nil - }) + if c.cmd.Destination != nil { + errgrp.Go(func() error { + initStatementsResp, err := getTableInitStatementMap(errctx, c.logger, c.connectiondataclient, c.cmd.Source.ConnectionId, c.cmd.Destination) + if err != nil { + return err + } + initTableStatementsMap = initStatementsResp.GetTableInitStatements() + truncateTableStatementsMap = initStatementsResp.GetTableTruncateStatements() + initSchemaStatements = initStatementsResp.GetSchemaInitStatements() + return nil + }) + } if err := errgrp.Wait(); err != nil { return nil, err } diff --git a/cli/internal/cmds/neosync/sync/sync_integration_test.go b/cli/internal/cmds/neosync/sync/sync_integration_test.go index 31b04ce797..3aa3aac185 100644 --- a/cli/internal/cmds/neosync/sync/sync_integration_test.go +++ b/cli/internal/cmds/neosync/sync/sync_integration_test.go @@ -2,20 +2,25 @@ package sync_cmd import ( "context" - "fmt" + "database/sql" "testing" "connectrpc.com/connect" - "github.com/jackc/pgx/v5/pgxpool" + "github.com/aws/aws-sdk-go-v2/service/dynamodb" + dyntypes "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" tcneosyncapi "github.com/nucleuscloud/neosync/backend/pkg/integration-test" "github.com/nucleuscloud/neosync/cli/internal/output" + connectionmanager "github.com/nucleuscloud/neosync/internal/connection-manager" "github.com/nucleuscloud/neosync/internal/testutil" + tcdynamodb "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/dynamodb" tcmysql "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/mysql" tcpostgres "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/postgres" + testutil_testdata "github.com/nucleuscloud/neosync/internal/testutil/testdata" mysqlalltypes "github.com/nucleuscloud/neosync/internal/testutil/testdata/mysql/alltypes" pgalltypes "github.com/nucleuscloud/neosync/internal/testutil/testdata/postgres/alltypes" + tcworkflow "github.com/nucleuscloud/neosync/worker/pkg/integration-test" "github.com/stretchr/testify/require" ) @@ -35,14 +40,14 @@ func Test_Sync(t *testing.T) { t.Fatal(err) } - connclient := neosyncApi.UnauthdClients.Connections - conndataclient := neosyncApi.UnauthdClients.ConnectionData - jobclient := neosyncApi.UnauthdClients.Jobs + connclient := neosyncApi.OSSUnauthenticatedLicensedClients.Connections() + conndataclient := neosyncApi.OSSUnauthenticatedLicensedClients.ConnectionData() + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() dbManagers := tcworkflow.NewTestDatabaseManagers(t) connmanager := dbManagers.SqlConnManager sqlmanagerclient := dbManagers.SqlManager - accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, neosyncApi.UnauthdClients.Users) + accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Users()) awsS3Config := testutil.GetTestAwsS3Config() s3Conn := tcneosyncapi.CreateS3Connection( ctx, @@ -63,28 +68,29 @@ func Test_Sync(t *testing.T) { } testdataFolder := "../../../../../internal/testutil/testdata/postgres" - sourceConn := tcneosyncapi.CreatePostgresConnection(ctx, t, neosyncApi.UnauthdClients.Connections, accountId, "postgres-source", postgres.Source.URL) + sourceConn := tcneosyncapi.CreatePostgresConnection(ctx, t, connclient, accountId, "postgres-source", postgres.Source.URL) t.Run("postgres_sync", func(t *testing.T) { // can't be run in parallel yet // right now CLI sync and init schema takes everything in source and copies it to target since there are no job mappings defined by the user // so it can't be scoped to specific schema // t.Parallel() - err = postgres.Source.RunCreateStmtsInSchema(ctx, &testdataFolder, []string{"humanresources/create-tables.sql"}, "humanresources") + err = postgres.Source.RunCreateStmtsInSchema(ctx, testdataFolder, []string{"humanresources/create-tables.sql"}, "humanresources") if err != nil { t.Fatal(err) } - err = postgres.Source.RunCreateStmtsInSchema(ctx, &testdataFolder, []string{"alltypes/create-tables.sql"}, "alltypes") + alltypesSchema := "alltypes" + err = postgres.Source.RunCreateStmtsInSchema(ctx, testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) if err != nil { t.Fatal(err) } - err = postgres.Target.CreateSchemas(ctx, []string{"humanresources", "alltypes"}) + err = postgres.Target.CreateSchemas(ctx, []string{"humanresources", alltypesSchema}) if err != nil { t.Fatal(err) } testlogger := testutil.GetTestLogger(t) - cmdConfig := &cmdConfig{ + cmdconfig := &cmdConfig{ Source: &sourceConfig{ ConnectionId: sourceConn.Id, }, @@ -104,7 +110,7 @@ func Test_Sync(t *testing.T) { sqlmanagerclient: sqlmanagerclient, ctx: ctx, logger: testlogger, - cmd: cmdConfig, + cmd: cmdconfig, connmanager: connmanager, session: connectionmanager.NewUniqueSession(), } @@ -127,16 +133,18 @@ func Test_Sync(t *testing.T) { require.NoError(t, err) require.Greater(t, rowCount, 0) - var tsvectorVal, jsonVal, jsonbVal string - row := postgres.Target.DB.QueryRow(ctx, "select tsvector_col::text, json_col::text, jsonb_col::text from alltypes.all_data_types where tsvector_col is not null and json_col is not null;") - err = row.Scan(&tsvectorVal, &jsonVal, &jsonbVal) + source, err := sql.Open("postgres", postgres.Source.URL) require.NoError(t, err) - require.Equal(t, "'example' 'tsvector'", tsvectorVal) - require.Equal(t, `{"name": "John", "age": 30}`, jsonVal) - require.Equal(t, `{"age": 30, "name": "John"}`, jsonbVal) // Note: JSONB reorders keys + defer source.Close() - err = verifyPostgresTimeTimeTableValues(t, ctx, postgres.Target.DB, "alltypes") + target, err := sql.Open("postgres", postgres.Target.URL) require.NoError(t, err) + defer target.Close() + + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "all_data_types", "postgres", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "time_time", "postgres", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "json_data", "postgres", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "array_types", "postgres", "id") }) t.Run("S3_end_to_end", func(t *testing.T) { @@ -147,12 +155,12 @@ func Test_Sync(t *testing.T) { } alltypesSchema := "alltypes_s3_pg" - err := postgres.Source.RunCreateStmtsInSchema(ctx, &testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) + err := postgres.Source.RunCreateStmtsInSchema(ctx, testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) if err != nil { t.Fatal(err) } - err = postgres.Target.RunCreateStmtsInSchema(ctx, &testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) + err = postgres.Target.RunCreateStmtsInSchema(ctx, testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) if err != nil { t.Fatal(err) } @@ -226,30 +234,31 @@ func Test_Sync(t *testing.T) { } err := sync.configureAndRunSync() require.NoError(t, err) - }) + rowCount, err := postgres.Target.GetTableRowCount(ctx, alltypesSchema, "all_data_types") + require.NoError(t, err) + require.Greater(t, rowCount, 1) - rowCount, err := postgres.Target.GetTableRowCount(ctx, alltypesSchema, "all_data_types") - require.NoError(t, err) - require.Greater(t, rowCount, 1) + rowCount, err = postgres.Target.GetTableRowCount(ctx, alltypesSchema, "json_data") + require.NoError(t, err) + require.Greater(t, rowCount, 1) - rowCount, err = postgres.Target.GetTableRowCount(ctx, alltypesSchema, "json_data") - require.NoError(t, err) - require.Greater(t, rowCount, 1) + rowCount, err = postgres.Target.GetTableRowCount(ctx, alltypesSchema, "time_time") + require.NoError(t, err) + require.Greater(t, rowCount, 0) - rowCount, err = postgres.Target.GetTableRowCount(ctx, alltypesSchema, "time_time") - require.NoError(t, err) - require.Greater(t, rowCount, 0) + source, err := sql.Open("postgres", postgres.Source.URL) + require.NoError(t, err) + defer source.Close() - var tsvectorVal, jsonVal, jsonbVal string - row := postgres.Target.DB.QueryRow(ctx, fmt.Sprintf("select tsvector_col::text, json_col::text, jsonb_col::text from %s.all_data_types where tsvector_col is not null and json_col is not null;", alltypesSchema)) - err = row.Scan(&tsvectorVal, &jsonVal, &jsonbVal) - require.NoError(t, err) - require.Equal(t, "'example' 'tsvector'", tsvectorVal) - require.Equal(t, `{"age":30,"name":"John"}`, jsonVal) - require.Equal(t, `{"age": 30, "name": "John"}`, jsonbVal) // Note: JSONB reorders keys + target, err := sql.Open("postgres", postgres.Target.URL) + require.NoError(t, err) + defer target.Close() - err = verifyPostgresTimeTimeTableValues(t, ctx, postgres.Target.DB, alltypesSchema) - require.NoError(t, err) + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "all_data_types", "postgres", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "time_time", "postgres", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "json_data", "postgres", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "array_types", "postgres", "id") + }) }) t.Cleanup(func() { @@ -268,22 +277,23 @@ func Test_Sync(t *testing.T) { } testdataFolder := "../../../../../internal/testutil/testdata/mysql" - sourceConn := tcneosyncapi.CreateMysqlConnection(ctx, t, neosyncApi.UnauthdClients.Connections, accountId, "mysql-source", mysql.Source.URL) + sourceConn := tcneosyncapi.CreateMysqlConnection(ctx, t, connclient, accountId, "mysql-source", mysql.Source.URL) t.Run("mysql_sync", func(t *testing.T) { // can't be run in parallel yet // right now CLI sync and init schema takes everything in source and copies it to target since there are no job mappings defined by the user // so it can't be scoped to specific schema // t.Parallel() - err = mysql.Source.RunCreateStmtsInDatabase(ctx, &testdataFolder, []string{"humanresources/create-tables.sql"}, "humanresources") + alltypesSchema := "alltypes" + err = mysql.Source.RunCreateStmtsInDatabase(ctx, testdataFolder, []string{"humanresources/create-tables.sql"}, "humanresources") if err != nil { t.Fatal(err) } - err = mysql.Source.RunCreateStmtsInDatabase(ctx, &testdataFolder, []string{"alltypes/create-tables.sql"}, "alltypes") + err = mysql.Source.RunCreateStmtsInDatabase(ctx, testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) if err != nil { t.Fatal(err) } - err = mysql.Target.CreateDatabases(ctx, []string{"humanresources", "alltypes"}) + err = mysql.Target.CreateDatabases(ctx, []string{"humanresources", alltypesSchema}) if err != nil { t.Fatal(err) } @@ -322,9 +332,12 @@ func Test_Sync(t *testing.T) { require.NoError(t, err) require.Greater(t, rowCount, 1) - rowCount, err = mysql.Target.GetTableRowCount(ctx, "alltypes", "all_data_types") + rowCount, err = mysql.Target.GetTableRowCount(ctx, alltypesSchema, "all_data_types") require.NoError(t, err) require.Greater(t, rowCount, 1) + + testutil_testdata.VerifySQLTableColumnValues(t, ctx, mysql.Source.DB, mysql.Target.DB, alltypesSchema, "json_data", "mysql", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, mysql.Source.DB, mysql.Target.DB, alltypesSchema, "all_data_types", "mysql", "id") }) t.Run("S3_end_to_end", func(t *testing.T) { @@ -335,12 +348,12 @@ func Test_Sync(t *testing.T) { } alltypesSchema := "alltypes_s3_mysql" - err := mysql.Source.RunCreateStmtsInDatabase(ctx, &testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) + err := mysql.Source.RunCreateStmtsInDatabase(ctx, testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) if err != nil { t.Fatal(err) } - err = mysql.Target.RunCreateStmtsInDatabase(ctx, &testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) + err = mysql.Target.RunCreateStmtsInDatabase(ctx, testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) if err != nil { t.Fatal(err) } @@ -422,6 +435,9 @@ func Test_Sync(t *testing.T) { rowCount, err = mysql.Target.GetTableRowCount(ctx, alltypesSchema, "json_data") require.NoError(t, err) require.Greater(t, rowCount, 1) + + testutil_testdata.VerifySQLTableColumnValues(t, ctx, mysql.Source.DB, mysql.Target.DB, alltypesSchema, "json_data", "mysql", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, mysql.Source.DB, mysql.Target.DB, alltypesSchema, "all_data_types", "mysql", "id") }) t.Cleanup(func() { @@ -432,49 +448,149 @@ func Test_Sync(t *testing.T) { }) }) - t.Cleanup(func() { - err = neosyncApi.TearDown(ctx) + t.Run("dynamodb", func(t *testing.T) { + t.Parallel() + dynamo, err := tcdynamodb.NewDynamoDBTestSyncContainer(ctx, t, []tcdynamodb.Option{}, []tcdynamodb.Option{}) if err != nil { t.Fatal(err) } - }) -} -func verifyPostgresTimeTimeTableValues(t *testing.T, ctx context.Context, db *pgxpool.Pool, schema string) error { - rows, err := db.Query(ctx, fmt.Sprintf("select timestamp_col::text, date_col::text from %q.time_time;", schema)) - if err != nil { - return err - } - defer rows.Close() + sourceConn := tcneosyncapi.CreateDynamoDBConnection(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Connections(), accountId, "dynamo-source", dynamo.Source.URL, dynamo.Source.Credentials) - expectedTimestamps := [][]byte{ - []byte("2024-03-18 10:30:00"), - []byte("0001-01-01 00:00:00 BC"), - []byte("0002-01-01 00:00:00 BC"), - } - expectedDates := [][]byte{ - []byte("2024-03-18"), - []byte("0001-01-01 BC"), - []byte("0002-01-01 BC"), - } - var actualTimestamps [][]byte - var actualDates [][]byte + t.Run("dynamodb_sync", func(t *testing.T) { + t.Parallel() - for rows.Next() { - var timestampCol, dateCol []byte - err = rows.Scan(×tampCol, &dateCol) - if err != nil { - return err - } - actualTimestamps = append(actualTimestamps, timestampCol) - actualDates = append(actualDates, dateCol) - } + tableName := "test-sync-source" + primaryKey := "id" - if err = rows.Err(); err != nil { - return err - } + err = dynamo.Source.SetupDynamoDbTable(ctx, tableName, primaryKey) + if err != nil { + t.Fatal(err) + } + + err = dynamo.Target.SetupDynamoDbTable(ctx, tableName, primaryKey) + if err != nil { + t.Fatal(err) + } + + testData := []map[string]dyntypes.AttributeValue{ + { + "id": &dyntypes.AttributeValueMemberS{Value: "1"}, + "a": &dyntypes.AttributeValueMemberBOOL{Value: true}, + "NestedMap": &dyntypes.AttributeValueMemberM{ + Value: map[string]dyntypes.AttributeValue{ + "Level1": &dyntypes.AttributeValueMemberM{ + Value: map[string]dyntypes.AttributeValue{ + "Level2": &dyntypes.AttributeValueMemberM{ + Value: map[string]dyntypes.AttributeValue{ + "Attribute1": &dyntypes.AttributeValueMemberS{Value: "Value1"}, + "NumberSet": &dyntypes.AttributeValueMemberNS{Value: []string{"1", "2", "3"}}, + "BinaryData": &dyntypes.AttributeValueMemberB{Value: []byte("U29tZUJpbmFyeURhdGE=")}, + "Level3": &dyntypes.AttributeValueMemberM{ + Value: map[string]dyntypes.AttributeValue{ + "Attribute2": &dyntypes.AttributeValueMemberS{Value: "Value2"}, + "StringSet": &dyntypes.AttributeValueMemberSS{Value: []string{"Item1", "Item2", "Item3"}}, + "BinarySet": &dyntypes.AttributeValueMemberBS{ + Value: [][]byte{ + []byte("U29tZUJpbmFyeQ=="), + []byte("QW5vdGhlckJpbmFyeQ=="), + }, + }, + "Level4": &dyntypes.AttributeValueMemberM{ + Value: map[string]dyntypes.AttributeValue{ + "Attribute3": &dyntypes.AttributeValueMemberS{Value: "Value3"}, + "Boolean": &dyntypes.AttributeValueMemberBOOL{Value: true}, + "MoreBinaryData": &dyntypes.AttributeValueMemberB{Value: []byte("TW9yZUJpbmFyeURhdGE=")}, + "MoreBinarySet": &dyntypes.AttributeValueMemberBS{ + Value: [][]byte{ + []byte("TW9yZUJpbmFyeQ=="), + []byte("QW5vdGhlck1vcmVCaW5hcnk="), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + "id": &dyntypes.AttributeValueMemberS{Value: "2"}, + "a": &dyntypes.AttributeValueMemberBOOL{Value: false}, + }, + { + "id": &dyntypes.AttributeValueMemberS{Value: "3"}, + "name": &dyntypes.AttributeValueMemberS{Value: "test3"}, + }, + { + "id": &dyntypes.AttributeValueMemberS{Value: "4"}, + "name": &dyntypes.AttributeValueMemberS{Value: "test4"}, + }, + } + + err = dynamo.Source.InsertDynamoDBRecords(ctx, tableName, testData) + if err != nil { + t.Fatal(err) + } - require.ElementsMatch(t, expectedTimestamps, actualTimestamps, "Expected timestamp_col values to match") - require.ElementsMatch(t, expectedDates, actualDates, "Expected date_col values to match") - return nil + testlogger := testutil.GetTestLogger(t) + cmdConfig := &cmdConfig{ + Source: &sourceConfig{ + ConnectionId: sourceConn.Id, + }, + AwsDynamoDbDestination: &dynamoDbDestinationConfig{ + AwsCredConfig: &AwsCredConfig{ + Region: "us-west-2", + AccessKeyID: dynamo.Target.Credentials.AccessKeyId, + SecretAccessKey: dynamo.Target.Credentials.SecretAccessKey, + SessionToken: dynamo.Target.Credentials.SessionToken, + Endpoint: &dynamo.Target.URL, + }, + }, + OutputType: &outputType, + AccountId: &accountId, + } + sync := &clisync{ + connectiondataclient: conndataclient, + connectionclient: connclient, + sqlmanagerclient: sqlmanagerclient, + ctx: ctx, + logger: testlogger, + cmd: cmdConfig, + connmanager: connmanager, + session: connectionmanager.NewUniqueSession(), + } + err := sync.configureAndRunSync() + require.NoError(t, err) + + out, err := dynamo.Source.Client.Scan(ctx, &dynamodb.ScanInput{ + TableName: &tableName, + }) + require.NoError(t, err) + // Verify data was synced + out, err = dynamo.Target.Client.Scan(ctx, &dynamodb.ScanInput{ + TableName: &tableName, + }) + require.NoError(t, err) + require.Equal(t, int32(4), out.Count) + }) + + t.Cleanup(func() { + err := dynamo.TearDown(ctx) + if err != nil { + t.Fatal(err) + } + }) + }) + + t.Cleanup(func() { + err = neosyncApi.TearDown(ctx) + if err != nil { + t.Fatal(err) + } + }) } diff --git a/cli/internal/cmds/neosync/sync/util.go b/cli/internal/cmds/neosync/sync/util.go index 0b27f5de67..61b1e8df63 100644 --- a/cli/internal/cmds/neosync/sync/util.go +++ b/cli/internal/cmds/neosync/sync/util.go @@ -25,25 +25,6 @@ func parseDriverString(str string) (DriverType, bool) { return p, ok } -func getConnectionType(connection *mgmtv1alpha1.Connection) (ConnectionType, error) { - if connection.ConnectionConfig.GetAwsS3Config() != nil { - return awsS3Connection, nil - } - if connection.GetConnectionConfig().GetGcpCloudstorageConfig() != nil { - return gcpCloudStorageConnection, nil - } - if connection.ConnectionConfig.GetMysqlConfig() != nil { - return mysqlConnection, nil - } - if connection.ConnectionConfig.GetPgConfig() != nil { - return postgresConnection, nil - } - if connection.ConnectionConfig.GetDynamodbConfig() != nil { - return awsDynamoDBConnection, nil - } - return "", errors.New("unsupported connection type") -} - func isConfigReady(config *benthosbuilder.BenthosConfigResponse, queuedMap map[string][]string) bool { for _, dep := range config.DependsOn { if cols, ok := queuedMap[dep.Table]; ok { @@ -138,15 +119,15 @@ func buildDependencyMap(syncConfigs []*tabledependency.RunConfig) map[string][]s return dependencyMap } -func areSourceAndDestCompatible(connection *mgmtv1alpha1.Connection, destinationDriver DriverType) error { +func areSourceAndDestCompatible(connection *mgmtv1alpha1.Connection, destinationDriver *DriverType) error { switch connection.ConnectionConfig.Config.(type) { case *mgmtv1alpha1.ConnectionConfig_PgConfig: - if destinationDriver != postgresDriver { - return fmt.Errorf("Connection and destination types are incompatible [postgres, %s]", destinationDriver) + if destinationDriver != nil && *destinationDriver != postgresDriver { + return fmt.Errorf("Connection and destination types are incompatible [postgres, %s]", *destinationDriver) } case *mgmtv1alpha1.ConnectionConfig_MysqlConfig: - if destinationDriver != mysqlDriver { - return fmt.Errorf("Connection and destination types are incompatible [mysql, %s]", destinationDriver) + if destinationDriver != nil && *destinationDriver != mysqlDriver { + return fmt.Errorf("Connection and destination types are incompatible [mysql, %s]", *destinationDriver) } case *mgmtv1alpha1.ConnectionConfig_AwsS3Config, *mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig, *mgmtv1alpha1.ConnectionConfig_DynamodbConfig: default: diff --git a/compose.dev.yml b/compose.dev.yml index bb3533343d..4a2315b931 100644 --- a/compose.dev.yml +++ b/compose.dev.yml @@ -124,6 +124,9 @@ services: - REDIS_URL=redis://default:foofar@redis:6379 - LOG_LEVEL=DEBUG - DB_LOG_LEVEL=ERROR + env_file: + - path: ./.env.worker.local + required: false networks: - neosync-network - temporal-network diff --git a/docs/docs/deploy/authentication.md b/docs/docs/deploy/authentication.md index 0bb614d639..d727db3489 100644 --- a/docs/docs/deploy/authentication.md +++ b/docs/docs/deploy/authentication.md @@ -15,6 +15,8 @@ There will also be a section for how to properly set up these systems properly. ## User Authentication +> **NB:** This requires a valid Neosync Enterprise license for OSS deployments. If you would like to try this out, please contact us. + This authentication is the primary form of authentication in the system. It is used to identify authenticating users in the system and what privileges they have. Today, this is quite simple and merely verifies their access token is valid and that they are operating against a Neosync account that a user resides in. @@ -110,6 +112,8 @@ For Keycloak, the `view-users` scope should be added to the service account role ## Starting Neosync in Auth Mode +> **NB:** This requires a valid Neosync Enterprise license to be present in the API container. If you would like to try this out, please contact us. + Starting Neosync in Auth Mode is done in a similar way as starting Neosync in non-auth mode: using a compose file. A compose file is also provided that stands up [Keycloak](https://keycloak.org), an open source auth solution. To stand up Neosync with auth, simply run the following command from the repo root: diff --git a/docs/docs/deploy/docker-compose.md b/docs/docs/deploy/docker-compose.md index 3b584e13cd..c471804599 100644 --- a/docs/docs/deploy/docker-compose.md +++ b/docs/docs/deploy/docker-compose.md @@ -21,9 +21,9 @@ We split out the Temporal compose file to make it easier to include in other pla To run this you can run one of the two following commands: -```sh -$ make compose/up -$ docker compose up -d +```console +make compose/up +docker compose up -d ``` ## Deploying Neosync with Compose @@ -37,11 +37,13 @@ Once all of the containers come online, the app is now routable via [http://loca ## Deploy with Docker Compose and Authentication +> **NB:** This requires a valid Neosync Enterprise license for OSS deployments. If you would like to try this out, please contact us. + Neosync provides an auth friendly compose file that will stand up Neosync in auth-mode with Keycloak. -```sh -$ make compose/auth/up -$ docker compose -f compose.yml -f compose.auth.yml up -d +```console +make compose/auth/up +docker compose -f compose.yml -f compose.auth.yml up -d ``` Keycloak comes default with two clients that allow the app and cli to login successfully. diff --git a/docs/docs/guides/neosync-local-dev.md b/docs/docs/guides/neosync-local-dev.md index bb533603c2..e2bf0dcc4a 100644 --- a/docs/docs/guides/neosync-local-dev.md +++ b/docs/docs/guides/neosync-local-dev.md @@ -38,7 +38,7 @@ The docker compose environment runs entirely by itself. To start: -``` +```console make compose/dev/up ``` @@ -48,7 +48,7 @@ Once they have a build cache, they will come online and re-build much faster! To stop: -``` +```console make compose/dev/down ``` @@ -58,13 +58,15 @@ Once everything is up and running, The app can be accessed locally at [http://lo This will stand up Keycloak with a pre-configured realm that will allow logging in to Neosync with a standard username and password, completely offline! -```sh +> **NB:** This requires a valid Neosync Enterprise license to be present in the API container. If you would like to try this out, please contact us. + +```console make compose/dev/auth/up ``` To stop, run: -```sh +```console make compose/dev/auth/down ``` @@ -162,6 +164,6 @@ This lets us declare the versions in code and docker takes care of the rest. Each tool above can be straightforwardly installed with brew if on Linux/MacOS -``` +```console brew install kind tilt-dev/tap/tilt tilt-dev/tap/ctlptl kubernetes-cli kustomize helm helmfile go sqlc buf golangci-lint node ``` diff --git a/docs/docs/guides/viewing-job-run-logs.md b/docs/docs/guides/viewing-job-run-logs.md index e71ec3f861..ea138156e5 100644 --- a/docs/docs/guides/viewing-job-run-logs.md +++ b/docs/docs/guides/viewing-job-run-logs.md @@ -61,6 +61,8 @@ kubectl logs -n neosync deployment/neosync-worker -f` #### Neosync UI +> **NB:** This requires a valid Neosync Enterprise license for OSS deployments. If you would like to try this out, please contact us. + Neosync can be configured to surface pod logs via the UI by configuring `neosync-api` to surface these. If you've deployed Neosync via the helm chart, this should come pre-configured with kubernetes pod logs. @@ -71,9 +73,9 @@ This are great for basic deployments, but will disappear on worker pod shutdown. ## Persistence with Loki -Neosync has native support for surfacing logs that come from a [Grafana Loki](https://grafana.com/oss/loki/) instance. +Neosync has native support for surfacing logs that come from a [Grafana Loki](https://grafana.com/oss/loki/) instance (with a valid Neosync Enterprise license). -Please note that Neosync does not natively handle shipping logs to Loki, but it can natively handle querying a Loki instance and surfacing logs natively into Neosync UI. +Please note that Neosync does not natively handle shipping logs to Loki, however it can natively handle querying a Loki instance to surface logs into Neosync UI. This can be configured by setting the `RUN_LOGS_TYPE` environment variable to `loki`, along with configuring the `RUN_LOGS_LOKICONFIG_BASEURL`. To see the full environment variables, view the [api env vars](../deploy/environment-variables.md#backend-api). diff --git a/docs/docs/transformers/gen-javascript-transformer.md b/docs/docs/transformers/gen-javascript-transformer.md index 3da50d1145..5aea124ccf 100644 --- a/docs/docs/transformers/gen-javascript-transformer.md +++ b/docs/docs/transformers/gen-javascript-transformer.md @@ -934,8 +934,7 @@ Generates IPv4 or IPv6 addresses with support for different network classes. | Field | Type | Default | Required | Description | | -------- | ---- | ------- | -------- | ----------- | | maxLength | int64 | 100000 | false | Specifies the maximum length for the generated data. This field ensures that the output does not exceed a certain number of characters. -| version | string | string(IpVersion_V4) | false | IP version to generate: 'ipv4' or 'ipv6' -| class | string | string(IpV4Class_Public) | false | IP class: 'public', 'private-a', 'private-b', 'private-c', 'link_local', 'multicast', 'loopback' +| ipType | string | string(IpV4_Public) | false | IP type to generate. | seed | int64 | | false | Optional seed for deterministic generation
@@ -945,8 +944,7 @@ Generates IPv4 or IPv6 addresses with support for different network classes. const newValue = neosync.generateIpAddress({ maxLength: 100000, - version: string(IpVersion_V4), - class: string(IpV4Class_Public), + ipType: string(IpV4_Public), seed: 1, }); diff --git a/docs/openapi/mgmt/v1alpha1/auth.openapi.yaml b/docs/openapi/mgmt/v1alpha1/auth.openapi.yaml index 3fcf21eb62..39e5030313 100644 --- a/docs/openapi/mgmt/v1alpha1/auth.openapi.yaml +++ b/docs/openapi/mgmt/v1alpha1/auth.openapi.yaml @@ -113,44 +113,6 @@ paths: application/json: schema: $ref: '#/components/schemas/mgmt.v1alpha1.CheckTokenResponse' - /mgmt.v1alpha1.AuthService/GetCliIssuer: - post: - tags: - - mgmt.v1alpha1.AuthService - summary: GetCliIssuer - description: |- - Used by the CLI to retrieve Auth Issuer information - @deprecated - operationId: mgmt.v1alpha1.AuthService.GetCliIssuer - parameters: - - name: Connect-Protocol-Version - in: header - required: true - schema: - $ref: '#/components/schemas/connect-protocol-version' - - name: Connect-Timeout-Ms - in: header - schema: - $ref: '#/components/schemas/connect-timeout-header' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mgmt.v1alpha1.GetCliIssuerRequest' - required: true - responses: - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/connect.error' - "200": - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/mgmt.v1alpha1.GetCliIssuerResponse' /mgmt.v1alpha1.AuthService/GetAuthorizeUrl: post: tags: @@ -328,23 +290,6 @@ components: description: The generated url that is the client will be redirected to during the Oauth flow title: GetAuthorizeUrlResponse additionalProperties: false - mgmt.v1alpha1.GetCliIssuerRequest: - type: object - title: GetCliIssuerRequest - additionalProperties: false - mgmt.v1alpha1.GetCliIssuerResponse: - type: object - properties: - issuerUrl: - type: string - title: issuer_url - description: The backing authentication issuer url - audience: - type: string - title: audience - description: The audience that will be used in the access token. This corresponds to the "aud" claim - title: GetCliIssuerResponse - additionalProperties: false mgmt.v1alpha1.LoginCliRequest: type: object properties: diff --git a/docs/openapi/mgmt/v1alpha1/connection.openapi.yaml b/docs/openapi/mgmt/v1alpha1/connection.openapi.yaml index af8a70f2de..c1238ef794 100644 --- a/docs/openapi/mgmt/v1alpha1/connection.openapi.yaml +++ b/docs/openapi/mgmt/v1alpha1/connection.openapi.yaml @@ -460,9 +460,6 @@ components: - required: - region properties: - bucketArn: - type: string - title: bucket_arn pathPrefix: type: string title: path_prefix diff --git a/docs/openapi/mgmt/v1alpha1/connection_data.openapi.yaml b/docs/openapi/mgmt/v1alpha1/connection_data.openapi.yaml index d631f5aa1b..099d560c41 100644 --- a/docs/openapi/mgmt/v1alpha1/connection_data.openapi.yaml +++ b/docs/openapi/mgmt/v1alpha1/connection_data.openapi.yaml @@ -148,82 +148,6 @@ paths: application/json: schema: $ref: '#/components/schemas/mgmt.v1alpha1.GetConnectionTableConstraintsResponse' - /mgmt.v1alpha1.ConnectionDataService/GetConnectionForeignConstraints: - post: - tags: - - mgmt.v1alpha1.ConnectionDataService - summary: GetConnectionForeignConstraints - description: |- - For a specific connection, returns the foreign key constraints. Mostly useful for SQL-based Connections. - Used primarily by the CLI sync command to determine stream order. - operationId: mgmt.v1alpha1.ConnectionDataService.GetConnectionForeignConstraints - parameters: - - name: Connect-Protocol-Version - in: header - required: true - schema: - $ref: '#/components/schemas/connect-protocol-version' - - name: Connect-Timeout-Ms - in: header - schema: - $ref: '#/components/schemas/connect-timeout-header' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mgmt.v1alpha1.GetConnectionForeignConstraintsRequest' - required: true - responses: - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/connect.error' - "200": - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/mgmt.v1alpha1.GetConnectionForeignConstraintsResponse' - /mgmt.v1alpha1.ConnectionDataService/GetConnectionPrimaryConstraints: - post: - tags: - - mgmt.v1alpha1.ConnectionDataService - summary: GetConnectionPrimaryConstraints - description: |- - For a specific connection, returns the primary key constraints. Mostly useful for SQL-based Connections. - Used primarily by the CLI sync command to determine stream order. - operationId: mgmt.v1alpha1.ConnectionDataService.GetConnectionPrimaryConstraints - parameters: - - name: Connect-Protocol-Version - in: header - required: true - schema: - $ref: '#/components/schemas/connect-protocol-version' - - name: Connect-Timeout-Ms - in: header - schema: - $ref: '#/components/schemas/connect-timeout-header' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest' - required: true - responses: - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/connect.error' - "200": - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse' /mgmt.v1alpha1.ConnectionDataService/GetConnectionInitStatements: post: tags: @@ -262,42 +186,6 @@ paths: application/json: schema: $ref: '#/components/schemas/mgmt.v1alpha1.GetConnectionInitStatementsResponse' - /mgmt.v1alpha1.ConnectionDataService/GetConnectionUniqueConstraints: - post: - tags: - - mgmt.v1alpha1.ConnectionDataService - summary: GetConnectionUniqueConstraints - description: For a specific connection, returns the unique constraints. Mostly useful for SQL-based connections. - operationId: mgmt.v1alpha1.ConnectionDataService.GetConnectionUniqueConstraints - parameters: - - name: Connect-Protocol-Version - in: header - required: true - schema: - $ref: '#/components/schemas/connect-protocol-version' - - name: Connect-Timeout-Ms - in: header - schema: - $ref: '#/components/schemas/connect-timeout-header' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest' - required: true - responses: - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/connect.error' - "200": - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse' /mgmt.v1alpha1.ConnectionDataService/GetAiGeneratedData: post: tags: @@ -772,14 +660,6 @@ components: mgmt.v1alpha1.ForeignConstraint: type: object properties: - column: - type: string - title: column - description: '@deprecated - use columns' - isNullable: - type: boolean - title: is_nullable - description: '@deprecated - use not_nullable' foreignKey: allOf: - title: foreign_key @@ -812,10 +692,6 @@ components: table: type: string title: table - column: - type: string - title: column - description: '@deprecated - use columns' columns: type: array items: @@ -974,64 +850,14 @@ components: mgmt.v1alpha1.GetConnectionDataStreamResponse: type: object properties: - row: - type: object - title: row - additionalProperties: - type: string - title: value - format: byte - description: A map of column name to the bytes value of the data that was found for that column and row - title: GetConnectionDataStreamResponse - additionalProperties: false - description: Each stream response is a single row in the requested schema and table - mgmt.v1alpha1.GetConnectionDataStreamResponse.RowEntry: - type: object - properties: - key: - type: string - title: key - value: + rowBytes: type: string - title: value + title: row_bytes format: byte - title: RowEntry - additionalProperties: false - mgmt.v1alpha1.GetConnectionForeignConstraintsRequest: - type: object - properties: - connectionId: - type: string - title: connection_id - format: uuid - title: GetConnectionForeignConstraintsRequest - additionalProperties: false - mgmt.v1alpha1.GetConnectionForeignConstraintsResponse: - type: object - properties: - tableConstraints: - type: object - title: table_constraints - additionalProperties: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.ForeignConstraintTables' - description: the key here is .
and the list of tables that it depends on, also `.
` format. - title: GetConnectionForeignConstraintsResponse - additionalProperties: false - description: Dependency constraints for a specific table - mgmt.v1alpha1.GetConnectionForeignConstraintsResponse.TableConstraintsEntry: - type: object - properties: - key: - type: string - title: key - value: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.ForeignConstraintTables' - title: TableConstraintsEntry + description: A map of column name to column value, where the value is serialized as bytes. The value represents a map[string]any structure. + title: GetConnectionDataStreamResponse additionalProperties: false + description: Each stream response is a single row in the requested schema and table mgmt.v1alpha1.GetConnectionInitStatementsRequest: type: object properties: @@ -1092,41 +918,6 @@ components: title: value title: TableTruncateStatementsEntry additionalProperties: false - mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest: - type: object - properties: - connectionId: - type: string - title: connection_id - format: uuid - title: GetConnectionPrimaryConstraintsRequest - additionalProperties: false - description: Primary constraints for a specific table - mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse: - type: object - properties: - tableConstraints: - type: object - title: table_constraints - additionalProperties: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.PrimaryConstraint' - description: the key here is .
and value is the primary constraint - title: GetConnectionPrimaryConstraintsResponse - additionalProperties: false - mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry: - type: object - properties: - key: - type: string - title: key - value: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.PrimaryConstraint' - title: TableConstraintsEntry - additionalProperties: false mgmt.v1alpha1.GetConnectionSchemaMapRequest: type: object properties: @@ -1290,41 +1081,6 @@ components: - $ref: '#/components/schemas/mgmt.v1alpha1.UniqueConstraints' title: UniqueConstraintsEntry additionalProperties: false - mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest: - type: object - properties: - connectionId: - type: string - title: connection_id - format: uuid - title: GetConnectionUniqueConstraintsRequest - additionalProperties: false - description: Unique constraints for a specific table - mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse: - type: object - properties: - tableConstraints: - type: object - title: table_constraints - additionalProperties: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.UniqueConstraint' - description: the key here is .
and value is the unique constraint - title: GetConnectionUniqueConstraintsResponse - additionalProperties: false - mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse.TableConstraintsEntry: - type: object - properties: - key: - type: string - title: key - value: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.UniqueConstraint' - title: TableConstraintsEntry - additionalProperties: false mgmt.v1alpha1.GetTableRowCountRequest: type: object allOf: diff --git a/docs/openapi/mgmt/v1alpha1/job.openapi.yaml b/docs/openapi/mgmt/v1alpha1/job.openapi.yaml index 553ca43be4..e4821c4f6d 100644 --- a/docs/openapi/mgmt/v1alpha1/job.openapi.yaml +++ b/docs/openapi/mgmt/v1alpha1/job.openapi.yaml @@ -1389,59 +1389,6 @@ components: - HASH_TYPE_MD5 - HASH_TYPE_SHA256 - HASH_TYPE_SHA512 - mgmt.v1alpha1.TransformerSource: - type: string - title: TransformerSource - enum: - - TRANSFORMER_SOURCE_UNSPECIFIED - - TRANSFORMER_SOURCE_PASSTHROUGH - - TRANSFORMER_SOURCE_GENERATE_DEFAULT - - TRANSFORMER_SOURCE_TRANSFORM_JAVASCRIPT - - TRANSFORMER_SOURCE_GENERATE_EMAIL - - TRANSFORMER_SOURCE_TRANSFORM_EMAIL - - TRANSFORMER_SOURCE_GENERATE_BOOL - - TRANSFORMER_SOURCE_GENERATE_CARD_NUMBER - - TRANSFORMER_SOURCE_GENERATE_CITY - - TRANSFORMER_SOURCE_GENERATE_E164_PHONE_NUMBER - - TRANSFORMER_SOURCE_GENERATE_FIRST_NAME - - TRANSFORMER_SOURCE_GENERATE_FLOAT64 - - TRANSFORMER_SOURCE_GENERATE_FULL_ADDRESS - - TRANSFORMER_SOURCE_GENERATE_FULL_NAME - - TRANSFORMER_SOURCE_GENERATE_GENDER - - TRANSFORMER_SOURCE_GENERATE_INT64_PHONE_NUMBER - - TRANSFORMER_SOURCE_GENERATE_INT64 - - TRANSFORMER_SOURCE_GENERATE_RANDOM_INT64 - - TRANSFORMER_SOURCE_GENERATE_LAST_NAME - - TRANSFORMER_SOURCE_GENERATE_SHA256HASH - - TRANSFORMER_SOURCE_GENERATE_SSN - - TRANSFORMER_SOURCE_GENERATE_STATE - - TRANSFORMER_SOURCE_GENERATE_STREET_ADDRESS - - TRANSFORMER_SOURCE_GENERATE_STRING_PHONE_NUMBER - - TRANSFORMER_SOURCE_GENERATE_STRING - - TRANSFORMER_SOURCE_GENERATE_RANDOM_STRING - - TRANSFORMER_SOURCE_GENERATE_UNIXTIMESTAMP - - TRANSFORMER_SOURCE_GENERATE_USERNAME - - TRANSFORMER_SOURCE_GENERATE_UTCTIMESTAMP - - TRANSFORMER_SOURCE_GENERATE_UUID - - TRANSFORMER_SOURCE_GENERATE_ZIPCODE - - TRANSFORMER_SOURCE_TRANSFORM_E164_PHONE_NUMBER - - TRANSFORMER_SOURCE_TRANSFORM_FIRST_NAME - - TRANSFORMER_SOURCE_TRANSFORM_FLOAT64 - - TRANSFORMER_SOURCE_TRANSFORM_FULL_NAME - - TRANSFORMER_SOURCE_TRANSFORM_INT64_PHONE_NUMBER - - TRANSFORMER_SOURCE_TRANSFORM_INT64 - - TRANSFORMER_SOURCE_TRANSFORM_LAST_NAME - - TRANSFORMER_SOURCE_TRANSFORM_PHONE_NUMBER - - TRANSFORMER_SOURCE_TRANSFORM_STRING - - TRANSFORMER_SOURCE_GENERATE_NULL - - TRANSFORMER_SOURCE_GENERATE_CATEGORICAL - - TRANSFORMER_SOURCE_TRANSFORM_CHARACTER_SCRAMBLE - - TRANSFORMER_SOURCE_USER_DEFINED - - TRANSFORMER_SOURCE_GENERATE_JAVASCRIPT - - TRANSFORMER_SOURCE_GENERATE_COUNTRY - - TRANSFORMER_SOURCE_TRANSFORM_PII_TEXT - - TRANSFORMER_SOURCE_GENERATE_BUSINESS_NAME - - TRANSFORMER_SOURCE_GENERATE_IP_ADDRESS google.protobuf.Timestamp: type: string format: date-time @@ -3428,11 +3375,6 @@ components: mgmt.v1alpha1.JobMappingTransformer: type: object properties: - source: - allOf: - - title: source - description: '@deprecated - This is no longer used in favor just providing the TransformerConfig' - - $ref: '#/components/schemas/mgmt.v1alpha1.TransformerSource' config: allOf: - title: config @@ -4417,26 +4359,7 @@ components: additionalProperties: false mgmt.v1alpha1.PostgresSourceConnectionOptions: type: object - allOf: - - anyOf: - - required: - - haltOnNewColumnAddition - - not: - anyOf: - - required: - - haltOnNewColumnAddition - anyOf: - - required: - - haltOnNewColumnAddition - - not: - anyOf: - - required: - - haltOnNewColumnAddition properties: - haltOnNewColumnAddition: - type: boolean - title: halt_on_new_column_addition - description: '@deprecated - Use new_column_addition_strategy instead' schemas: type: array items: @@ -4485,7 +4408,7 @@ components: haltJob: allOf: - title: halt_job - description: halt job if a new column is detected. This is equiavlent to the deprecated halt_on_new_column_addition + description: halt job if a new column is detected. - $ref: '#/components/schemas/mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob' autoMap: allOf: diff --git a/docs/openapi/mgmt/v1alpha1/metrics.openapi.yaml b/docs/openapi/mgmt/v1alpha1/metrics.openapi.yaml index 67e647ac10..0a8adc713b 100644 --- a/docs/openapi/mgmt/v1alpha1/metrics.openapi.yaml +++ b/docs/openapi/mgmt/v1alpha1/metrics.openapi.yaml @@ -83,99 +83,6 @@ components: enum: - RANGED_METRIC_NAME_UNSPECIFIED - RANGED_METRIC_NAME_INPUT_RECEIVED - google.protobuf.Timestamp: - type: string - format: date-time - description: |- - A Timestamp represents a point in time independent of any time zone or local - calendar, encoded as a count of seconds and fractions of seconds at - nanosecond resolution. The count is relative to an epoch at UTC midnight on - January 1, 1970, in the proleptic Gregorian calendar which extends the - Gregorian calendar backwards to year one. - - All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - second table is needed for interpretation, using a [24-hour linear - smear](https://developers.google.com/time/smear). - - The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - restricting to that range, we ensure that we can convert to and from [RFC - 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - - # Examples - - Example 1: Compute Timestamp from POSIX `time()`. - - Timestamp timestamp; - timestamp.set_seconds(time(NULL)); - timestamp.set_nanos(0); - - Example 2: Compute Timestamp from POSIX `gettimeofday()`. - - struct timeval tv; - gettimeofday(&tv, NULL); - - Timestamp timestamp; - timestamp.set_seconds(tv.tv_sec); - timestamp.set_nanos(tv.tv_usec * 1000); - - Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - - FILETIME ft; - GetSystemTimeAsFileTime(&ft); - UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - - // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - Timestamp timestamp; - timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - - Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - - long millis = System.currentTimeMillis(); - - Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - .setNanos((int) ((millis % 1000) * 1000000)).build(); - - Example 5: Compute Timestamp from Java `Instant.now()`. - - Instant now = Instant.now(); - - Timestamp timestamp = - Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - .setNanos(now.getNano()).build(); - - Example 6: Compute Timestamp from current time in Python. - - timestamp = Timestamp() - timestamp.GetCurrentTime() - - # JSON Mapping - - In JSON format, the Timestamp type is encoded as a string in the - [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - where {year} is always expressed using four digits while {month}, {day}, - {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - is required. A proto3 JSON serializer should always use UTC (as indicated by - "Z") when printing the Timestamp type and a proto3 JSON parser should be - able to accept both UTC and other timezones (as indicated by an offset). - - For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - 01:30 UTC on January 15, 2017. - - In JavaScript, one can convert a Date object to this format using the - standard - [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - method. In Python, a standard `datetime.datetime` object can be converted - to this format using - [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - the Joda Time's [`ISODateTimeFormat.dateTime()`]( - http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - ) to obtain a formatter capable of generating timestamps in this format. mgmt.v1alpha1.Date: type: object properties: @@ -341,16 +248,6 @@ components: - required: - runId properties: - start: - allOf: - - title: start - description: '@deprecated - use start_day' - - $ref: '#/components/schemas/google.protobuf.Timestamp' - end: - allOf: - - title: end - description: '@deprecated - use end_day' - - $ref: '#/components/schemas/google.protobuf.Timestamp' metric: allOf: - title: metric diff --git a/docs/openapi/mgmt/v1alpha1/transformer.openapi.yaml b/docs/openapi/mgmt/v1alpha1/transformer.openapi.yaml index 1f8c5f28a8..393257ada0 100644 --- a/docs/openapi/mgmt/v1alpha1/transformer.openapi.yaml +++ b/docs/openapi/mgmt/v1alpha1/transformer.openapi.yaml @@ -609,10 +609,6 @@ components: description: type: string title: description - type: - type: string - title: type - description: '@deprecated' source: allOf: - title: source @@ -2433,10 +2429,6 @@ components: mgmt.v1alpha1.ValidateUserJavascriptCodeRequest: type: object properties: - accountId: - type: string - title: account_id - description: '@deprecated - an account isn''t required to validate js code' code: type: string title: code @@ -2454,10 +2446,6 @@ components: mgmt.v1alpha1.ValidateUserRegexCodeRequest: type: object properties: - accountId: - type: string - title: account_id - description: '@deprecated - an account isn''t required to validate js code' userProvidedRegex: type: string title: user_provided_regex diff --git a/docs/openapi/mgmt/v1alpha1/user_account.openapi.yaml b/docs/openapi/mgmt/v1alpha1/user_account.openapi.yaml index ffd80b4140..ef7e54311e 100644 --- a/docs/openapi/mgmt/v1alpha1/user_account.openapi.yaml +++ b/docs/openapi/mgmt/v1alpha1/user_account.openapi.yaml @@ -903,8 +903,6 @@ components: title: AccountStatus enum: - ACCOUNT_STATUS_REASON_UNSPECIFIED - - ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT - - ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT - ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE - ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE - ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED @@ -1079,22 +1077,6 @@ components: mgmt.v1alpha1.AccountOnboardingConfig: type: object properties: - hasCreatedSourceConnection: - type: boolean - title: has_created_source_connection - description: '@deprecated - use has_completed_onboarding' - hasCreatedDestinationConnection: - type: boolean - title: has_created_destination_connection - description: '@deprecated - use has_completed_onboarding' - hasCreatedJob: - type: boolean - title: has_created_job - description: '@deprecated - use has_completed_onboarding' - hasInvitedMembers: - type: boolean - title: has_invited_members - description: '@deprecated - use has_completed_onboarding' hasCompletedOnboarding: type: boolean title: has_completed_onboarding @@ -1407,7 +1389,13 @@ components: buildDate: allOf: - title: build_date + description: The time when the build was created - $ref: '#/components/schemas/google.protobuf.Timestamp' + license: + allOf: + - title: license + description: The license information for the system + - $ref: '#/components/schemas/mgmt.v1alpha1.SystemLicense' title: GetSystemInformationResponse additionalProperties: false mgmt.v1alpha1.GetTeamAccountInvitesRequest: @@ -1551,13 +1539,6 @@ components: mgmt.v1alpha1.IsAccountStatusValidResponse: type: object allOf: - - anyOf: - - required: - - allowedRecordCount - - not: - anyOf: - - required: - - allowedRecordCount - anyOf: - required: - reason @@ -1584,23 +1565,6 @@ components: type: boolean title: should_poll description: Whether or not the process should decide to continue polling for validitiy updates - usedRecordCount: - oneOf: - - type: string - - type: number - title: used_record_count - description: |- - A count of the currently used records for the current billing period. - This may go over the allowed record count depending on when the record count is polled by the metric system. - @deprecated - allowedRecordCount: - oneOf: - - type: string - - type: number - title: allowed_record_count - description: |- - The allowed record count. It will be null if there is no limit. - @deprecated accountStatus: allOf: - title: account_status @@ -1802,6 +1766,24 @@ components: type: object title: SetUserRoleResponse additionalProperties: false + mgmt.v1alpha1.SystemLicense: + type: object + properties: + isValid: + type: boolean + title: is_valid + description: Whether or not a valid license was found + expiresAt: + allOf: + - title: expires_at + description: The time when the license expires + - $ref: '#/components/schemas/google.protobuf.Timestamp' + isNeosyncCloud: + type: boolean + title: is_neosync_cloud + description: Whether or not the license is for NeosyncCloud + title: SystemLicense + additionalProperties: false mgmt.v1alpha1.UserAccount: type: object properties: diff --git a/docs/openapi/neosync.mgmt.v1alpha1.yaml b/docs/openapi/neosync.mgmt.v1alpha1.yaml index e6dc2eef68..71e9786060 100644 --- a/docs/openapi/neosync.mgmt.v1alpha1.yaml +++ b/docs/openapi/neosync.mgmt.v1alpha1.yaml @@ -416,45 +416,6 @@ paths: schema: $ref: '#/components/schemas/connect.error' security: [] - /mgmt.v1alpha1.AuthService/GetCliIssuer: - post: - tags: - - mgmt.v1alpha1.AuthService - summary: GetCliIssuer - description: |- - Used by the CLI to retrieve Auth Issuer information - @deprecated - operationId: mgmt.v1alpha1.AuthService.GetCliIssuer - parameters: - - name: Connect-Protocol-Version - in: header - required: true - schema: - $ref: '#/components/schemas/connect-protocol-version' - - name: Connect-Timeout-Ms - in: header - schema: - $ref: '#/components/schemas/connect-timeout-header' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mgmt.v1alpha1.GetCliIssuerRequest' - required: true - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/mgmt.v1alpha1.GetCliIssuerResponse' - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/connect.error' - security: [] /mgmt.v1alpha1.AuthService/GetAuthorizeUrl: post: tags: @@ -1039,90 +1000,6 @@ paths: schema: $ref: '#/components/schemas/connect.error' security: [] - /mgmt.v1alpha1.ConnectionDataService/GetConnectionForeignConstraints: - post: - tags: - - mgmt.v1alpha1.ConnectionDataService - summary: GetConnectionForeignConstraints - description: >- - For a specific connection, returns the foreign key constraints. Mostly - useful for SQL-based Connections. - Used primarily by the CLI sync command to determine stream order. - operationId: mgmt.v1alpha1.ConnectionDataService.GetConnectionForeignConstraints - parameters: - - name: Connect-Protocol-Version - in: header - required: true - schema: - $ref: '#/components/schemas/connect-protocol-version' - - name: Connect-Timeout-Ms - in: header - schema: - $ref: '#/components/schemas/connect-timeout-header' - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/mgmt.v1alpha1.GetConnectionForeignConstraintsRequest - required: true - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: >- - #/components/schemas/mgmt.v1alpha1.GetConnectionForeignConstraintsResponse - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/connect.error' - security: [] - /mgmt.v1alpha1.ConnectionDataService/GetConnectionPrimaryConstraints: - post: - tags: - - mgmt.v1alpha1.ConnectionDataService - summary: GetConnectionPrimaryConstraints - description: >- - For a specific connection, returns the primary key constraints. Mostly - useful for SQL-based Connections. - Used primarily by the CLI sync command to determine stream order. - operationId: mgmt.v1alpha1.ConnectionDataService.GetConnectionPrimaryConstraints - parameters: - - name: Connect-Protocol-Version - in: header - required: true - schema: - $ref: '#/components/schemas/connect-protocol-version' - - name: Connect-Timeout-Ms - in: header - schema: - $ref: '#/components/schemas/connect-timeout-header' - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest - required: true - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: >- - #/components/schemas/mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/connect.error' - security: [] /mgmt.v1alpha1.ConnectionDataService/GetConnectionInitStatements: post: tags: @@ -1165,47 +1042,6 @@ paths: schema: $ref: '#/components/schemas/connect.error' security: [] - /mgmt.v1alpha1.ConnectionDataService/GetConnectionUniqueConstraints: - post: - tags: - - mgmt.v1alpha1.ConnectionDataService - summary: GetConnectionUniqueConstraints - description: >- - For a specific connection, returns the unique constraints. Mostly useful - for SQL-based connections. - operationId: mgmt.v1alpha1.ConnectionDataService.GetConnectionUniqueConstraints - parameters: - - name: Connect-Protocol-Version - in: header - required: true - schema: - $ref: '#/components/schemas/connect-protocol-version' - - name: Connect-Timeout-Ms - in: header - schema: - $ref: '#/components/schemas/connect-timeout-header' - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest - required: true - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: >- - #/components/schemas/mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/connect.error' - security: [] /mgmt.v1alpha1.ConnectionDataService/GetAiGeneratedData: post: tags: @@ -6308,25 +6144,6 @@ components: the Oauth flow title: GetAuthorizeUrlResponse additionalProperties: false - mgmt.v1alpha1.GetCliIssuerRequest: - type: object - title: GetCliIssuerRequest - additionalProperties: false - mgmt.v1alpha1.GetCliIssuerResponse: - type: object - properties: - issuerUrl: - type: string - title: issuer_url - description: The backing authentication issuer url - audience: - type: string - title: audience - description: >- - The audience that will be used in the access token. This corresponds - to the "aud" claim - title: GetCliIssuerResponse - additionalProperties: false mgmt.v1alpha1.LoginCliRequest: type: object properties: @@ -6404,9 +6221,6 @@ components: - required: - region properties: - bucketArn: - type: string - title: bucket_arn pathPrefix: type: string title: path_prefix @@ -7968,14 +7782,6 @@ components: mgmt.v1alpha1.ForeignConstraint: type: object properties: - column: - type: string - title: column - description: '@deprecated - use columns' - isNullable: - type: boolean - title: is_nullable - description: '@deprecated - use not_nullable' foreignKey: allOf: - title: foreign_key @@ -8008,10 +7814,6 @@ components: table: type: string title: table - column: - type: string - title: column - description: '@deprecated - use columns' columns: type: array items: @@ -8195,43 +7997,6 @@ components: format: byte title: RowEntry additionalProperties: false - mgmt.v1alpha1.GetConnectionForeignConstraintsRequest: - type: object - properties: - connectionId: - type: string - title: connection_id - format: uuid - title: GetConnectionForeignConstraintsRequest - additionalProperties: false - mgmt.v1alpha1.GetConnectionForeignConstraintsResponse: - type: object - properties: - tableConstraints: - type: object - title: table_constraints - additionalProperties: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.ForeignConstraintTables' - description: >- - the key here is .
and the list of tables that it - depends on, also `.
` format. - title: GetConnectionForeignConstraintsResponse - additionalProperties: false - description: Dependency constraints for a specific table - mgmt.v1alpha1.GetConnectionForeignConstraintsResponse.TableConstraintsEntry: - type: object - properties: - key: - type: string - title: key - value: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.ForeignConstraintTables' - title: TableConstraintsEntry - additionalProperties: false mgmt.v1alpha1.GetConnectionInitStatementsRequest: type: object properties: @@ -8296,41 +8061,6 @@ components: title: value title: TableTruncateStatementsEntry additionalProperties: false - mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest: - type: object - properties: - connectionId: - type: string - title: connection_id - format: uuid - title: GetConnectionPrimaryConstraintsRequest - additionalProperties: false - description: Primary constraints for a specific table - mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse: - type: object - properties: - tableConstraints: - type: object - title: table_constraints - additionalProperties: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.PrimaryConstraint' - description: the key here is .
and value is the primary constraint - title: GetConnectionPrimaryConstraintsResponse - additionalProperties: false - mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry: - type: object - properties: - key: - type: string - title: key - value: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.PrimaryConstraint' - title: TableConstraintsEntry - additionalProperties: false mgmt.v1alpha1.GetConnectionSchemaMapRequest: type: object properties: @@ -8498,41 +8228,6 @@ components: - $ref: '#/components/schemas/mgmt.v1alpha1.UniqueConstraints' title: UniqueConstraintsEntry additionalProperties: false - mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest: - type: object - properties: - connectionId: - type: string - title: connection_id - format: uuid - title: GetConnectionUniqueConstraintsRequest - additionalProperties: false - description: Unique constraints for a specific table - mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse: - type: object - properties: - tableConstraints: - type: object - title: table_constraints - additionalProperties: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.UniqueConstraint' - description: the key here is .
and value is the unique constraint - title: GetConnectionUniqueConstraintsResponse - additionalProperties: false - mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse.TableConstraintsEntry: - type: object - properties: - key: - type: string - title: key - value: - allOf: - - title: value - - $ref: '#/components/schemas/mgmt.v1alpha1.UniqueConstraint' - title: TableConstraintsEntry - additionalProperties: false mgmt.v1alpha1.GetTableRowCountRequest: type: object allOf: @@ -8723,59 +8418,6 @@ components: - LOG_WINDOW_FIFTEEN_MIN - LOG_WINDOW_ONE_HOUR - LOG_WINDOW_ONE_DAY - mgmt.v1alpha1.TransformerSource: - type: string - title: TransformerSource - enum: - - TRANSFORMER_SOURCE_UNSPECIFIED - - TRANSFORMER_SOURCE_PASSTHROUGH - - TRANSFORMER_SOURCE_GENERATE_DEFAULT - - TRANSFORMER_SOURCE_TRANSFORM_JAVASCRIPT - - TRANSFORMER_SOURCE_GENERATE_EMAIL - - TRANSFORMER_SOURCE_TRANSFORM_EMAIL - - TRANSFORMER_SOURCE_GENERATE_BOOL - - TRANSFORMER_SOURCE_GENERATE_CARD_NUMBER - - TRANSFORMER_SOURCE_GENERATE_CITY - - TRANSFORMER_SOURCE_GENERATE_E164_PHONE_NUMBER - - TRANSFORMER_SOURCE_GENERATE_FIRST_NAME - - TRANSFORMER_SOURCE_GENERATE_FLOAT64 - - TRANSFORMER_SOURCE_GENERATE_FULL_ADDRESS - - TRANSFORMER_SOURCE_GENERATE_FULL_NAME - - TRANSFORMER_SOURCE_GENERATE_GENDER - - TRANSFORMER_SOURCE_GENERATE_INT64_PHONE_NUMBER - - TRANSFORMER_SOURCE_GENERATE_INT64 - - TRANSFORMER_SOURCE_GENERATE_RANDOM_INT64 - - TRANSFORMER_SOURCE_GENERATE_LAST_NAME - - TRANSFORMER_SOURCE_GENERATE_SHA256HASH - - TRANSFORMER_SOURCE_GENERATE_SSN - - TRANSFORMER_SOURCE_GENERATE_STATE - - TRANSFORMER_SOURCE_GENERATE_STREET_ADDRESS - - TRANSFORMER_SOURCE_GENERATE_STRING_PHONE_NUMBER - - TRANSFORMER_SOURCE_GENERATE_STRING - - TRANSFORMER_SOURCE_GENERATE_RANDOM_STRING - - TRANSFORMER_SOURCE_GENERATE_UNIXTIMESTAMP - - TRANSFORMER_SOURCE_GENERATE_USERNAME - - TRANSFORMER_SOURCE_GENERATE_UTCTIMESTAMP - - TRANSFORMER_SOURCE_GENERATE_UUID - - TRANSFORMER_SOURCE_GENERATE_ZIPCODE - - TRANSFORMER_SOURCE_TRANSFORM_E164_PHONE_NUMBER - - TRANSFORMER_SOURCE_TRANSFORM_FIRST_NAME - - TRANSFORMER_SOURCE_TRANSFORM_FLOAT64 - - TRANSFORMER_SOURCE_TRANSFORM_FULL_NAME - - TRANSFORMER_SOURCE_TRANSFORM_INT64_PHONE_NUMBER - - TRANSFORMER_SOURCE_TRANSFORM_INT64 - - TRANSFORMER_SOURCE_TRANSFORM_LAST_NAME - - TRANSFORMER_SOURCE_TRANSFORM_PHONE_NUMBER - - TRANSFORMER_SOURCE_TRANSFORM_STRING - - TRANSFORMER_SOURCE_GENERATE_NULL - - TRANSFORMER_SOURCE_GENERATE_CATEGORICAL - - TRANSFORMER_SOURCE_TRANSFORM_CHARACTER_SCRAMBLE - - TRANSFORMER_SOURCE_USER_DEFINED - - TRANSFORMER_SOURCE_GENERATE_JAVASCRIPT - - TRANSFORMER_SOURCE_GENERATE_COUNTRY - - TRANSFORMER_SOURCE_TRANSFORM_PII_TEXT - - TRANSFORMER_SOURCE_GENERATE_BUSINESS_NAME - - TRANSFORMER_SOURCE_GENERATE_IP_ADDRESS mgmt.v1alpha1.ActivityFailure: type: object properties: @@ -10286,13 +9928,6 @@ components: mgmt.v1alpha1.JobMappingTransformer: type: object properties: - source: - allOf: - - title: source - description: >- - @deprecated - This is no longer used in favor just providing the - TransformerConfig - - $ref: '#/components/schemas/mgmt.v1alpha1.TransformerSource' config: allOf: - title: config @@ -11120,26 +10755,7 @@ components: additionalProperties: false mgmt.v1alpha1.PostgresSourceConnectionOptions: type: object - allOf: - - anyOf: - - required: - - haltOnNewColumnAddition - - not: - anyOf: - - required: - - haltOnNewColumnAddition - anyOf: - - required: - - haltOnNewColumnAddition - - not: - anyOf: - - required: - - haltOnNewColumnAddition properties: - haltOnNewColumnAddition: - type: boolean - title: halt_on_new_column_addition - description: '@deprecated - Use new_column_addition_strategy instead' schemas: type: array items: @@ -11191,9 +10807,7 @@ components: haltJob: allOf: - title: halt_job - description: >- - halt job if a new column is detected. This is equiavlent to the - deprecated halt_on_new_column_addition + description: halt job if a new column is detected. - $ref: >- #/components/schemas/mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob autoMap: @@ -11908,16 +11522,6 @@ components: - required: - runId properties: - start: - allOf: - - title: start - description: '@deprecated - use start_day' - - $ref: '#/components/schemas/google.protobuf.Timestamp' - end: - allOf: - - title: end - description: '@deprecated - use end_day' - - $ref: '#/components/schemas/google.protobuf.Timestamp' metric: allOf: - title: metric @@ -11981,6 +11585,59 @@ components: - TRANSFORMER_DATA_TYPE_ANY - TRANSFORMER_DATA_TYPE_TIME - TRANSFORMER_DATA_TYPE_UUID + mgmt.v1alpha1.TransformerSource: + type: string + title: TransformerSource + enum: + - TRANSFORMER_SOURCE_UNSPECIFIED + - TRANSFORMER_SOURCE_PASSTHROUGH + - TRANSFORMER_SOURCE_GENERATE_DEFAULT + - TRANSFORMER_SOURCE_TRANSFORM_JAVASCRIPT + - TRANSFORMER_SOURCE_GENERATE_EMAIL + - TRANSFORMER_SOURCE_TRANSFORM_EMAIL + - TRANSFORMER_SOURCE_GENERATE_BOOL + - TRANSFORMER_SOURCE_GENERATE_CARD_NUMBER + - TRANSFORMER_SOURCE_GENERATE_CITY + - TRANSFORMER_SOURCE_GENERATE_E164_PHONE_NUMBER + - TRANSFORMER_SOURCE_GENERATE_FIRST_NAME + - TRANSFORMER_SOURCE_GENERATE_FLOAT64 + - TRANSFORMER_SOURCE_GENERATE_FULL_ADDRESS + - TRANSFORMER_SOURCE_GENERATE_FULL_NAME + - TRANSFORMER_SOURCE_GENERATE_GENDER + - TRANSFORMER_SOURCE_GENERATE_INT64_PHONE_NUMBER + - TRANSFORMER_SOURCE_GENERATE_INT64 + - TRANSFORMER_SOURCE_GENERATE_RANDOM_INT64 + - TRANSFORMER_SOURCE_GENERATE_LAST_NAME + - TRANSFORMER_SOURCE_GENERATE_SHA256HASH + - TRANSFORMER_SOURCE_GENERATE_SSN + - TRANSFORMER_SOURCE_GENERATE_STATE + - TRANSFORMER_SOURCE_GENERATE_STREET_ADDRESS + - TRANSFORMER_SOURCE_GENERATE_STRING_PHONE_NUMBER + - TRANSFORMER_SOURCE_GENERATE_STRING + - TRANSFORMER_SOURCE_GENERATE_RANDOM_STRING + - TRANSFORMER_SOURCE_GENERATE_UNIXTIMESTAMP + - TRANSFORMER_SOURCE_GENERATE_USERNAME + - TRANSFORMER_SOURCE_GENERATE_UTCTIMESTAMP + - TRANSFORMER_SOURCE_GENERATE_UUID + - TRANSFORMER_SOURCE_GENERATE_ZIPCODE + - TRANSFORMER_SOURCE_TRANSFORM_E164_PHONE_NUMBER + - TRANSFORMER_SOURCE_TRANSFORM_FIRST_NAME + - TRANSFORMER_SOURCE_TRANSFORM_FLOAT64 + - TRANSFORMER_SOURCE_TRANSFORM_FULL_NAME + - TRANSFORMER_SOURCE_TRANSFORM_INT64_PHONE_NUMBER + - TRANSFORMER_SOURCE_TRANSFORM_INT64 + - TRANSFORMER_SOURCE_TRANSFORM_LAST_NAME + - TRANSFORMER_SOURCE_TRANSFORM_PHONE_NUMBER + - TRANSFORMER_SOURCE_TRANSFORM_STRING + - TRANSFORMER_SOURCE_GENERATE_NULL + - TRANSFORMER_SOURCE_GENERATE_CATEGORICAL + - TRANSFORMER_SOURCE_TRANSFORM_CHARACTER_SCRAMBLE + - TRANSFORMER_SOURCE_USER_DEFINED + - TRANSFORMER_SOURCE_GENERATE_JAVASCRIPT + - TRANSFORMER_SOURCE_GENERATE_COUNTRY + - TRANSFORMER_SOURCE_TRANSFORM_PII_TEXT + - TRANSFORMER_SOURCE_GENERATE_BUSINESS_NAME + - TRANSFORMER_SOURCE_GENERATE_IP_ADDRESS mgmt.v1alpha1.CreateUserDefinedTransformerRequest: type: object properties: @@ -11995,10 +11652,6 @@ components: description: type: string title: description - type: - type: string - title: type - description: '@deprecated' source: allOf: - title: source @@ -12255,10 +11908,6 @@ components: mgmt.v1alpha1.ValidateUserJavascriptCodeRequest: type: object properties: - accountId: - type: string - title: account_id - description: '@deprecated - an account isn''t required to validate js code' code: type: string title: code @@ -12276,10 +11925,6 @@ components: mgmt.v1alpha1.ValidateUserRegexCodeRequest: type: object properties: - accountId: - type: string - title: account_id - description: '@deprecated - an account isn''t required to validate js code' userProvidedRegex: type: string title: user_provided_regex @@ -12307,8 +11952,6 @@ components: title: AccountStatus enum: - ACCOUNT_STATUS_REASON_UNSPECIFIED - - ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT - - ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT - ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE - ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE - ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED @@ -12390,22 +12033,6 @@ components: mgmt.v1alpha1.AccountOnboardingConfig: type: object properties: - hasCreatedSourceConnection: - type: boolean - title: has_created_source_connection - description: '@deprecated - use has_completed_onboarding' - hasCreatedDestinationConnection: - type: boolean - title: has_created_destination_connection - description: '@deprecated - use has_completed_onboarding' - hasCreatedJob: - type: boolean - title: has_created_job - description: '@deprecated - use has_completed_onboarding' - hasInvitedMembers: - type: boolean - title: has_invited_members - description: '@deprecated - use has_completed_onboarding' hasCompletedOnboarding: type: boolean title: has_completed_onboarding @@ -12730,7 +12357,13 @@ components: buildDate: allOf: - title: build_date + description: The time when the build was created - $ref: '#/components/schemas/google.protobuf.Timestamp' + license: + allOf: + - title: license + description: The license information for the system + - $ref: '#/components/schemas/mgmt.v1alpha1.SystemLicense' title: GetSystemInformationResponse additionalProperties: false mgmt.v1alpha1.GetTeamAccountInvitesRequest: @@ -12876,13 +12509,6 @@ components: mgmt.v1alpha1.IsAccountStatusValidResponse: type: object allOf: - - anyOf: - - required: - - allowedRecordCount - - not: - anyOf: - - required: - - allowedRecordCount - anyOf: - required: - reason @@ -12911,24 +12537,6 @@ components: description: >- Whether or not the process should decide to continue polling for validitiy updates - usedRecordCount: - oneOf: - - type: string - - type: number - title: used_record_count - description: >- - A count of the currently used records for the current billing - period. - This may go over the allowed record count depending on when the record count is polled by the metric system. - @deprecated - allowedRecordCount: - oneOf: - - type: string - - type: number - title: allowed_record_count - description: |- - The allowed record count. It will be null if there is no limit. - @deprecated accountStatus: allOf: - title: account_status @@ -13132,6 +12740,24 @@ components: type: object title: SetUserRoleResponse additionalProperties: false + mgmt.v1alpha1.SystemLicense: + type: object + properties: + isValid: + type: boolean + title: is_valid + description: Whether or not a valid license was found + expiresAt: + allOf: + - title: expires_at + description: The time when the license expires + - $ref: '#/components/schemas/google.protobuf.Timestamp' + isNeosyncCloud: + type: boolean + title: is_neosync_cloud + description: Whether or not the license is for NeosyncCloud + title: SystemLicense + additionalProperties: false mgmt.v1alpha1.UserAccount: type: object properties: diff --git a/docs/protos/mgmt/v1alpha1/auth.proto.mdx b/docs/protos/mgmt/v1alpha1/auth.proto.mdx index 549c582334..a4e286c641 100644 --- a/docs/protos/mgmt/v1alpha1/auth.proto.mdx +++ b/docs/protos/mgmt/v1alpha1/auth.proto.mdx @@ -45,28 +45,20 @@ _**package** mgmt.v1alpha1_ -### `GetCliIssuerRequest` - - - -### `GetCliIssuerResponse` - - - ### `LoginCliRequest` - + ### `LoginCliResponse` - + ### `RefreshCliRequest` - + ### `RefreshCliResponse` - + --- ## Services @@ -90,16 +82,12 @@ Today this is mostly used by the CLI to receive authentication information -#### `GetCliIssuer` - - - #### `GetAuthorizeUrl` - + #### `GetAuthStatus` - + --- diff --git a/docs/protos/mgmt/v1alpha1/connection.proto.mdx b/docs/protos/mgmt/v1alpha1/connection.proto.mdx index c27dd01ef0..fc20884cef 100644 --- a/docs/protos/mgmt/v1alpha1/connection.proto.mdx +++ b/docs/protos/mgmt/v1alpha1/connection.proto.mdx @@ -18,7 +18,7 @@ _**package** mgmt.v1alpha1_ ### `AwsS3ConnectionConfig` - + ### `AwsS3Credentials` diff --git a/docs/protos/mgmt/v1alpha1/connection_data.proto.mdx b/docs/protos/mgmt/v1alpha1/connection_data.proto.mdx index ee915a60c0..3c7dae8c36 100644 --- a/docs/protos/mgmt/v1alpha1/connection_data.proto.mdx +++ b/docs/protos/mgmt/v1alpha1/connection_data.proto.mdx @@ -50,7 +50,7 @@ _**package** mgmt.v1alpha1_ ### `ForeignConstraint` - + ### `ForeignConstraintTables` @@ -58,7 +58,7 @@ _**package** mgmt.v1alpha1_ ### `ForeignKey` - + ### `GcpCloudStorageSchemaConfig` @@ -82,163 +82,123 @@ _**package** mgmt.v1alpha1_ ### `GetConnectionDataStreamResponse` - - - -### `GetConnectionDataStreamResponse.RowEntry` - - - -### `GetConnectionForeignConstraintsRequest` - - - -### `GetConnectionForeignConstraintsResponse` -.
and the list of tables that it depends on, also `.
` format.","label":"repeated","type":"TableConstraintsEntry","longType":"GetConnectionForeignConstraintsResponse.TableConstraintsEntry","fullType":"mgmt.v1alpha1.GetConnectionForeignConstraintsResponse.TableConstraintsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectionforeignconstraintsresponsetableconstraintsentry"}]}} /> - - -### `GetConnectionForeignConstraintsResponse.TableConstraintsEntry` - + ### `GetConnectionInitStatementsRequest` - + ### `GetConnectionInitStatementsResponse` -.
and value is the table init statement.","label":"repeated","type":"TableInitStatementsEntry","longType":"GetConnectionInitStatementsResponse.TableInitStatementsEntry","fullType":"mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableInitStatementsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectioninitstatementsresponsetableinitstatementsentry"},{"name":"table_truncate_statements","description":"the key here is .
and value is the table truncate statement.","label":"repeated","type":"TableTruncateStatementsEntry","longType":"GetConnectionInitStatementsResponse.TableTruncateStatementsEntry","fullType":"mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableTruncateStatementsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectioninitstatementsresponsetabletruncatestatementsentry"},{"name":"schema_init_statements","description":"","label":"repeated","type":"SchemaInitStatements","longType":"SchemaInitStatements","fullType":"mgmt.v1alpha1.SchemaInitStatements","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#schemainitstatements"}]}} /> +.
and value is the table init statement.","label":"repeated","type":"TableInitStatementsEntry","longType":"GetConnectionInitStatementsResponse.TableInitStatementsEntry","fullType":"mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableInitStatementsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectioninitstatementsresponsetableinitstatementsentry"},{"name":"table_truncate_statements","description":"the key here is .
and value is the table truncate statement.","label":"repeated","type":"TableTruncateStatementsEntry","longType":"GetConnectionInitStatementsResponse.TableTruncateStatementsEntry","fullType":"mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableTruncateStatementsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectioninitstatementsresponsetabletruncatestatementsentry"},{"name":"schema_init_statements","description":"","label":"repeated","type":"SchemaInitStatements","longType":"SchemaInitStatements","fullType":"mgmt.v1alpha1.SchemaInitStatements","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#schemainitstatements"}]}} /> ### `GetConnectionInitStatementsResponse.TableInitStatementsEntry` - + ### `GetConnectionInitStatementsResponse.TableTruncateStatementsEntry` - - - -### `GetConnectionPrimaryConstraintsRequest` - - - -### `GetConnectionPrimaryConstraintsResponse` -.
and value is the primary constraint","label":"repeated","type":"TableConstraintsEntry","longType":"GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry","fullType":"mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectionprimaryconstraintsresponsetableconstraintsentry"}]}} /> - - -### `GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry` - + ### `GetConnectionSchemaMapRequest` - + ### `GetConnectionSchemaMapResponse` -.
","label":"repeated","type":"SchemaMapEntry","longType":"GetConnectionSchemaMapResponse.SchemaMapEntry","fullType":"mgmt.v1alpha1.GetConnectionSchemaMapResponse.SchemaMapEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectionschemamapresponseschemamapentry"}]}} /> +.
","label":"repeated","type":"SchemaMapEntry","longType":"GetConnectionSchemaMapResponse.SchemaMapEntry","fullType":"mgmt.v1alpha1.GetConnectionSchemaMapResponse.SchemaMapEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectionschemamapresponseschemamapentry"}]}} /> ### `GetConnectionSchemaMapResponse.SchemaMapEntry` - + ### `GetConnectionSchemaMapsRequest` - + ### `GetConnectionSchemaMapsResponse` - + ### `GetConnectionSchemaRequest` - + ### `GetConnectionSchemaResponse` - + ### `GetConnectionTableConstraintsRequest` - + ### `GetConnectionTableConstraintsResponse` -.
and the list of tables that it depends on, also `.
` format.","label":"repeated","type":"ForeignKeyConstraintsEntry","longType":"GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry","fullType":"mgmt.v1alpha1.GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectiontableconstraintsresponseforeignkeyconstraintsentry"},{"name":"primary_key_constraints","description":"the key here is .
and value is the primary constraint","label":"repeated","type":"PrimaryKeyConstraintsEntry","longType":"GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry","fullType":"mgmt.v1alpha1.GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectiontableconstraintsresponseprimarykeyconstraintsentry"},{"name":"unique_constraints","description":"the key here is .
and value is the unique constraint","label":"repeated","type":"UniqueConstraintsEntry","longType":"GetConnectionTableConstraintsResponse.UniqueConstraintsEntry","fullType":"mgmt.v1alpha1.GetConnectionTableConstraintsResponse.UniqueConstraintsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectiontableconstraintsresponseuniqueconstraintsentry"}]}} /> +.
and the list of tables that it depends on, also `.
` format.","label":"repeated","type":"ForeignKeyConstraintsEntry","longType":"GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry","fullType":"mgmt.v1alpha1.GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectiontableconstraintsresponseforeignkeyconstraintsentry"},{"name":"primary_key_constraints","description":"the key here is .
and value is the primary constraint","label":"repeated","type":"PrimaryKeyConstraintsEntry","longType":"GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry","fullType":"mgmt.v1alpha1.GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectiontableconstraintsresponseprimarykeyconstraintsentry"},{"name":"unique_constraints","description":"the key here is .
and value is the unique constraint","label":"repeated","type":"UniqueConstraintsEntry","longType":"GetConnectionTableConstraintsResponse.UniqueConstraintsEntry","fullType":"mgmt.v1alpha1.GetConnectionTableConstraintsResponse.UniqueConstraintsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectiontableconstraintsresponseuniqueconstraintsentry"}]}} /> ### `GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry` - + ### `GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry` - + ### `GetConnectionTableConstraintsResponse.UniqueConstraintsEntry` - - - -### `GetConnectionUniqueConstraintsRequest` - - - -### `GetConnectionUniqueConstraintsResponse` -.
and value is the unique constraint","label":"repeated","type":"TableConstraintsEntry","longType":"GetConnectionUniqueConstraintsResponse.TableConstraintsEntry","fullType":"mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse.TableConstraintsEntry","ismap":true,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection_data.proto#getconnectionuniqueconstraintsresponsetableconstraintsentry"}]}} /> - - -### `GetConnectionUniqueConstraintsResponse.TableConstraintsEntry` - + ### `GetTableRowCountRequest` - + ### `GetTableRowCountResponse` - + ### `InitStatementOptions` - + ### `MongoSchemaConfig` - + ### `MssqlSchemaConfig` - + ### `MysqlSchemaConfig` - + ### `MysqlStreamConfig` - + ### `PostgresSchemaConfig` - + ### `PostgresStreamConfig` - + ### `PrimaryConstraint` - + ### `SchemaInitStatements` - + ### `UniqueConstraint` - + ### `UniqueConstraints` - + --- ## Services @@ -270,28 +230,16 @@ This is used in handle data from a connection -#### `GetConnectionForeignConstraints` - - - -#### `GetConnectionPrimaryConstraints` - - - #### `GetConnectionInitStatements` - - - -#### `GetConnectionUniqueConstraints` - + #### `GetAiGeneratedData` - + #### `GetTableRowCount` - + --- diff --git a/docs/protos/mgmt/v1alpha1/job.proto.mdx b/docs/protos/mgmt/v1alpha1/job.proto.mdx index 1d8cea800b..ddcd28dc58 100644 --- a/docs/protos/mgmt/v1alpha1/job.proto.mdx +++ b/docs/protos/mgmt/v1alpha1/job.proto.mdx @@ -342,7 +342,7 @@ _**package** mgmt.v1alpha1_ ### `JobMappingTransformer` - + ### `JobNextRuns` @@ -482,11 +482,11 @@ _**package** mgmt.v1alpha1_ ### `PostgresSourceConnectionOptions` - + ### `PostgresSourceConnectionOptions.NewColumnAdditionStrategy` - + ### `PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap` diff --git a/docs/protos/mgmt/v1alpha1/metrics.proto.mdx b/docs/protos/mgmt/v1alpha1/metrics.proto.mdx index 7cbd410a11..2a9d79091e 100644 --- a/docs/protos/mgmt/v1alpha1/metrics.proto.mdx +++ b/docs/protos/mgmt/v1alpha1/metrics.proto.mdx @@ -34,7 +34,7 @@ _**package** mgmt.v1alpha1_ ### `GetMetricCountRequest` - + ### `GetMetricCountResponse` diff --git a/docs/protos/mgmt/v1alpha1/transformer.proto.mdx b/docs/protos/mgmt/v1alpha1/transformer.proto.mdx index 172aceda41..65b6b30b06 100644 --- a/docs/protos/mgmt/v1alpha1/transformer.proto.mdx +++ b/docs/protos/mgmt/v1alpha1/transformer.proto.mdx @@ -18,7 +18,7 @@ _**package** mgmt.v1alpha1_ ### `CreateUserDefinedTransformerRequest` - + ### `CreateUserDefinedTransformerResponse` @@ -310,7 +310,7 @@ _**package** mgmt.v1alpha1_ ### `ValidateUserJavascriptCodeRequest` - + ### `ValidateUserJavascriptCodeResponse` @@ -318,7 +318,7 @@ _**package** mgmt.v1alpha1_ ### `ValidateUserRegexCodeRequest` - + ### `ValidateUserRegexCodeResponse` diff --git a/docs/protos/mgmt/v1alpha1/user_account.proto.mdx b/docs/protos/mgmt/v1alpha1/user_account.proto.mdx index 07676f6e6a..a282f50a7a 100644 --- a/docs/protos/mgmt/v1alpha1/user_account.proto.mdx +++ b/docs/protos/mgmt/v1alpha1/user_account.proto.mdx @@ -30,7 +30,7 @@ _**package** mgmt.v1alpha1_ ### `AccountOnboardingConfig` - + ### `AccountTemporalConfig` @@ -110,7 +110,7 @@ _**package** mgmt.v1alpha1_ ### `GetSystemInformationResponse` - + ### `GetTeamAccountInvitesRequest` @@ -158,7 +158,7 @@ _**package** mgmt.v1alpha1_ ### `IsAccountStatusValidResponse` - + ### `IsUserInAccountRequest` @@ -233,8 +233,12 @@ _**package** mgmt.v1alpha1_ +### `SystemLicense` + + + ### `UserAccount` - + --- ## Enums @@ -245,7 +249,7 @@ _**package** mgmt.v1alpha1_ ### `AccountStatus` - + ### `BillingStatus` diff --git a/docs/protos/proto_docs.json b/docs/protos/proto_docs.json index 10613ca1e8..c51e37cd1e 100644 --- a/docs/protos/proto_docs.json +++ b/docs/protos/proto_docs.json @@ -524,18 +524,6 @@ "oneofdecl": "", "defaultValue": "" }, - { - "name": "type", - "description": "@deprecated", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, { "name": "source", "description": "", @@ -3095,18 +3083,6 @@ "hasOneofs": false, "extensions": [], "fields": [ - { - "name": "account_id", - "description": "@deprecated - an account isn't required to validate js code", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, { "name": "code", "description": "", @@ -3155,18 +3131,6 @@ "hasOneofs": false, "extensions": [], "fields": [ - { - "name": "account_id", - "description": "@deprecated - an account isn't required to validate js code", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, { "name": "user_provided_regex", "description": "", @@ -4413,53 +4377,6 @@ } ] }, - { - "name": "GetCliIssuerRequest", - "longName": "GetCliIssuerRequest", - "fullName": "mgmt.v1alpha1.GetCliIssuerRequest", - "description": "", - "hasExtensions": false, - "hasFields": false, - "hasOneofs": false, - "extensions": [], - "fields": [] - }, - { - "name": "GetCliIssuerResponse", - "longName": "GetCliIssuerResponse", - "fullName": "mgmt.v1alpha1.GetCliIssuerResponse", - "description": "", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "issuer_url", - "description": "The backing authentication issuer url", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "audience", - "description": "The audience that will be used in the access token. This corresponds to the \"aud\" claim", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, { "name": "LoginCliRequest", "longName": "LoginCliRequest", @@ -4612,18 +4529,6 @@ "responseFullType": "mgmt.v1alpha1.CheckTokenResponse", "responseStreaming": false }, - { - "name": "GetCliIssuer", - "description": "Used by the CLI to retrieve Auth Issuer information\n@deprecated", - "requestType": "GetCliIssuerRequest", - "requestLongType": "GetCliIssuerRequest", - "requestFullType": "mgmt.v1alpha1.GetCliIssuerRequest", - "requestStreaming": false, - "responseType": "GetCliIssuerResponse", - "responseLongType": "GetCliIssuerResponse", - "responseFullType": "mgmt.v1alpha1.GetCliIssuerResponse", - "responseStreaming": false - }, { "name": "GetAuthorizeUrl", "description": "Used by the CLI to retrieve an Authorize URL for use with OAuth login.", @@ -4673,21 +4578,6 @@ "hasOneofs": true, "extensions": [], "fields": [ - { - "name": "bucket_arn", - "description": "", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "", - "options": { - "deprecated": true - } - }, { "name": "path_prefix", "description": "", @@ -7096,30 +6986,6 @@ "hasOneofs": false, "extensions": [], "fields": [ - { - "name": "column", - "description": "@deprecated - use columns", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "is_nullable", - "description": "@deprecated - use not_nullable", - "label": "", - "type": "bool", - "longType": "bool", - "fullType": "bool", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, { "name": "foreign_key", "description": "", @@ -7204,18 +7070,6 @@ "oneofdecl": "", "defaultValue": "" }, - { - "name": "column", - "description": "@deprecated - use columns", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, { "name": "columns", "description": "", @@ -7481,44 +7335,8 @@ "extensions": [], "fields": [ { - "name": "row", - "description": "A map of column name to the bytes value of the data that was found for that column and row", - "label": "repeated", - "type": "RowEntry", - "longType": "GetConnectionDataStreamResponse.RowEntry", - "fullType": "mgmt.v1alpha1.GetConnectionDataStreamResponse.RowEntry", - "ismap": true, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, - { - "name": "RowEntry", - "longName": "GetConnectionDataStreamResponse.RowEntry", - "fullName": "mgmt.v1alpha1.GetConnectionDataStreamResponse.RowEntry", - "description": "", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "key", - "description": "", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "value", - "description": "", + "name": "row_bytes", + "description": "A map of column name to column value, where the value is serialized as bytes. The value represents a map[string]any structure.", "label": "", "type": "bytes", "longType": "bytes", @@ -7530,90 +7348,6 @@ } ] }, - { - "name": "GetConnectionForeignConstraintsRequest", - "longName": "GetConnectionForeignConstraintsRequest", - "fullName": "mgmt.v1alpha1.GetConnectionForeignConstraintsRequest", - "description": "", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "connection_id", - "description": "", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, - { - "name": "GetConnectionForeignConstraintsResponse", - "longName": "GetConnectionForeignConstraintsResponse", - "fullName": "mgmt.v1alpha1.GetConnectionForeignConstraintsResponse", - "description": "Dependency constraints for a specific table", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "table_constraints", - "description": "the key here is \u003cschema\u003e.\u003ctable\u003e and the list of tables that it depends on, also `\u003cschema\u003e.\u003ctable\u003e` format.", - "label": "repeated", - "type": "TableConstraintsEntry", - "longType": "GetConnectionForeignConstraintsResponse.TableConstraintsEntry", - "fullType": "mgmt.v1alpha1.GetConnectionForeignConstraintsResponse.TableConstraintsEntry", - "ismap": true, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, - { - "name": "TableConstraintsEntry", - "longName": "GetConnectionForeignConstraintsResponse.TableConstraintsEntry", - "fullName": "mgmt.v1alpha1.GetConnectionForeignConstraintsResponse.TableConstraintsEntry", - "description": "", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "key", - "description": "", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "value", - "description": "", - "label": "", - "type": "ForeignConstraintTables", - "longType": "ForeignConstraintTables", - "fullType": "mgmt.v1alpha1.ForeignConstraintTables", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, { "name": "GetConnectionInitStatementsRequest", "longName": "GetConnectionInitStatementsRequest", @@ -7725,93 +7459,9 @@ "description": "", "label": "", "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, - { - "name": "TableTruncateStatementsEntry", - "longName": "GetConnectionInitStatementsResponse.TableTruncateStatementsEntry", - "fullName": "mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableTruncateStatementsEntry", - "description": "", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "key", - "description": "", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "value", - "description": "", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, - { - "name": "GetConnectionPrimaryConstraintsRequest", - "longName": "GetConnectionPrimaryConstraintsRequest", - "fullName": "mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest", - "description": "Primary constraints for a specific table", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "connection_id", - "description": "", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, - { - "name": "GetConnectionPrimaryConstraintsResponse", - "longName": "GetConnectionPrimaryConstraintsResponse", - "fullName": "mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse", - "description": "", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "table_constraints", - "description": "the key here is \u003cschema\u003e.\u003ctable\u003e and value is the primary constraint", - "label": "repeated", - "type": "TableConstraintsEntry", - "longType": "GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry", - "fullType": "mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry", - "ismap": true, + "longType": "string", + "fullType": "string", + "ismap": false, "isoneof": false, "oneofdecl": "", "defaultValue": "" @@ -7819,9 +7469,9 @@ ] }, { - "name": "TableConstraintsEntry", - "longName": "GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry", - "fullName": "mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse.TableConstraintsEntry", + "name": "TableTruncateStatementsEntry", + "longName": "GetConnectionInitStatementsResponse.TableTruncateStatementsEntry", + "fullName": "mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableTruncateStatementsEntry", "description": "", "hasExtensions": false, "hasFields": true, @@ -7844,9 +7494,9 @@ "name": "value", "description": "", "label": "", - "type": "PrimaryConstraint", - "longType": "PrimaryConstraint", - "fullType": "mgmt.v1alpha1.PrimaryConstraint", + "type": "string", + "longType": "string", + "fullType": "string", "ismap": false, "isoneof": false, "oneofdecl": "", @@ -8250,90 +7900,6 @@ } ] }, - { - "name": "GetConnectionUniqueConstraintsRequest", - "longName": "GetConnectionUniqueConstraintsRequest", - "fullName": "mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest", - "description": "Unique constraints for a specific table", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "connection_id", - "description": "", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, - { - "name": "GetConnectionUniqueConstraintsResponse", - "longName": "GetConnectionUniqueConstraintsResponse", - "fullName": "mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse", - "description": "", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "table_constraints", - "description": "the key here is \u003cschema\u003e.\u003ctable\u003e and value is the unique constraint", - "label": "repeated", - "type": "TableConstraintsEntry", - "longType": "GetConnectionUniqueConstraintsResponse.TableConstraintsEntry", - "fullType": "mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse.TableConstraintsEntry", - "ismap": true, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, - { - "name": "TableConstraintsEntry", - "longName": "GetConnectionUniqueConstraintsResponse.TableConstraintsEntry", - "fullName": "mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse.TableConstraintsEntry", - "description": "", - "hasExtensions": false, - "hasFields": true, - "hasOneofs": false, - "extensions": [], - "fields": [ - { - "name": "key", - "description": "", - "label": "", - "type": "string", - "longType": "string", - "fullType": "string", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "value", - "description": "", - "label": "", - "type": "UniqueConstraint", - "longType": "UniqueConstraint", - "fullType": "mgmt.v1alpha1.UniqueConstraint", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - } - ] - }, { "name": "GetTableRowCountRequest", "longName": "GetTableRowCountRequest", @@ -8708,30 +8274,6 @@ "responseFullType": "mgmt.v1alpha1.GetConnectionTableConstraintsResponse", "responseStreaming": false }, - { - "name": "GetConnectionForeignConstraints", - "description": "For a specific connection, returns the foreign key constraints. Mostly useful for SQL-based Connections.\nUsed primarily by the CLI sync command to determine stream order.", - "requestType": "GetConnectionForeignConstraintsRequest", - "requestLongType": "GetConnectionForeignConstraintsRequest", - "requestFullType": "mgmt.v1alpha1.GetConnectionForeignConstraintsRequest", - "requestStreaming": false, - "responseType": "GetConnectionForeignConstraintsResponse", - "responseLongType": "GetConnectionForeignConstraintsResponse", - "responseFullType": "mgmt.v1alpha1.GetConnectionForeignConstraintsResponse", - "responseStreaming": false - }, - { - "name": "GetConnectionPrimaryConstraints", - "description": "For a specific connection, returns the primary key constraints. Mostly useful for SQL-based Connections.\nUsed primarily by the CLI sync command to determine stream order.", - "requestType": "GetConnectionPrimaryConstraintsRequest", - "requestLongType": "GetConnectionPrimaryConstraintsRequest", - "requestFullType": "mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest", - "requestStreaming": false, - "responseType": "GetConnectionPrimaryConstraintsResponse", - "responseLongType": "GetConnectionPrimaryConstraintsResponse", - "responseFullType": "mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse", - "responseStreaming": false - }, { "name": "GetConnectionInitStatements", "description": "For a specific connection, returns the init table statements. Mostly useful for SQL-based Connections.\nUsed primarily by the CLI sync command to create table schema init statement.", @@ -8744,18 +8286,6 @@ "responseFullType": "mgmt.v1alpha1.GetConnectionInitStatementsResponse", "responseStreaming": false }, - { - "name": "GetConnectionUniqueConstraints", - "description": "For a specific connection, returns the unique constraints. Mostly useful for SQL-based connections.", - "requestType": "GetConnectionUniqueConstraintsRequest", - "requestLongType": "GetConnectionUniqueConstraintsRequest", - "requestFullType": "mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest", - "requestStreaming": false, - "responseType": "GetConnectionUniqueConstraintsResponse", - "responseLongType": "GetConnectionUniqueConstraintsResponse", - "responseFullType": "mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse", - "responseStreaming": false - }, { "name": "GetAiGeneratedData", "description": "Query an AI connection by providing the necessary values. Typically used for generating preview data", @@ -11971,18 +11501,6 @@ "hasOneofs": false, "extensions": [], "fields": [ - { - "name": "source", - "description": "@deprecated - This is no longer used in favor just providing the TransformerConfig", - "label": "", - "type": "TransformerSource", - "longType": "TransformerSource", - "fullType": "mgmt.v1alpha1.TransformerSource", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, { "name": "config", "description": "", @@ -13539,21 +13057,9 @@ "description": "", "hasExtensions": false, "hasFields": true, - "hasOneofs": true, + "hasOneofs": false, "extensions": [], "fields": [ - { - "name": "halt_on_new_column_addition", - "description": "@deprecated - Use new_column_addition_strategy instead", - "label": "optional", - "type": "bool", - "longType": "bool", - "fullType": "bool", - "ismap": false, - "isoneof": true, - "oneofdecl": "_halt_on_new_column_addition", - "defaultValue": "" - }, { "name": "schemas", "description": "", @@ -13616,7 +13122,7 @@ "fields": [ { "name": "halt_job", - "description": "halt job if a new column is detected. This is equiavlent to the deprecated halt_on_new_column_addition", + "description": "halt job if a new column is detected.", "label": "", "type": "HaltJob", "longType": "PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob", @@ -15523,30 +15029,6 @@ "hasOneofs": true, "extensions": [], "fields": [ - { - "name": "start", - "description": "@deprecated - use start_day", - "label": "", - "type": "Timestamp", - "longType": "google.protobuf.Timestamp", - "fullType": "google.protobuf.Timestamp", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "end", - "description": "@deprecated - use end_day", - "label": "", - "type": "Timestamp", - "longType": "google.protobuf.Timestamp", - "fullType": "google.protobuf.Timestamp", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, { "name": "metric", "description": "The metric to return", @@ -15734,16 +15216,6 @@ "number": "0", "description": "Default value, should be used when no reason is specified" }, - { - "name": "ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT", - "number": "1", - "description": "@deprecated - Current usage exceeds allowed limit" - }, - { - "name": "ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT", - "number": "2", - "description": "@deprecated - Adding requested records exceeds the allowed limit" - }, { "name": "ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE", "number": "3", @@ -16015,54 +15487,6 @@ "hasOneofs": false, "extensions": [], "fields": [ - { - "name": "has_created_source_connection", - "description": "@deprecated - use has_completed_onboarding", - "label": "", - "type": "bool", - "longType": "bool", - "fullType": "bool", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "has_created_destination_connection", - "description": "@deprecated - use has_completed_onboarding", - "label": "", - "type": "bool", - "longType": "bool", - "fullType": "bool", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "has_created_job", - "description": "@deprecated - use has_completed_onboarding", - "label": "", - "type": "bool", - "longType": "bool", - "fullType": "bool", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "has_invited_members", - "description": "@deprecated - use has_completed_onboarding", - "label": "", - "type": "bool", - "longType": "bool", - "fullType": "bool", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, { "name": "has_completed_onboarding", "description": "", @@ -16724,7 +16148,7 @@ }, { "name": "build_date", - "description": "", + "description": "The time when the build was created", "label": "", "type": "Timestamp", "longType": "google.protobuf.Timestamp", @@ -16733,6 +16157,18 @@ "isoneof": false, "oneofdecl": "", "defaultValue": "" + }, + { + "name": "license", + "description": "The license information for the system", + "label": "", + "type": "SystemLicense", + "longType": "SystemLicense", + "fullType": "mgmt.v1alpha1.SystemLicense", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" } ] }, @@ -17056,30 +16492,6 @@ "oneofdecl": "", "defaultValue": "" }, - { - "name": "used_record_count", - "description": "A count of the currently used records for the current billing period.\nThis may go over the allowed record count depending on when the record count is polled by the metric system.\n@deprecated", - "label": "", - "type": "uint64", - "longType": "uint64", - "fullType": "uint64", - "ismap": false, - "isoneof": false, - "oneofdecl": "", - "defaultValue": "" - }, - { - "name": "allowed_record_count", - "description": "The allowed record count. It will be null if there is no limit.\n@deprecated", - "label": "optional", - "type": "uint64", - "longType": "uint64", - "fullType": "uint64", - "ismap": false, - "isoneof": true, - "oneofdecl": "_allowed_record_count", - "defaultValue": "" - }, { "name": "account_status", "description": "The current status of the account. Default is valid.", @@ -17568,6 +16980,54 @@ "extensions": [], "fields": [] }, + { + "name": "SystemLicense", + "longName": "SystemLicense", + "fullName": "mgmt.v1alpha1.SystemLicense", + "description": "", + "hasExtensions": false, + "hasFields": true, + "hasOneofs": false, + "extensions": [], + "fields": [ + { + "name": "is_valid", + "description": "Whether or not a valid license was found", + "label": "", + "type": "bool", + "longType": "bool", + "fullType": "bool", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + }, + { + "name": "expires_at", + "description": "The time when the license expires", + "label": "", + "type": "Timestamp", + "longType": "google.protobuf.Timestamp", + "fullType": "google.protobuf.Timestamp", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + }, + { + "name": "is_neosync_cloud", + "description": "Whether or not the license is for NeosyncCloud", + "label": "", + "type": "bool", + "longType": "bool", + "fullType": "bool", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + } + ] + }, { "name": "UserAccount", "longName": "UserAccount", diff --git a/docs/protos/typescript.md b/docs/protos/typescript.md index 0c61db2f30..fb5722b524 100644 --- a/docs/protos/typescript.md +++ b/docs/protos/typescript.md @@ -22,8 +22,10 @@ The correct entry point will be chosen based on using `import` or `require`. The `tsup` package is used to generated the distributed code. +`@bufbuild/protobuf` provides methods to instantiate the messages used in the SDK. + ```sh -npm install @neosync/sdk +npm install @neosync/sdk @bufbuild/protobuf ``` | **Properties** | **Details** | @@ -70,11 +72,26 @@ const neosyncClient = getNeosyncClient({ In this section, we're going to walk through two examples that show you how to make an API call using Neosync's TS SDK. For a complete list of the APIs, check out the APIs in the `Services` section of our [protos](/api/mgmt/v1alpha1/job.proto#jobservice). +### Note on Types and Messages + +In each example there are some cases where the `create` function is used from the `@bufbuild/protobuf` package. + +This is a convenience function that allows you to create a message from a schema. + +It is generally only necessary for any top-level message that you are attempting to assign directly to any inferface. +The generaly pattern is this: `TransformerConfig` -> `TransformerConfigSchema` -> `create(TransformerConfigSchema, {})`. + +The second parameter to the `create` function is a type that looks like this `MessageInit`. which is effectively a `Partial`. +This is the same interface that will be found on all of the actual RPC calls from the API. So if you are just inlining the messages directlyinto the RPC call, the `create` function is generally not necessary. The examples below highlight when to use the `create` function. + +If inspecting the types or using your IDE's intellisense, you'll find that each message also contains two additional properties: `$typename` and `$unknown`. +These should not be set directly and are generally set by the `create` function. This information is used by the underlying library to ensure correct serialization and deserialization of the message. + ### Anonymizing Structured Data A straightforward use case is to anonymize sensitive data in an API request. Let's look at an example. -```js +```jsonc // input { "user": { @@ -96,6 +113,15 @@ In order to anonymize this object, you can use Neosync's `AnonymizeSingle` API t Here's how you do it: ```ts +import { create } from '@bufbuild/protobuf'; +import { createConnectTransport } from '@connectrpc/connect-node'; +import { + AnonymizeSingleResponse, + getNeosyncClient, + TransformerMapping, + TransformerMappingSchema, +} from '@neosync/sdk'; + // authenticates with Neosync Cloud const neosyncClient = getNeosyncClient({ getAccessToken: () => { @@ -124,45 +150,45 @@ const data = { }; const transformers: TransformerMapping[] = [ - new TransformerMapping({ + create(TransformerMappingSchema, { expression: '.user.name', // targets the name field in the user object with a jq expression - transformer: new TransformerConfig({ + transformer: { config: { case: 'generateFullNameConfig', // sets the generateFullNameConfig - value: new GenerateFullName({}), // sets the GenerateFullName transformer + value: {}, // sets the GenerateFullName transformer }, - }), + }, }), - new TransformerMapping({ + create(TransformerMappingSchema, { expression: '.user.email', // targets the email field in the user object with a jq expression - transformer: new TransformerConfig({ + transformer: { config: { - case: 'generateEmaileConfig', // sets the generateEmailConfig - value: new GenerateEmail({}), // sets the GenerateEmail transformer + case: 'generateEmailConfig', // sets the generateEmailConfig + value: {}, // sets the GenerateEmail transformer }, - }), + }, }), - new TransformerMapping({ + create(TransformerMappingSchema, { expression: '.details.address', // targets the address field in the details object with a jq expression - transformer: new TransformerConfig({ + transformer: { config: { case: 'generateFullAddressConfig', // sets the generateFullAddressConfig - value: new GenerateFullAddress({}), // sets the GenerateFullAddress transformer + value: {}, // sets the GenerateFullAddress transformer }, - }), + }, }), - new TransformerMapping({ + create(TransformerMappingSchema, { expression: '.details.phone', // targets the phone field in the details object with a jq expression - transformer: new TransformerConfig({ + transformer: { config: { case: 'generateStringPhoneNumberConfig', // sets the generateStringPhoneNumberConfig - value: new GenerateStringPhoneNumber({ + value: { // sets the GenerateStringPhoneNumber transformer max: BigInt(12), // sets the max number of digits in the string phone number min: BigInt(9), // sets the min number of digits in the string phone number - }), + }, }, - }), + }, }), ]; @@ -190,7 +216,7 @@ Let's take a closer look at what we're doing here. Neosync's AnonymizeSingle API Our output will look something like this: ```js -// output +// output result Anonymization result: '{"user":{"email":"22fdd05dd75746728a9c2a37d3d58cf5@stackoverflow.com","name":"Bryam Begg"},"details":{"address":"212 Ambleside Drive Severna Park MD, 21146","favorites":["dog","cat","bird"],"phone":"58868075625"},}' ``` @@ -202,7 +228,7 @@ Another common use case is to anonymize free form text or unstructured data. Thi The best part is that all you have to do is change a transformer, that's it! Here's how: -```js +```jsonc // input { text: "Dear Mr. John Chang, your physical therapy for your rotator cuff injury is approved for 12 sessions. Your first appointment with therapist Jake is on 8/1/2024 at 11 AM. Please bring a photo ID. We have your SSN on file as 246-80-1357. Is this correct?", @@ -213,12 +239,12 @@ Our input object is a transcription from a call from a doctor's office. In this ```ts import { + AnonymizeSingleResponse, getNeosyncClient, - TransformerConfig, TransformerMapping, - AnonymizeSingleResponse, - TransformPiiText, + TransformerMappingSchema, } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf; import { createConnectTransport } from '@connectrpc/connect-node'; const neosyncClient = getNeosyncClient({ @@ -239,34 +265,20 @@ const data = { }; const transformers: TransformerMapping[] = [ - new TransformerMapping({ + create(TransformerMappingSchema, { expression: '.text', - transformer: new TransformerConfig({ + transformer: { config: { case: 'transformPiiTextConfig', // set the case to transformPiiTextConfig - value: new TransformPiiText({ + value: { // use the TransformPiiText transformer scoreThreshold: 0.1, // lower = more paranoid, higher chance of false positive; higher = less paranoid, higher chance of false negative - }), + }, }, - }), + }, }), ]; -async function runAnonymization() { - try { - const result: AnonymizeSingleResponse = - await neosyncClient.anonymization.anonymizeSingle({ - inputData: JSON.stringify(data), - transformerMappings: transformers, - accountId: 'xxxx', // your accountId found in the the App settings - }); - console.log('Anonymization result:', result.outputData); - } catch (error) { - console.error('Error:', error); - } -} - // calling our async function runAnonymization() .then(() => console.log('Script completed')) @@ -289,6 +301,19 @@ As you can see, we've identified and redacted the PII in the original message an Another common use case is to create resources in Neosync such as Jobs, Runs, Connections, Transformers and more. In this example, we'll create a Job. This can be used as part of a set-up script or custom workflow. Let's take a look at the code: ```ts +import { createConnectTransport } from '@connectrpc/connect-node'; +import { create } from '@bufbuild/protobuf'; +import { + CreateJobDestination, + CreateJobDestinationSchema, + CreateJobResponse, + getNeosyncClient, + JobMapping, + JobMappingSchema, + JobSource, + JobSourceSchema, +} from '@neosync/sdk'; + // authenticates with Neosync Cloud const neosyncClient = getNeosyncClient({ getAccessToken: () => { @@ -305,53 +330,50 @@ const neosyncClient = getNeosyncClient({ // creates our job mappings which maps transformers -> columns const jobMapping: JobMapping[] = [ - new JobMapping({ + create(JobMappingSchema, { schema: 'public', table: 'users', column: 'email', // mapping the email column - transformer: new JobMappingTransformer({ - source: 4, - config: new TransformerConfig({ + transformer: { + config: { config: { case: 'generateEmailConfig', // setting the generateEmailConfig - value: new GenerateEmail({}), // setting the GenerateEmail transformer to the email column + value: {}, // setting the GenerateEmail transformer to the email column }, - }), - }), + }, + }, }), - new JobMapping({ + create(JobMappingSchema, { schema: 'public', table: 'users', column: 'age', // mapping the age column - transformer: new JobMappingTransformer({ - source: 17, - config: new TransformerConfig({ + transformer: { + config: { config: { case: 'generateInt64Config', // setting the generateInt64Config - value: new GenerateInt64({}), // setting the GenerateInt64 transformer to the age column + value: {}, // setting the GenerateInt64 transformer to the age column }, - }), - }), + }, + }, }), - new JobMapping({ + create(JobMappingSchema, { schema: 'public', table: 'users', column: 'address', // mapping the address column - transformer: new JobMappingTransformer({ - source: 12, - config: new TransformerConfig({ + transformer: { + config: { config: { case: 'generateFullAddressConfig', // setting the generateFullAddressConfig - value: new GenerateFullAddress({}), // setting the GenerateFullAddress transformer to the address column + value: {}, // setting the GenerateFullAddress transformer to the address column }, - }), - }), + }, + }, }), ]; // setting our source connection and connection optinos -const sourceConnection: JobSource = new JobSource({ - options: new JobSourceOptions({ +const sourceConnection: JobSource = create(JobSourceSchema, { + options: { config: { case: 'postgres', value: { @@ -361,12 +383,12 @@ const sourceConnection: JobSource = new JobSource({ haltOnNewColumnAddition: false, }, }, - }), + }, }); // setting our destination const destination: CreateJobDestination[] = [ - new JobDestination({ + create(CreateJobDestinationSchema, { connectionId: '3470533a-1fcc-43ec-9cba-8c037ea0da47', }), ]; diff --git a/frontend/apps/web/@types/neosync-transformers.d.ts b/frontend/apps/web/@types/neosync-transformers.d.ts index 10a5a055da..ea3fd7b921 100644 --- a/frontend/apps/web/@types/neosync-transformers.d.ts +++ b/frontend/apps/web/@types/neosync-transformers.d.ts @@ -405,10 +405,8 @@ declare namespace neosync { export interface GenerateIpAddressOptions { /** Specifies the maximum length for the generated data. This field ensures that the output does not exceed a certain number of characters. */ maxLength?: number; - /** IP version to generate: 'ipv4' or 'ipv6' */ - version?: string; - /** IP class: 'public', 'private-a', 'private-b', 'private-c', 'link_local', 'multicast', 'loopback' */ - class?: string; + /** IP type to generate. */ + ipType?: string; /** Optional seed for deterministic generation */ seed?: number; } diff --git a/frontend/apps/web/api-only/neosync-context.ts b/frontend/apps/web/api-only/neosync-context.ts index 74f2468515..6a8b0cb3f7 100644 --- a/frontend/apps/web/api-only/neosync-context.ts +++ b/frontend/apps/web/api-only/neosync-context.ts @@ -24,7 +24,7 @@ export function withNeosyncContext( handler: NeosyncApiHandler ): (req: NextRequest) => Promise> { const systemAppConfig = getSystemAppConfig(); - return async (req) => { + return async (_req) => { try { const neosyncClient = getNeosyncClient({ getAccessToken: getAccessTokenFn(systemAppConfig.isAuthEnabled), diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/AwsS3Form.tsx b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/AwsS3Form.tsx index 9064f4176f..aaadc0fb1a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/AwsS3Form.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/AwsS3Form.tsx @@ -2,6 +2,7 @@ import ButtonText from '@/components/ButtonText'; import { PasswordInput } from '@/components/PasswordComponent'; import Spinner from '@/components/Spinner'; +import SystemLicenseAlert from '@/components/SystemLicenseAlert'; import RequiredLabel from '@/components/labels/RequiredLabel'; import { useAccount } from '@/components/providers/account-provider'; import SwitchCard from '@/components/switches/SwitchCard'; @@ -18,27 +19,24 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { - AWSFormValues, - AWS_FORM_SCHEMA, + AwsFormValues, EditConnectionFormContext, } from '@/yup-validations/connections'; +import { create } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { - UpdateConnectionRequest, + ConnectionService, + UpdateConnectionRequestSchema, UpdateConnectionResponse, } from '@neosync/sdk'; -import { - isConnectionNameAvailable, - updateConnection, -} from '@neosync/sdk/connectquery'; import { useForm } from 'react-hook-form'; import { IoAlertCircleOutline } from 'react-icons/io5'; import { buildConnectionConfigAwsS3 } from '../../util'; interface Props { connectionId: string; - defaultValues: AWSFormValues; + defaultValues: AwsFormValues; onSaved(updatedConnectionResp: UpdateConnectionResponse): void; onSaveFailed(err: unknown): void; } @@ -47,10 +45,10 @@ export default function AwsS3Form(props: Props) { const { connectionId, defaultValues, onSaved, onSaveFailed } = props; const { account } = useAccount(); const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( - isConnectionNameAvailable + ConnectionService.method.isConnectionNameAvailable ); - const form = useForm({ - resolver: yupResolver(AWS_FORM_SCHEMA), + const form = useForm({ + resolver: yupResolver(AwsFormValues), defaultValues: { connectionName: '', s3: {}, @@ -62,12 +60,14 @@ export default function AwsS3Form(props: Props) { isConnectionNameAvailable: isConnectionNameAvailableAsync, }, }); - const { mutateAsync } = useMutation(updateConnection); + const { mutateAsync } = useMutation( + ConnectionService.method.updateConnection + ); - async function onSubmit(values: AWSFormValues) { + async function onSubmit(values: AwsFormValues) { try { const connectionResp = await mutateAsync( - new UpdateConnectionRequest({ + create(UpdateConnectionRequestSchema, { id: connectionId, name: values.connectionName, connectionConfig: buildConnectionConfigAwsS3(values), @@ -81,6 +81,7 @@ export default function AwsS3Form(props: Props) { } return (
+
diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/DynamoDBForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/DynamoDBForm.tsx index 4a25a2f722..9dea2f3ed7 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/DynamoDBForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/DynamoDBForm.tsx @@ -29,18 +29,16 @@ import { DynamoDbFormValues, EditConnectionFormContext, } from '@/yup-validations/connections'; +import { create } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { CheckConnectionConfigResponse, - UpdateConnectionRequest, + CheckConnectionConfigResponseSchema, + ConnectionService, + UpdateConnectionRequestSchema, UpdateConnectionResponse, } from '@neosync/sdk'; -import { - checkConnectionConfig, - isConnectionNameAvailable, - updateConnection, -} from '@neosync/sdk/connectquery'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { ReactElement, useState } from 'react'; import { useForm } from 'react-hook-form'; @@ -58,7 +56,7 @@ export default function DynamoDBForm(props: Props) { const { account } = useAccount(); const { data: systemAppConfig } = useGetSystemAppConfig(); const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( - isConnectionNameAvailable + ConnectionService.method.isConnectionNameAvailable ); const form = useForm({ resolver: yupResolver(DynamoDbFormValues), @@ -69,8 +67,12 @@ export default function DynamoDBForm(props: Props) { isConnectionNameAvailable: isConnectionNameAvailableAsync, }, }); - const { mutateAsync } = useMutation(updateConnection); - const { mutateAsync: checkDbConnection } = useMutation(checkConnectionConfig); + const { mutateAsync } = useMutation( + ConnectionService.method.updateConnection + ); + const { mutateAsync: checkDbConnection } = useMutation( + ConnectionService.method.checkConnectionConfig + ); const [isValidating, setIsValidating] = useState(false); const [validationResponse, setValidationResponse] = useState< @@ -92,7 +94,7 @@ export default function DynamoDBForm(props: Props) { setOpenPermissionDialog(!!res.isConnected); } catch (err) { setValidationResponse( - new CheckConnectionConfigResponse({ + create(CheckConnectionConfigResponseSchema, { isConnected: false, connectionError: err instanceof Error ? err.message : 'unknown error', }) @@ -105,7 +107,7 @@ export default function DynamoDBForm(props: Props) { async function onSubmit(values: DynamoDbFormValues) { try { const connectionResp = await mutateAsync( - new UpdateConnectionRequest({ + create(UpdateConnectionRequestSchema, { id: connectionId, name: values.connectionName, connectionConfig: buildConnectionConfigDynamoDB(values), @@ -328,7 +330,8 @@ export default function DynamoDBForm(props: Props) { ({ resolver: yupResolver(GcpCloudStorageFormValues), @@ -52,7 +49,9 @@ export default function GcpCloudStorageForm(props: Props): ReactElement { isConnectionNameAvailable: isConnectionNameAvailableAsync, }, }); - const { mutateAsync } = useMutation(updateConnection); + const { mutateAsync } = useMutation( + ConnectionService.method.updateConnection + ); async function onSubmit(values: GcpCloudStorageFormValues): Promise { if (!account) { @@ -75,6 +74,7 @@ export default function GcpCloudStorageForm(props: Props): ReactElement { return (
+ ({ @@ -73,9 +71,11 @@ export default function MongoDbForm(props: Props): ReactElement { >(); const [openPermissionDialog, setOpenPermissionDialog] = useState(false); - const { mutateAsync: updateConnectionAsync } = useMutation(updateConnection); + const { mutateAsync: updateConnectionAsync } = useMutation( + ConnectionService.method.updateConnection + ); const { mutateAsync: checkConnectionConfigAsync } = useMutation( - checkConnectionConfig + ConnectionService.method.checkConnectionConfig ); async function onValidationClick(): Promise { @@ -91,7 +91,7 @@ export default function MongoDbForm(props: Props): ReactElement { setOpenPermissionDialog(!!res.isConnected); } catch (err) { setValidationResponse( - new CheckConnectionConfigResponse({ + create(CheckConnectionConfigResponseSchema, { isConnected: false, connectionError: err instanceof Error ? err.message : 'unknown error', }) @@ -246,7 +246,8 @@ export default function MongoDbForm(props: Props): ReactElement { ({ @@ -68,8 +66,12 @@ export default function MssqlForm(props: Props): ReactElement { isConnectionNameAvailable: isConnectionNameAvailableAsync, }, }); - const { mutateAsync: updateMssqlConnection } = useMutation(updateConnection); - const { mutateAsync: checkConnection } = useMutation(checkConnectionConfig); + const { mutateAsync: updateMssqlConnection } = useMutation( + ConnectionService.method.updateConnection + ); + const { mutateAsync: checkConnection } = useMutation( + ConnectionService.method.checkConnectionConfig + ); const [validationResponse, setValidationResponse] = useState< CheckConnectionConfigResponse | undefined >(); @@ -484,7 +486,8 @@ export default function MssqlForm(props: Props): ReactElement { ({ @@ -84,9 +82,11 @@ export default function MysqlForm(props: Props) { isConnectionNameAvailable: isConnectionNameAvailableAsync, }, }); - const { mutateAsync: createMysqlConnection } = useMutation(updateConnection); + const { mutateAsync: createMysqlConnection } = useMutation( + ConnectionService.method.updateConnection + ); const { mutateAsync: checkMysqlConnection } = useMutation( - checkConnectionConfig + ConnectionService.method.checkConnectionConfig ); const [validationResponse, setValidationResponse] = useState< CheckConnectionConfigResponse | undefined @@ -654,7 +654,8 @@ export default function MysqlForm(props: Props) { ({ resolver: yupResolver(OpenAiFormValues), @@ -53,7 +49,9 @@ export default function OpenAiForm(props: Props): ReactElement { isConnectionNameAvailable: isConnectionNameAvailableAsync, }, }); - const { mutateAsync } = useMutation(updateConnection); + const { mutateAsync } = useMutation( + ConnectionService.method.updateConnection + ); async function onSubmit(values: OpenAiFormValues): Promise { if (!account) { diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/PostgresForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/PostgresForm.tsx index ffe083898e..edb8209b5a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/PostgresForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/PostgresForm.tsx @@ -38,17 +38,15 @@ import { PostgresFormValues, SSL_MODES, } from '@/yup-validations/connections'; +import { create } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { CheckConnectionConfigResponse, + CheckConnectionConfigResponseSchema, + ConnectionService, UpdateConnectionResponse, } from '@neosync/sdk'; -import { - checkConnectionConfig, - isConnectionNameAvailable, - updateConnection, -} from '@neosync/sdk/connectquery'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { ReactElement, useState } from 'react'; import { useForm } from 'react-hook-form'; @@ -69,7 +67,7 @@ export default function PostgresForm(props: Props): ReactElement { defaultValues.url ? 'url' : 'host' ); const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( - isConnectionNameAvailable + ConnectionService.method.isConnectionNameAvailable ); const form = useForm({ @@ -90,10 +88,11 @@ export default function PostgresForm(props: Props): ReactElement { const [isValidating, setIsValidating] = useState(false); const [openPermissionDialog, setOpenPermissionDialog] = useState(false); - const { mutateAsync: updatePostgresConnection } = - useMutation(updateConnection); + const { mutateAsync: updatePostgresConnection } = useMutation( + ConnectionService.method.updateConnection + ); const { mutateAsync: checkPostgresConnection } = useMutation( - checkConnectionConfig + ConnectionService.method.checkConnectionConfig ); async function onSubmit(values: PostgresFormValues) { @@ -661,7 +660,8 @@ export default function PostgresForm(props: Props): ReactElement { { try { diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/page.tsx index 2a350fb17f..fc9b1f6f39 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/page.tsx @@ -7,9 +7,13 @@ import { useAccount } from '@/components/providers/account-provider'; import SkeletonForm from '@/components/skeleton/SkeletonForm'; import { PageProps } from '@/components/types'; import { getErrorMessage } from '@/util/util'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useQuery } from '@connectrpc/connect-query'; -import { ConnectionConfig, GetConnectionResponse } from '@neosync/sdk'; -import { getConnection } from '@neosync/sdk/connectquery'; +import { + ConnectionConfigSchema, + ConnectionService, + GetConnectionResponseSchema, +} from '@neosync/sdk'; import { useQueryClient } from '@tanstack/react-query'; import Error from 'next/error'; import { toast } from 'sonner'; @@ -21,7 +25,7 @@ export default function ConnectionPage({ params }: PageProps) { const { account } = useAccount(); const { data, isLoading } = useQuery( - getConnection, + ConnectionService.method.getConnection, { id: id }, { enabled: !!id } ); @@ -42,10 +46,14 @@ export default function ConnectionPage({ params }: PageProps) { const connectionComponent = getConnectionComponentDetails({ connection: data?.connection!, onSaved: (resp) => { - const key = createConnectQueryKey(getConnection, { id }); + const key = createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id }, + cardinality: undefined, + }); queryclient.setQueryData( key, - new GetConnectionResponse({ connection: resp.connection }) + create(GetConnectionResponseSchema, { connection: resp.connection }) ); toast.success('Successfully updated connection!'); }, @@ -59,7 +67,8 @@ export default function ConnectionPage({ params }: PageProps) { data?.connection?.id && ( diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/permissions/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/permissions/page.tsx index 9c3d20560e..cdfb0ec603 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/permissions/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/permissions/page.tsx @@ -16,17 +16,15 @@ import SkeletonForm from '@/components/skeleton/SkeletonForm'; import { PageProps } from '@/components/types'; import { Button } from '@/components/ui/button'; import { getErrorMessage } from '@/util/util'; -import { PlainMessage } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useQuery } from '@connectrpc/connect-query'; import { ConnectionConfig, + ConnectionConfigSchema, ConnectionRolePrivilege, - GetConnectionResponse, + ConnectionService, + GetConnectionResponseSchema, } from '@neosync/sdk'; -import { - checkConnectionConfig, - getConnection, -} from '@neosync/sdk/connectquery'; import { UpdateIcon } from '@radix-ui/react-icons'; import { useQueryClient } from '@tanstack/react-query'; import { ColumnDef } from '@tanstack/react-table'; @@ -57,7 +55,7 @@ export default function PermissionsPage({ params }: PageProps) { const id = params?.id ?? ''; const { account } = useAccount(); const { data, isLoading } = useQuery( - getConnection, + ConnectionService.method.getConnection, { id }, { enabled: !!id } ); @@ -67,7 +65,7 @@ export default function PermissionsPage({ params }: PageProps) { isLoading: isCheckConnLoading, isFetching, refetch: refetchCheckConnectionConfig, - } = useQuery(checkConnectionConfig, { + } = useQuery(ConnectionService.method.checkConnectionConfig, { connectionConfig: data?.connection?.connectionConfig, }); @@ -75,7 +73,8 @@ export default function PermissionsPage({ params }: PageProps) { () => getPermissionColumns( getPermissionColumnType( - data?.connection?.connectionConfig ?? new ConnectionConfig() + data?.connection?.connectionConfig ?? + create(ConnectionConfigSchema, {}) ) ), [isLoading] @@ -99,8 +98,12 @@ export default function PermissionsPage({ params }: PageProps) { connection: data?.connection!, onSaved: (resp) => { queryclient.setQueryData( - createConnectQueryKey(getConnection, { id: resp.connection?.id }), - new GetConnectionResponse({ + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id: resp.connection?.id }, + cardinality: undefined, + }), + create(GetConnectionResponseSchema, { connection: resp.connection, }) ); @@ -116,7 +119,8 @@ export default function PermissionsPage({ params }: PageProps) { data?.connection?.id && ( @@ -176,7 +180,7 @@ interface PermissionsPageContainerProps { connectionName: string; data: ConnectionRolePrivilege[]; isDbConnected: boolean; - columns: ColumnDef>[]; + columns: ColumnDef[]; recheck(): Promise; isRechecking: boolean; } diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/components/ConnectionsTable/columns.tsx b/frontend/apps/web/app/(mgmt)/[account]/connections/components/ConnectionsTable/columns.tsx index 60dcd7a49b..89229f1e40 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/components/ConnectionsTable/columns.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/components/ConnectionsTable/columns.tsx @@ -6,7 +6,7 @@ import NextLink from 'next/link'; import TruncatedText from '@/components/TruncatedText'; import { formatDateTime } from '@/util/util'; -import { PlainMessage, Timestamp } from '@bufbuild/protobuf'; +import { Timestamp, timestampDate } from '@bufbuild/protobuf/wkt'; import { Connection } from '@neosync/sdk'; import { getCategory } from '../../util'; import { DataTableColumnHeader } from './data-table-column-header'; @@ -17,9 +17,7 @@ interface GetColumnsProps { accountName: string; } -export function getColumns( - props: GetColumnsProps -): ColumnDef>[] { +export function getColumns(props: GetColumnsProps): ColumnDef[] { const { accountName, onConnectionDeleted } = props; return [ { @@ -84,10 +82,14 @@ export function getColumns( ), cell: ({ row }) => { + const ts = row.getValue('createdAt') ?? { + nanos: 0, + seconds: 0, + }; return (
- {formatDateTime(row.getValue('createdAt')?.toDate())} + {formatDateTime(timestampDate(ts))}
); @@ -102,10 +104,14 @@ export function getColumns( ), cell: ({ row }) => { + const ts = row.getValue('updatedAt') ?? { + nanos: 0, + seconds: 0, + }; return (
- {formatDateTime(row.getValue('updatedAt')?.toDate())} + {formatDateTime(timestampDate(ts))}
); diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/components/ConnectionsTable/data-table-row-actions.tsx b/frontend/apps/web/app/(mgmt)/[account]/connections/components/ConnectionsTable/data-table-row-actions.tsx index 5104bf933c..b8f69aa04b 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/components/ConnectionsTable/data-table-row-actions.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/components/ConnectionsTable/data-table-row-actions.tsx @@ -14,9 +14,13 @@ import { DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; import { getErrorMessage } from '@/util/util'; +import { create } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; -import { Connection, ConnectionConfig } from '@neosync/sdk'; -import { deleteConnection } from '@neosync/sdk/connectquery'; +import { + Connection, + ConnectionConfigSchema, + ConnectionService, +} from '@neosync/sdk'; import { useRouter } from 'next/navigation'; import { toast } from 'sonner'; import { getConnectionUrlSlugName } from '../../util'; @@ -33,7 +37,9 @@ export function DataTableRowActions({ const connection = row.original as Connection; const router = useRouter(); const { account } = useAccount(); - const { mutateAsync } = useMutation(deleteConnection); + const { mutateAsync } = useMutation( + ConnectionService.method.deleteConnection + ); async function onDelete(): Promise { try { @@ -73,7 +79,10 @@ export function DataTableRowActions({ className="cursor-pointer" onClick={() => router.push( - `/${account?.name}/new/connection/${getConnectionUrlSlugName(connection.connectionConfig ?? new ConnectionConfig())}?sourceId=${connection.id}` + `/${account?.name}/new/connection/${getConnectionUrlSlugName( + connection.connectionConfig ?? + create(ConnectionConfigSchema, {}) + )}?sourceId=${connection.id}` ) } > diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/connections/page.tsx index e895175b59..0146d2ef9d 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/page.tsx @@ -7,7 +7,7 @@ import { useAccount } from '@/components/providers/account-provider'; import SkeletonTable from '@/components/skeleton/SkeletonTable'; import { Button } from '@/components/ui/button'; import { useQuery } from '@connectrpc/connect-query'; -import { getConnections } from '@neosync/sdk/connectquery'; +import { ConnectionService } from '@neosync/sdk'; import { PlusIcon } from '@radix-ui/react-icons'; import NextLink from 'next/link'; import { ReactElement, useMemo } from 'react'; @@ -37,7 +37,7 @@ function ConnectionTable(props: ConnectionTableProps): ReactElement { const {} = props; const { account } = useAccount(); const { data, isLoading, refetch } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id ?? '' }, { enabled: !!account?.id } ); diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/util.ts b/frontend/apps/web/app/(mgmt)/[account]/connections/util.ts index 5d7e935d84..bdc0919704 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/util.ts +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/util.ts @@ -1,6 +1,7 @@ +import { useGetSystemAppConfig } from '@/libs/hooks/useGetSystemAppConfig'; import { AwsCredentialsFormValues, - AWSFormValues, + AwsFormValues, ClientTlsFormValues, DynamoDbFormValues, GcpCloudStorageFormValues, @@ -12,27 +13,37 @@ import { SqlOptionsFormValues, SshTunnelFormValues, } from '@/yup-validations/connections'; -import { PlainMessage } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; import { - AwsS3ConnectionConfig, + AwsS3ConnectionConfigSchema, AwsS3Credentials, + AwsS3CredentialsSchema, ClientTlsConfig, + ClientTlsConfigSchema, Connection, ConnectionConfig, - DynamoDBConnectionConfig, + ConnectionConfigSchema, + DynamoDBConnectionConfigSchema, GcpCloudStorageConnectionConfig, + GcpCloudStorageConnectionConfigSchema, MongoConnectionConfig, + MongoConnectionConfigSchema, MssqlConnectionConfig, - MysqlConnection, + MssqlConnectionConfigSchema, MysqlConnectionConfig, - OpenAiConnectionConfig, - PostgresConnection, + MysqlConnectionConfigSchema, + MysqlConnectionSchema, + OpenAiConnectionConfigSchema, PostgresConnectionConfig, + PostgresConnectionConfigSchema, + PostgresConnectionSchema, SqlConnectionOptions, - SSHAuthentication, - SSHPassphrase, - SSHPrivateKey, + SqlConnectionOptionsSchema, + SSHAuthenticationSchema, + SSHPassphraseSchema, + SSHPrivateKeySchema, SSHTunnel, + SSHTunnelSchema, } from '@neosync/sdk'; export interface ConnectionMeta { @@ -42,6 +53,7 @@ export interface ConnectionMeta { connectionType: ConnectionConfigCase; connectionTypeVariant?: ConnectionTypeVariant; isExperimental?: boolean; + isLicenseOnly?: boolean; } const CONNECTIONS_METADATA: ConnectionMeta[] = [ @@ -65,6 +77,7 @@ const CONNECTIONS_METADATA: ConnectionMeta[] = [ description: 'Amazon Simple Storage Service (Amazon S3) is an object storage service used to store and retrieve any data.', connectionType: 'awsS3Config', + isLicenseOnly: true, }, { urlSlug: 'gcp-cloud-storage', @@ -72,6 +85,7 @@ const CONNECTIONS_METADATA: ConnectionMeta[] = [ description: 'GCP Cloud Storage is an object storage service used to store and retrieve any data.', connectionType: 'gcpCloudstorageConfig', + isLicenseOnly: true, }, { urlSlug: 'neon', @@ -102,7 +116,6 @@ const CONNECTIONS_METADATA: ConnectionMeta[] = [ description: 'MongoDB is a source-available, cross-platform, document-oriented database program.', connectionType: 'mongoConfig', - isExperimental: true, }, { urlSlug: 'dynamodb', @@ -110,7 +123,6 @@ const CONNECTIONS_METADATA: ConnectionMeta[] = [ description: 'Amazon DynamoDB is a fully managed proprietary NoSQL database offered by Amazon.com as part of the Amazon Web Services portfolio', connectionType: 'dynamodbConfig', - isExperimental: true, }, { urlSlug: 'mssql', @@ -118,15 +130,23 @@ const CONNECTIONS_METADATA: ConnectionMeta[] = [ description: 'Microsoft SQL Server is a proprietary relational database management system developed by Microsoft.', connectionType: 'mssqlConfig', - isExperimental: true, }, ]; -export function getConnectionsMetadata( +export function useGetConnectionsMetadata( + allowedConnectionTypes: Set +): ConnectionMeta[] { + const { data: systemAppConfigData } = useGetSystemAppConfig(); + + return getConnectionsMetadata( + allowedConnectionTypes, + systemAppConfigData?.isGcpCloudStorageConnectionsEnabled ?? false + ); +} + +function getConnectionsMetadata( connectionTypes: Set, - isGcpCloudStorageConnectionsEnabled: boolean, - isDynamoDbConnectionsEnabled: boolean, - isMssqlConnectionsEnabled: boolean + isGcpCloudStorageConnectionsEnabled: boolean ): ConnectionMeta[] { let connections = CONNECTIONS_METADATA; if (!isGcpCloudStorageConnectionsEnabled) { @@ -134,14 +154,7 @@ export function getConnectionsMetadata( (c) => c.connectionType !== 'gcpCloudstorageConfig' ); } - if (!isDynamoDbConnectionsEnabled) { - connections = connections.filter( - (c) => c.connectionType !== 'dynamodbConfig' - ); - } - if (!isMssqlConnectionsEnabled) { - connections = connections.filter((c) => c.connectionType !== 'mssqlConfig'); - } + if (connectionTypes.size > 0) { connections = connections.filter((c) => connectionTypes.has(c.connectionType) @@ -270,13 +283,13 @@ const DESTINATION_ONLY_CONNECTION_TYPES = new Set([ ]); export function getConnectionType( - connectionConfig: PlainMessage + connectionConfig: ConnectionConfig ): ConnectionConfigCase | null { return connectionConfig.config.case ?? null; } export function getConnectionUrlSlugName( - connectionConfig: PlainMessage + connectionConfig: ConnectionConfig ): string { const connType = getConnectionType(connectionConfig); if (!connType) { @@ -301,7 +314,7 @@ const CONNECTION_CATEGORY_MAP: Record = { }; // Used for the connections data table -export function getCategory(cc?: PlainMessage): string { +export function getCategory(cc?: ConnectionConfig): string { if (!cc || !cc.config.case) { return '-'; } @@ -312,10 +325,10 @@ export function getCategory(cc?: PlainMessage): string { export function buildConnectionConfigDynamoDB( values: DynamoDbFormValues ): ConnectionConfig { - return new ConnectionConfig({ + return create(ConnectionConfigSchema, { config: { case: 'dynamodbConfig', - value: new DynamoDBConnectionConfig({ + value: create(DynamoDBConnectionConfigSchema, { endpoint: values.db.endpoint, region: values.db.region, credentials: values.db.credentials @@ -327,12 +340,12 @@ export function buildConnectionConfigDynamoDB( } export function buildConnectionConfigAwsS3( - values: AWSFormValues + values: AwsFormValues ): ConnectionConfig { - return new ConnectionConfig({ + return create(ConnectionConfigSchema, { config: { case: 'awsS3Config', - value: new AwsS3ConnectionConfig({ + value: create(AwsS3ConnectionConfigSchema, { bucket: values.s3.bucket, pathPrefix: values.s3.pathPrefix, region: values.s3.region, @@ -348,7 +361,7 @@ export function buildConnectionConfigAwsS3( function buildAwsCredentials( values: AwsCredentialsFormValues ): AwsS3Credentials { - return new AwsS3Credentials({ + return create(AwsS3CredentialsSchema, { profile: values.profile, accessKeyId: values.accessKeyId, secretAccessKey: values.secretAccessKey, @@ -362,7 +375,7 @@ function buildAwsCredentials( export function buildConnectionConfigGcpCloudStorage( values: GcpCloudStorageFormValues ): ConnectionConfig { - return new ConnectionConfig({ + return create(ConnectionConfigSchema, { config: { case: 'gcpCloudstorageConfig', value: buildGcpCloudStorageConnectionConfig(values), @@ -373,7 +386,7 @@ export function buildConnectionConfigGcpCloudStorage( export function buildConnectionConfigPostgres( values: PostgresFormValues ): ConnectionConfig { - return new ConnectionConfig({ + return create(ConnectionConfigSchema, { config: { case: 'pgConfig', value: buildPostgresConnectionConfig(values), @@ -384,10 +397,10 @@ export function buildConnectionConfigPostgres( export function buildConnectionConfigOpenAi( values: OpenAiFormValues ): ConnectionConfig { - return new ConnectionConfig({ + return create(ConnectionConfigSchema, { config: { case: 'openaiConfig', - value: new OpenAiConnectionConfig({ + value: create(OpenAiConnectionConfigSchema, { apiUrl: values.sdk.url, apiKey: values.sdk.apiKey, }), @@ -398,7 +411,7 @@ export function buildConnectionConfigOpenAi( export function buildConnectionConfigMysql( values: MysqlFormValues ): ConnectionConfig { - return new ConnectionConfig({ + return create(ConnectionConfigSchema, { config: { case: 'mysqlConfig', value: buildMysqlConnectionConfig(values), @@ -409,7 +422,7 @@ export function buildConnectionConfigMysql( export function buildConnectionConfigMssql( values: MssqlFormValues ): ConnectionConfig { - return new ConnectionConfig({ + return create(ConnectionConfigSchema, { config: { case: 'mssqlConfig', value: buildMssqlConnectionConfig(values), @@ -420,12 +433,12 @@ export function buildConnectionConfigMssql( function buildMssqlConnectionConfig( values: MssqlFormValues ): MssqlConnectionConfig { - return new MssqlConnectionConfig({ + return create(MssqlConnectionConfigSchema, { connectionConfig: { case: 'url', value: values.db.url, }, - connectionOptions: new SqlConnectionOptions({ + connectionOptions: create(SqlConnectionOptionsSchema, { ...values.options, }), tunnel: getTunnelConfig(values.tunnel), @@ -436,7 +449,7 @@ function buildMssqlConnectionConfig( function buildGcpCloudStorageConnectionConfig( values: GcpCloudStorageFormValues ): GcpCloudStorageConnectionConfig { - return new GcpCloudStorageConnectionConfig({ + return create(GcpCloudStorageConnectionConfigSchema, { bucket: values.gcp.bucket, pathPrefix: values.gcp.pathPrefix, }); @@ -445,8 +458,8 @@ function buildGcpCloudStorageConnectionConfig( function buildMysqlConnectionConfig( values: MysqlFormValues ): MysqlConnectionConfig { - const mysqlconfig = new MysqlConnectionConfig({ - connectionOptions: new SqlConnectionOptions({ + const mysqlconfig = create(MysqlConnectionConfigSchema, { + connectionOptions: create(SqlConnectionOptionsSchema, { ...values.options, }), tunnel: getTunnelConfig(values.tunnel), @@ -461,7 +474,7 @@ function buildMysqlConnectionConfig( } else { mysqlconfig.connectionConfig = { case: 'connection', - value: new MysqlConnection({ + value: create(MysqlConnectionSchema, { host: values.db.host, name: values.db.name, pass: values.db.pass, @@ -477,7 +490,7 @@ function buildMysqlConnectionConfig( function getSqlConnectionOptions( values: SqlOptionsFormValues ): SqlConnectionOptions { - return new SqlConnectionOptions({ + return create(SqlConnectionOptionsSchema, { maxConnectionLimit: values.maxConnectionLimit != null && values.maxConnectionLimit >= 0 ? values.maxConnectionLimit @@ -498,7 +511,7 @@ function getSqlConnectionOptions( function buildPostgresConnectionConfig( values: PostgresFormValues ): PostgresConnectionConfig { - const pgconfig = new PostgresConnectionConfig({ + const pgconfig = create(PostgresConnectionConfigSchema, { clientTls: getClientTlsConfig(values.clientTls), tunnel: getTunnelConfig(values.tunnel), connectionOptions: getSqlConnectionOptions(values.options), @@ -512,7 +525,7 @@ function buildPostgresConnectionConfig( } else { pgconfig.connectionConfig = { case: 'connection', - value: new PostgresConnection({ + value: create(PostgresConnectionSchema, { host: values.db.host, port: values.db.port, name: values.db.name, @@ -537,7 +550,7 @@ function getClientTlsConfig( ) { return undefined; } - return new ClientTlsConfig({ + return create(ClientTlsConfigSchema, { rootCert: values.rootCert ? values.rootCert : undefined, clientKey: values.clientKey ? values.clientKey : undefined, clientCert: values.clientCert ? values.clientCert : undefined, @@ -549,7 +562,7 @@ function getTunnelConfig(values?: SshTunnelFormValues): SSHTunnel | undefined { if (!values || !values.host) { return undefined; } - const tunnel = new SSHTunnel({ + const tunnel = create(SSHTunnelSchema, { host: values.host, port: values.port, user: values.user, @@ -559,20 +572,20 @@ function getTunnelConfig(values?: SshTunnelFormValues): SSHTunnel | undefined { }); if (values.privateKey) { - tunnel.authentication = new SSHAuthentication({ + tunnel.authentication = create(SSHAuthenticationSchema, { authConfig: { case: 'privateKey', - value: new SSHPrivateKey({ + value: create(SSHPrivateKeySchema, { value: values.privateKey, passphrase: values.passphrase, }), }, }); } else if (values.passphrase) { - tunnel.authentication = new SSHAuthentication({ + tunnel.authentication = create(SSHAuthenticationSchema, { authConfig: { case: 'passphrase', - value: new SSHPassphrase({ + value: create(SSHPassphraseSchema, { value: values.passphrase, }), }, @@ -584,7 +597,7 @@ function getTunnelConfig(values?: SshTunnelFormValues): SSHTunnel | undefined { export function buildConnectionConfigMongo( values: MongoDbFormValues ): ConnectionConfig { - return new ConnectionConfig({ + return create(ConnectionConfigSchema, { config: { case: 'mongoConfig', value: buildMongoConnectionConfig(values), @@ -595,7 +608,7 @@ export function buildConnectionConfigMongo( function buildMongoConnectionConfig( values: MongoDbFormValues ): MongoConnectionConfig { - const mongoconfig = new MongoConnectionConfig({ + const mongoconfig = create(MongoConnectionConfigSchema, { connectionConfig: { case: 'url', value: values.url, diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/ActivitySyncOptionsCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/ActivitySyncOptionsCard.tsx index 08065f61da..7ff60bcfa7 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/ActivitySyncOptionsCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/ActivitySyncOptionsCard.tsx @@ -15,12 +15,11 @@ import { Input } from '@/components/ui/input'; import { convertNanosecondsToMinutes, getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { Job } from '@neosync/sdk'; -import { setJobSyncOptions } from '@neosync/sdk/connectquery'; +import { Job, JobService } from '@neosync/sdk'; import { ReactElement } from 'react'; import { useForm } from 'react-hook-form'; import { toast } from 'sonner'; -import { ActivityOptionsSchema } from '../../../new/job/job-form-validations'; +import { ActivityOptionsFormValues } from '../../../new/job/job-form-validations'; import { toActivityOptions } from '../../util'; interface Props { @@ -32,9 +31,9 @@ export default function ActivitySyncOptionsCard({ job, mutate, }: Props): ReactElement { - const form = useForm({ + const form = useForm({ mode: 'onChange', - resolver: yupResolver(ActivityOptionsSchema), + resolver: yupResolver(ActivityOptionsFormValues), values: { scheduleToCloseTimeout: job?.syncOptions?.scheduleToCloseTimeout ? convertNanosecondsToMinutes(job.syncOptions.scheduleToCloseTimeout) @@ -48,10 +47,11 @@ export default function ActivitySyncOptionsCard({ }, }); const { account } = useAccount(); - const { mutateAsync: updateJobSyncActivityOptions } = - useMutation(setJobSyncOptions); + const { mutateAsync: updateJobSyncActivityOptions } = useMutation( + JobService.method.setJobSyncOptions + ); - async function onSubmit(values: ActivityOptionsSchema) { + async function onSubmit(values: ActivityOptionsFormValues) { if (!account?.id) { return; } diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/JobPauseButton.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/JobPauseButton.tsx index 6dc08cfd79..17baaa23f1 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/JobPauseButton.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/JobPauseButton.tsx @@ -4,8 +4,7 @@ import Spinner from '@/components/Spinner'; import { Button } from '@/components/ui/button'; import { getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; -import { JobStatus } from '@neosync/sdk'; -import { pauseJob } from '@neosync/sdk/connectquery'; +import { JobService, JobStatus } from '@neosync/sdk'; import { PauseIcon, PlayIcon } from '@radix-ui/react-icons'; import { ReactElement, useEffect, useState } from 'react'; import { toast } from 'sonner'; @@ -21,7 +20,7 @@ export default function JobPauseButton({ onNewStatus, jobId, }: Props): ReactElement { - const { mutateAsync: setJobPaused } = useMutation(pauseJob); + const { mutateAsync: setJobPaused } = useMutation(JobService.method.pauseJob); const [buttonText, setButtonText] = useState( status === JobStatus.PAUSED ? 'Resume Job' : 'Pause Job' ); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/NextRuns.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/NextRuns.tsx index b2220a8faa..df00a041de 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/NextRuns.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/NextRuns.tsx @@ -10,9 +10,9 @@ import { TableRow, } from '@/components/ui/table'; import { formatDateTime } from '@/util/util'; +import { timestampDate } from '@bufbuild/protobuf/wkt'; import { useQuery } from '@connectrpc/connect-query'; -import { JobStatus } from '@neosync/sdk'; -import { getJobNextRuns } from '@neosync/sdk/connectquery'; +import { JobService, JobStatus } from '@neosync/sdk'; import { ReactElement } from 'react'; interface Props { @@ -22,7 +22,7 @@ interface Props { export default function JobNextRuns({ jobId, status }: Props): ReactElement { const { data, isLoading, error } = useQuery( - getJobNextRuns, + JobService.method.getJobNextRuns, { jobId }, { enabled: !!jobId } ); @@ -61,7 +61,7 @@ export default function JobNextRuns({ jobId, status }: Props): ReactElement { - {formatDateTime(r?.toDate())} + {formatDateTime(timestampDate(r))} diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/RecentRuns.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/RecentRuns.tsx index 147ba494a0..a7c3147290 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/RecentRuns.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/RecentRuns.tsx @@ -22,15 +22,9 @@ import { TableRow, } from '@/components/ui/table'; import { formatDateTime, getErrorMessage } from '@/util/util'; +import { timestampDate } from '@bufbuild/protobuf/wkt'; import { useMutation, useQuery } from '@connectrpc/connect-query'; -import { JobRunStatus as JobRunStatusEnum } from '@neosync/sdk'; -import { - cancelJobRun, - deleteJobRun, - getJobRecentRuns, - getJobRuns, - terminateJobRun, -} from '@neosync/sdk/connectquery'; +import { JobRunStatus as JobRunStatusEnum, JobService } from '@neosync/sdk'; import { Cross2Icon, DotsHorizontalIcon, @@ -54,20 +48,30 @@ export default function JobRecentRuns({ jobId }: Props): ReactElement { error: recentRunsError, refetch: recentRunsMutate, isFetching: isValidating, - } = useQuery(getJobRecentRuns, { jobId }, { enabled: !!jobId }); + } = useQuery( + JobService.method.getJobRecentRuns, + { jobId }, + { enabled: !!jobId } + ); const { data: jobRunsData, isLoading: jobRunsLoading, isFetching: jobRunsValidating, refetch: jobRunsMutate, } = useQuery( - getJobRuns, + JobService.method.getJobRuns, { id: { case: 'jobId', value: jobId } }, { enabled: !!jobId } ); - const { mutateAsync: removeJobRunAsync } = useMutation(deleteJobRun); - const { mutateAsync: cancelJobRunAsync } = useMutation(cancelJobRun); - const { mutateAsync: terminateJobRunAsync } = useMutation(terminateJobRun); + const { mutateAsync: removeJobRunAsync } = useMutation( + JobService.method.deleteJobRun + ); + const { mutateAsync: cancelJobRunAsync } = useMutation( + JobService.method.cancelJobRun + ); + const { mutateAsync: terminateJobRunAsync } = useMutation( + JobService.method.terminateJobRun + ); const recentRuns = (recentRunsData?.recentRuns ?? []).toReversed(); const jobRunsIdMap = new Map( @@ -176,12 +180,19 @@ export default function JobRecentRuns({ jobId }: Props): ReactElement { - {formatDateTime(r.startTime?.toDate())} + {formatDateTime( + r.startTime ? timestampDate(r.startTime) : undefined + )} - {jobRun && formatDateTime(jobRun.completedAt?.toDate())} + {jobRun && + formatDateTime( + jobRun.completedAt + ? timestampDate(jobRun.completedAt) + : undefined + )} diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/ScheduleCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/ScheduleCard.tsx index 777d218a83..0c868c82a0 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/ScheduleCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/ScheduleCard.tsx @@ -19,8 +19,7 @@ import { Input } from '@/components/ui/input'; import { getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { Job } from '@neosync/sdk'; -import { updateJobSchedule } from '@neosync/sdk/connectquery'; +import { Job, JobService } from '@neosync/sdk'; import cron from 'cron-validate'; import { ReactElement } from 'react'; import { useForm } from 'react-hook-form'; @@ -63,8 +62,9 @@ export default function JobScheduleCard({ job, mutate }: Props): ReactElement { resolver: yupResolver(SCHEDULE_FORM_SCHEMA), values: { cronSchedule: job?.cronSchedule }, }); - const { mutateAsync: updateJobScheduleAsync } = - useMutation(updateJobSchedule); + const { mutateAsync: updateJobScheduleAsync } = useMutation( + JobService.method.updateJobSchedule + ); async function onSubmit(values: ScheduleFormValues) { try { diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/WorkflowSettingsCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/WorkflowSettingsCard.tsx index 341ccbb412..dfcf287fc0 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/WorkflowSettingsCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/components/WorkflowSettingsCard.tsx @@ -15,8 +15,7 @@ import { Input } from '@/components/ui/input'; import { convertNanosecondsToMinutes, getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { Job } from '@neosync/sdk'; -import { setJobWorkflowOptions } from '@neosync/sdk/connectquery'; +import { Job, JobService } from '@neosync/sdk'; import { ReactElement } from 'react'; import { useForm } from 'react-hook-form'; import { toast } from 'sonner'; @@ -43,7 +42,7 @@ export default function WorkflowSettingsCard({ }); const { account } = useAccount(); const { mutateAsync: updateJobWorkflowOptions } = useMutation( - setJobWorkflowOptions + JobService.method.setJobWorkflowOptions ); async function onSubmit(values: WorkflowSettingsSchema) { diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/destinations/components/DestinationConnectionCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/destinations/components/DestinationConnectionCard.tsx index 964c897adf..d0f7ade47a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/destinations/components/DestinationConnectionCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/destinations/components/DestinationConnectionCard.tsx @@ -24,15 +24,7 @@ import { getErrorMessage } from '@/util/util'; import { NewDestinationFormValues } from '@/yup-validations/jobs'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { - Connection, - JobDestination, - JobDestinationOptions, -} from '@neosync/sdk'; -import { - deleteJobDestinationConnection, - updateJobDestinationConnection, -} from '@neosync/sdk/connectquery'; +import { Connection, JobDestination, JobService } from '@neosync/sdk'; import { TrashIcon } from '@radix-ui/react-icons'; import { ReactElement } from 'react'; import { Control, useForm, useWatch } from 'react-hook-form'; @@ -62,10 +54,10 @@ export default function DestinationConnectionCard({ jobSourceId, }: Props): ReactElement { const { mutateAsync: setJobDestConnection } = useMutation( - updateJobDestinationConnection + JobService.method.updateJobDestinationConnection ); const { mutateAsync: removeJobDestConnection } = useMutation( - deleteJobDestinationConnection + JobService.method.deleteJobDestinationConnection ); const form = useForm({ @@ -80,9 +72,7 @@ export default function DestinationConnectionCard({ jobId, connectionId: values.connectionId, destinationId: destination.id, - options: new JobDestinationOptions( - toJobDestinationOptions(values, connection) - ), + options: toJobDestinationOptions(values, connection), }); mutate(); toast.success('Successfully updated job destination!'); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/destinations/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/destinations/page.tsx index f59a3db5bc..0cb1601827 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/destinations/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/destinations/page.tsx @@ -5,9 +5,14 @@ import { useAccount } from '@/components/providers/account-provider'; import { PageProps } from '@/components/types'; import { Button } from '@/components/ui/button'; import { Skeleton } from '@/components/ui/skeleton'; +import { create } from '@bufbuild/protobuf'; import { useQuery } from '@connectrpc/connect-query'; -import { Connection } from '@neosync/sdk'; -import { getConnections, getJob } from '@neosync/sdk/connectquery'; +import { + Connection, + ConnectionSchema, + ConnectionService, + JobService, +} from '@neosync/sdk'; import { PlusIcon } from '@radix-ui/react-icons'; import NextLink from 'next/link'; import { ReactElement } from 'react'; @@ -23,12 +28,12 @@ export default function Page({ params }: PageProps): ReactElement { const id = params?.id ?? ''; const { account } = useAccount(); const { data, isLoading, refetch } = useQuery( - getJob, + JobService.method.getJob, { id }, { enabled: !!id } ); const { data: connectionsData, isLoading: isConnectionsLoading } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); @@ -53,7 +58,7 @@ export default function Page({ params }: PageProps): ReactElement { ? sourceConnectionId : ''; const sourceConnection = - connectionsRecord[destinationJobSourceId] ?? new Connection(); + connectionsRecord[destinationJobSourceId] ?? create(ConnectionSchema, {}); return (
diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/EditHookButton.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/EditHookButton.tsx index 870846f5df..f778c51954 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/EditHookButton.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/EditHookButton.tsx @@ -8,10 +8,8 @@ import { DialogTrigger, } from '@/components/ui/dialog'; import { getErrorMessage } from '@/util/util'; -import { PlainMessage } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; -import { Connection, JobHook } from '@neosync/sdk'; -import { updateJobHook } from '@neosync/sdk/connectquery'; +import { Connection, JobHook, JobService } from '@neosync/sdk'; import { Pencil1Icon } from '@radix-ui/react-icons'; import { ReactElement, useState } from 'react'; import { toast } from 'sonner'; @@ -25,14 +23,21 @@ interface Props { export default function EditHookButton(props: Props): ReactElement { const { hook, onEdited, jobConnections } = props; - const { mutateAsync: updateHook } = useMutation(updateJobHook); + const { mutateAsync: updateHook } = useMutation( + JobService.method.updateJobHook + ); const [open, setOpen] = useState(false); - async function onUpdate( - values: Partial> - ): Promise { + async function onUpdate(values: Partial): Promise { try { - await updateHook({ id: hook.id, ...values }); + await updateHook({ + id: hook.id, + config: values.config, + description: values.description, + enabled: values.enabled, + name: values.name, + priority: values.priority, + }); toast.success('Successfully updated job hook!'); onEdited(); setOpen(false); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/HookCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/HookCard.tsx index fc53386597..8220dd2a59 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/HookCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/HookCard.tsx @@ -1,10 +1,12 @@ import { Badge } from '@/components/ui/badge'; import { Card, CardContent } from '@/components/ui/card'; +import { create } from '@bufbuild/protobuf'; import { Connection, JobHook, JobHookConfig, JobHookConfig_JobSqlHook, + JobHookConfigSchema, } from '@neosync/sdk'; import { ClockIcon } from '@radix-ui/react-icons'; import { ReactElement } from 'react'; @@ -22,7 +24,7 @@ interface Props { export default function HookCard(props: Props): ReactElement { const { hook, onDeleted, onEdited, jobConnections, jobConnectionsMap } = props; - const hookTiming = getHookTiming(hook.config ?? new JobHookConfig()); + const hookTiming = getHookTiming(hook.config ?? create(JobHookConfigSchema)); return (
diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/HooksCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/HooksCard.tsx index 839c4f728f..4bee2ce66a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/HooksCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/HooksCard.tsx @@ -3,9 +3,10 @@ import SubPageHeader from '@/components/headers/SubPageHeader'; import { useAccount } from '@/components/providers/account-provider'; import Spinner from '@/components/Spinner'; import { Skeleton } from '@/components/ui/skeleton'; +import { create } from '@bufbuild/protobuf'; +import { timestampDate } from '@bufbuild/protobuf/wkt'; import { useQuery } from '@connectrpc/connect-query'; -import { Job } from '@neosync/sdk'; -import { getConnections, getJob, getJobHooks } from '@neosync/sdk/connectquery'; +import { ConnectionService, Job, JobSchema, JobService } from '@neosync/sdk'; import { ReactElement, ReactNode, useMemo } from 'react'; import { MdWebhook } from 'react-icons/md'; import { getConnectionIdFromSource } from '../../source/components/util'; @@ -23,32 +24,36 @@ export default function HooksCard(props: Props): ReactElement { isLoading: isGetJobHooksLoading, isFetching: isGetJobHooksFetching, refetch, - } = useQuery(getJobHooks, { jobId: jobId }, { enabled: !!jobId }); + } = useQuery( + JobService.method.getJobHooks, + { jobId: jobId }, + { enabled: !!jobId } + ); const { data: getJobResp, isLoading: isGetJobLoading, isFetching: isGetJobFetching, - } = useQuery(getJob, { id: jobId }, { enabled: !!jobId }); + } = useQuery(JobService.method.getJob, { id: jobId }, { enabled: !!jobId }); const { account } = useAccount(); const { data: getConnectionsResp, isFetching: isConnectionsFetching } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); const jobHooks = useMemo(() => { return [...(getJobHooksResp?.hooks ?? [])].sort((a, b) => { - const timeA = a.createdAt ? a.createdAt.toDate().getTime() : 0; - const timeB = b.createdAt ? b.createdAt.toDate().getTime() : 0; + const timeA = a.createdAt ? timestampDate(a.createdAt).getTime() : 0; + const timeB = b.createdAt ? timestampDate(b.createdAt).getTime() : 0; return timeA - timeB; }); }, [getJobHooksResp?.hooks, isGetJobHooksFetching]); const jobConnectionIds = useMemo(() => { - return new Set(getJobConnectionIds(getJobResp?.job ?? new Job())); + return new Set(getJobConnectionIds(getJobResp?.job ?? create(JobSchema))); }, [getJobResp?.job, isGetJobFetching]); const jobConnections = useMemo(() => { diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/NewHookButton.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/NewHookButton.tsx index 37fb0de2d6..e17f848990 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/NewHookButton.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/NewHookButton.tsx @@ -9,10 +9,8 @@ import { DialogTrigger, } from '@/components/ui/dialog'; import { getErrorMessage } from '@/util/util'; -import { PlainMessage } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; -import { Connection, NewJobHook } from '@neosync/sdk'; -import { createJobHook } from '@neosync/sdk/connectquery'; +import { Connection, JobService, NewJobHook } from '@neosync/sdk'; import { PlusIcon } from '@radix-ui/react-icons'; import { ReactElement, useState } from 'react'; import { toast } from 'sonner'; @@ -26,16 +24,22 @@ interface Props { export default function NewHookButton(props: Props): ReactElement { const { jobId, jobConnections, onCreated } = props; - const { mutateAsync: createHook } = useMutation(createJobHook); + const { mutateAsync: createHook } = useMutation( + JobService.method.createJobHook + ); const [open, setOpen] = useState(false); - async function onCreate( - values: Partial> - ): Promise { + async function onCreate(values: Partial): Promise { try { await createHook({ jobId, - hook: values, + hook: { + config: values.config, + description: values.description, + enabled: values.enabled, + name: values.name, + priority: values.priority, + }, }); toast.success('Successfully created job hook!'); onCreated(); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/RemoveHookButton.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/RemoveHookButton.tsx index 3f5c3ec2ce..2a4fd6a3ef 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/RemoveHookButton.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/RemoveHookButton.tsx @@ -2,8 +2,7 @@ import DeleteConfirmationDialog from '@/components/DeleteConfirmationDialog'; import { Button } from '@/components/ui/button'; import { getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; -import { JobHook } from '@neosync/sdk'; -import { deleteJobHook } from '@neosync/sdk/connectquery'; +import { JobHook, JobService } from '@neosync/sdk'; import { TrashIcon } from '@radix-ui/react-icons'; import { ReactElement } from 'react'; import { toast } from 'sonner'; @@ -14,7 +13,9 @@ interface Props { } export default function RemoveHookButton(props: Props): ReactElement { const { hook, onDeleted } = props; - const { mutateAsync: removeHook } = useMutation(deleteJobHook); + const { mutateAsync: removeHook } = useMutation( + JobService.method.deleteJobHook + ); async function onDelete(): Promise { try { diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/validation.ts b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/validation.ts index 3e4aff2804..1937810a18 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/validation.ts +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/hooks/components/validation.ts @@ -1,12 +1,17 @@ import { RESOURCE_NAME_REGEX } from '@/yup-validations/connections'; +import { create } from '@bufbuild/protobuf'; import { JobHook, JobHookConfig, - JobHookConfig_JobSqlHook, JobHookConfig_JobSqlHook_Timing, - JobHookTimingPostSync, - JobHookTimingPreSync, + JobHookConfig_JobSqlHook_TimingSchema, + JobHookConfig_JobSqlHookSchema, + JobHookConfigSchema, + JobHookSchema, + JobHookTimingPostSyncSchema, + JobHookTimingPreSyncSchema, NewJobHook, + NewJobHookSchema, } from '@neosync/sdk'; import * as yup from 'yup'; @@ -82,11 +87,11 @@ export function toEditFormData(input: JobHook): EditJobHookFormValues { return { name: input.name, description: input.description, - hookType: toHookType(input.config ?? new JobHookConfig()), + hookType: toHookType(input.config ?? create(JobHookConfigSchema)), priority: input.priority, enabled: input.enabled, config: { - sql: toSqlConfig(input.config ?? new JobHookConfig()), + sql: toSqlConfig(input.config ?? create(JobHookConfigSchema)), }, }; } @@ -108,7 +113,8 @@ function toSqlConfig(input: JobHookConfig): JobHookSqlFormValues { connectionId: input.config.value.connectionId, query: input.config.value.query, timing: toSqlTimingConfig( - input.config.value.timing ?? new JobHookConfig_JobSqlHook_Timing() + input.config.value.timing ?? + create(JobHookConfig_JobSqlHook_TimingSchema) ), }; } @@ -152,16 +158,21 @@ export function editFormDataToJobHook( input: JobHook, values: EditJobHookFormValues ): JobHook { - return new JobHook({ + const newValues = newFormDataToNewJobHook(values); + return create(JobHookSchema, { ...input, - ...newFormDataToNewJobHook(values), + name: newValues.name, + description: newValues.description, + enabled: newValues.enabled, + priority: newValues.priority, + config: newValues.config, }); } export function newFormDataToNewJobHook( values: NewJobHookFormValues ): NewJobHook { - return new NewJobHook({ + return create(NewJobHookSchema, { name: values.name, description: values.description, enabled: values.enabled, @@ -175,10 +186,10 @@ function toJobHookConfig( ): JobHookConfig | undefined { switch (values.hookType) { case 'sql': { - return new JobHookConfig({ + return create(JobHookConfigSchema, { config: { case: 'sql', - value: new JobHookConfig_JobSqlHook({ + value: create(JobHookConfig_JobSqlHookSchema, { connectionId: values.config.sql.connectionId, query: values.config.sql.query, timing: toJobHookSqlTimingConfig(values.config.sql.timing), @@ -194,26 +205,26 @@ function toJobHookSqlTimingConfig( ): JobHookConfig_JobSqlHook_Timing { switch (values) { case 'preSync': { - return new JobHookConfig_JobSqlHook_Timing({ + return create(JobHookConfig_JobSqlHook_TimingSchema, { timing: { case: 'preSync', - value: new JobHookTimingPreSync(), + value: create(JobHookTimingPreSyncSchema), }, }); } case 'postSync': { - return new JobHookConfig_JobSqlHook_Timing({ + return create(JobHookConfig_JobSqlHook_TimingSchema, { timing: { case: 'postSync', - value: new JobHookTimingPostSync(), + value: create(JobHookTimingPostSyncSchema), }, }); } default: { - return new JobHookConfig_JobSqlHook_Timing({ + return create(JobHookConfig_JobSqlHook_TimingSchema, { timing: { case: 'preSync', - value: new JobHookTimingPreSync(), + value: create(JobHookTimingPreSyncSchema), }, }); } diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/layout.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/layout.tsx index d83794d932..08b0149ec8 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/layout.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/layout.tsx @@ -13,15 +13,7 @@ import { Button } from '@/components/ui/button'; import { useGetSystemAppConfig } from '@/libs/hooks/useGetSystemAppConfig'; import { getErrorMessage } from '@/util/util'; import { useMutation, useQuery } from '@connectrpc/connect-query'; -import { Job, JobSourceOptions, JobStatus } from '@neosync/sdk'; -import { - createJobRun, - deleteJob, - getJob, - getJobRecentRuns, - getJobRuns, - getJobStatus, -} from '@neosync/sdk/connectquery'; +import { Job, JobService, JobSourceOptions, JobStatus } from '@neosync/sdk'; import { LightningBoltIcon, TrashIcon } from '@radix-ui/react-icons'; import { useRouter } from 'next/navigation'; import { toast } from 'sonner'; @@ -33,26 +25,32 @@ export default function JobIdLayout({ children, params }: LayoutProps) { const id = params?.id ?? ''; const router = useRouter(); const { account } = useAccount(); - const { data, isLoading } = useQuery(getJob, { id }, { enabled: !!id }); + const { data, isLoading } = useQuery( + JobService.method.getJob, + { id }, + { enabled: !!id } + ); const { data: jobStatus, refetch: mutateJobStatus } = useQuery( - getJobStatus, + JobService.method.getJobStatus, { jobId: id }, { enabled: !!id } ); const { refetch: mutateRecentRuns } = useQuery( - getJobRecentRuns, + JobService.method.getJobRecentRuns, { jobId: id }, { enabled: !!id } ); const { refetch: mutateJobRunsByJob } = useQuery( - getJobRuns, + JobService.method.getJobRuns, { id: { case: 'jobId', value: id } }, { enabled: !!id } ); const { data: systemAppConfigData, isLoading: isSystemConfigLoading } = useGetSystemAppConfig(); - const { mutateAsync: removeJob } = useMutation(deleteJob); - const { mutateAsync: triggerJobRun } = useMutation(createJobRun); + const { mutateAsync: removeJob } = useMutation(JobService.method.deleteJob); + const { mutateAsync: triggerJobRun } = useMutation( + JobService.method.createJobRun + ); async function onTriggerJobRun(): Promise { try { diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/page.tsx index c22ff42bf0..5d958507ac 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/page.tsx @@ -8,9 +8,9 @@ import { AccordionTrigger, } from '@/components/ui/accordion'; import { Alert, AlertTitle } from '@/components/ui/alert'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useQuery } from '@connectrpc/connect-query'; -import { GetJobResponse } from '@neosync/sdk'; -import { getJob, getJobStatus } from '@neosync/sdk/connectquery'; +import { GetJobResponseSchema, JobService } from '@neosync/sdk'; import { useQueryClient } from '@tanstack/react-query'; import { ReactElement } from 'react'; import ActivitySyncOptionsCard from './components/ActivitySyncOptionsCard'; @@ -22,8 +22,16 @@ import JobIdSkeletonForm from './JobIdSkeletonForm'; export default function Page({ params }: PageProps): ReactElement { const id = params?.id ?? ''; - const { data, isLoading } = useQuery(getJob, { id }, { enabled: !!id }); - const { data: jobStatus } = useQuery(getJobStatus, { jobId: id }); + const { data, isLoading } = useQuery( + JobService.method.getJob, + { id }, + { enabled: !!id } + ); + const { data: jobStatus } = useQuery( + JobService.method.getJobStatus, + { jobId: id }, + { enabled: !!id } + ); const queryclient = useQueryClient(); if (isLoading) { @@ -53,8 +61,12 @@ export default function Page({ params }: PageProps): ReactElement { job={data.job} mutate={(newjob) => { queryclient.setQueryData( - createConnectQueryKey(getJob, { id }), - new GetJobResponse({ job: newjob }) + createConnectQueryKey({ + schema: JobService.method.getJob, + input: { id }, + cardinality: undefined, + }), + create(GetJobResponseSchema, { job: newjob }) ); }} /> @@ -78,8 +90,12 @@ export default function Page({ params }: PageProps): ReactElement { job={data.job} mutate={(newjob) => { queryclient.setQueryData( - createConnectQueryKey(getJob, { id }), - new GetJobResponse({ job: newjob }) + createConnectQueryKey({ + schema: JobService.method.getJob, + input: { id }, + cardinality: undefined, + }), + create(GetJobResponseSchema, { job: newjob }) ); }} /> @@ -89,8 +105,12 @@ export default function Page({ params }: PageProps): ReactElement { job={data.job} mutate={(newjob) => { queryclient.setQueryData( - createConnectQueryKey(getJob, { id }), - new GetJobResponse({ job: newjob }) + createConnectQueryKey({ + schema: JobService.method.getJob, + input: { id }, + cardinality: undefined, + }), + create(GetJobResponseSchema, { job: newjob }) ); }} /> diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/AiDataGenConnectionCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/AiDataGenConnectionCard.tsx index 3e7a9daed6..8d929e9b47 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/AiDataGenConnectionCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/AiDataGenConnectionCard.tsx @@ -41,19 +41,13 @@ import { } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { + ConnectionDataService, + ConnectionService, GetConnectionResponse, GetConnectionSchemaMapResponse, Job, + JobService, } from '@neosync/sdk'; -import { - getAiGeneratedData, - getConnection, - getConnections, - getConnectionSchemaMap, - getConnectionTableConstraints, - getJob, - updateJobSourceConnection, -} from '@neosync/sdk/connectquery'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { useQueryClient } from '@tanstack/react-query'; import { ColumnDef } from '@tanstack/react-table'; @@ -61,7 +55,6 @@ import { ReactElement, useEffect, useMemo, useState } from 'react'; import { useForm } from 'react-hook-form'; import { toast } from 'sonner'; import { - fromStructToRecord, getSampleEditAiGeneratedRecordsRequest, getSingleTableAiGenerateNumRows, getSingleTableAiSchemaTable, @@ -82,20 +75,22 @@ export default function AiDataGenConnectionCard({ data, refetch: mutate, isLoading: isJobLoading, - } = useQuery(getJob, { id: jobId }, { enabled: !!jobId }); + } = useQuery(JobService.method.getJob, { id: jobId }, { enabled: !!jobId }); const { data: connectionsData, isLoading: isConnectionsLoading, isFetching: isConnectionsValidating, } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); const connections = connectionsData?.connections ?? []; - const { mutateAsync: sampleRecords } = useMutation(getAiGeneratedData); + const { mutateAsync: sampleRecords } = useMutation( + ConnectionDataService.method.getAiGeneratedData + ); const form = useForm({ resolver: yupResolver(SingleTableEditAiSourceFormValues), @@ -110,26 +105,28 @@ export default function AiDataGenConnectionCard({ isLoading: isSchemaDataMapLoading, isFetching: isSchemaMapValidating, } = useQuery( - getConnectionSchemaMap, + ConnectionDataService.method.getConnectionSchemaMap, { connectionId: fkSourceConnectionId }, { enabled: !!fkSourceConnectionId } ); const { mutateAsync: getConnectionSchemaMapAsync } = useMutation( - getConnectionSchemaMap + ConnectionDataService.method.getConnectionSchemaMap ); const queryclient = useQueryClient(); const { data: tableConstraints, isFetching: isTableConstraintsValidating } = useQuery( - getConnectionTableConstraints, + ConnectionDataService.method.getConnectionTableConstraints, { connectionId: fkSourceConnectionId }, { enabled: !!fkSourceConnectionId } ); const { mutateAsync: updateSourceConnection } = useMutation( - updateJobSourceConnection + JobService.method.updateJobSourceConnection + ); + const { mutateAsync: getConnectionAsync } = useMutation( + ConnectionService.method.getConnection ); - const { mutateAsync: getConnectionAsync } = useMutation(getConnection); const schemaConstraintHandler = useMemo( () => @@ -233,7 +230,7 @@ export default function AiDataGenConnectionCard({ const output = await sampleRecords( getSampleEditAiGeneratedRecordsRequest(form.getValues()) ); - setaioutput(output.records.map((r) => fromStructToRecord(r))); + setaioutput(output.records); } catch (err) { toast.error('Unable to generate sample data', { description: getErrorMessage(err), @@ -271,7 +268,11 @@ export default function AiDataGenConnectionCard({ async (id) => { const resp = await getConnectionAsync({ id }); queryclient.setQueryData( - createConnectQueryKey(getConnection, { id }), + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id }, + cardinality: undefined, + }), resp ); return resp; @@ -279,7 +280,11 @@ export default function AiDataGenConnectionCard({ async (id) => { const resp = await getConnectionSchemaMapAsync({ connectionId: id }); queryclient.setQueryData( - createConnectQueryKey(getConnectionSchemaMap, { connectionId: id }), + createConnectQueryKey({ + schema: ConnectionDataService.method.getConnectionSchemaMap, + input: { connectionId: id }, + cardinality: undefined, + }), resp ); return resp; diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataGenConnectionCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataGenConnectionCard.tsx index ece66a947a..c82b583bd7 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataGenConnectionCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataGenConnectionCard.tsx @@ -34,6 +34,7 @@ import { convertJobMappingTransformerFormToJobMappingTransformer, convertJobMappingTransformerToForm, } from '@/yup-validations/jobs'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useMutation, @@ -41,22 +42,16 @@ import { } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { + ConnectionDataService, + ConnectionService, GetConnectionResponse, GetConnectionSchemaMapResponse, Job, - JobMapping, - JobMappingTransformer, + JobMappingSchema, + JobMappingTransformerSchema, + JobService, ValidateJobMappingsResponse, } from '@neosync/sdk'; -import { - getConnection, - getConnectionSchemaMap, - getConnectionTableConstraints, - getConnections, - getJob, - updateJobSourceConnection, - validateJobMappings, -} from '@neosync/sdk/connectquery'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { useQueryClient } from '@tanstack/react-query'; import { ReactElement, useEffect, useMemo, useState } from 'react'; @@ -93,10 +88,10 @@ export default function DataGenConnectionCard({ jobId }: Props): ReactElement { data, refetch: mutate, isLoading: isJobLoading, - } = useQuery(getJob, { id: jobId }, { enabled: !!jobId }); + } = useQuery(JobService.method.getJob, { id: jobId }, { enabled: !!jobId }); const { data: connectionsData, isFetching: isConnectionsValidating } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); @@ -116,24 +111,26 @@ export default function DataGenConnectionCard({ jobId }: Props): ReactElement { isLoading: isSchemaDataMapLoading, isFetching: isSchemaMapValidating, } = useQuery( - getConnectionSchemaMap, + ConnectionDataService.method.getConnectionSchemaMap, { connectionId: fkSourceConnectionId }, { enabled: !!fkSourceConnectionId } ); const { mutateAsync: getConnectionSchemaMapAsync } = useMutation( - getConnectionSchemaMap + ConnectionDataService.method.getConnectionSchemaMap ); const queryclient = useQueryClient(); const { data: tableConstraints, isFetching: isTableConstraintsValidating } = useQuery( - getConnectionTableConstraints, + ConnectionDataService.method.getConnectionTableConstraints, { connectionId: fkSourceConnectionId }, { enabled: !!fkSourceConnectionId } ); - const { mutateAsync: getConnectionAsync } = useMutation(getConnection); + const { mutateAsync: getConnectionAsync } = useMutation( + ConnectionService.method.getConnection + ); const schemaConstraintHandler = useMemo( () => @@ -195,7 +192,7 @@ export default function DataGenConnectionCard({ jobId }: Props): ReactElement { table: dbcol.table, column: dbcol.column, transformer: convertJobMappingTransformerToForm( - new JobMappingTransformer() + create(JobMappingTransformerSchema) ), }); } @@ -213,7 +210,7 @@ export default function DataGenConnectionCard({ jobId }: Props): ReactElement { ); const { mutateAsync: updateJobSrcConnection } = useMutation( - updateJobSourceConnection + JobService.method.updateJobSourceConnection ); useEffect(() => { @@ -226,8 +223,9 @@ export default function DataGenConnectionCard({ jobId }: Props): ReactElement { validateJobMappings(); }, [selectedTables, fkSourceConnectionId, account?.id]); - const { mutateAsync: validateJobMappingsAsync } = - useMutation(validateJobMappings); + const { mutateAsync: validateJobMappingsAsync } = useMutation( + JobService.method.validateJobMappings + ); const { handler, isLoading: isGetTransformersLoading } = useGetTransformersHandler(account?.id ?? ''); @@ -333,7 +331,7 @@ export default function DataGenConnectionCard({ jobId }: Props): ReactElement { await updateJobSrcConnection({ id: job.id, mappings: values.mappings.map((m) => { - return new JobMapping({ + return create(JobMappingSchema, { schema: m.schema, table: m.table, column: m.column, @@ -393,7 +391,11 @@ export default function DataGenConnectionCard({ jobId }: Props): ReactElement { async (id) => { const resp = await getConnectionAsync({ id }); queryclient.setQueryData( - createConnectQueryKey(getConnection, { id }), + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id }, + cardinality: undefined, + }), resp ); return resp; @@ -401,7 +403,11 @@ export default function DataGenConnectionCard({ jobId }: Props): ReactElement { async (id) => { const resp = await getConnectionSchemaMapAsync({ connectionId: id }); queryclient.setQueryData( - createConnectQueryKey(getConnectionSchemaMap, { connectionId: id }), + createConnectQueryKey({ + schema: ConnectionDataService.method.getConnectionSchemaMap, + input: { connectionId: id }, + cardinality: undefined, + }), resp ); return resp; @@ -606,7 +612,9 @@ function getJobSource(job?: Job): SingleTableEditSourceFormValues { column: mapping.column, transformer: mapping.transformer ? convertJobMappingTransformerToForm(mapping.transformer) - : convertJobMappingTransformerToForm(new JobMappingTransformer()), + : convertJobMappingTransformerToForm( + create(JobMappingTransformerSchema) + ), }; }); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataSyncConnectionCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataSyncConnectionCard.tsx index b7054b1346..af5f3bb4d9 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataSyncConnectionCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataSyncConnectionCard.tsx @@ -44,7 +44,7 @@ import { toJobSourcePostgresNewColumnAdditionStrategy, toNewColumnAdditionStrategy, } from '@/yup-validations/jobs'; -import { PartialMessage } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useMutation, @@ -53,37 +53,37 @@ import { import { yupResolver } from '@hookform/resolvers/yup'; import { Connection, + ConnectionDataService, + ConnectionSchema, + ConnectionService, DynamoDBSourceConnectionOptions, - DynamoDBSourceUnmappedTransformConfig, + DynamoDBSourceConnectionOptionsSchema, + DynamoDBSourceUnmappedTransformConfigSchema, GetConnectionResponse, GetConnectionSchemaMapRequest, + GetConnectionSchemaMapRequestSchema, GetConnectionSchemaMapResponse, - GetConnectionSchemaMapsResponse, + GetConnectionSchemaMapsResponseSchema, GetConnectionSchemaResponse, Job, - JobMapping, - JobMappingTransformer, - JobSource, + JobMappingSchema, + JobMappingTransformerSchema, + JobService, JobSourceOptions, + JobSourceOptionsSchema, + JobSourceSchema, MongoDBSourceConnectionOptions, + MongoDBSourceConnectionOptionsSchema, MssqlSourceConnectionOptions, + MssqlSourceConnectionOptionsSchema, MysqlSourceConnectionOptions, + MysqlSourceConnectionOptionsSchema, PostgresSourceConnectionOptions, + PostgresSourceConnectionOptionsSchema, ValidateJobMappingsResponse, - VirtualForeignConstraint, - VirtualForeignKey, + VirtualForeignConstraintSchema, + VirtualForeignKeySchema, } from '@neosync/sdk'; -import { - getConnection, - getConnectionSchemaMap, - getConnectionSchemaMaps, - getConnectionTableConstraints, - getConnections, - getJob, - updateJobDestinationConnection, - updateJobSourceConnection, - validateJobMappings, -} from '@neosync/sdk/connectquery'; import { useQueryClient } from '@tanstack/react-query'; import { ReactElement, useCallback, useEffect, useMemo, useState } from 'react'; import { useFieldArray, useForm } from 'react-hook-form'; @@ -118,7 +118,7 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { data, refetch: mutate, isLoading: isJobDataLoading, - } = useQuery(getJob, { id: jobId }, { enabled: !!jobId }); + } = useQuery(JobService.method.getJob, { id: jobId }, { enabled: !!jobId }); const sourceConnectionId = getConnectionIdFromSource(data?.job?.source); const { @@ -126,21 +126,22 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { isLoading: isSchemaDataMapLoading, isFetching: isSchemaMapValidating, } = useQuery( - getConnectionSchemaMap, + ConnectionDataService.method.getConnectionSchemaMap, { connectionId: sourceConnectionId }, { enabled: !!sourceConnectionId } ); const { mutateAsync: getConnectionSchemaMapAsync } = useMutation( - getConnectionSchemaMap + ConnectionDataService.method.getConnectionSchemaMap ); const { data: destinationConnectionSchemaMapsResp } = useQuery( - getConnectionSchemaMaps, + ConnectionDataService.method.getConnectionSchemaMaps, { requests: data?.job?.destinations.map( - (dest): PartialMessage => ({ - connectionId: dest.connectionId, - }) + (dest): GetConnectionSchemaMapRequest => + create(GetConnectionSchemaMapRequestSchema, { + connectionId: dest.connectionId, + }) ), }, { @@ -151,7 +152,7 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { ); const { isLoading: isConnectionsLoading, data: connectionsData } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); @@ -165,10 +166,10 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { ); const { mutateAsync: updateJobSrcConnection } = useMutation( - updateJobSourceConnection + JobService.method.updateJobSourceConnection ); const { mutateAsync: updateJobDestConnection } = useMutation( - updateJobDestinationConnection + JobService.method.updateJobDestinationConnection ); const queryclient = useQueryClient(); @@ -187,11 +188,13 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { const { data: tableConstraints, isFetching: isTableConstraintsValidating } = useQuery( - getConnectionTableConstraints, + ConnectionDataService.method.getConnectionTableConstraints, { connectionId: sourceConnectionId }, { enabled: !!sourceConnectionId } ); - const { mutateAsync: getConnectionAsync } = useMutation(getConnection); + const { mutateAsync: getConnectionAsync } = useMutation( + ConnectionService.method.getConnection + ); const { append: appendVfk, @@ -206,11 +209,11 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { const virtualForeignKeys = Array.from(data?.job?.virtualForeignKeys ?? []); formVirtualForeignKeys?.forEach((v) => { virtualForeignKeys.push( - new VirtualForeignConstraint({ + create(VirtualForeignConstraintSchema, { schema: v.schema, table: v.table, columns: v.columns, - foreignKey: new VirtualForeignKey({ + foreignKey: create(VirtualForeignKeySchema, { schema: v.foreignKey.schema, table: v.foreignKey.table, columns: v.foreignKey.columns, @@ -256,8 +259,9 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { ); }, [isJobDataLoading, isSchemaDataMapLoading]); - const { mutateAsync: validateJobMappingsAsync } = - useMutation(validateJobMappings); + const { mutateAsync: validateJobMappingsAsync } = useMutation( + JobService.method.validateJobMappings + ); async function onSourceChange(value: string): Promise { try { @@ -267,7 +271,11 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { async (id) => { const resp = await getConnectionAsync({ id }); queryclient.setQueryData( - createConnectQueryKey(getConnection, { id }), + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id }, + cardinality: undefined, + }), resp ); return resp; @@ -275,7 +283,11 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { async (id) => { const resp = await getConnectionSchemaMapAsync({ connectionId: id }); queryclient.setQueryData( - createConnectQueryKey(getConnectionSchemaMap, { connectionId: id }), + createConnectQueryKey({ + schema: ConnectionDataService.method.getConnectionSchemaMap, + input: { connectionId: id }, + cardinality: undefined, + }), resp ); return resp; @@ -300,7 +312,7 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { await updateJobSrcConnection({ id: job.id, mappings: values.mappings.map((m) => { - return new JobMapping({ + return create(JobMappingSchema, { schema: m.schema, table: m.table, column: m.column, @@ -312,18 +324,18 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { }), virtualForeignKeys: values.virtualForeignKeys?.map((v) => { - return new VirtualForeignConstraint({ + return create(VirtualForeignConstraintSchema, { schema: v.schema, table: v.table, columns: v.columns, - foreignKey: new VirtualForeignKey({ + foreignKey: create(VirtualForeignKeySchema, { schema: v.foreignKey.schema, table: v.foreignKey.table, columns: v.foreignKey.columns, }), }); }) || [], - source: new JobSource({ + source: create(JobSourceSchema, { options: toJobSourceOptions(values, job, connection, values.sourceId), }), }); @@ -649,7 +661,7 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { }} /> - {isNosqlSource(source ?? new Connection()) && ( + {isNosqlSource(source ?? create(ConnectionSchema)) && ( 0 )} onImportMappingsClick={onImportMappingsClick} @@ -816,7 +828,7 @@ export default function DataSyncConnectionCard({ jobId }: Props): ReactElement { /> )} - {!isNosqlSource(source ?? new Connection()) && ( + {!isNosqlSource(source ?? create(ConnectionSchema)) && ( > = {}; - const mappings = (job.mappings ?? []).map((mapping) => { + const mappings = (job.mappings ?? []).map((mapping): JobMappingFormValues => { const tkey = `${mapping.schema}.${mapping.table}`; const uniqcols = mapData[tkey]; if (uniqcols) { @@ -1039,7 +1054,9 @@ function getJobSource( ...mapping, transformer: mapping.transformer ? convertJobMappingTransformerToForm(mapping.transformer) - : convertJobMappingTransformerToForm(new JobMappingTransformer()), + : convertJobMappingTransformerToForm( + create(JobMappingTransformerSchema) + ), }; }); @@ -1071,7 +1088,7 @@ function getJobSource( table: dbcol.table, column: dbcol.column, transformer: convertJobMappingTransformerToForm( - new JobMappingTransformer() + create(JobMappingTransformerSchema) ), }); } diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/SourceConnectionCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/SourceConnectionCard.tsx index 6ad5042af0..73e48cd381 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/SourceConnectionCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/SourceConnectionCard.tsx @@ -1,6 +1,6 @@ 'use client'; import { useQuery } from '@connectrpc/connect-query'; -import { getJob } from '@neosync/sdk/connectquery'; +import { JobService } from '@neosync/sdk'; import { ReactElement } from 'react'; import { isAiDataGenJob, isDataGenJob } from '../../util'; import AiDataGenConnectionCard from './AiDataGenConnectionCard'; @@ -14,7 +14,7 @@ interface Props { export default function SourceConnectionCard({ jobId }: Props): ReactElement { const { data, isLoading } = useQuery( - getJob, + JobService.method.getJob, { id: jobId }, { enabled: !!jobId } ); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/useOnApplyDefaultClick.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/useOnApplyDefaultClick.tsx index 373d0a6c15..2f7e00e7f4 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/useOnApplyDefaultClick.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/useOnApplyDefaultClick.tsx @@ -3,11 +3,13 @@ import { convertJobMappingTransformerToForm, JobMappingFormValues, } from '@/yup-validations/jobs'; +import { create } from '@bufbuild/protobuf'; import { - GenerateDefault, + GenerateDefaultSchema, JobMappingTransformer, - Passthrough, - TransformerConfig, + JobMappingTransformerSchema, + PassthroughSchema, + TransformerConfigSchema, } from '@neosync/sdk'; interface Props { @@ -57,19 +59,19 @@ export function useOnApplyDefaultClick( function getDefaultJMTransformer(useDefault: boolean): JobMappingTransformer { return useDefault - ? new JobMappingTransformer({ - config: new TransformerConfig({ + ? create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'generateDefaultConfig', - value: new GenerateDefault(), + value: create(GenerateDefaultSchema), }, }), }) - : new JobMappingTransformer({ - config: new TransformerConfig({ + : create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'passthroughConfig', - value: new Passthrough(), + value: create(PassthroughSchema), }, }), }); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/useOnImportMappings.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/useOnImportMappings.tsx index 5f1f69c0d5..67baebc97c 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/useOnImportMappings.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/useOnImportMappings.tsx @@ -4,7 +4,8 @@ import { JobMappingFormValues, JobMappingTransformerForm, } from '@/yup-validations/jobs'; -import { JobMapping, JobMappingTransformer } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { JobMapping, JobMappingTransformerSchema } from '@neosync/sdk'; import { toast } from 'sonner'; interface Props { @@ -47,7 +48,7 @@ export function useOnImportMappings(props: Props): UseOnImportMappingsResponse { table: jm.table, column: jm.column, transformer: convertJobMappingTransformerToForm( - jm.transformer ?? new JobMappingTransformer() + jm.transformer ?? create(JobMappingTransformerSchema) ), }; } @@ -81,7 +82,7 @@ export function useOnImportMappings(props: Props): UseOnImportMappingsResponse { setTransformer( existingIdx, convertJobMappingTransformerToForm( - jm.transformer ?? new JobMappingTransformer() + jm.transformer ?? create(JobMappingTransformerSchema) ) ); } @@ -91,7 +92,7 @@ export function useOnImportMappings(props: Props): UseOnImportMappingsResponse { table: jm.table, column: jm.column, transformer: convertJobMappingTransformerToForm( - jm.transformer ?? new JobMappingTransformer() + jm.transformer ?? create(JobMappingTransformerSchema) ), }); } diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/util.ts b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/util.ts index a2c6af60e9..a721da21ef 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/util.ts +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/util.ts @@ -23,12 +23,13 @@ import { JobMappingFormValues, convertJobMappingTransformerToForm, } from '@/yup-validations/jobs'; +import { create } from '@bufbuild/protobuf'; import { Connection, GetConnectionSchemaMapsResponse, GetConnectionSchemaResponse, JobDestination, - JobMappingTransformer, + JobMappingTransformerSchema, JobSource, SystemTransformer, UserDefinedTransformer, @@ -119,7 +120,7 @@ export function getOnSelectedTableToggle( table: dbcol.table, column: dbcol.column, transformer: convertJobMappingTransformerToForm( - new JobMappingTransformer() + create(JobMappingTransformerSchema) ), }); }); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/subsets/components/SubsetCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/subsets/components/SubsetCard.tsx index 5c2b959b78..2fc74cd66b 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/subsets/components/SubsetCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/subsets/components/SubsetCard.tsx @@ -26,6 +26,7 @@ import { import { Form } from '@/components/ui/form'; import { Separator } from '@/components/ui/separator'; import { getErrorMessage } from '@/util/util'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useMutation, @@ -33,16 +34,13 @@ import { } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { - ConnectionConfig, - GetJobResponse, + ConnectionConfigSchema, + ConnectionDataService, + ConnectionService, + GetJobResponseSchema, + JobService, JobSourceOptions, } from '@neosync/sdk'; -import { - getConnection, - getConnectionTableConstraints, - getJob, - setJobSourceSqlConnectionSubsets, -} from '@neosync/sdk/connectquery'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { useQueryClient } from '@tanstack/react-query'; import { ReactElement, useEffect, useState } from 'react'; @@ -61,7 +59,7 @@ export default function SubsetCard(props: Props): ReactElement { const [isDialogOpen, setIsDialogOpen] = useState(false); const { data, isLoading: isJobLoading } = useQuery( - getJob, + JobService.method.getJob, { id: jobId }, { enabled: !!jobId } ); @@ -69,15 +67,15 @@ export default function SubsetCard(props: Props): ReactElement { const sourceConnectionId = getConnectionIdFromSource(data?.job?.source); const { data: tableConstraints, isFetching: isTableConstraintsValidating } = useQuery( - getConnectionTableConstraints, + ConnectionDataService.method.getConnectionTableConstraints, { connectionId: sourceConnectionId }, { enabled: !!sourceConnectionId } ); const { mutateAsync: setJobSubsets } = useMutation( - setJobSourceSqlConnectionSubsets + JobService.method.setJobSourceSqlConnectionSubsets ); const { data: sourceConnectionData } = useQuery( - getConnection, + ConnectionService.method.getConnection, { id: sourceConnectionId }, { enabled: !!sourceConnectionId } ); @@ -125,7 +123,8 @@ export default function SubsetCard(props: Props): ReactElement { } const connectionType = getConnectionType( - sourceConnectionData?.connection?.connectionConfig ?? new ConnectionConfig() + sourceConnectionData?.connection?.connectionConfig ?? + create(ConnectionConfigSchema) ); if (!isValidSubsetType(connectionType)) { @@ -155,8 +154,12 @@ export default function SubsetCard(props: Props): ReactElement { }); toast.success('Successfully updated database subsets'); queryclient.setQueryData( - createConnectQueryKey(getJob, { id: updatedJobRes.job?.id }), - new GetJobResponse({ job: updatedJobRes.job }) + createConnectQueryKey({ + schema: JobService.method.getJob, + input: { id: updatedJobRes.job?.id }, + cardinality: undefined, + }), + create(GetJobResponseSchema, { job: updatedJobRes.job }) ); } catch (err) { console.error(err); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/components/DataTable/columns.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/components/DataTable/columns.tsx index 611d07417d..f2d2df3e2c 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/components/DataTable/columns.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/components/DataTable/columns.tsx @@ -5,7 +5,7 @@ import { ColumnDef } from '@tanstack/react-table'; import TruncatedText from '@/components/TruncatedText'; import { Badge } from '@/components/ui/badge'; import { formatDateTime } from '@/util/util'; -import { Timestamp } from '@bufbuild/protobuf'; +import { Timestamp, timestampDate } from '@bufbuild/protobuf/wkt'; import { JobStatus } from '@neosync/sdk'; import NextLink from 'next/link'; import { DataTableColumnHeader } from './data-table-column-header'; @@ -129,10 +129,14 @@ export function getColumns(props: GetJobsProps): ColumnDef[] { ), cell: ({ row }) => { + const ts = row.getValue('createdAt') ?? { + nanos: 0, + seconds: 0, + }; return (
- {formatDateTime(row.getValue('createdAt')?.toDate())} + {formatDateTime(timestampDate(ts))}
); @@ -147,10 +151,15 @@ export function getColumns(props: GetJobsProps): ColumnDef[] { ), cell: ({ row }) => { + const ts = row.getValue('updatedAt') ?? { + nanos: 0, + seconds: 0, + }; + return (
- {formatDateTime(row.getValue('updatedAt')?.toDate())} + {formatDateTime(timestampDate(ts))}
); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/components/DataTable/data-table-row-actions.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/components/DataTable/data-table-row-actions.tsx index 0335a219f7..3d6b15e4b0 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/components/DataTable/data-table-row-actions.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/components/DataTable/data-table-row-actions.tsx @@ -7,7 +7,7 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import { Job } from '@neosync/sdk'; +import { Job, JobService } from '@neosync/sdk'; import { Row } from '@tanstack/react-table'; import { useRouter } from 'next/navigation'; @@ -15,7 +15,6 @@ import DeleteConfirmationDialog from '@/components/DeleteConfirmationDialog'; import { useAccount } from '@/components/providers/account-provider'; import { getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; -import { deleteJob } from '@neosync/sdk/connectquery'; import { DotsHorizontalIcon } from '@radix-ui/react-icons'; import { nanoid } from 'nanoid'; import { toast } from 'sonner'; @@ -34,7 +33,7 @@ export function DataTableRowActions({ const job = row.original as Job; const router = useRouter(); const { account } = useAccount(); - const { mutateAsync: removeJob } = useMutation(deleteJob); + const { mutateAsync: removeJob } = useMutation(JobService.method.deleteJob); async function onDelete(): Promise { try { diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/page.tsx index e69830ef1d..20db3cd3a6 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/page.tsx @@ -7,8 +7,7 @@ import { useAccount } from '@/components/providers/account-provider'; import SkeletonTable from '@/components/skeleton/SkeletonTable'; import { Button } from '@/components/ui/button'; import { useQuery } from '@connectrpc/connect-query'; -import { JobStatus } from '@neosync/sdk'; -import { getJobs, getJobStatuses } from '@neosync/sdk/connectquery'; +import { JobService, JobStatus } from '@neosync/sdk'; import { PlusIcon } from '@radix-ui/react-icons'; import NextLink from 'next/link'; import { usePostHog } from 'posthog-js/react'; @@ -39,9 +38,13 @@ function JobTable(props: JobTableProps): ReactElement { isLoading, data, refetch: mutate, - } = useQuery(getJobs, { accountId: account?.id }, { enabled: !!account?.id }); + } = useQuery( + JobService.method.getJobs, + { accountId: account?.id }, + { enabled: !!account?.id } + ); const { data: statusData } = useQuery( - getJobStatuses, + JobService.method.getJobStatuses, { accountId: account?.id }, { enabled: !!account?.id } ); diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/util.ts b/frontend/apps/web/app/(mgmt)/[account]/jobs/util.ts index f1d6b1a6f7..e72731e1a9 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/util.ts +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/util.ts @@ -4,86 +4,106 @@ import { convertNanosecondsToMinutes, } from '@/util/util'; import { + convertJobMappingTransformerFormToJobMappingTransformer, + convertJobMappingTransformerToForm, DestinationOptionsFormValues, DynamoDBSourceUnmappedTransformConfigFormValues, JobMappingFormValues, NewDestinationFormValues, SchemaFormValues, SchemaFormValuesDestinationOptions, - VirtualForeignConstraintFormValues, - convertJobMappingTransformerFormToJobMappingTransformer, - convertJobMappingTransformerToForm, toJobSourcePostgresNewColumnAdditionStrategy, toNewColumnAdditionStrategy, + VirtualForeignConstraintFormValues, } from '@/yup-validations/jobs'; -import { Struct, Value } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; import { ActivityOptions, + ActivityOptionsSchema, AiGenerateSourceOptions, - AiGenerateSourceSchemaOption, - AiGenerateSourceTableOption, - AwsS3DestinationConnectionOptions, + AiGenerateSourceOptionsSchema, + AiGenerateSourceSchemaOptionSchema, + AiGenerateSourceTableOptionSchema, AwsS3DestinationConnectionOptions_StorageClass, - BatchConfig, + AwsS3DestinationConnectionOptionsSchema, + BatchConfigSchema, Connection, + CreateJobDestination, + CreateJobDestinationSchema, CreateJobRequest, - DatabaseTable, - DynamoDBDestinationConnectionOptions, - DynamoDBDestinationTableMapping, - DynamoDBSourceConnectionOptions, - DynamoDBSourceSchemaSubset, + CreateJobRequestSchema, + DatabaseTableSchema, + DynamoDBDestinationConnectionOptionsSchema, + DynamoDBDestinationTableMappingSchema, + DynamoDBSourceConnectionOptionsSchema, + DynamoDBSourceSchemaSubsetSchema, DynamoDBSourceTableOption, + DynamoDBSourceTableOptionSchema, DynamoDBSourceUnmappedTransformConfig, - GcpCloudStorageDestinationConnectionOptions, - GenerateBool, + DynamoDBSourceUnmappedTransformConfigSchema, + GcpCloudStorageDestinationConnectionOptionsSchema, + GenerateBoolSchema, GenerateSourceOptions, - GenerateSourceSchemaOption, - GenerateSourceTableOption, - GenerateString, + GenerateSourceOptionsSchema, + GenerateSourceSchemaOptionSchema, + GenerateSourceTableOptionSchema, + GenerateStringSchema, GetAiGeneratedDataRequest, + GetAiGeneratedDataRequestSchema, Job, JobDestination, JobDestinationOptions, + JobDestinationOptionsSchema, JobMapping, - JobMappingTransformer, + JobMappingSchema, + JobMappingTransformerSchema, JobSource, JobSourceOptions, + JobSourceOptionsSchema, + JobSourceSchema, JobSourceSqlSubetSchemas, - MongoDBDestinationConnectionOptions, - MongoDBSourceConnectionOptions, - MssqlDestinationConnectionOptions, - MssqlOnConflictConfig, - MssqlSourceConnectionOptions, + JobSourceSqlSubetSchemasSchema, + MongoDBDestinationConnectionOptionsSchema, + MongoDBSourceConnectionOptionsSchema, + MssqlDestinationConnectionOptionsSchema, + MssqlOnConflictConfigSchema, + MssqlSourceConnectionOptionsSchema, MssqlSourceSchemaOption, - MssqlSourceSchemaSubset, - MssqlSourceTableOption, - MssqlTruncateTableConfig, - MysqlDestinationConnectionOptions, - MysqlOnConflictConfig, - MysqlSourceConnectionOptions, + MssqlSourceSchemaOptionSchema, + MssqlSourceSchemaSubsetSchema, + MssqlSourceTableOptionSchema, + MssqlTruncateTableConfigSchema, + MysqlDestinationConnectionOptionsSchema, + MysqlOnConflictConfigSchema, + MysqlSourceConnectionOptionsSchema, MysqlSourceSchemaOption, - MysqlSourceSchemaSubset, - MysqlSourceTableOption, - MysqlTruncateTableConfig, - Passthrough, - PostgresDestinationConnectionOptions, - PostgresOnConflictConfig, - PostgresSourceConnectionOptions, + MysqlSourceSchemaOptionSchema, + MysqlSourceSchemaSubsetSchema, + MysqlSourceTableOptionSchema, + MysqlTruncateTableConfigSchema, + PassthroughSchema, + PostgresDestinationConnectionOptionsSchema, + PostgresOnConflictConfigSchema, + PostgresSourceConnectionOptionsSchema, PostgresSourceSchemaOption, - PostgresSourceSchemaSubset, - PostgresSourceTableOption, - PostgresTruncateTableConfig, - RetryPolicy, - TransformerConfig, + PostgresSourceSchemaOptionSchema, + PostgresSourceSchemaSubsetSchema, + PostgresSourceTableOptionSchema, + PostgresTruncateTableConfigSchema, + RetryPolicySchema, + TransformerConfigSchema, ValidateJobMappingsRequest, + ValidateJobMappingsRequestSchema, ValidateJobMappingsResponse, VirtualForeignConstraint, - VirtualForeignKey, + VirtualForeignConstraintSchema, + VirtualForeignKeySchema, WorkflowOptions, + WorkflowOptionsSchema, } from '@neosync/sdk'; import { ConnectionConfigCase } from '../connections/util'; import { - ActivityOptionsSchema, + ActivityOptionsFormValues, ConnectFormValues, CreateJobFormValues, CreateSingleTableAiGenerateJobFormValues, @@ -106,14 +126,14 @@ export function getCreateNewSingleTableAiGenerateJobRequest( accountId: string, getConnectionById: GetConnectionById ): CreateJobRequest { - return new CreateJobRequest({ + return create(CreateJobRequestSchema, { accountId, jobName: values.define.jobName, cronSchedule: values.define.cronSchedule, initiateJobRun: values.define.initiateJobRun, mappings: [], source: toSingleTableAiGenerateJobSource(values), - destinations: toSingleTableGenerateJobDestinations( + destinations: toSingleTableGenerateCreateJobDestinations( values, getConnectionById ), @@ -125,13 +145,13 @@ export function getCreateNewSingleTableAiGenerateJobRequest( export function getSampleAiGeneratedRecordsRequest( values: Pick ): GetAiGeneratedDataRequest { - return new GetAiGeneratedDataRequest({ + return create(GetAiGeneratedDataRequestSchema, { aiConnectionId: values.connect.sourceId, count: BigInt(10), modelName: values.schema.model, userPrompt: values.schema.userPrompt, dataConnectionId: values.connect.fkSourceConnectionId, - table: new DatabaseTable({ + table: create(DatabaseTableSchema, { schema: values.schema.schema, table: values.schema.table, }), @@ -140,13 +160,13 @@ export function getSampleAiGeneratedRecordsRequest( export function getSampleEditAiGeneratedRecordsRequest( values: SingleTableEditAiSourceFormValues ): GetAiGeneratedDataRequest { - return new GetAiGeneratedDataRequest({ + return create(GetAiGeneratedDataRequestSchema, { aiConnectionId: values.source.sourceId, count: BigInt(10), modelName: values.schema.model, userPrompt: values.schema.userPrompt, dataConnectionId: values.source.fkSourceConnectionId, - table: new DatabaseTable({ + table: create(DatabaseTableSchema, { schema: values.schema.schema, table: values.schema.table, }), @@ -158,14 +178,14 @@ export function getCreateNewSingleTableGenerateJobRequest( accountId: string, getConnectionById: GetConnectionById ): CreateJobRequest { - return new CreateJobRequest({ + return create(CreateJobRequestSchema, { accountId, jobName: values.define.jobName, cronSchedule: values.define.cronSchedule, initiateJobRun: values.define.initiateJobRun, mappings: toSingleGenerateJobMappings(values), source: toSingleTableGenerateJobSource(values), - destinations: toSingleTableGenerateJobDestinations( + destinations: toSingleTableGenerateCreateJobDestinations( values, getConnectionById ), @@ -174,47 +194,24 @@ export function getCreateNewSingleTableGenerateJobRequest( }); } -export function fromStructToRecord(struct: Struct): Record { - return Object.entries(struct.fields).reduce( - (output, [key, value]) => { - output[key] = handleValue(value); - return output; - }, - {} as Record - ); -} - -function handleValue(value: Value): unknown { - switch (value.kind.case) { - case 'structValue': { - return fromStructToRecord(value.kind.value); - } - case 'listValue': { - return value.kind.value.values.map((val) => handleValue(val)); - } - default: - return value.kind.value; - } -} - function toSingleTableAiGenerateJobSource( values: Pick ): JobSource { - return new JobSource({ - options: new JobSourceOptions({ + return create(JobSourceSchema, { + options: create(JobSourceOptionsSchema, { config: { case: 'aiGenerate', - value: new AiGenerateSourceOptions({ + value: create(AiGenerateSourceOptionsSchema, { aiConnectionId: values.connect.sourceId, modelName: values.schema.model, fkSourceConnectionId: values.connect.fkSourceConnectionId, userPrompt: values.schema.userPrompt, generateBatchSize: BigInt(values.schema.generateBatchSize), schemas: [ - new AiGenerateSourceSchemaOption({ + create(AiGenerateSourceSchemaOptionSchema, { schema: values.schema.schema, tables: [ - new AiGenerateSourceTableOption({ + create(AiGenerateSourceTableOptionSchema, { table: values.schema.table, rowCount: BigInt(values.schema.numRows), }), @@ -229,21 +226,21 @@ function toSingleTableAiGenerateJobSource( export function toSingleTableEditAiGenerateJobSource( values: SingleTableEditAiSourceFormValues ): JobSource { - return new JobSource({ - options: new JobSourceOptions({ + return create(JobSourceSchema, { + options: create(JobSourceOptionsSchema, { config: { case: 'aiGenerate', - value: new AiGenerateSourceOptions({ + value: create(AiGenerateSourceOptionsSchema, { aiConnectionId: values.source.sourceId, modelName: values.schema.model, fkSourceConnectionId: values.source.fkSourceConnectionId, userPrompt: values.schema.userPrompt, generateBatchSize: BigInt(values.schema.generateBatchSize), schemas: [ - new AiGenerateSourceSchemaOption({ + create(AiGenerateSourceSchemaOptionSchema, { schema: values.schema.schema, tables: [ - new AiGenerateSourceTableOption({ + create(AiGenerateSourceTableOptionSchema, { table: values.schema.table, rowCount: BigInt(values.schema.numRows), }), @@ -264,19 +261,19 @@ function toSingleTableGenerateJobSource( const table = values.schema.mappings.length > 0 ? values.schema.mappings[0].table : null; - return new JobSource({ - options: { + return create(JobSourceSchema, { + options: create(JobSourceOptionsSchema, { config: { case: 'generate', - value: new GenerateSourceOptions({ + value: create(GenerateSourceOptionsSchema, { fkSourceConnectionId: values.connect.fkSourceConnectionId, schemas: tableSchema && table ? [ - new GenerateSourceSchemaOption({ + create(GenerateSourceSchemaOptionSchema, { schema: tableSchema, tables: [ - new GenerateSourceTableOption({ + create(GenerateSourceTableOptionSchema, { rowCount: BigInt(values.schema.numRows), table: table, }), @@ -286,7 +283,7 @@ function toSingleTableGenerateJobSource( : [], }), }, - }, + }), }); } @@ -295,19 +292,19 @@ export function toSingleTableEditGenerateJobSource( ): JobSource { const schema = values.mappings.length > 0 ? values.mappings[0].schema : null; const table = values.mappings.length > 0 ? values.mappings[0].table : null; - return new JobSource({ - options: new JobSourceOptions({ + return create(JobSourceSchema, { + options: create(JobSourceOptionsSchema, { config: { case: 'generate', - value: new GenerateSourceOptions({ + value: create(GenerateSourceOptionsSchema, { fkSourceConnectionId: values.source.fkSourceConnectionId, schemas: schema && table ? [ - new GenerateSourceSchemaOption({ + create(GenerateSourceSchemaOptionSchema, { schema: schema, tables: [ - new GenerateSourceTableOption({ + create(GenerateSourceTableOptionSchema, { table: table, rowCount: BigInt(values.numRows), }), @@ -333,7 +330,7 @@ export function getCreateNewSyncJobRequest( }, {} as Record ); - return new CreateJobRequest({ + return create(CreateJobRequestSchema, { accountId, jobName: values.define.jobName, cronSchedule: values.define.cronSchedule, @@ -341,7 +338,7 @@ export function getCreateNewSyncJobRequest( mappings: toSyncJobMappings(values), virtualForeignKeys: toSyncVirtualForeignKeys(values), source: toJobSource(values, getConnectionById), - destinations: toSyncJobDestinations( + destinations: toSyncCreateJobDestinations( { connect: { ...values.connect, @@ -368,7 +365,7 @@ export function toWorkflowOptions( values?: WorkflowSettingsSchema ): WorkflowOptions | undefined { if (values?.runTimeout) { - return new WorkflowOptions({ + return create(WorkflowOptionsSchema, { runTimeout: convertMinutesToNanoseconds(values.runTimeout), }); } @@ -380,7 +377,7 @@ function toSyncOptions( ): ActivityOptions | undefined { if (values.define.syncActivityOptions) { const formSyncOpts = values.define.syncActivityOptions; - return new ActivityOptions({ + return create(ActivityOptionsSchema, { scheduleToCloseTimeout: formSyncOpts.scheduleToCloseTimeout !== undefined ? convertMinutesToNanoseconds(formSyncOpts.scheduleToCloseTimeout) @@ -389,7 +386,7 @@ function toSyncOptions( formSyncOpts.startToCloseTimeout !== undefined ? convertMinutesToNanoseconds(formSyncOpts.startToCloseTimeout) : undefined, - retryPolicy: new RetryPolicy({ + retryPolicy: create(RetryPolicySchema, { maximumAttempts: formSyncOpts.retryPolicy?.maximumAttempts, }), }); @@ -397,12 +394,12 @@ function toSyncOptions( return undefined; } -function toSingleTableGenerateJobDestinations( +function toSingleTableGenerateCreateJobDestinations( values: Pick, getConnectionById: GetConnectionById -): JobDestination[] { +): CreateJobDestination[] { return [ - new JobDestination({ + create(CreateJobDestinationSchema, { connectionId: values.connect.destination.connectionId, options: toJobDestinationOptions( values.connect.destination, @@ -412,12 +409,12 @@ function toSingleTableGenerateJobDestinations( ]; } -function toSyncJobDestinations( +function toSyncCreateJobDestinations( values: Pick, getConnectionById: GetConnectionById -): JobDestination[] { +): CreateJobDestination[] { return values.connect.destinations.map((d) => { - return new JobDestination({ + return create(CreateJobDestinationSchema, { connectionId: d.connectionId, options: toJobDestinationOptions(d, getConnectionById(d.connectionId)), }); @@ -429,22 +426,22 @@ export function toJobDestinationOptions( connection?: Connection ): JobDestinationOptions { if (!connection) { - return new JobDestinationOptions(); + return create(JobDestinationOptionsSchema, {}); } switch (connection.connectionConfig?.config.case) { case 'pgConfig': { - return new JobDestinationOptions({ + return create(JobDestinationOptionsSchema, { config: { case: 'postgresOptions', - value: new PostgresDestinationConnectionOptions({ - truncateTable: new PostgresTruncateTableConfig({ + value: create(PostgresDestinationConnectionOptionsSchema, { + truncateTable: create(PostgresTruncateTableConfigSchema, { truncateBeforeInsert: values.destinationOptions.postgres?.truncateBeforeInsert ?? false, cascade: values.destinationOptions.postgres?.truncateCascade ?? false, }), - onConflict: new PostgresOnConflictConfig({ + onConflict: create(PostgresOnConflictConfigSchema, { doNothing: values.destinationOptions.postgres?.onConflictDoNothing ?? false, @@ -454,7 +451,7 @@ export function toJobDestinationOptions( skipForeignKeyViolations: values.destinationOptions.postgres?.skipForeignKeyViolations, maxInFlight: values.destinationOptions.postgres?.maxInFlight, - batch: new BatchConfig({ + batch: create(BatchConfigSchema, { ...values.destinationOptions.postgres?.batch, }), }), @@ -462,15 +459,15 @@ export function toJobDestinationOptions( }); } case 'mysqlConfig': { - return new JobDestinationOptions({ + return create(JobDestinationOptionsSchema, { config: { case: 'mysqlOptions', - value: new MysqlDestinationConnectionOptions({ - truncateTable: new MysqlTruncateTableConfig({ + value: create(MysqlDestinationConnectionOptionsSchema, { + truncateTable: create(MysqlTruncateTableConfigSchema, { truncateBeforeInsert: values.destinationOptions.mysql?.truncateBeforeInsert ?? false, }), - onConflict: new MysqlOnConflictConfig({ + onConflict: create(MysqlOnConflictConfigSchema, { doNothing: values.destinationOptions.mysql?.onConflictDoNothing ?? false, }), @@ -478,7 +475,7 @@ export function toJobDestinationOptions( skipForeignKeyViolations: values.destinationOptions.mysql?.skipForeignKeyViolations, maxInFlight: values.destinationOptions.mysql?.maxInFlight, - batch: new BatchConfig({ + batch: create(BatchConfigSchema, { ...values.destinationOptions.mysql?.batch, }), }), @@ -486,14 +483,14 @@ export function toJobDestinationOptions( }); } case 'awsS3Config': { - return new JobDestinationOptions({ + return create(JobDestinationOptionsSchema, { config: { case: 'awsS3Options', - value: new AwsS3DestinationConnectionOptions({ + value: create(AwsS3DestinationConnectionOptionsSchema, { storageClass: values.destinationOptions.awss3?.storageClass, timeout: values.destinationOptions.awss3?.timeout, maxInFlight: values.destinationOptions.awss3?.maxInFlight, - batch: new BatchConfig({ + batch: create(BatchConfigSchema, { ...values.destinationOptions.awss3?.batch, }), }), @@ -501,48 +498,47 @@ export function toJobDestinationOptions( }); } case 'mongoConfig': { - return new JobDestinationOptions({ + return create(JobDestinationOptionsSchema, { config: { case: 'mongodbOptions', - value: new MongoDBDestinationConnectionOptions({}), + value: create(MongoDBDestinationConnectionOptionsSchema, {}), }, }); } case 'gcpCloudstorageConfig': { - return new JobDestinationOptions({ + return create(JobDestinationOptionsSchema, { config: { case: 'gcpCloudstorageOptions', - value: new GcpCloudStorageDestinationConnectionOptions({}), + value: create(GcpCloudStorageDestinationConnectionOptionsSchema, {}), }, }); } case 'dynamodbConfig': { - return new JobDestinationOptions({ + return create(JobDestinationOptionsSchema, { config: { case: 'dynamodbOptions', - value: new DynamoDBDestinationConnectionOptions({ + value: create(DynamoDBDestinationConnectionOptionsSchema, { tableMappings: - values.destinationOptions.dynamodb?.tableMappings.map( - (tm) => - new DynamoDBDestinationTableMapping({ - sourceTable: tm.sourceTable, - destinationTable: tm.destinationTable, - }) + values.destinationOptions.dynamodb?.tableMappings.map((tm) => + create(DynamoDBDestinationTableMappingSchema, { + sourceTable: tm.sourceTable, + destinationTable: tm.destinationTable, + }) ), }), }, }); } case 'mssqlConfig': { - return new JobDestinationOptions({ + return create(JobDestinationOptionsSchema, { config: { case: 'mssqlOptions', - value: new MssqlDestinationConnectionOptions({ - truncateTable: new MssqlTruncateTableConfig({ + value: create(MssqlDestinationConnectionOptionsSchema, { + truncateTable: create(MssqlTruncateTableConfigSchema, { truncateBeforeInsert: values.destinationOptions.mssql?.truncateBeforeInsert ?? false, }), - onConflict: new MssqlOnConflictConfig({ + onConflict: create(MssqlOnConflictConfigSchema, { doNothing: values.destinationOptions.mssql?.onConflictDoNothing ?? false, }), @@ -550,7 +546,7 @@ export function toJobDestinationOptions( skipForeignKeyViolations: values.destinationOptions.mssql?.skipForeignKeyViolations, maxInFlight: values.destinationOptions.mssql?.maxInFlight, - batch: new BatchConfig({ + batch: create(BatchConfigSchema, { ...values.destinationOptions.mssql?.batch, }), }), @@ -558,7 +554,7 @@ export function toJobDestinationOptions( }); } default: { - return new JobDestinationOptions(); + return create(JobDestinationOptionsSchema, {}); } } } @@ -567,7 +563,7 @@ function toSingleGenerateJobMappings( values: Pick ): JobMapping[] { return values.schema.mappings.map((m) => { - return new JobMapping({ + return create(JobMappingSchema, { schema: m.schema, table: m.table, column: m.column, @@ -582,7 +578,7 @@ function toSyncJobMappings( values: Pick ): JobMapping[] { return values.schema.mappings.map((m) => { - return new JobMapping({ + return create(JobMappingSchema, { schema: m.schema, table: m.table, column: m.column, @@ -598,11 +594,11 @@ function toSyncVirtualForeignKeys( ): VirtualForeignConstraint[] { return ( values.schema.virtualForeignKeys?.map((v) => { - return new VirtualForeignConstraint({ + return create(VirtualForeignConstraintSchema, { schema: v.schema, table: v.table, columns: v.columns, - foreignKey: new VirtualForeignKey({ + foreignKey: create(VirtualForeignKeySchema, { schema: v.foreignKey.schema, table: v.foreignKey.table, columns: v.foreignKey.columns, @@ -616,7 +612,7 @@ function toJobSource( values: Pick, getConnectionById: GetConnectionById ): JobSource { - return new JobSource({ + return create(JobSourceSchema, { options: toJobSourceOptions(values, getConnectionById), }); } @@ -627,14 +623,14 @@ function toJobSourceOptions( ): JobSourceOptions { const sourceConnection = getConnectionById(values.connect.sourceId); if (!sourceConnection) { - return new JobSourceOptions(); + return create(JobSourceOptionsSchema, {}); } switch (sourceConnection.connectionConfig?.config.case) { case 'pgConfig': - return new JobSourceOptions({ + return create(JobSourceOptionsSchema, { config: { case: 'postgres', - value: new PostgresSourceConnectionOptions({ + value: create(PostgresSourceConnectionOptionsSchema, { connectionId: values.connect.sourceId, newColumnAdditionStrategy: toJobSourcePostgresNewColumnAdditionStrategy( @@ -649,10 +645,10 @@ function toJobSourceOptions( }, }); case 'mysqlConfig': - return new JobSourceOptions({ + return create(JobSourceOptionsSchema, { config: { case: 'mysql', - value: new MysqlSourceConnectionOptions({ + value: create(MysqlSourceConnectionOptionsSchema, { connectionId: values.connect.sourceId, haltOnNewColumnAddition: values.connect.sourceOptions.mysql?.haltOnNewColumnAddition ?? @@ -666,19 +662,19 @@ function toJobSourceOptions( }, }); case 'mongoConfig': - return new JobSourceOptions({ + return create(JobSourceOptionsSchema, { config: { case: 'mongodb', - value: new MongoDBSourceConnectionOptions({ + value: create(MongoDBSourceConnectionOptionsSchema, { connectionId: values.connect.sourceId, }), }, }); case 'dynamodbConfig': { - return new JobSourceOptions({ + return create(JobSourceOptionsSchema, { config: { case: 'dynamodb', - value: new DynamoDBSourceConnectionOptions({ + value: create(DynamoDBSourceConnectionOptionsSchema, { connectionId: values.connect.sourceId, tables: toDynamoDbSourceTableOptions(values.subset?.subsets ?? []), unmappedTransforms: toDynamoDbSourceUnmappedOptions( @@ -693,10 +689,10 @@ function toJobSourceOptions( }); } case 'mssqlConfig': { - return new JobSourceOptions({ + return create(JobSourceOptionsSchema, { config: { case: 'mssql', - value: new MssqlSourceConnectionOptions({ + value: create(MssqlSourceConnectionOptionsSchema, { connectionId: values.connect.sourceId, haltOnNewColumnAddition: values.connect.sourceOptions.mssql?.haltOnNewColumnAddition ?? @@ -718,41 +714,44 @@ function toJobSourceOptions( export function getDefaultUnmappedTransformConfig(): DynamoDBSourceUnmappedTransformConfigFormValues { return { boolean: convertJobMappingTransformerToForm( - new JobMappingTransformer({ - config: new TransformerConfig({ + create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'generateBoolConfig', - value: new GenerateBool(), + value: create(GenerateBoolSchema, {}), }, }), }) ), byte: convertJobMappingTransformerToForm( - new JobMappingTransformer({ - config: new TransformerConfig({ + create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'passthroughConfig', - value: new Passthrough(), + value: create(PassthroughSchema, {}), }, }), }) ), n: convertJobMappingTransformerToForm( - new JobMappingTransformer({ - config: new TransformerConfig({ + create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'passthroughConfig', - value: new Passthrough(), + value: create(PassthroughSchema, {}), }, }), }) ), s: convertJobMappingTransformerToForm( - new JobMappingTransformer({ - config: new TransformerConfig({ + create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'generateStringConfig', - value: new GenerateString({ min: BigInt(1), max: BigInt(100) }), + value: create(GenerateStringSchema, { + min: BigInt(1), + max: BigInt(100), + }), }, }), }) @@ -766,13 +765,13 @@ function toPostgresSourceSchemaOptions( const schemaMap = subsets.reduce( (map, subset) => { if (!map[subset.schema]) { - map[subset.schema] = new PostgresSourceSchemaOption({ + map[subset.schema] = create(PostgresSourceSchemaOptionSchema, { schema: subset.schema, tables: [], }); } map[subset.schema].tables.push( - new PostgresSourceTableOption({ + create(PostgresSourceTableOptionSchema, { table: subset.table, whereClause: subset.whereClause, }) @@ -790,13 +789,13 @@ function toMysqlSourceSchemaOptions( const schemaMap = subsets.reduce( (map, subset) => { if (!map[subset.schema]) { - map[subset.schema] = new MysqlSourceSchemaOption({ + map[subset.schema] = create(MysqlSourceSchemaOptionSchema, { schema: subset.schema, tables: [], }); } map[subset.schema].tables.push( - new MysqlSourceTableOption({ + create(MysqlSourceTableOptionSchema, { table: subset.table, whereClause: subset.whereClause, }) @@ -814,13 +813,13 @@ function toMssqlSourceSchemaOptions( const schemaMap = subsets.reduce( (map, subset) => { if (!map[subset.schema]) { - map[subset.schema] = new MssqlSourceSchemaOption({ + map[subset.schema] = create(MssqlSourceSchemaOptionSchema, { schema: subset.schema, tables: [], }); } map[subset.schema].tables.push( - new MssqlSourceTableOption({ + create(MssqlSourceTableOptionSchema, { table: subset.table, whereClause: subset.whereClause, }) @@ -835,19 +834,18 @@ function toMssqlSourceSchemaOptions( function toDynamoDbSourceTableOptions( subsets: SubsetFormValues['subsets'] ): DynamoDBSourceTableOption[] { - return subsets.map( - (ss) => - new DynamoDBSourceTableOption({ - table: ss.table, - whereClause: ss.whereClause, - }) + return subsets.map((ss) => + create(DynamoDBSourceTableOptionSchema, { + table: ss.table, + whereClause: ss.whereClause, + }) ); } function toDynamoDbSourceUnmappedOptions( unmappedTransformConfig: DynamoDBSourceUnmappedTransformConfigFormValues ): DynamoDBSourceUnmappedTransformConfig { - return new DynamoDBSourceUnmappedTransformConfig({ + return create(DynamoDBSourceUnmappedTransformConfigSchema, { b: convertJobMappingTransformerFormToJobMappingTransformer( unmappedTransformConfig.byte ), @@ -872,44 +870,47 @@ export function toDynamoDbSourceUnmappedOptionsFormValues( return { boolean: convertJobMappingTransformerToForm( ut.boolean || - new JobMappingTransformer({ - config: new TransformerConfig({ + create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'generateBoolConfig', - value: new GenerateBool(), + value: create(GenerateBoolSchema, {}), }, }), }) ), byte: convertJobMappingTransformerToForm( ut.b || - new JobMappingTransformer({ - config: new TransformerConfig({ + create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'passthroughConfig', - value: new Passthrough(), + value: create(PassthroughSchema, {}), }, }), }) ), n: convertJobMappingTransformerToForm( ut.n || - new JobMappingTransformer({ - config: new TransformerConfig({ + create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'passthroughConfig', - value: new Passthrough(), + value: create(PassthroughSchema, {}), }, }), }) ), s: convertJobMappingTransformerToForm( ut.s || - new JobMappingTransformer({ - config: new TransformerConfig({ + create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'generateStringConfig', - value: new GenerateString({ min: BigInt(1), max: BigInt(100) }), + value: create(GenerateStringSchema, { + min: BigInt(1), + max: BigInt(100), + }), }, }), }) @@ -918,9 +919,9 @@ export function toDynamoDbSourceUnmappedOptionsFormValues( } export function toActivityOptions( - values: ActivityOptionsSchema + values: ActivityOptionsFormValues ): ActivityOptions { - return new ActivityOptions({ + return create(ActivityOptionsSchema, { startToCloseTimeout: values.startToCloseTimeout !== undefined && values.startToCloseTimeout > 0 ? convertMinutesToNanoseconds(values.startToCloseTimeout) @@ -930,9 +931,11 @@ export function toActivityOptions( values.scheduleToCloseTimeout > 0 ? convertMinutesToNanoseconds(values.scheduleToCloseTimeout) : undefined, - retryPolicy: new RetryPolicy({ - maximumAttempts: values.retryPolicy?.maximumAttempts, - }), + retryPolicy: values.retryPolicy + ? create(RetryPolicySchema, { + maximumAttempts: values.retryPolicy.maximumAttempts, + }) + : undefined, }); } @@ -942,47 +945,47 @@ export function toJobSourceSqlSubsetSchemas( ): JobSourceSqlSubetSchemas { switch (dbType) { case 'mysqlConfig': { - return new JobSourceSqlSubetSchemas({ + return create(JobSourceSqlSubetSchemasSchema, { schemas: { case: 'mysqlSubset', - value: new MysqlSourceSchemaSubset({ + value: create(MysqlSourceSchemaSubsetSchema, { mysqlSchemas: toMysqlSourceSchemaOptions(values.subsets), }), }, }); } case 'pgConfig': { - return new JobSourceSqlSubetSchemas({ + return create(JobSourceSqlSubetSchemasSchema, { schemas: { case: 'postgresSubset', - value: new PostgresSourceSchemaSubset({ + value: create(PostgresSourceSchemaSubsetSchema, { postgresSchemas: toPostgresSourceSchemaOptions(values.subsets), }), }, }); } case 'dynamodbConfig': { - return new JobSourceSqlSubetSchemas({ + return create(JobSourceSqlSubetSchemasSchema, { schemas: { case: 'dynamodbSubset', - value: new DynamoDBSourceSchemaSubset({ + value: create(DynamoDBSourceSchemaSubsetSchema, { tables: toDynamoDbSourceTableOptions(values.subsets), }), }, }); } case 'mssqlConfig': { - return new JobSourceSqlSubetSchemas({ + return create(JobSourceSqlSubetSchemasSchema, { schemas: { case: 'mssqlSubset', - value: new MssqlSourceSchemaSubset({ + value: create(MssqlSourceSchemaSubsetSchema, { mssqlSchemas: toMssqlSourceSchemaOptions(values.subsets), }), }, }); } default: { - return new JobSourceSqlSubetSchemas(); + return create(JobSourceSqlSubetSchemasSchema, {}); } } } @@ -1224,7 +1227,9 @@ function setDefaultSchemaFormValues( ...mapping, transformer: mapping.transformer ? convertJobMappingTransformerToForm(mapping.transformer) - : convertJobMappingTransformerToForm(new JobMappingTransformer()), + : convertJobMappingTransformerToForm( + create(JobMappingTransformerSchema, {}) + ), }; }), }; @@ -1244,7 +1249,9 @@ function setDefaultSchemaFormValues( ...mapping, transformer: mapping.transformer ? convertJobMappingTransformerToForm(mapping.transformer) - : convertJobMappingTransformerToForm(new JobMappingTransformer()), + : convertJobMappingTransformerToForm( + create(JobMappingTransformerSchema, {}) + ), }; }), virtualForeignKeys: job.virtualForeignKeys.map((v) => { @@ -1286,7 +1293,9 @@ function setDefaultSchemaFormValues( ...mapping, transformer: mapping.transformer ? convertJobMappingTransformerToForm(mapping.transformer) - : convertJobMappingTransformerToForm(new JobMappingTransformer()), + : convertJobMappingTransformerToForm( + create(JobMappingTransformerSchema, {}) + ), }; }), virtualForeignKeys: job.virtualForeignKeys.map((v) => { @@ -1639,10 +1648,10 @@ export async function validateJobMapping( req: ValidateJobMappingsRequest ) => Promise ): Promise { - const body = new ValidateJobMappingsRequest({ + const body = create(ValidateJobMappingsRequestSchema, { accountId, mappings: formMappings.map((m) => { - return new JobMapping({ + return create(JobMappingSchema, { schema: m.schema, table: m.table, column: m.column, @@ -1650,8 +1659,8 @@ export async function validateJobMapping( ? convertJobMappingTransformerFormToJobMappingTransformer( m.transformer ) - : new JobMappingTransformer({ - config: new TransformerConfig({ + : create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'passthroughConfig', value: {}, @@ -1661,11 +1670,11 @@ export async function validateJobMapping( }); }), virtualForeignKeys: virtualForeignKeys.map((v) => { - return new VirtualForeignConstraint({ + return create(VirtualForeignConstraintSchema, { schema: v.schema, table: v.table, columns: v.columns, - foreignKey: new VirtualForeignKey({ + foreignKey: create(VirtualForeignKeySchema, { schema: v.foreignKey.schema, table: v.foreignKey.table, columns: v.foreignKey.columns, diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/api-key/NewApiKeyForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/api-key/NewApiKeyForm.tsx index e4c5a4549c..f928462b91 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/api-key/NewApiKeyForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/api-key/NewApiKeyForm.tsx @@ -26,10 +26,10 @@ import { import { cn } from '@/libs/utils'; import { getErrorMessage } from '@/util/util'; import { ApiKeyFormValues } from '@/yup-validations/apikey'; -import { Timestamp } from '@bufbuild/protobuf'; +import { timestampFromMs } from '@bufbuild/protobuf/wkt'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { createAccountApiKey } from '@neosync/sdk/connectquery'; +import { ApiKeyService } from '@neosync/sdk'; import { CalendarIcon } from '@radix-ui/react-icons'; import { PopoverTrigger } from '@radix-ui/react-popover'; import { addDays } from 'date-fns'; @@ -56,7 +56,7 @@ export default function NewApiKeyForm(): ReactElement { }, }); const posthog = usePostHog(); - const { mutateAsync } = useMutation(createAccountApiKey); + const { mutateAsync } = useMutation(ApiKeyService.method.createAccountApiKey); async function onSubmit(values: ApiKeyFormValues): Promise { if (!account) { @@ -65,9 +65,7 @@ export default function NewApiKeyForm(): ReactElement { try { const apiKey = await mutateAsync({ accountId: account.id, - expiresAt: new Timestamp({ - seconds: BigInt(values.expiresAt.getTime() / 1000), - }), + expiresAt: timestampFromMs(values.expiresAt.getTime()), name: values.name, }); if (apiKey.apiKey?.id) { diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/connection/aws-s3/AwsS3Form.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/connection/aws-s3/AwsS3Form.tsx index 9b175dcb24..4f47340bdc 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/connection/aws-s3/AwsS3Form.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/connection/aws-s3/AwsS3Form.tsx @@ -2,6 +2,7 @@ import ButtonText from '@/components/ButtonText'; import { PasswordInput } from '@/components/PasswordComponent'; import Spinner from '@/components/Spinner'; +import SystemLicenseAlert from '@/components/SystemLicenseAlert'; import RequiredLabel from '@/components/labels/RequiredLabel'; import { useAccount } from '@/components/providers/account-provider'; import SkeletonForm from '@/components/skeleton/SkeletonForm'; @@ -20,18 +21,21 @@ import { import { Input } from '@/components/ui/input'; import { getErrorMessage } from '@/util/util'; import { - AWSFormValues, - AWS_FORM_SCHEMA, + AwsFormValues, CreateConnectionFormContext, } from '@/yup-validations/connections'; -import { createConnectQueryKey, useMutation } from '@connectrpc/connect-query'; +import { create } from '@bufbuild/protobuf'; +import { + createConnectQueryKey, + useMutation, + useQuery, +} from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { GetConnectionResponse } from '@neosync/sdk'; import { - createConnection, - getConnection, - isConnectionNameAvailable, -} from '@neosync/sdk/connectquery'; + ConnectionService, + GetConnectionResponseSchema, + UserAccountService, +} from '@neosync/sdk'; import { useQueryClient } from '@tanstack/react-query'; import { useRouter, useSearchParams } from 'next/navigation'; import { useEffect, useState } from 'react'; @@ -47,10 +51,10 @@ export default function AwsS3Form() { const [isLoading, setIsLoading] = useState(); const queryclient = useQueryClient(); const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( - isConnectionNameAvailable + ConnectionService.method.isConnectionNameAvailable ); - const form = useForm({ - resolver: yupResolver(AWS_FORM_SCHEMA), + const form = useForm({ + resolver: yupResolver(AwsFormValues), defaultValues: { connectionName: '', s3: { @@ -63,10 +67,17 @@ export default function AwsS3Form() { }, }); const router = useRouter(); - const { mutateAsync: createAwsS3Connection } = useMutation(createConnection); - const { mutateAsync: getAwsS3Connection } = useMutation(getConnection); + const { mutateAsync: createAwsS3Connection } = useMutation( + ConnectionService.method.createConnection + ); + const { mutateAsync: getAwsS3Connection } = useMutation( + ConnectionService.method.getConnection + ); + const { data: systemInfo, isLoading: isSystemInfoLoading } = useQuery( + UserAccountService.method.getSystemInformation + ); - async function onSubmit(values: AWSFormValues) { + async function onSubmit(values: AwsFormValues) { if (!account) { return; } @@ -82,10 +93,12 @@ export default function AwsS3Form() { router.push(returnTo); } else if (connection.connection?.id) { queryclient.setQueryData( - createConnectQueryKey(getConnection, { - id: connection.connection.id, + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id: connection.connection.id }, + cardinality: undefined, }), - new GetConnectionResponse({ + create(GetConnectionResponseSchema, { connection: connection.connection, }) ); @@ -153,9 +166,12 @@ the hook in the useEffect conditionally. This is used to retrieve the values for fetchData(); }, [account?.id]); - if (isLoading || !account?.id) { + if (isLoading || !account?.id || isSystemInfoLoading) { return ; } + if (!systemInfo?.license?.isValid) { + return ; + } return ( diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/connection/components/ConnectionCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/connection/components/ConnectionCard.tsx index ea499cf28d..9c3ad7c5da 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/connection/components/ConnectionCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/connection/components/ConnectionCard.tsx @@ -8,6 +8,9 @@ import { CardHeader, CardTitle, } from '@/components/ui/card'; +import { cn } from '@/libs/utils'; +import { useQuery } from '@connectrpc/connect-query'; +import { UserAccountService } from '@neosync/sdk'; import { useRouter, useSearchParams } from 'next/navigation'; import { ReactElement } from 'react'; import { ConnectionMeta } from '../../../connections/util'; @@ -21,16 +24,29 @@ export default function ConnectionCard(props: Props): ReactElement { const router = useRouter(); const { account } = useAccount(); const searchParams = useSearchParams(); + const { data: systemInfo } = useQuery( + UserAccountService.method.getSystemInformation + ); + const hasValidLicense = systemInfo?.license?.isValid ?? false; + const isClickable = + !connection.isLicenseOnly || (connection.isLicenseOnly && hasValidLicense); return ( + onClick={() => { + if (!isClickable) { + return; + } router.push( `/${account?.name}/new/connection/${ connection.urlSlug }?${searchParams.toString()}` - ) - } - className="cursor-pointer hover:border hover:border-gray-500 dark:border-gray-700 dark:hover:border-gray-600" + ); + }} + className={cn( + 'cursor-pointer hover:border hover:border-gray-500 dark:border-gray-700 dark:hover:border-gray-600', + !isClickable && 'opacity-50', + !isClickable && 'cursor-not-allowed' + )} > @@ -41,6 +57,7 @@ export default function ConnectionCard(props: Props): ReactElement { />

{connection.name}

{connection.isExperimental ? Experimental : null} + {connection.isLicenseOnly ? Enterprise : null}
{connection.description} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/connection/dynamodb/DynamoDBForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/connection/dynamodb/DynamoDBForm.tsx index 4e757be92f..1f2e5742d7 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/connection/dynamodb/DynamoDBForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/connection/dynamodb/DynamoDBForm.tsx @@ -31,18 +31,15 @@ import { CreateConnectionFormContext, DynamoDbFormValues, } from '@/yup-validations/connections'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { CheckConnectionConfigResponse, - GetConnectionResponse, + CheckConnectionConfigResponseSchema, + ConnectionService, + GetConnectionResponseSchema, } from '@neosync/sdk'; -import { - checkConnectionConfig, - createConnection, - getConnection, - isConnectionNameAvailable, -} from '@neosync/sdk/connectquery'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { useQueryClient } from '@tanstack/react-query'; import { useRouter, useSearchParams } from 'next/navigation'; @@ -60,7 +57,7 @@ export default function NewDynamoDBForm(): ReactElement { const [isLoading, setIsLoading] = useState(); const queryclient = useQueryClient(); const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( - isConnectionNameAvailable + ConnectionService.method.isConnectionNameAvailable ); const form = useForm({ resolver: yupResolver(DynamoDbFormValues), @@ -97,9 +94,15 @@ export default function NewDynamoDBForm(): ReactElement { useState(false); const [isSubmitting, setIsSubmitting] = useState(); const posthog = usePostHog(); - const { mutateAsync: createDbConnection } = useMutation(createConnection); - const { mutateAsync: checkDbConnection } = useMutation(checkConnectionConfig); - const { mutateAsync: getDbConnection } = useMutation(getConnection); + const { mutateAsync: createDbConnection } = useMutation( + ConnectionService.method.createConnection + ); + const { mutateAsync: checkDbConnection } = useMutation( + ConnectionService.method.checkConnectionConfig + ); + const { mutateAsync: getDbConnection } = useMutation( + ConnectionService.method.getConnection + ); useEffect(() => { const fetchData = async () => { @@ -167,10 +170,12 @@ export default function NewDynamoDBForm(): ReactElement { router.push(returnTo); } else if (newConnection.connection?.id) { queryclient.setQueryData( - createConnectQueryKey(getConnection, { - id: newConnection.connection.id, + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id: newConnection.connection.id }, + cardinality: undefined, }), - new GetConnectionResponse({ + create(GetConnectionResponseSchema, { connection: newConnection.connection, }) ); @@ -202,7 +207,7 @@ export default function NewDynamoDBForm(): ReactElement { setOpenPermissionDialog(!!res.isConnected); } catch (err) { setValidationResponse( - new CheckConnectionConfigResponse({ + create(CheckConnectionConfigResponseSchema, { isConnected: false, connectionError: err instanceof Error ? err.message : 'unknown error', }) @@ -419,7 +424,8 @@ export default function NewDynamoDBForm(): ReactElement { ({ resolver: yupResolver(GcpCloudStorageFormValues), @@ -68,10 +73,12 @@ export default function GcpCloudStorageForm(): ReactElement { const router = useRouter(); const [isSubmitting, setIsSubmitting] = useState(false); const posthog = usePostHog(); - const { mutateAsync: createGcpCloudStorageConnection } = - useMutation(createConnection); - const { mutateAsync: getGcpCloudStorageConnection } = - useMutation(getConnection); + const { mutateAsync: createGcpCloudStorageConnection } = useMutation( + ConnectionService.method.createConnection + ); + const { mutateAsync: getGcpCloudStorageConnection } = useMutation( + ConnectionService.method.getConnection + ); const queryclient = useQueryClient(); async function onSubmit(values: GcpCloudStorageFormValues) { @@ -92,10 +99,12 @@ export default function GcpCloudStorageForm(): ReactElement { router.push(returnTo); } else if (newConnection.connection?.id) { queryclient.setQueryData( - createConnectQueryKey(getConnection, { - id: newConnection.connection.id, + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id: newConnection.connection.id }, + cardinality: undefined, }), - new GetConnectionResponse({ + create(GetConnectionResponseSchema, { connection: newConnection.connection, }) ); @@ -153,12 +162,24 @@ export default function GcpCloudStorageForm(): ReactElement { fetchData(); }, [account?.id]); - if (isLoading || !account?.id || isSystemAppConfigLoading) { + const { data: systemInfo, isLoading: isSystemInfoLoading } = useQuery( + UserAccountService.method.getSystemInformation + ); + + if ( + isLoading || + !account?.id || + isSystemAppConfigLoading || + isSystemInfoLoading + ) { return ; } if (!systemAppConfig?.isGcpCloudStorageConnectionsEnabled) { return ; } + if (!systemInfo?.license?.isValid) { + return ; + } return ( diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/connection/mongodb/MongoDBForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/connection/mongodb/MongoDBForm.tsx index 978bb97086..b28e12e2a9 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/connection/mongodb/MongoDBForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/connection/mongodb/MongoDBForm.tsx @@ -29,18 +29,15 @@ import { CreateConnectionFormContext, MongoDbFormValues, } from '@/yup-validations/connections'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { CheckConnectionConfigResponse, - GetConnectionResponse, + CheckConnectionConfigResponseSchema, + ConnectionService, + GetConnectionResponseSchema, } from '@neosync/sdk'; -import { - checkConnectionConfig, - createConnection, - getConnection, - isConnectionNameAvailable, -} from '@neosync/sdk/connectquery'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { useQueryClient } from '@tanstack/react-query'; import { useRouter, useSearchParams } from 'next/navigation'; @@ -57,7 +54,7 @@ export default function MongoDBForm(): ReactElement { const [isLoading, setIsLoading] = useState(); const queryclient = useQueryClient(); const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( - isConnectionNameAvailable + ConnectionService.method.isConnectionNameAvailable ); const form = useForm({ resolver: yupResolver(MongoDbFormValues), @@ -88,12 +85,15 @@ export default function MongoDBForm(): ReactElement { useState(false); const [isSubmitting, setIsSubmitting] = useState(); const posthog = usePostHog(); - const { mutateAsync: createMongoDbConnection } = - useMutation(createConnection); + const { mutateAsync: createMongoDbConnection } = useMutation( + ConnectionService.method.createConnection + ); const { mutateAsync: checkMongoDbConnection } = useMutation( - checkConnectionConfig + ConnectionService.method.checkConnectionConfig + ); + const { mutateAsync: getMongoDbConnection } = useMutation( + ConnectionService.method.getConnection ); - const { mutateAsync: getMongoDbConnection } = useMutation(getConnection); useEffect(() => { const fetchData = async () => { @@ -154,10 +154,12 @@ export default function MongoDBForm(): ReactElement { router.push(returnTo); } else if (newConnection.connection?.id) { queryclient.setQueryData( - createConnectQueryKey(getConnection, { - id: newConnection.connection.id, + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id: newConnection.connection.id }, + cardinality: undefined, }), - new GetConnectionResponse({ + create(GetConnectionResponseSchema, { connection: newConnection.connection, }) ); @@ -189,7 +191,7 @@ export default function MongoDBForm(): ReactElement { setOpenPermissionDialog(!!res.isConnected); } catch (err) { setValidationResponse( - new CheckConnectionConfigResponse({ + create(CheckConnectionConfigResponseSchema, { isConnected: false, connectionError: err instanceof Error ? err.message : 'unknown error', }) @@ -330,7 +332,8 @@ export default function MongoDBForm(): ReactElement { (); const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( - isConnectionNameAvailable + ConnectionService.method.isConnectionNameAvailable ); const form = useForm({ resolver: yupResolver(MssqlFormValues), @@ -101,11 +98,15 @@ export default function MssqlForm() { const [openPermissionDialog, setOpenPermissionDialog] = useState(false); const posthog = usePostHog(); - const { mutateAsync: createMssqlConnection } = useMutation(createConnection); + const { mutateAsync: createMssqlConnection } = useMutation( + ConnectionService.method.createConnection + ); const { mutateAsync: checkMssqlConnection } = useMutation( - checkConnectionConfig + ConnectionService.method.checkConnectionConfig + ); + const { mutateAsync: getMssqlConnection } = useMutation( + ConnectionService.method.getConnection ); - const { mutateAsync: getMssqlConnection } = useMutation(getConnection); const queryclient = useQueryClient(); async function onSubmit(values: MssqlFormValues) { if (!account) { @@ -124,10 +125,12 @@ export default function MssqlForm() { router.push(returnTo); } else if (connection.connection?.id) { queryclient.setQueryData( - createConnectQueryKey(getConnection, { - id: connection.connection.id, + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id: connection.connection.id }, + cardinality: undefined, }), - new GetConnectionResponse({ + create(GetConnectionResponseSchema, { connection: connection.connection, }) ); @@ -622,7 +625,8 @@ the hook in the useEffect conditionally. This is used to retrieve the values for ('url'); const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( - isConnectionNameAvailable + ConnectionService.method.isConnectionNameAvailable ); const form = useForm({ resolver: yupResolver(MysqlFormValues), @@ -123,11 +120,15 @@ export default function MysqlForm() { const [openPermissionDialog, setOpenPermissionDialog] = useState(false); const posthog = usePostHog(); - const { mutateAsync: createMysqlConnection } = useMutation(createConnection); + const { mutateAsync: createMysqlConnection } = useMutation( + ConnectionService.method.createConnection + ); const { mutateAsync: checkMysqlConnection } = useMutation( - checkConnectionConfig + ConnectionService.method.checkConnectionConfig + ); + const { mutateAsync: getMysqlConnection } = useMutation( + ConnectionService.method.getConnection ); - const { mutateAsync: getMysqlConnection } = useMutation(getConnection); const queryclient = useQueryClient(); async function onSubmit(values: MysqlFormValues) { if (!account) { @@ -150,10 +151,12 @@ export default function MysqlForm() { router.push(returnTo); } else if (connection.connection?.id) { queryclient.setQueryData( - createConnectQueryKey(getConnection, { - id: connection.connection.id, + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id: connection.connection.id }, + cardinality: undefined, }), - new GetConnectionResponse({ + create(GetConnectionResponseSchema, { connection: connection.connection, }) ); @@ -820,7 +823,8 @@ the hook in the useEffect conditionally. This is used to retrieve the values for (false); const router = useRouter(); const posthog = usePostHog(); - const { mutateAsync: createOpenAiConnection } = useMutation(createConnection); + const { mutateAsync: createOpenAiConnection } = useMutation( + ConnectionService.method.createConnection + ); const queryclient = useQueryClient(); - const { mutateAsync: getOpenAiConnection } = useMutation(getConnection); + const { mutateAsync: getOpenAiConnection } = useMutation( + ConnectionService.method.getConnection + ); const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( - isConnectionNameAvailable + ConnectionService.method.isConnectionNameAvailable ); const form = useForm({ resolver: yupResolver(OpenAiFormValues), @@ -82,10 +82,14 @@ export default function OpenAiForm(props: Props): ReactElement { }); toast.success('Successfully created OpenAI Connection!'); queryclient.setQueryData( - createConnectQueryKey(getConnection, { - id: connectionResp.connection?.id, + createConnectQueryKey({ + schema: ConnectionService.method.getConnection, + input: { id: connectionResp.connection?.id }, + cardinality: undefined, }), - new GetConnectionResponse({ connection: connectionResp.connection }) + create(GetConnectionResponseSchema, { + connection: connectionResp.connection, + }) ); posthog.capture('New Connection Created', { type: 'openai' }); diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/connection/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/connection/page.tsx index bf5e32cabc..d2eb290186 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/connection/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/connection/page.tsx @@ -1,23 +1,16 @@ 'use client'; import OverviewContainer from '@/components/containers/OverviewContainer'; import PageHeader from '@/components/headers/PageHeader'; -import { useGetSystemAppConfig } from '@/libs/hooks/useGetSystemAppConfig'; import { useSearchParams } from 'next/navigation'; import { ReactElement } from 'react'; -import { getConnectionsMetadata } from '../../connections/util'; +import { useGetConnectionsMetadata } from '../../connections/util'; import ConnectionCard from './components/ConnectionCard'; export default function NewConnectionPage(): ReactElement { const searchParams = useSearchParams(); - const { data: systemAppConfigData } = useGetSystemAppConfig(); const connectionTypes = new Set(searchParams.getAll('connectionType')); - const connections = getConnectionsMetadata( - connectionTypes, - systemAppConfigData?.isGcpCloudStorageConnectionsEnabled ?? false, - systemAppConfigData?.isDynamoDbConnectionsEnabled ?? false, - systemAppConfigData?.isMsSqlServerEnabled ?? false - ); + const connections = useGetConnectionsMetadata(connectionTypes); return ( (); const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( - isConnectionNameAvailable + ConnectionService.method.isConnectionNameAvailable ); // used to know which tab - host or url that the user is on when we submit the form @@ -114,12 +113,15 @@ export default function PostgresForm() { }, } ); - const { mutateAsync: createPostgresConnection } = - useMutation(createConnection); + const { mutateAsync: createPostgresConnection } = useMutation( + ConnectionService.method.createConnection + ); const { mutateAsync: checkPostgresConnection } = useMutation( - checkConnectionConfig + ConnectionService.method.checkConnectionConfig + ); + const { mutateAsync: getPostgresConnection } = useMutation( + ConnectionService.method.getConnection ); - const { mutateAsync: getPostgresConnection } = useMutation(getConnection); const router = useRouter(); const [validationResponse, setValidationResponse] = useState< @@ -810,7 +812,8 @@ the hook in the useEffect conditionally. This is used to retrieve the values for (FormValues), @@ -117,7 +120,7 @@ export default function Page({ params }: PageProps): ReactElement { .filter((conn) => !!conn && isDynamoDBConnection(conn)); const { data: destinationConnectionSchemaMapsResp } = useQuery( - getConnectionSchemaMaps, + ConnectionDataService.method.getConnectionSchemaMaps, { requests: newDynamoDestConnections.map((conn) => ({ connectionId: conn.id, @@ -132,7 +135,7 @@ export default function Page({ params }: PageProps): ReactElement { const job = await createJobConnections({ jobId: id, destinations: values.destinations.map((d) => { - return new JobDestination({ + return create(CreateJobDestinationSchema, { connectionId: d.connectionId, options: toJobDestinationOptions(d, connMap.get(d.connectionId)), }); @@ -269,7 +272,7 @@ export default function Page({ params }: PageProps): ReactElement { }} hideDynamoDbTableMappings={ !isDynamoDBConnection( - destConnection ?? new Connection() + destConnection ?? create(ConnectionSchema, {}) ) } destinationDetailsRecord={getDestinationDetailsRecord( @@ -279,7 +282,7 @@ export default function Page({ params }: PageProps): ReactElement { })), connRecord, destinationConnectionSchemaMapsResp ?? - new GetConnectionSchemaMapsResponse() + create(GetConnectionSchemaMapsResponseSchema, {}) )} errors={destinationsErrors[index]?.destinationOptions} /> diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/job/aigenerate/single/connect/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/job/aigenerate/single/connect/page.tsx index 2f41b7b098..367cf4096a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/job/aigenerate/single/connect/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/job/aigenerate/single/connect/page.tsx @@ -27,10 +27,10 @@ import { import { Separator } from '@/components/ui/separator'; import { Skeleton } from '@/components/ui/skeleton'; import { getSingleOrUndefined, splitConnections } from '@/libs/utils'; +import { create } from '@bufbuild/protobuf'; import { useQuery } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { ConnectionConfig } from '@neosync/sdk'; -import { getConnections } from '@neosync/sdk/connectquery'; +import { ConnectionConfigSchema, ConnectionService } from '@neosync/sdk'; import { useRouter } from 'next/navigation'; import { usePostHog } from 'posthog-js/react'; import { ReactElement, useEffect } from 'react'; @@ -76,7 +76,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { }); const { isLoading: isConnectionsLoading, data: connectionsData } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); @@ -233,7 +233,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { ); const connType = getConnectionType( connection?.connectionConfig ?? - new ConnectionConfig() + create(ConnectionConfigSchema, {}) ); if (connType) { urlParams.append('connectionType', connType); @@ -263,7 +263,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { ); const destConnType = getConnectionType( destConnection?.connectionConfig ?? - new ConnectionConfig() + create(ConnectionConfigSchema, {}) ); const newOpts = getDefaultDestinationFormValueOptionsFromConnectionCase( @@ -344,7 +344,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { ); const connType = getConnectionType( connection?.connectionConfig ?? - new ConnectionConfig() + create(ConnectionConfigSchema, {}) ); if (connType) { urlParams.append('connectionType', connType); @@ -369,7 +369,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { ); const destConnType = getConnectionType( destConnection?.connectionConfig ?? - new ConnectionConfig() + create(ConnectionConfigSchema, {}) ); const newOpts = getDefaultDestinationFormValueOptionsFromConnectionCase( diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/job/aigenerate/single/schema/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/job/aigenerate/single/schema/page.tsx index cc4ba1b2d3..f82cb2d1f4 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/job/aigenerate/single/schema/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/job/aigenerate/single/schema/page.tsx @@ -3,7 +3,6 @@ import FormPersist from '@/app/(mgmt)/FormPersist'; import { clearNewJobSession, - fromStructToRecord, getCreateNewSingleTableAiGenerateJobRequest, getNewJobSessionKeys, getSampleAiGeneratedRecordsRequest, @@ -38,12 +37,10 @@ import { getErrorMessage } from '@/util/util'; import { useMutation, useQuery } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { - createJob, - getAiGeneratedData, - getConnections, - getConnectionSchemaMap, - getConnectionTableConstraints, -} from '@neosync/sdk/connectquery'; + ConnectionDataService, + ConnectionService, + JobService, +} from '@neosync/sdk'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { ColumnDef } from '@tanstack/react-table'; import { useRouter } from 'next/navigation'; @@ -77,14 +74,18 @@ export default function Page({ searchParams }: PageProps): ReactElement { } }, [searchParams?.sessionId]); const { data: connectionsData } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); const connections = connectionsData?.connections ?? []; - const { mutateAsync: createJobAsync } = useMutation(createJob); - const { mutateAsync: sampleRecords } = useMutation(getAiGeneratedData); + const { mutateAsync: createJobAsync } = useMutation( + JobService.method.createJob + ); + const { mutateAsync: sampleRecords } = useMutation( + ConnectionDataService.method.getAiGeneratedData + ); const sessionPrefix = getSingleOrUndefined(searchParams?.sessionId) ?? ''; const sessionKeys = getNewJobSessionKeys(sessionPrefix); @@ -113,7 +114,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { isLoading: isSchemaMapLoading, isFetching: isSchemaMapValidating, } = useQuery( - getConnectionSchemaMap, + ConnectionDataService.method.getConnectionSchemaMap, { connectionId: connectFormValues.fkSourceConnectionId }, { enabled: !!connectFormValues.fkSourceConnectionId } ); @@ -182,7 +183,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { const { data: tableConstraints, isFetching: isTableConstraintsValidating } = useQuery( - getConnectionTableConstraints, + ConnectionDataService.method.getConnectionTableConstraints, { connectionId: connectFormValues.fkSourceConnectionId }, { enabled: !!connectFormValues.fkSourceConnectionId } ); @@ -222,7 +223,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { schema: form.getValues(), }) ); - setaioutput(output.records.map((r) => fromStructToRecord(r))); + setaioutput(output.records); } catch (err) { toast.error('Unable to generate sample data', { description: getErrorMessage(err), diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/job/connect/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/job/connect/page.tsx index b1caf11d83..951419e17b 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/job/connect/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/job/connect/page.tsx @@ -24,19 +24,18 @@ import { import { Separator } from '@/components/ui/separator'; import { Skeleton } from '@/components/ui/skeleton'; import { cn, getSingleOrUndefined, splitConnections } from '@/libs/utils'; +import { create } from '@bufbuild/protobuf'; import { useMutation, useQuery } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { - CheckConnectionConfigResponse, + CheckConnectionConfigByIdResponse, + CheckConnectionConfigByIdResponseSchema, Code, ConnectError, - Connection, - ConnectionConfig, + ConnectionConfigSchema, + ConnectionSchema, + ConnectionService, } from '@neosync/sdk'; -import { - checkConnectionConfigById, - getConnections, -} from '@neosync/sdk/connectquery'; import { Cross2Icon, PlusIcon } from '@radix-ui/react-icons'; import { useRouter } from 'next/navigation'; import { usePostHog } from 'posthog-js/react'; @@ -62,7 +61,7 @@ const NEW_CONNECTION_VALUE = 'new-connection'; interface DestinationValidationState { isValidating: boolean; - response?: CheckConnectionConfigResponse; + response?: CheckConnectionConfigByIdResponse; } export default function Page({ searchParams }: PageProps): ReactElement { @@ -85,7 +84,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { const [isSourceValidating, setIsSourceValidating] = useState(false); const [sourceValidationResponse, setSourceValidationResponse] = useState< - CheckConnectionConfigResponse | undefined + CheckConnectionConfigByIdResponse | undefined >(); const [destinationValidation, setDestinationValidation] = useState< @@ -93,7 +92,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { >({}); const { isLoading: isConnectionsLoading, data: connectionsData } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); @@ -122,7 +121,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { splitConnections(connections); const { mutateAsync: checkConnectionConfig } = useMutation( - checkConnectionConfigById + ConnectionService.method.checkConnectionConfigById ); return ( @@ -193,7 +192,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { .map((c) => getConnectionType( c.connectionConfig ?? - new ConnectionConfig() + create(ConnectionConfigSchema, {}) ) ) .filter((x) => !!x) @@ -214,10 +213,10 @@ export default function Page({ searchParams }: PageProps): ReactElement { field.onChange(value); const connection = connections.find((c) => c.id === value) ?? - new Connection(); + create(ConnectionSchema, {}); const connectionType = getConnectionType( connection.connectionConfig ?? - new ConnectionConfig() + create(ConnectionConfigSchema, {}) ); setIsSourceValidating(true); try { @@ -234,13 +233,16 @@ export default function Page({ searchParams }: PageProps): ReactElement { setSourceValidationResponse(undefined); } else { setSourceValidationResponse( - new CheckConnectionConfigResponse({ - isConnected: false, - connectionError: - err instanceof Error - ? err.message - : 'unknown error', - }) + create( + CheckConnectionConfigByIdResponseSchema, + { + isConnected: false, + connectionError: + err instanceof Error + ? err.message + : 'unknown error', + } + ) ); } } finally { @@ -457,7 +459,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { ); const destConnType = getConnectionType( destConnection?.connectionConfig ?? - new ConnectionConfig() + create(ConnectionConfigSchema, {}) ); setDestinationValidation( @@ -465,10 +467,10 @@ export default function Page({ searchParams }: PageProps): ReactElement { ...prevState, [value]: { isValidating: true, - response: - new CheckConnectionConfigResponse( - {} - ), + response: create( + CheckConnectionConfigByIdResponseSchema, + {} + ), }, }) ); @@ -509,16 +511,16 @@ export default function Page({ searchParams }: PageProps): ReactElement { ...prevState, [value]: { isValidating: false, - response: - new CheckConnectionConfigResponse( - { - isConnected: false, - connectionError: - err instanceof Error - ? err.message - : 'unknown error', - } - ), + response: create( + CheckConnectionConfigByIdResponseSchema, + { + isConnected: false, + connectionError: + err instanceof Error + ? err.message + : 'unknown error', + } + ), }, }) ); diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/job/define/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/job/define/page.tsx index e524315233..f23aa5ac6a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/job/define/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/job/define/page.tsx @@ -38,7 +38,7 @@ import { Separator } from '@/components/ui/separator'; import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group'; import { getSingleOrUndefined } from '@/libs/utils'; import { useMutation } from '@connectrpc/connect-query'; -import { isJobNameAvailable } from '@neosync/sdk/connectquery'; +import { JobService } from '@neosync/sdk'; import { usePostHog } from 'posthog-js/react'; import { DEFAULT_CRON_STRING } from '../../../jobs/[id]/components/ScheduleCard'; import { getNewJobSessionKeys } from '../../../jobs/util'; @@ -77,8 +77,9 @@ export default function Page({ searchParams }: PageProps): ReactElement { } }, []); - const { mutateAsync: isJobNameAvailableAsync } = - useMutation(isJobNameAvailable); + const { mutateAsync: isJobNameAvailableAsync } = useMutation( + JobService.method.isJobNameAvailable + ); const form = useForm({ mode: 'onChange', resolver: yupResolver(DefineFormValues), diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/connect/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/connect/page.tsx index 56745894e3..657b9d694e 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/connect/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/connect/page.tsx @@ -29,18 +29,17 @@ import { import { Separator } from '@/components/ui/separator'; import { Skeleton } from '@/components/ui/skeleton'; import { getSingleOrUndefined, splitConnections } from '@/libs/utils'; +import { create } from '@bufbuild/protobuf'; import { useMutation, useQuery } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { - CheckConnectionConfigResponse, + CheckConnectionConfigByIdResponse, + CheckConnectionConfigByIdResponseSchema, Code, ConnectError, - ConnectionConfig, + ConnectionConfigSchema, + ConnectionService, } from '@neosync/sdk'; -import { - checkConnectionConfigById, - getConnections, -} from '@neosync/sdk/connectquery'; import { useRouter } from 'next/navigation'; import { usePostHog } from 'posthog-js/react'; import { ReactElement, useEffect, useState } from 'react'; @@ -80,13 +79,13 @@ export default function Page({ searchParams }: PageProps): ReactElement { const [isSourceValidating, setIsSourceValidating] = useState(false); const [sourceValidationResponse, setSourceValidationResponse] = useState< - CheckConnectionConfigResponse | undefined + CheckConnectionConfigByIdResponse | undefined >(); const [isDestinationValidating, setIsDestinationValidating] = useState(false); const [destinationValidationResponse, setDestinationValidationResponse] = - useState(); + useState(); const form = useForm({ resolver: yupResolver( @@ -96,7 +95,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { }); const { isLoading: isConnectionsLoading, data: connectionsData } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); @@ -119,7 +118,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { ); const { mutateAsync: checkConnectionConfig } = useMutation( - checkConnectionConfigById + ConnectionService.method.checkConnectionConfigById ); return ( @@ -185,7 +184,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { ); const connType = getConnectionType( connection?.connectionConfig ?? - new ConnectionConfig() + create(ConnectionConfigSchema, {}) ); if (connType) { @@ -223,7 +222,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { ); const destConnType = getConnectionType( destConnection?.connectionConfig ?? - new ConnectionConfig() + create(ConnectionConfigSchema, {}) ); const newOpts = getDefaultDestinationFormValueOptionsFromConnectionCase( @@ -256,13 +255,16 @@ export default function Page({ searchParams }: PageProps): ReactElement { setSourceValidationResponse(undefined); } else { setSourceValidationResponse( - new CheckConnectionConfigResponse({ - isConnected: false, - connectionError: - err instanceof Error - ? err.message - : 'unknown error', - }) + create( + CheckConnectionConfigByIdResponseSchema, + { + isConnected: false, + connectionError: + err instanceof Error + ? err.message + : 'unknown error', + } + ) ); } } finally { @@ -358,7 +360,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { ); const destConnType = getConnectionType( destConnection?.connectionConfig ?? - new ConnectionConfig() + create(ConnectionConfigSchema, {}) ); const newOpts = getDefaultDestinationFormValueOptionsFromConnectionCase( @@ -391,13 +393,16 @@ export default function Page({ searchParams }: PageProps): ReactElement { setDestinationValidationResponse(undefined); } else { setDestinationValidationResponse( - new CheckConnectionConfigResponse({ - isConnected: false, - connectionError: - err instanceof Error - ? err.message - : 'unknown error', - }) + create( + CheckConnectionConfigByIdResponseSchema, + { + isConnected: false, + connectionError: + err instanceof Error + ? err.message + : 'unknown error', + } + ) ); } } finally { diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/schema/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/schema/page.tsx index 3250733b17..1822233e82 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/schema/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/schema/page.tsx @@ -43,14 +43,12 @@ import { getErrorMessage, getTransformerFromField } from '@/util/util'; import { JobMappingTransformerForm } from '@/yup-validations/jobs'; import { useMutation, useQuery } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { ValidateJobMappingsResponse } from '@neosync/sdk'; import { - createJob, - getConnections, - getConnectionSchemaMap, - getConnectionTableConstraints, - validateJobMappings, -} from '@neosync/sdk/connectquery'; + ConnectionDataService, + ConnectionService, + JobService, + ValidateJobMappingsResponse, +} from '@neosync/sdk'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { useRouter } from 'next/navigation'; import { usePostHog } from 'posthog-js/react'; @@ -84,7 +82,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { } }, [searchParams?.sessionId]); const { data: connectionsData } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); @@ -124,12 +122,14 @@ export default function Page({ searchParams }: PageProps): ReactElement { isLoading: isSchemaMapLoading, isFetching: isSchemaMapValidating, } = useQuery( - getConnectionSchemaMap, + ConnectionDataService.method.getConnectionSchemaMap, { connectionId: connectFormValues.fkSourceConnectionId }, { enabled: !!connectFormValues.fkSourceConnectionId } ); - const { mutateAsync: createJobAsync } = useMutation(createJob); + const { mutateAsync: createJobAsync } = useMutation( + JobService.method.createJob + ); const form = useForm({ mode: 'onChange', @@ -145,8 +145,9 @@ export default function Page({ searchParams }: PageProps): ReactElement { setIsClient(true); }, []); - const { mutateAsync: validateJobMappingsAsync } = - useMutation(validateJobMappings); + const { mutateAsync: validateJobMappingsAsync } = useMutation( + JobService.method.validateJobMappings + ); async function onSubmit(values: SingleTableSchemaFormValues) { if (!account) { @@ -209,7 +210,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { const { data: tableConstraints, isFetching: isTableConstraintsValidating } = useQuery( - getConnectionTableConstraints, + ConnectionDataService.method.getConnectionTableConstraints, { connectionId: connectFormValues.fkSourceConnectionId }, { enabled: !!connectFormValues.fkSourceConnectionId } ); diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/job/job-form-validations.ts b/frontend/apps/web/app/(mgmt)/[account]/new/job/job-form-validations.ts index ae27de314a..8b171a7b78 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/job/job-form-validations.ts +++ b/frontend/apps/web/app/(mgmt)/[account]/new/job/job-form-validations.ts @@ -5,11 +5,11 @@ import { SchemaFormValues, SourceFormValues, } from '@/yup-validations/jobs'; -import { PartialMessage } from '@bufbuild/protobuf'; +import { create, MessageInitShape } from '@bufbuild/protobuf'; import { ConnectError, Connection, - IsJobNameAvailableRequest, + IsJobNameAvailableRequestSchema, IsJobNameAvailableResponse, } from '@neosync/sdk'; import { UseMutateAsyncFunction } from '@tanstack/react-query'; @@ -30,7 +30,7 @@ export type WorkflowSettingsSchema = Yup.InferType< typeof WorkflowSettingsSchema >; -export const ActivityOptionsSchema = Yup.object({ +export const ActivityOptionsFormValues = Yup.object({ scheduleToCloseTimeout: Yup.number() .optional() .min( @@ -65,7 +65,9 @@ export const ActivityOptionsSchema = Yup.object({ }).optional(), }); -export type ActivityOptionsSchema = Yup.InferType; +export type ActivityOptionsFormValues = Yup.InferType< + typeof ActivityOptionsFormValues +>; export const DefineFormValues = Yup.object({ jobName: Yup.string() @@ -94,12 +96,17 @@ export const DefineFormValues = Yup.object({ | UseMutateAsyncFunction< IsJobNameAvailableResponse, ConnectError, - PartialMessage, + MessageInitShape, unknown > | undefined = context?.options?.context?.isJobNameAvailable; if (isJobNameAvailable) { - const res = await isJobNameAvailable({ accountId, name: value }); + const res = await isJobNameAvailable( + create(IsJobNameAvailableRequestSchema, { + accountId, + name: value, + }) + ); if (!res.isAvailable) { return context.createError({ message: 'This Job Name is already taken.', @@ -133,7 +140,7 @@ export const DefineFormValues = Yup.object({ ), initiateJobRun: Yup.boolean(), workflowSettings: WorkflowSettingsSchema.optional(), - syncActivityOptions: ActivityOptionsSchema.optional(), + syncActivityOptions: ActivityOptionsFormValues.optional(), }); export type DefineFormValues = Yup.InferType; @@ -443,7 +450,7 @@ export interface DefineFormValuesContext { isJobNameAvailable: UseMutateAsyncFunction< IsJobNameAvailableResponse, ConnectError, - PartialMessage, + MessageInitShape, unknown >; } diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/job/schema/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/job/schema/page.tsx index 45e0ed34f4..de8a2bb87d 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/job/schema/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/job/schema/page.tsx @@ -26,29 +26,25 @@ import { SchemaFormValuesDestinationOptions, VirtualForeignConstraintFormValues, } from '@/yup-validations/jobs'; -import { PartialMessage } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; import { useMutation, useQuery } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { Connection, + ConnectionDataService, + ConnectionSchema, + ConnectionService, DatabaseColumn, ForeignConstraintTables, GetConnectionSchemaMapRequest, - GetConnectionSchemaMapsResponse, + GetConnectionSchemaMapRequestSchema, + GetConnectionSchemaMapsResponseSchema, + JobService, PrimaryConstraint, ValidateJobMappingsResponse, - VirtualForeignConstraint, - VirtualForeignKey, + VirtualForeignConstraintSchema, + VirtualForeignKeySchema, } from '@neosync/sdk'; -import { - createJob, - getConnection, - getConnections, - getConnectionSchemaMap, - getConnectionSchemaMaps, - getConnectionTableConstraints, - validateJobMappings, -} from '@neosync/sdk/connectquery'; import { useRouter } from 'next/navigation'; import { usePostHog } from 'posthog-js/react'; import { ReactElement, useCallback, useEffect, useMemo, useState } from 'react'; @@ -126,7 +122,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { }); const { data: connectionData, isLoading: isConnectionLoading } = useQuery( - getConnection, + ConnectionService.method.getConnection, { id: connectFormValues.sourceId }, { enabled: !!connectFormValues.sourceId } ); @@ -136,12 +132,12 @@ export default function Page({ searchParams }: PageProps): ReactElement { isLoading: isSchemaMapLoading, isFetching: isSchemaMapValidating, } = useQuery( - getConnectionSchemaMap, + ConnectionDataService.method.getConnectionSchemaMap, { connectionId: connectFormValues.sourceId }, { enabled: !!connectFormValues.sourceId } ); const { data: connectionsData } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); @@ -156,18 +152,19 @@ export default function Page({ searchParams }: PageProps): ReactElement { const { data: tableConstraints, isFetching: isTableConstraintsValidating } = useQuery( - getConnectionTableConstraints, + ConnectionDataService.method.getConnectionTableConstraints, { connectionId: connectFormValues.sourceId }, { enabled: !!connectFormValues.sourceId } ); const { data: destinationConnectionSchemaMapsResp } = useQuery( - getConnectionSchemaMaps, + ConnectionDataService.method.getConnectionSchemaMaps, { requests: connectFormValues.destinations.map( - (dest): PartialMessage => ({ - connectionId: dest.connectionId, - }) + (dest): GetConnectionSchemaMapRequest => + create(GetConnectionSchemaMapRequestSchema, { + connectionId: dest.connectionId, + }) ), }, { @@ -178,7 +175,9 @@ export default function Page({ searchParams }: PageProps): ReactElement { } ); - const { mutateAsync: createNewSyncJob } = useMutation(createJob); + const { mutateAsync: createNewSyncJob } = useMutation( + JobService.method.createJob + ); const form = useForm({ resolver: yupResolver(SchemaFormValues), @@ -186,8 +185,9 @@ export default function Page({ searchParams }: PageProps): ReactElement { context: { accountId: account?.id }, }); - const { mutateAsync: validateJobMappingsAsync } = - useMutation(validateJobMappings); + const { mutateAsync: validateJobMappingsAsync } = useMutation( + JobService.method.validateJobMappings + ); async function onSubmit(values: SchemaFormValues) { if (!account || !source) { @@ -280,11 +280,11 @@ export default function Page({ searchParams }: PageProps): ReactElement { const schemaConstraintHandler = useMemo(() => { const virtualForeignKeys = formVirtualForeignKeys?.map((v) => { - return new VirtualForeignConstraint({ + return create(VirtualForeignConstraintSchema, { schema: v.schema, table: v.table, columns: v.columns, - foreignKey: new VirtualForeignKey({ + foreignKey: create(VirtualForeignKeySchema, { schema: v.foreignKey.schema, table: v.foreignKey.table, columns: v.foreignKey.columns, @@ -509,7 +509,9 @@ export default function Page({ searchParams }: PageProps): ReactElement { @@ -522,7 +524,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { - {isNosqlSource(source ?? new Connection({})) && ( + {isNosqlSource(source ?? create(ConnectionSchema, {})) && ( 0 )} destinationOptions={form.watch('destinationOptions')} @@ -688,7 +690,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { /> )} - {!isNosqlSource(source ?? new Connection({})) && ( + {!isNosqlSource(source ?? create(ConnectionSchema, {})) && ( diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/job/subset/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/job/subset/page.tsx index 0c777a95d4..42ac047095 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/job/subset/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/job/subset/page.tsx @@ -30,14 +30,16 @@ import { Separator } from '@/components/ui/separator'; import { getSingleOrUndefined } from '@/libs/utils'; import { getErrorMessage } from '@/util/util'; import { SchemaFormValues } from '@/yup-validations/jobs'; +import { create } from '@bufbuild/protobuf'; import { useMutation, useQuery } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { ConnectionConfig, JobMapping } from '@neosync/sdk'; import { - createJob, - getConnections, - getConnectionTableConstraints, -} from '@neosync/sdk/connectquery'; + ConnectionConfigSchema, + ConnectionDataService, + ConnectionService, + JobMappingSchema, + JobService, +} from '@neosync/sdk'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { useRouter } from 'next/navigation'; import { usePostHog } from 'posthog-js/react'; @@ -72,7 +74,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { } }, [searchParams?.sessionId]); const { data: connectionsData } = useQuery( - getConnections, + ConnectionService.method.getConnections, { accountId: account?.id }, { enabled: !!account?.id } ); @@ -119,12 +121,14 @@ export default function Page({ searchParams }: PageProps): ReactElement { const { data: tableConstraints, isFetching: isTableConstraintsValidating } = useQuery( - getConnectionTableConstraints, + ConnectionDataService.method.getConnectionTableConstraints, { connectionId: schemaFormValues.connectionId }, { enabled: !!schemaFormValues.connectionId } ); - const { mutateAsync: createNewSyncJob } = useMutation(createJob); + const { mutateAsync: createNewSyncJob } = useMutation( + JobService.method.createJob + ); const fkConstraints = tableConstraints?.foreignKeyConstraints; const [rootTables, setRootTables] = useState>(new Set()); @@ -152,7 +156,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { ); const connectionType = getConnectionType( - connection?.connectionConfig ?? new ConnectionConfig() + connection?.connectionConfig ?? create(ConnectionConfigSchema, {}) ); async function onSubmit(values: SubsetFormValues): Promise { @@ -335,7 +339,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { }} columns={GetColumnsForSqlAutocomplete( schemaFormValues?.mappings.map((row) => { - return new JobMapping({ + return create(JobMappingSchema, { schema: row.schema, table: row.table, column: row.column, diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCardNumber.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCardNumber.tsx index 65963a28e9..59bbae515a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCardNumber.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCardNumber.tsx @@ -3,16 +3,12 @@ import { FormDescription, FormLabel } from '@/components/ui/form'; import FormErrorMessage from '@/components/FormErrorMessage'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateCardNumber } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { GenerateCardNumber, GenerateCardNumberSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - GenerateCardNumber, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function GenerateCardNumberForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -31,7 +27,10 @@ export default function GenerateCardNumberForm(props: Props): ReactElement { checked={value.validLuhn} onCheckedChange={(checked) => { setValue( - new GenerateCardNumber({ ...value, validLuhn: checked }) + create(GenerateCardNumberSchema, { + ...value, + validLuhn: checked, + }) ); }} disabled={isDisabled} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCategoricalForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCategoricalForm.tsx index c0c75c91c4..83820a576a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCategoricalForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCategoricalForm.tsx @@ -2,16 +2,12 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateCategorical } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { GenerateCategorical, GenerateCategoricalSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - GenerateCategorical, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function GenerateCategoricalForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -31,7 +27,10 @@ export default function GenerateCategoricalForm(props: Props): ReactElement { type="string" onChange={(e) => setValue( - new GenerateCategorical({ ...value, categories: e.target.value }) + create(GenerateCategoricalSchema, { + ...value, + categories: e.target.value, + }) ) } disabled={isDisabled} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCountryForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCountryForm.tsx index 748478b38c..48b06843c6 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCountryForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateCountryForm.tsx @@ -3,16 +3,12 @@ import { FormDescription, FormLabel } from '@/components/ui/form'; import FormErrorMessage from '@/components/FormErrorMessage'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateCountry } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { GenerateCountry, GenerateCountrySchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - GenerateCountry, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function GenerateCountryForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -32,7 +28,10 @@ export default function GenerateCountryForm(props: Props): ReactElement { checked={value.generateFullName} onCheckedChange={(checked) => setValue( - new GenerateCountry({ ...value, generateFullName: checked }) + create(GenerateCountrySchema, { + ...value, + generateFullName: checked, + }) ) } disabled={isDisabled} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateEmailForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateEmailForm.tsx index d58d39c1e9..749e95078b 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateEmailForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateEmailForm.tsx @@ -9,13 +9,16 @@ import { SelectValue, } from '@/components/ui/select'; import { getGenerateEmailTypeString } from '@/util/util'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateEmail, GenerateEmailType } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { + GenerateEmail, + GenerateEmailSchema, + GenerateEmailType, +} from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps> {} +interface Props extends TransformerConfigProps {} export default function GenerateEmailForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -35,7 +38,7 @@ export default function GenerateEmailForm(props: Props): ReactElement { disabled={isDisabled} onValueChange={(newValue) => { setValue( - new GenerateEmail({ + create(GenerateEmailSchema, { ...value, // this is so hacky, but has to be done due to have we are encoding the incoming config and how the enums are converted to their wire-format string type emailType: parseInt(newValue, 10), diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateFloat64Form.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateFloat64Form.tsx index 76fea62797..ab0d0f69d9 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateFloat64Form.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateFloat64Form.tsx @@ -4,16 +4,12 @@ import { Input } from '@/components/ui/input'; import { Switch } from '@/components/ui/switch'; import FormErrorMessage from '@/components/FormErrorMessage'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateFloat64 } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { GenerateFloat64, GenerateFloat64Schema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - GenerateFloat64, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function GenerateFloat64Form(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -34,7 +30,10 @@ export default function GenerateFloat64Form(props: Props): ReactElement { checked={value.randomizeSign} onCheckedChange={(checked) => setValue( - new GenerateFloat64({ ...value, randomizeSign: checked }) + create(GenerateFloat64Schema, { + ...value, + randomizeSign: checked, + }) ) } disabled={isDisabled} @@ -59,7 +58,7 @@ export default function GenerateFloat64Form(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateFloat64({ + create(GenerateFloat64Schema, { ...value, min: e.target.valueAsNumber, }) @@ -89,7 +88,7 @@ export default function GenerateFloat64Form(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateFloat64({ + create(GenerateFloat64Schema, { ...value, max: e.target.valueAsNumber, }) @@ -123,7 +122,7 @@ export default function GenerateFloat64Form(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateFloat64({ + create(GenerateFloat64Schema, { ...value, precision: BigInt(e.target.valueAsNumber), }) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateGenderForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateGenderForm.tsx index 96a4ce5753..3b12160623 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateGenderForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateGenderForm.tsx @@ -3,16 +3,12 @@ import { FormDescription, FormLabel } from '@/components/ui/form'; import FormErrorMessage from '@/components/FormErrorMessage'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateGender } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { GenerateGender, GenerateGenderSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - GenerateGender, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function GenerateGenderForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -31,7 +27,12 @@ export default function GenerateGenderForm(props: Props): ReactElement { - setValue(new GenerateGender({ ...value, abbreviate: checked })) + setValue( + create(GenerateGenderSchema, { + ...value, + abbreviate: checked, + }) + ) } disabled={isDisabled} /> diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateInt64Form.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateInt64Form.tsx index c30066715b..d62714d1cc 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateInt64Form.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateInt64Form.tsx @@ -4,13 +4,12 @@ import { Input } from '@/components/ui/input'; import { Switch } from '@/components/ui/switch'; import FormErrorMessage from '@/components/FormErrorMessage'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateInt64 } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { GenerateInt64, GenerateInt64Schema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps> {} +interface Props extends TransformerConfigProps {} export default function GenerateInt64Form(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -31,7 +30,10 @@ export default function GenerateInt64Form(props: Props): ReactElement { checked={value.randomizeSign} onCheckedChange={(checked) => setValue( - new GenerateInt64({ ...value, randomizeSign: checked }) + create(GenerateInt64Schema, { + ...value, + randomizeSign: checked, + }) ) } disabled={isDisabled} @@ -56,7 +58,7 @@ export default function GenerateInt64Form(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateInt64({ + create(GenerateInt64Schema, { ...value, min: BigInt(e.target.valueAsNumber), }) @@ -86,7 +88,7 @@ export default function GenerateInt64Form(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateInt64({ + create(GenerateInt64Schema, { ...value, max: BigInt(e.target.valueAsNumber), }) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateInternationalPhoneNumberForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateInternationalPhoneNumberForm.tsx index 9799c04e7b..dccc7c4b51 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateInternationalPhoneNumberForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateInternationalPhoneNumberForm.tsx @@ -2,16 +2,15 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateE164PhoneNumber } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { + GenerateE164PhoneNumber, + GenerateE164PhoneNumberSchema, +} from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - GenerateE164PhoneNumber, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function GenerateInternationalPhoneNumberForm( props: Props @@ -37,7 +36,7 @@ export default function GenerateInternationalPhoneNumberForm( onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateE164PhoneNumber({ + create(GenerateE164PhoneNumberSchema, { ...value, min: BigInt(e.target.valueAsNumber), }) @@ -68,7 +67,7 @@ export default function GenerateInternationalPhoneNumberForm( onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateE164PhoneNumber({ + create(GenerateE164PhoneNumberSchema, { ...value, max: BigInt(e.target.valueAsNumber), }) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateIpAddressForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateIpAddressForm.tsx index d9cd6d6dd3..7a31a66759 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateIpAddressForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateIpAddressForm.tsx @@ -9,16 +9,16 @@ import { SelectValue, } from '@/components/ui/select'; import { getGenerateIpAddressVersionString } from '@/util/util'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateIpAddress, GenerateIpAddressType } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { + GenerateIpAddress, + GenerateIpAddressSchema, + GenerateIpAddressType, +} from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - GenerateIpAddress, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function GenerateIpAddressForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -38,7 +38,7 @@ export default function GenerateIpAddressForm(props: Props): ReactElement { disabled={isDisabled} onValueChange={(newValue) => { setValue( - new GenerateIpAddress({ + create(GenerateIpAddressSchema, { ...value, // this is so hacky, but has to be done due to have we are encoding the incoming config and how the enums are converted to their wire-format string type ipType: parseInt(newValue, 10), diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateJavascriptForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateJavascriptForm.tsx index aff5df62b9..2ce22e960a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateJavascriptForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateJavascriptForm.tsx @@ -8,22 +8,21 @@ import { useAccount } from '@/components/providers/account-provider'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { useReadNeosyncTransformerDeclarationFile } from '@/libs/hooks/useReadNeosyncTransfomerDeclarationFile'; -import { PlainMessage } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; import Editor, { useMonaco } from '@monaco-editor/react'; -import { GenerateJavascript } from '@neosync/sdk'; -import { validateUserJavascriptCode } from '@neosync/sdk/connectquery'; +import { + GenerateJavascript, + GenerateJavascriptSchema, + TransformersService, +} from '@neosync/sdk'; import { CheckCircledIcon, CrossCircledIcon } from '@radix-ui/react-icons'; import { useTheme } from 'next-themes'; import { ReactElement, useEffect, useState } from 'react'; import { ValidCode } from './TransformJavascriptForm'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - GenerateJavascript, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function GenerateJavascriptForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -50,7 +49,7 @@ export default function GenerateJavascriptForm(props: Props): ReactElement { const { account } = useAccount(); const { mutateAsync: validateUserJsCodeAsync } = useMutation( - validateUserJavascriptCode + TransformersService.method.validateUserJavascriptCode ); async function handleValidateCode(): Promise { @@ -61,7 +60,6 @@ export default function GenerateJavascriptForm(props: Props): ReactElement { try { const res = await validateUserJsCodeAsync({ - accountId: account.id, code: value.code, }); setIsValidatingCode(false); @@ -124,7 +122,9 @@ export default function GenerateJavascriptForm(props: Props): ReactElement { value={value.code} theme={resolvedTheme === 'dark' ? 'vs-dark' : 'cobalt'} onChange={(e) => { - setValue(new GenerateJavascript({ ...value, code: e ?? '' })); + setValue( + create(GenerateJavascriptSchema, { ...value, code: e ?? '' }) + ); }} options={options} /> diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStateForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStateForm.tsx index b22749813c..6f023f56a0 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStateForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStateForm.tsx @@ -3,13 +3,12 @@ import { FormDescription, FormLabel } from '@/components/ui/form'; import FormErrorMessage from '@/components/FormErrorMessage'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateState } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { GenerateState, GenerateStateSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps> {} +interface Props extends TransformerConfigProps {} export default function GenerateStateForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -29,7 +28,10 @@ export default function GenerateStateForm(props: Props): ReactElement { checked={value.generateFullName} onCheckedChange={(checked) => setValue( - new GenerateState({ ...value, generateFullName: checked }) + create(GenerateStateSchema, { + ...value, + generateFullName: checked, + }) ) } disabled={isDisabled} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStringForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStringForm.tsx index 87333a1754..1aa1b347d1 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStringForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStringForm.tsx @@ -3,16 +3,12 @@ import { FormDescription, FormLabel } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import FormErrorMessage from '@/components/FormErrorMessage'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateString } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { GenerateString, GenerateStringSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - GenerateString, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function GenerateStringForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -35,7 +31,7 @@ export default function GenerateStringForm(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateString({ + create(GenerateStringSchema, { ...value, min: BigInt(e.target.valueAsNumber), }) @@ -65,7 +61,7 @@ export default function GenerateStringForm(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateString({ + create(GenerateStringSchema, { ...value, max: BigInt(e.target.valueAsNumber), }) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStringPhoneNumberForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStringPhoneNumberForm.tsx index 3fef9c2780..6a002b33e4 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStringPhoneNumberForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateStringPhoneNumberForm.tsx @@ -2,16 +2,15 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateStringPhoneNumber } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { + GenerateStringPhoneNumber, + GenerateStringPhoneNumberSchema, +} from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - GenerateStringPhoneNumber, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function GenerateStringPhoneNumberNumberForm( props: Props @@ -36,7 +35,7 @@ export default function GenerateStringPhoneNumberNumberForm( onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateStringPhoneNumber({ + create(GenerateStringPhoneNumberSchema, { ...value, min: BigInt(e.target.valueAsNumber), }) @@ -66,7 +65,7 @@ export default function GenerateStringPhoneNumberNumberForm( onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new GenerateStringPhoneNumber({ + create(GenerateStringPhoneNumberSchema, { ...value, max: BigInt(e.target.valueAsNumber), }) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateUuidForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateUuidForm.tsx index 816866262c..2be8fb18a0 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateUuidForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/GenerateUuidForm.tsx @@ -2,13 +2,12 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { GenerateUuid } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { GenerateUuid, GenerateUuidSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps> {} +interface Props extends TransformerConfigProps {} export default function GenerateUuidForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -27,7 +26,12 @@ export default function GenerateUuidForm(props: Props): ReactElement { - setValue(new GenerateUuid({ ...value, includeHyphens: checked })) + setValue( + create(GenerateUuidSchema, { + ...value, + includeHyphens: checked, + }) + ) } disabled={isDisabled} /> diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformCharacterScrambleForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformCharacterScrambleForm.tsx index ecc46cc76f..c979f4331a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformCharacterScrambleForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformCharacterScrambleForm.tsx @@ -1,7 +1,6 @@ 'use client'; import ButtonText from '@/components/ButtonText'; import Spinner from '@/components/Spinner'; -import { useAccount } from '@/components/providers/account-provider'; import { Badge } from '@/components/ui/badge'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; @@ -10,18 +9,17 @@ import { CheckCircledIcon, CrossCircledIcon } from '@radix-ui/react-icons'; import FormErrorMessage from '@/components/FormErrorMessage'; import LearnMoreLink from '@/components/labels/LearnMoreLink'; import { Button } from '@/components/ui/button'; -import { PlainMessage } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; -import { TransformCharacterScramble } from '@neosync/sdk'; -import { validateUserRegexCode } from '@neosync/sdk/connectquery'; +import { + TransformCharacterScramble, + TransformCharacterScrambleSchema, + TransformersService, +} from '@neosync/sdk'; import { ReactElement, useState } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformCharacterScramble, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} type ValidRegex = 'valid' | 'invalid' | 'null'; @@ -33,20 +31,15 @@ export default function TransformCharacterScrambleForm( const [isValidatingRegex, setIsValidatingRegex] = useState(false); const [isRegexValid, setIsRegexValid] = useState('null'); - const { account } = useAccount(); const { mutateAsync: validateUserRegexCodeAsync } = useMutation( - validateUserRegexCode + TransformersService.method.validateUserRegexCode ); async function handleValidateCode(): Promise { - if (!account) { - return; - } setIsValidatingRegex(true); try { const res = await validateUserRegexCodeAsync({ - accountId: account.id, userProvidedRegex: value.userProvidedRegex, }); setIsValidatingRegex(false); @@ -105,7 +98,7 @@ export default function TransformCharacterScrambleForm( value={value.userProvidedRegex} onChange={(e) => { setValue( - new TransformCharacterScramble({ + create(TransformCharacterScrambleSchema, { ...value, userProvidedRegex: e.target.value, }) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformE164PhoneNumberForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformE164PhoneNumberForm.tsx index b0d28d3da5..1f1d544825 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformE164PhoneNumberForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformE164PhoneNumberForm.tsx @@ -2,16 +2,15 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { TransformE164PhoneNumber } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { + TransformE164PhoneNumber, + TransformE164PhoneNumberSchema, +} from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformE164PhoneNumber, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function TransformE164NumberForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -31,7 +30,9 @@ export default function TransformE164NumberForm(props: Props): ReactElement { checked={value.preserveLength} onCheckedChange={(checked) => setValue( - new TransformE164PhoneNumber({ preserveLength: checked }) + create(TransformE164PhoneNumberSchema, { + preserveLength: checked, + }) ) } disabled={isDisabled} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformEmailForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformEmailForm.tsx index 1371608ed5..48bd41f28a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformEmailForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformEmailForm.tsx @@ -14,20 +14,17 @@ import { getGenerateEmailTypeString, getInvalidEmailActionString, } from '@/util/util'; -import { PlainMessage } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; import { GenerateEmailType, InvalidEmailAction, TransformEmail, + TransformEmailSchema, } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformEmail, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function TransformEmailForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -44,7 +41,12 @@ export default function TransformEmailForm(props: Props): ReactElement { - setValue(new TransformEmail({ ...value, preserveLength: checked })) + setValue( + create(TransformEmailSchema, { + ...value, + preserveLength: checked, + }) + ) } disabled={isDisabled} /> @@ -62,7 +64,12 @@ export default function TransformEmailForm(props: Props): ReactElement { - setValue(new TransformEmail({ ...value, preserveDomain: checked })) + setValue( + create(TransformEmailSchema, { + ...value, + preserveDomain: checked, + }) + ) } disabled={isDisabled} /> @@ -83,7 +90,7 @@ export default function TransformEmailForm(props: Props): ReactElement { value={value.excludedDomains.map((d) => d.trim()).join(',')} onChange={(e) => setValue( - new TransformEmail({ + create(TransformEmailSchema, { ...value, excludedDomains: e.target.value.split(',').filter((d) => !!d), }) @@ -105,7 +112,7 @@ export default function TransformEmailForm(props: Props): ReactElement { disabled={isDisabled} onValueChange={(newVal) => { setValue( - new TransformEmail({ + create(TransformEmailSchema, { ...value, // this is so hacky, but has to be done due to have we are encoding the incoming config and how the enums are converted to their wire-format string type emailType: parseInt(newVal, 10), @@ -149,7 +156,7 @@ export default function TransformEmailForm(props: Props): ReactElement { disabled={isDisabled} onValueChange={(newValue) => { setValue( - new TransformEmail({ + create(TransformEmailSchema, { ...value, // this is so hacky, but has to be done due to have we are encoding the incoming config and how the enums are converted to their wire-format string type invalidEmailAction: parseInt(newValue, 10), diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFirstNameForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFirstNameForm.tsx index da9f74ff62..51a50d8903 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFirstNameForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFirstNameForm.tsx @@ -2,16 +2,12 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { TransformFirstName } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { TransformFirstName, TransformFirstNameSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformFirstName, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function TransformFirstNameForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -28,7 +24,10 @@ export default function TransformFirstNameForm(props: Props): ReactElement { checked={value.preserveLength} onCheckedChange={(checked) => setValue( - new TransformFirstName({ ...value, preserveLength: checked }) + create(TransformFirstNameSchema, { + ...value, + preserveLength: checked, + }) ) } disabled={isDisabled} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFloat64Form.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFloat64Form.tsx index cf0be95931..69f7eebc76 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFloat64Form.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFloat64Form.tsx @@ -2,16 +2,12 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { TransformFloat64 } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { TransformFloat64, TransformFloat64Schema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformFloat64, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function TransformFloat64Form(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -37,7 +33,7 @@ export default function TransformFloat64Form(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new TransformFloat64({ + create(TransformFloat64Schema, { ...value, randomizationRangeMin: e.target.valueAsNumber, }) @@ -70,7 +66,7 @@ export default function TransformFloat64Form(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new TransformFloat64({ + create(TransformFloat64Schema, { ...value, randomizationRangeMax: e.target.valueAsNumber, }) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFullNameForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFullNameForm.tsx index 244bbb99a0..0f57dd79b4 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFullNameForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformFullNameForm.tsx @@ -2,16 +2,12 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { TransformFullName } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { TransformFullName, TransformFullNameSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformFullName, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function TransformFullNameForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -29,7 +25,10 @@ export default function TransformFullNameForm(props: Props): ReactElement { checked={value.preserveLength} onCheckedChange={(checked) => setValue( - new TransformFullName({ ...value, preserveLength: checked }) + create(TransformFullNameSchema, { + ...value, + preserveLength: checked, + }) ) } disabled={isDisabled} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformInt64Form.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformInt64Form.tsx index 5089f6090a..1d3d0b5e6b 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformInt64Form.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformInt64Form.tsx @@ -2,16 +2,12 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { TransformInt64 } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { TransformInt64, TransformInt64Schema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformInt64, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function TransformInt64Form(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -41,7 +37,7 @@ export default function TransformInt64Form(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new TransformInt64({ + create(TransformInt64Schema, { ...value, randomizationRangeMin: BigInt(e.target.valueAsNumber), }) @@ -78,7 +74,7 @@ export default function TransformInt64Form(props: Props): ReactElement { onChange={(e) => { if (!isNaN(e.target.valueAsNumber)) { setValue( - new TransformInt64({ + create(TransformInt64Schema, { ...value, randomizationRangeMax: BigInt(e.target.valueAsNumber), }) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformInt64PhoneForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformInt64PhoneForm.tsx index 352f5208ee..0b9993429e 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformInt64PhoneForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformInt64PhoneForm.tsx @@ -2,16 +2,15 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { TransformInt64PhoneNumber } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { + TransformInt64PhoneNumber, + TransformInt64PhoneNumberSchema, +} from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformInt64PhoneNumber, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function TransformIntPhoneNumberForm( props: Props @@ -32,7 +31,7 @@ export default function TransformIntPhoneNumberForm( checked={value.preserveLength} onCheckedChange={(checked) => setValue( - new TransformInt64PhoneNumber({ + create(TransformInt64PhoneNumberSchema, { ...value, preserveLength: checked, }) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformJavascriptForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformJavascriptForm.tsx index 1c2e641127..d6ef793852 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformJavascriptForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformJavascriptForm.tsx @@ -8,21 +8,20 @@ import { useAccount } from '@/components/providers/account-provider'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { useReadNeosyncTransformerDeclarationFile } from '@/libs/hooks/useReadNeosyncTransfomerDeclarationFile'; -import { PlainMessage } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; import Editor, { useMonaco } from '@monaco-editor/react'; -import { TransformJavascript } from '@neosync/sdk'; -import { validateUserJavascriptCode } from '@neosync/sdk/connectquery'; +import { + TransformJavascript, + TransformJavascriptSchema, + TransformersService, +} from '@neosync/sdk'; import { CheckCircledIcon, CrossCircledIcon } from '@radix-ui/react-icons'; import { useTheme } from 'next-themes'; import { ReactElement, useEffect, useState } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformJavascript, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export type ValidCode = 'valid' | 'invalid' | 'null'; @@ -51,7 +50,7 @@ export default function TransformJavascriptForm(props: Props): ReactElement { const { account } = useAccount(); const { mutateAsync: validateUserJsCodeAsync } = useMutation( - validateUserJavascriptCode + TransformersService.method.validateUserJavascriptCode ); async function handleValidateCode(): Promise { @@ -62,7 +61,6 @@ export default function TransformJavascriptForm(props: Props): ReactElement { try { const res = await validateUserJsCodeAsync({ - accountId: account.id, code: value.code, }); setIsValidatingCode(false); @@ -135,7 +133,10 @@ export default function TransformJavascriptForm(props: Props): ReactElement { theme={resolvedTheme === 'dark' ? 'vs-dark' : 'cobalt'} onChange={(newCode) => { setValue( - new TransformJavascript({ ...value, code: newCode ?? '' }) + create(TransformJavascriptSchema, { + ...value, + code: newCode ?? '', + }) ); }} options={options} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformLastNameForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformLastNameForm.tsx index 3901f6e98a..33f46b0be8 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformLastNameForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformLastNameForm.tsx @@ -2,16 +2,12 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { TransformLastName } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { TransformLastName, TransformLastNameSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformLastName, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function TransformLastNameForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -28,7 +24,10 @@ export default function TransformLastNameForm(props: Props): ReactElement { checked={value.preserveLength} onCheckedChange={(checked) => setValue( - new TransformLastName({ ...value, preserveLength: checked }) + create(TransformLastNameSchema, { + ...value, + preserveLength: checked, + }) ) } disabled={isDisabled} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformPhoneNumberForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformPhoneNumberForm.tsx index 23cfca552d..1c1f34cf91 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformPhoneNumberForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformPhoneNumberForm.tsx @@ -2,15 +2,11 @@ import FormErrorMessage from '@/components/FormErrorMessage'; import { FormDescription, FormLabel } from '@/components/ui/form'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { TransformPhoneNumber } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { TransformPhoneNumber, TransformPhoneNumberSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformPhoneNumber, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function TransformPhoneNumberForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -29,7 +25,7 @@ export default function TransformPhoneNumberForm(props: Props): ReactElement { checked={value.preserveLength} onCheckedChange={(checked) => setValue( - new TransformPhoneNumber({ + create(TransformPhoneNumberSchema, { ...value, preserveLength: checked, }) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformStringForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformStringForm.tsx index 0ca9a83054..5dacbb4517 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformStringForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformStringForm.tsx @@ -3,16 +3,12 @@ import { FormDescription, FormLabel } from '@/components/ui/form'; import FormErrorMessage from '@/components/FormErrorMessage'; import { Switch } from '@/components/ui/switch'; -import { PlainMessage } from '@bufbuild/protobuf'; -import { TransformString } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { TransformString, TransformStringSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { TransformerConfigProps } from './util'; -interface Props - extends TransformerConfigProps< - TransformString, - PlainMessage - > {} +interface Props extends TransformerConfigProps {} export default function TransformStringForm(props: Props): ReactElement { const { value, setValue, isDisabled, errors } = props; @@ -29,7 +25,12 @@ export default function TransformStringForm(props: Props): ReactElement { - setValue(new TransformString({ ...value, preserveLength: checked })) + setValue( + create(TransformStringSchema, { + ...value, + preserveLength: checked, + }) + ) } disabled={isDisabled} /> diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformerForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformerForm.tsx index cb1dee1879..9573b75154 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformerForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/TransformerForms/TransformerForm.tsx @@ -1,5 +1,5 @@ -import { PlainMessage } from '@bufbuild/protobuf'; -import { TransformerConfig } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { TransformerConfig, TransformerConfigSchema } from '@neosync/sdk'; import { ReactElement } from 'react'; import { FieldErrors } from 'react-hook-form'; import GenerateCardNumberForm from './GenerateCardNumber'; @@ -34,7 +34,7 @@ interface Props { setValue(newValue: TransformerConfig): void; disabled?: boolean; - errors?: FieldErrors>; + errors?: FieldErrors; NoConfigComponent?: ReactElement; } @@ -50,7 +50,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -65,7 +65,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -80,7 +80,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -95,7 +95,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -110,7 +110,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -125,7 +125,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -140,7 +140,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -155,7 +155,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -170,7 +170,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -185,7 +185,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -200,7 +200,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -215,7 +215,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -230,7 +230,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -245,7 +245,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -260,7 +260,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -275,7 +275,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -290,7 +290,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -305,7 +305,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -320,7 +320,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -335,7 +335,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -350,7 +350,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -365,7 +365,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -380,7 +380,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -395,7 +395,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -410,7 +410,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) @@ -425,7 +425,7 @@ export default function TransformerForm(props: Props): ReactElement { value={valConfig.value} setValue={(newVal) => setValue( - new TransformerConfig({ + create(TransformerConfigSchema, { config: { case: valConfig.case, value: newVal }, }) ) diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/page.tsx index 6f27974037..f1468af0c4 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/transformer/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/transformer/page.tsx @@ -30,20 +30,16 @@ import { convertTransformerConfigSchemaToTransformerConfig, convertTransformerConfigToForm, } from '@/yup-validations/jobs'; +import { create } from '@bufbuild/protobuf'; import { useMutation, useQuery } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { - GenerateBool, - SystemTransformer, - TransformerConfig, + GenerateBoolSchema, + SystemTransformerSchema, + TransformerConfigSchema, TransformerSource, + TransformersService, } from '@neosync/sdk'; -import { - createUserDefinedTransformer, - getSystemTransformers, - isTransformerNameAvailable, - validateUserJavascriptCode, -} from '@neosync/sdk/connectquery'; import { CheckIcon } from '@radix-ui/react-icons'; import { useRouter, useSearchParams } from 'next/navigation'; import { usePostHog } from 'posthog-js/react'; @@ -68,7 +64,9 @@ function getTransformerSource(sourceStr: string): TransformerSource { export default function NewTransformer(): ReactElement { const { account } = useAccount(); - const { data, isLoading } = useQuery(getSystemTransformers); + const { data, isLoading } = useQuery( + TransformersService.method.getSystemTransformers + ); const transformers = data?.transformers ?? []; const transformerQueryParam = useSearchParams().get('transformer'); @@ -76,10 +74,10 @@ export default function NewTransformer(): ReactElement { transformerQueryParam ?? TransformerSource.UNSPECIFIED.toString() ); const { mutateAsync: isTransformerNameAvailableAsync } = useMutation( - isTransformerNameAvailable + TransformersService.method.isTransformerNameAvailable ); const { mutateAsync: isJavascriptCodeValid } = useMutation( - validateUserJavascriptCode + TransformersService.method.validateUserJavascriptCode ); const [openBaseSelect, setOpenBaseSelect] = useState(false); @@ -95,8 +93,11 @@ export default function NewTransformer(): ReactElement { name: '', source: transformerSource, config: convertTransformerConfigToForm( - new TransformerConfig({ - config: { case: 'generateBoolConfig', value: new GenerateBool() }, + create(TransformerConfigSchema, { + config: { + case: 'generateBoolConfig', + value: create(GenerateBoolSchema, {}), + }, }) ), description: '', @@ -109,7 +110,9 @@ export default function NewTransformer(): ReactElement { }); const router = useRouter(); - const { mutateAsync } = useMutation(createUserDefinedTransformer); + const { mutateAsync } = useMutation( + TransformersService.method.createUserDefinedTransformer + ); async function onSubmit( values: CreateUserDefinedTransformerFormValues @@ -151,7 +154,7 @@ export default function NewTransformer(): ReactElement { const base = transformers.find((t) => t.source === formSource) ?? - new SystemTransformer(); + create(SystemTransformerSchema, {}); const configCase = form.watch('config.case'); diff --git a/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunActivityTable/columns.tsx b/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunActivityTable/columns.tsx index 85423af248..3a538f1a13 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunActivityTable/columns.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunActivityTable/columns.tsx @@ -5,7 +5,7 @@ import { ColumnDef } from '@tanstack/react-table'; import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'; import { Badge } from '@/components/ui/badge'; import { formatDateTimeMilliseconds } from '@/util/util'; -import { Timestamp } from '@bufbuild/protobuf'; +import { Timestamp, timestampDate } from '@bufbuild/protobuf/wkt'; import { JobRunEvent, JobRunEventTaskError } from '@neosync/sdk'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { getJobSyncMetadata } from './data-table'; @@ -41,7 +41,7 @@ export function getColumns(props: GetColumnsProps): ColumnDef[] {
{scheduledTime && - formatDateTimeMilliseconds(scheduledTime?.toDate())} + formatDateTimeMilliseconds(timestampDate(scheduledTime))}
); @@ -57,7 +57,8 @@ export function getColumns(props: GetColumnsProps): ColumnDef[] { return (
- {startTime && formatDateTimeMilliseconds(startTime?.toDate())} + {startTime && + formatDateTimeMilliseconds(timestampDate(startTime))}
); @@ -77,7 +78,7 @@ export function getColumns(props: GetColumnsProps): ColumnDef[] {
{closeTime - ? formatDateTimeMilliseconds(closeTime?.toDate()) + ? formatDateTimeMilliseconds(timestampDate(closeTime)) : 'N/A'}
diff --git a/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunLogsTable/columns.tsx b/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunLogsTable/columns.tsx index fb987bc94f..952a823bf6 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunLogsTable/columns.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/runs/[id]/components/JobRunLogsTable/columns.tsx @@ -2,7 +2,7 @@ import { ColumnDef } from '@tanstack/react-table'; -import { PlainMessage, Timestamp } from '@bufbuild/protobuf'; +import { Timestamp, timestampDate } from '@bufbuild/protobuf/wkt'; import { GetJobRunLogsStreamResponse } from '@neosync/sdk'; import { DataTableColumnHeader } from './data-table-column-header'; @@ -10,7 +10,7 @@ interface GetColumnsProps {} export function getColumns( props: GetColumnsProps -): ColumnDef>[] { +): ColumnDef[] { const {} = props; return [ { @@ -20,8 +20,8 @@ export function getColumns( ), size: 210, cell: ({ getValue, cell }) => { - const date = getValue()?.toDate(); - const text = date ? date.toISOString() : '-'; + const date = getValue(); + const text = date ? timestampDate(date).toISOString() : '-'; return (
(false); @@ -118,8 +119,8 @@ export default function Page({ params }: PageProps): ReactElement { let timer: NodeJS.Timeout; if (jobRun?.startedAt && jobRun?.status === JobRunStatusEnum.RUNNING) { const updateDuration = () => { - if (jobRun?.startedAt?.toDate()) { - setDuration(getDuration(new Date(), jobRun?.startedAt?.toDate())); + if (jobRun?.startedAt) { + setDuration(getDuration(new Date(), timestampDate(jobRun.startedAt))); } }; @@ -128,7 +129,10 @@ export default function Page({ params }: PageProps): ReactElement { timer = setInterval(updateDuration, 1000); } else if (jobRun?.completedAt && jobRun?.startedAt) { setDuration( - getDuration(jobRun.completedAt.toDate(), jobRun.startedAt.toDate()) + getDuration( + timestampDate(jobRun.completedAt), + timestampDate(jobRun.startedAt) + ) ); } // cleans up and restarts the interval if the job isn't done yet @@ -309,11 +313,17 @@ export default function Page({ params }: PageProps): ReactElement { />
diff --git a/frontend/apps/web/app/(mgmt)/[account]/runs/components/JobRunsTable/columns.tsx b/frontend/apps/web/app/(mgmt)/[account]/runs/components/JobRunsTable/columns.tsx index 3a84a4911b..2a1cc58045 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/runs/components/JobRunsTable/columns.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/runs/components/JobRunsTable/columns.tsx @@ -3,7 +3,7 @@ import { ColumnDef } from '@tanstack/react-table'; import { formatDateTime } from '@/util/util'; -import { PlainMessage, Timestamp } from '@bufbuild/protobuf'; +import { timestampDate } from '@bufbuild/protobuf/wkt'; import { JobRun } from '@neosync/sdk'; import NextLink from 'next/link'; import JobRunStatus from '../JobRunStatus'; @@ -16,9 +16,7 @@ interface GetColumnsProps { jobNameMap: Record; } -export function getColumns( - props: GetColumnsProps -): ColumnDef>[] { +export function getColumns(props: GetColumnsProps): ColumnDef[] { const { onDeleted, accountName, jobNameMap } = props; return [ { @@ -100,7 +98,7 @@ export function getColumns( return (
- {formatDateTime(row.getValue('startedAt')?.toDate())} + {formatDateTime(timestampDate(row.getValue('startedAt')))}
); @@ -116,7 +114,7 @@ export function getColumns( ), cell: ({ row }) => { const completedAt = row.getValue('completedAt') - ? formatDateTime(row.getValue('completedAt')?.toDate()) + ? formatDateTime(timestampDate(row.getValue('completedAt'))) : undefined; return (
diff --git a/frontend/apps/web/app/(mgmt)/[account]/runs/components/JobRunsTable/data-table-row-actions.tsx b/frontend/apps/web/app/(mgmt)/[account]/runs/components/JobRunsTable/data-table-row-actions.tsx index d59e6342f7..0b03d524e0 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/runs/components/JobRunsTable/data-table-row-actions.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/runs/components/JobRunsTable/data-table-row-actions.tsx @@ -16,12 +16,11 @@ import { } from '@/components/ui/dropdown-menu'; import { getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; -import { JobRun, JobRunStatus as JobRunStatusEnum } from '@neosync/sdk'; import { - cancelJobRun, - deleteJobRun, - terminateJobRun, -} from '@neosync/sdk/connectquery'; + JobRun, + JobRunStatus as JobRunStatusEnum, + JobService, +} from '@neosync/sdk'; import { useRouter } from 'next/navigation'; import { toast } from 'sonner'; @@ -37,9 +36,15 @@ export function DataTableRowActions({ const run = row.original as JobRun; const router = useRouter(); const { account } = useAccount(); - const { mutateAsync: removeJobRunAsync } = useMutation(deleteJobRun); - const { mutateAsync: cancelJobRunAsync } = useMutation(cancelJobRun); - const { mutateAsync: terminateJobRunAsync } = useMutation(terminateJobRun); + const { mutateAsync: removeJobRunAsync } = useMutation( + JobService.method.deleteJobRun + ); + const { mutateAsync: cancelJobRunAsync } = useMutation( + JobService.method.cancelJobRun + ); + const { mutateAsync: terminateJobRunAsync } = useMutation( + JobService.method.terminateJobRun + ); async function onDelete(): Promise { try { diff --git a/frontend/apps/web/app/(mgmt)/[account]/runs/components/RunsTable.tsx b/frontend/apps/web/app/(mgmt)/[account]/runs/components/RunsTable.tsx index 75c88c11d4..9040d3416e 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/runs/components/RunsTable.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/runs/components/RunsTable.tsx @@ -7,7 +7,7 @@ import { onJobRunsPaused, } from '@/libs/utils'; import { useQuery } from '@connectrpc/connect-query'; -import { getJobRuns, getJobs } from '@neosync/sdk/connectquery'; +import { JobService } from '@neosync/sdk'; import { ArrowTopRightIcon } from '@radix-ui/react-icons'; import { ReactElement, useMemo, useState } from 'react'; import { GoStack } from 'react-icons/go'; @@ -35,7 +35,7 @@ export default function RunsTable(props: RunsTableProps): ReactElement { refetch: mutate, isFetching: isValidating, } = useQuery( - getJobRuns, + JobService.method.getJobRuns, { id: { case: 'accountId', value: account?.id ?? '' } }, { enabled() { @@ -52,7 +52,11 @@ export default function RunsTable(props: RunsTableProps): ReactElement { refetch: jobsMutate, isLoading: isJobsLoading, isFetching: isJobsValidating, - } = useQuery(getJobs, { accountId: account?.id }, { enabled: !!account?.id }); + } = useQuery( + JobService.method.getJobs, + { accountId: account?.id }, + { enabled: !!account?.id } + ); const jobs = jobsData?.jobs ?? []; diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/components/RemoveAccountApiKeyButton.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/components/RemoveAccountApiKeyButton.tsx index 011fb6997a..b1289aa5d9 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/components/RemoveAccountApiKeyButton.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/components/RemoveAccountApiKeyButton.tsx @@ -4,7 +4,7 @@ import DeleteConfirmationDialog from '@/components/DeleteConfirmationDialog'; import { Button } from '@/components/ui/button'; import { getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; -import { deleteAccountApiKey } from '@neosync/sdk/connectquery'; +import { ApiKeyService } from '@neosync/sdk'; import { TrashIcon } from '@radix-ui/react-icons'; import { ReactElement, ReactNode } from 'react'; import { toast } from 'sonner'; @@ -17,7 +17,7 @@ interface Props { export default function RemoveAccountApiKeyButton(props: Props): ReactElement { const { id, trigger, onDeleted } = props; - const { mutateAsync } = useMutation(deleteAccountApiKey); + const { mutateAsync } = useMutation(ApiKeyService.method.deleteAccountApiKey); async function onDelete(): Promise { try { diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/page.tsx index 33c9f752cc..e94d2e5cf6 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/page.tsx @@ -11,9 +11,9 @@ import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { formatDateTime } from '@/util/util'; +import { timestampDate } from '@bufbuild/protobuf/wkt'; import { useQuery } from '@connectrpc/connect-query'; -import { AccountApiKey } from '@neosync/sdk'; -import { getAccountApiKey } from '@neosync/sdk/connectquery'; +import { AccountApiKey, ApiKeyService } from '@neosync/sdk'; import { InfoCircledIcon, ReloadIcon } from '@radix-ui/react-icons'; import Error from 'next/error'; import Link from 'next/link'; @@ -27,7 +27,7 @@ export default function AccountApiKeyPage({ params }: PageProps): ReactElement { const router = useRouter(); const { account } = useAccount(); const { data, isLoading } = useQuery( - getAccountApiKey, + ApiKeyService.method.getAccountApiKey, { id }, { enabled: !!id } ); @@ -136,19 +136,25 @@ function ApiKeyDetails(props: ApiKeyDetailsProps): ReactElement {

Created At:

- {formatDateTime(apiKey.createdAt?.toDate())} + {formatDateTime( + apiKey.createdAt ? timestampDate(apiKey.createdAt) : new Date() + )}

Updated At:

- {formatDateTime(apiKey.updatedAt?.toDate())} + {formatDateTime( + apiKey.updatedAt ? timestampDate(apiKey.updatedAt) : new Date() + )}

Expires At:

- {formatDateTime(apiKey.expiresAt?.toDate())} + {formatDateTime( + apiKey.expiresAt ? timestampDate(apiKey.expiresAt) : new Date() + )}
diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/regenerate/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/regenerate/page.tsx index 135e72a488..023acf17b8 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/regenerate/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/[id]/regenerate/page.tsx @@ -33,18 +33,19 @@ import { import { cn } from '@/libs/utils'; import { getErrorMessage } from '@/util/util'; import { RegenerateApiKeyForm } from '@/yup-validations/apikey'; -import { Timestamp } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; +import { timestampFromMs } from '@bufbuild/protobuf/wkt'; import { createConnectQueryKey, useMutation, useQuery, } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { GetAccountApiKeyResponse } from '@neosync/sdk'; import { - getAccountApiKey, - regenerateAccountApiKey, -} from '@neosync/sdk/connectquery'; + ApiKeyService, + GetAccountApiKeyResponseSchema, + RegenerateAccountApiKeyRequestSchema, +} from '@neosync/sdk'; import { CalendarIcon } from '@radix-ui/react-icons'; import { useQueryClient } from '@tanstack/react-query'; import { addDays, endOfDay, format, startOfDay } from 'date-fns'; @@ -61,11 +62,13 @@ export default function RegenerateAccountApiKey({ const router = useRouter(); const { account } = useAccount(); const { data, isLoading } = useQuery( - getAccountApiKey, + ApiKeyService.method.getAccountApiKey, { id }, { enabled: !!id } ); - const { mutateAsync } = useMutation(regenerateAccountApiKey); + const { mutateAsync } = useMutation( + ApiKeyService.method.regenerateAccountApiKey + ); const queryclient = useQueryClient(); const form = useForm({ @@ -81,22 +84,28 @@ export default function RegenerateAccountApiKey({ return; } try { - const updatedApiKey = await mutateAsync({ - id, - expiresAt: new Timestamp({ - seconds: BigInt(values.expiresAt.getTime() / 1000), - }), - }); + const updatedApiKey = await mutateAsync( + create(RegenerateAccountApiKeyRequestSchema, { + id, + expiresAt: timestampFromMs(values.expiresAt.getTime()), + }) + ); if (updatedApiKey.apiKey?.keyValue && !!window?.sessionStorage) { const storeVal: ApiKeyValueSessionStore = { keyValue: updatedApiKey.apiKey.keyValue, }; window.sessionStorage.setItem(id, JSON.stringify(storeVal)); } - const key = createConnectQueryKey(getAccountApiKey, { id }); + const key = createConnectQueryKey({ + schema: ApiKeyService.method.getAccountApiKey, + input: { id }, + cardinality: undefined, + }); queryclient.setQueryData( key, - new GetAccountApiKeyResponse({ apiKey: updatedApiKey.apiKey }) + create(GetAccountApiKeyResponseSchema, { + apiKey: updatedApiKey.apiKey, + }) ); router.push(`/${account?.name}/settings/api-keys/${id}`); toast.success('Successfully regenerated api key!'); diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/components/ApiKeysTable/columns.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/components/ApiKeysTable/columns.tsx index a4eb04ccf3..d0b397f321 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/components/ApiKeysTable/columns.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/components/ApiKeysTable/columns.tsx @@ -7,7 +7,7 @@ import NextLink from 'next/link'; import TruncatedText from '@/components/TruncatedText'; import { Badge, BadgeProps } from '@/components/ui/badge'; import { formatDateTime } from '@/util/util'; -import { PlainMessage, Timestamp } from '@bufbuild/protobuf'; +import { Timestamp, timestampDate } from '@bufbuild/protobuf/wkt'; import { AccountApiKey } from '@neosync/sdk'; import { DataTableColumnHeader } from './data-table-column-header'; import { DataTableRowActions } from './data-table-row-actions'; @@ -17,9 +17,7 @@ interface GetColumnsProps { accountName: string; } -export function getColumns( - props: GetColumnsProps -): ColumnDef>[] { +export function getColumns(props: GetColumnsProps): ColumnDef[] { const { onDeleted, accountName } = props; return [ { @@ -61,11 +59,11 @@ export function getColumns( ), cell: ({ row }) => { - const expiresAt = row - .getValue('expiresAt') - ?.toDate() - .getTime(); - const text = expiresAt > Date.now() ? 'active' : 'expired'; + const expiresAt = row.getValue('expiresAt') + ? timestampDate(row.getValue('expiresAt')).getTime() + : undefined; + const text = + !!expiresAt && expiresAt > Date.now() ? 'active' : 'expired'; const badgeVariant: BadgeProps['variant'] = text === 'active' ? 'success' : 'destructive'; @@ -84,10 +82,13 @@ export function getColumns( ), cell: ({ row }) => { + const expiresAt = row.getValue('expiresAt'); return (
- {formatDateTime(row.getValue('expiresAt')?.toDate())} + {formatDateTime( + expiresAt ? timestampDate(expiresAt) : new Date() + )}
); @@ -102,10 +103,13 @@ export function getColumns( ), cell: ({ row }) => { + const createdAt = row.getValue('createdAt'); return (
- {formatDateTime(row.getValue('createdAt')?.toDate())} + {formatDateTime( + createdAt ? timestampDate(createdAt) : new Date() + )}
); @@ -120,10 +124,13 @@ export function getColumns( ), cell: ({ row }) => { + const updatedAt = row.getValue('updatedAt'); return (
- {formatDateTime(row.getValue('updatedAt')?.toDate())} + {formatDateTime( + updatedAt ? timestampDate(updatedAt) : new Date() + )}
); diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/page.tsx index b16f11cfcc..f60bcbf7d2 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/api-keys/page.tsx @@ -5,7 +5,7 @@ import { useAccount } from '@/components/providers/account-provider'; import SkeletonTable from '@/components/skeleton/SkeletonTable'; import { Button } from '@/components/ui/button'; import { useQuery } from '@connectrpc/connect-query'; -import { getAccountApiKeys } from '@neosync/sdk/connectquery'; +import { ApiKeyService } from '@neosync/sdk'; import { PlusIcon } from '@radix-ui/react-icons'; import Link from 'next/link'; import { ReactElement, useMemo } from 'react'; @@ -33,7 +33,7 @@ function ApiKeyTable(props: ApiKeyTableProps): ReactElement { const { account } = useAccount(); const { data, isLoading, refetch } = useQuery( - getAccountApiKeys, + ApiKeyService.method.getAccountApiKeys, { accountId: account?.id ?? '' }, { enabled: !!account?.id } ); diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/billing/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/billing/page.tsx index 6586037e90..0ac8e8ed6b 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/billing/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/billing/page.tsx @@ -14,12 +14,7 @@ import { getErrorMessage, toTitleCase } from '@/util/util'; import { CreateTeamFormValues } from '@/yup-validations/account-switcher'; import { useMutation, useQuery } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { UserAccount, UserAccountType } from '@neosync/sdk'; -import { - getAccountBillingCheckoutSession, - getAccountBillingPortalSession, - isAccountStatusValid, -} from '@neosync/sdk/connectquery'; +import { UserAccount, UserAccountService, UserAccountType } from '@neosync/sdk'; import { CheckIcon } from '@radix-ui/react-icons'; import Error from 'next/error'; import Link from 'next/link'; @@ -132,16 +127,16 @@ function ManageSubscription(props: ManageSubscriptionProps): ReactElement { const { account } = props; const { data: isAccountStatusValidResp, isLoading } = useQuery( - isAccountStatusValid, + UserAccountService.method.isAccountStatusValid, { accountId: account.id }, { enabled: !!account.id } ); const { mutateAsync: getAccountBillingPortalSessionAsync } = useMutation( - getAccountBillingPortalSession + UserAccountService.method.getAccountBillingPortalSession ); const { mutateAsync: getAccountBillingCheckoutSessionAsync } = useMutation( - getAccountBillingCheckoutSession + UserAccountService.method.getAccountBillingCheckoutSession ); const router = useRouter(); const [isGeneratingUrl, setIsGeneratingUrl] = useState(false); diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/InviteTable.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/InviteTable.tsx index c31008b29f..c5bc8d4079 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/InviteTable.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/InviteTable.tsx @@ -34,12 +34,9 @@ import { getAccountRoleString, getErrorMessage, } from '@/util/util'; +import { timestampDate } from '@bufbuild/protobuf/wkt'; import { useMutation, useQuery } from '@connectrpc/connect-query'; -import { AccountRole } from '@neosync/sdk'; -import { - getTeamAccountInvites, - removeTeamAccountInvite, -} from '@neosync/sdk/connectquery'; +import { AccountRole, UserAccountService } from '@neosync/sdk'; import { TrashIcon } from '@radix-ui/react-icons'; import { useMemo, useState } from 'react'; import { toast } from 'sonner'; @@ -130,7 +127,7 @@ interface Props { export function InvitesTable(props: Props): React.ReactElement { const { accountId } = props; const { data, isLoading, refetch, isFetching } = useQuery( - getTeamAccountInvites, + UserAccountService.method.getTeamAccountInvites, { accountId: accountId }, { enabled: !!accountId } ); @@ -140,8 +137,12 @@ export function InvitesTable(props: Props): React.ReactElement { return { id: invite.id, email: invite.email, - createdAt: invite.createdAt?.toDate() ?? new Date(), - expiresAt: invite.expiresAt?.toDate() ?? new Date(), + createdAt: invite.createdAt + ? timestampDate(invite.createdAt) + : new Date(), + expiresAt: invite.expiresAt + ? timestampDate(invite.expiresAt) + : new Date(), token: invite.token, role: invite.role, }; @@ -280,7 +281,9 @@ interface DeleteInviteButtonProps { } function DeleteInviteButton({ inviteId, onDeleted }: DeleteInviteButtonProps) { - const { mutateAsync } = useMutation(removeTeamAccountInvite); + const { mutateAsync } = useMutation( + UserAccountService.method.removeTeamAccountInvite + ); async function onRemove(): Promise { try { diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/InviteUserForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/InviteUserForm.tsx index ecf684f561..2ce5bef2c1 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/InviteUserForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/InviteUserForm.tsx @@ -27,8 +27,7 @@ import { getErrorMessage } from '@/util/util'; import { InviteMembersForm } from '@/yup-validations/invite-members'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { AccountRole } from '@neosync/sdk'; -import { inviteUserToTeamAccount } from '@neosync/sdk/connectquery'; +import { AccountRole, UserAccountService } from '@neosync/sdk'; import { DialogClose } from '@radix-ui/react-dialog'; import { PlusIcon } from '@radix-ui/react-icons'; import { ReactElement, useState } from 'react'; @@ -55,7 +54,9 @@ export default function InviteUserForm(props: Props): ReactElement { role: AccountRole.JOB_VIEWER, }, }); - const { mutateAsync } = useMutation(inviteUserToTeamAccount); + const { mutateAsync } = useMutation( + UserAccountService.method.inviteUserToTeamAccount + ); async function onSubmit(values: InviteMembersForm): Promise { try { diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/MemberTable.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/MemberTable.tsx index 35e8f5041e..02147e6b1c 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/MemberTable.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/MemberTable.tsx @@ -23,11 +23,7 @@ import { import { useGetSystemAppConfig } from '@/libs/hooks/useGetSystemAppConfig'; import { getAccountRoleString, getErrorMessage } from '@/util/util'; import { useMutation, useQuery } from '@connectrpc/connect-query'; -import { AccountRole, AccountUser } from '@neosync/sdk'; -import { - getTeamAccountMembers, - removeTeamAccountMember, -} from '@neosync/sdk/connectquery'; +import { AccountRole, AccountUser, UserAccountService } from '@neosync/sdk'; import { DotsHorizontalIcon } from '@radix-ui/react-icons'; import { ColumnDef, @@ -127,7 +123,7 @@ interface Props { export default function MembersTable(props: Props): ReactElement { const { accountId } = props; const { data, isLoading, refetch, isFetching } = useQuery( - getTeamAccountMembers, + UserAccountService.method.getTeamAccountMembers, { accountId: accountId }, { enabled: !!accountId } ); @@ -316,7 +312,9 @@ function DataTableRowActions({ }: DataTableRowActionsProps) { const { account } = useAccount(); - const { mutateAsync } = useMutation(removeTeamAccountMember); + const { mutateAsync } = useMutation( + UserAccountService.method.removeTeamAccountMember + ); async function onRemove(): Promise { if (!account?.id) { diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/UpdateMemberRoleDialog.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/UpdateMemberRoleDialog.tsx index f7888aded5..9ed7376a6c 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/UpdateMemberRoleDialog.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/members/components/UpdateMemberRoleDialog.tsx @@ -10,8 +10,7 @@ import { import { getErrorMessage } from '@/util/util'; import { UpdateMemberRoleFormValues } from '@/yup-validations/invite-members'; import { useMutation } from '@connectrpc/connect-query'; -import { AccountUser } from '@neosync/sdk'; -import { setUserRole } from '@neosync/sdk/connectquery'; +import { AccountUser, UserAccountService } from '@neosync/sdk'; import { ReactElement, ReactNode, useState } from 'react'; import { toast } from 'sonner'; import UpdateMemberRoleForm from './UpdateMemberRoleForm'; @@ -24,7 +23,9 @@ interface Props { export default function UpdateMemberRoleDialog(props: Props): ReactElement { const { member, onUpdated, dialogButton } = props; - const { mutateAsync: updateUserRole } = useMutation(setUserRole); + const { mutateAsync: updateUserRole } = useMutation( + UserAccountService.method.setUserRole + ); const { account } = useAccount(); const [open, setOpen] = useState(false); diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/members/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/members/page.tsx index 45733ba788..8644030cc6 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/members/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/members/page.tsx @@ -5,8 +5,7 @@ import { Alert, AlertTitle } from '@/components/ui/alert'; import { Skeleton } from '@/components/ui/skeleton'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { useQuery } from '@connectrpc/connect-query'; -import { UserAccountType } from '@neosync/sdk'; -import { getTeamAccountInvites } from '@neosync/sdk/connectquery'; +import { UserAccountService, UserAccountType } from '@neosync/sdk'; import { ReactElement } from 'react'; import { InvitesTable } from './components/InviteTable'; import InviteUserForm from './components/InviteUserForm'; @@ -19,7 +18,7 @@ export default function MemberManagementSettings(_: Props): ReactElement { const accountId = account?.id || ''; const { refetch } = useQuery( - getTeamAccountInvites, + UserAccountService.method.getTeamAccountInvites, { accountId: accountId }, { enabled: !!accountId } ); diff --git a/frontend/apps/web/app/(mgmt)/[account]/settings/temporal/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/settings/temporal/page.tsx index 7f6f9c50f3..250079f9aa 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/settings/temporal/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/settings/temporal/page.tsx @@ -16,6 +16,7 @@ import { Skeleton } from '@/components/ui/skeleton'; import { useGetSystemAppConfig } from '@/libs/hooks/useGetSystemAppConfig'; import { getErrorMessage } from '@/util/util'; import { TemporalFormValues } from '@/yup-validations/temporal'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useMutation, @@ -23,13 +24,10 @@ import { } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { - AccountTemporalConfig, - GetAccountTemporalConfigResponse, + AccountTemporalConfigSchema, + GetAccountTemporalConfigResponseSchema, + UserAccountService, } from '@neosync/sdk'; -import { - getAccountTemporalConfig, - setAccountTemporalConfig, -} from '@neosync/sdk/connectquery'; import { useQueryClient } from '@tanstack/react-query'; import Error from 'next/error'; import { ReactElement } from 'react'; @@ -41,11 +39,13 @@ export default function Temporal(): ReactElement { const { data: systemAppConfigData, isLoading: isSystemAppConfigDataLoading } = useGetSystemAppConfig(); const { data: tcData, isLoading: isTemporalConfigLoading } = useQuery( - getAccountTemporalConfig, + UserAccountService.method.getAccountTemporalConfig, { accountId: account?.id ?? '' }, { enabled: !!account?.id } ); - const { mutateAsync } = useMutation(setAccountTemporalConfig); + const { mutateAsync } = useMutation( + UserAccountService.method.setAccountTemporalConfig + ); const queryclient = useQueryClient(); const form = useForm({ @@ -68,18 +68,22 @@ export default function Temporal(): ReactElement { try { const updatedResp = await mutateAsync({ accountId: account.id, - config: new AccountTemporalConfig({ + config: create(AccountTemporalConfigSchema, { namespace: values.namespace, syncJobQueueName: values.syncJobName, url: values.temporalUrl, }), }); - const key = createConnectQueryKey(getAccountTemporalConfig, { - accountId: account.id, + const key = createConnectQueryKey({ + schema: UserAccountService.method.getAccountTemporalConfig, + input: { accountId: account.id }, + cardinality: undefined, }); queryclient.setQueryData( key, - new GetAccountTemporalConfigResponse({ config: updatedResp.config }) + create(GetAccountTemporalConfigResponseSchema, { + config: updatedResp.config, + }) ); toast.success('Successfully updated temporal config'); } catch (err) { diff --git a/frontend/apps/web/app/(mgmt)/[account]/transformers/EditTransformerOptions.tsx b/frontend/apps/web/app/(mgmt)/[account]/transformers/EditTransformerOptions.tsx index 32fe3670da..3107021291 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/transformers/EditTransformerOptions.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/transformers/EditTransformerOptions.tsx @@ -27,10 +27,15 @@ import { convertTransformerConfigToForm, JobMappingTransformerForm, } from '@/yup-validations/jobs'; +import { create } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { TransformerConfig, TransformerSource } from '@neosync/sdk'; -import { validateUserJavascriptCode } from '@neosync/sdk/connectquery'; +import { + TransformerConfig, + TransformerConfigSchema, + TransformerSource, + TransformersService, +} from '@neosync/sdk'; import { EyeOpenIcon, MixerHorizontalIcon, @@ -116,7 +121,7 @@ export default function EditTransformerOptions(props: Props): ReactElement { ? convertTransformerConfigSchemaToTransformerConfig( value.config ) - : (transformer.config ?? new TransformerConfig()) + : (transformer.config ?? create(TransformerConfigSchema)) } onSubmit={(newval) => { onSubmit({ @@ -149,7 +154,7 @@ function EditTransformerConfig( const { account } = useAccount(); const { mutateAsync: isJavascriptCodeValid } = useMutation( - validateUserJavascriptCode + TransformersService.method.validateUserJavascriptCode ); const form = useForm< diff --git a/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/components/RemoveTransformerButton.tsx b/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/components/RemoveTransformerButton.tsx index 9e355446a7..8a2ec7daaa 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/components/RemoveTransformerButton.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/components/RemoveTransformerButton.tsx @@ -4,7 +4,7 @@ import { useAccount } from '@/components/providers/account-provider'; import { Button } from '@/components/ui/button'; import { getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; -import { deleteUserDefinedTransformer } from '@neosync/sdk/connectquery'; +import { TransformersService } from '@neosync/sdk'; import { TrashIcon } from '@radix-ui/react-icons'; import { useRouter } from 'next/navigation'; import { ReactElement } from 'react'; @@ -18,7 +18,9 @@ export default function RemoveTransformerButton(props: Props): ReactElement { const { transformerID } = props; const router = useRouter(); const { account } = useAccount(); - const { mutateAsync } = useMutation(deleteUserDefinedTransformer); + const { mutateAsync } = useMutation( + TransformersService.method.deleteUserDefinedTransformer + ); async function deleteTransformer(): Promise { try { diff --git a/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/components/UpdateTransformerForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/components/UpdateTransformerForm.tsx index 2166c0aada..597ce61357 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/components/UpdateTransformerForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/components/UpdateTransformerForm.tsx @@ -25,12 +25,7 @@ import { } from '@/yup-validations/transformer-validations'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { UserDefinedTransformer } from '@neosync/sdk'; -import { - isTransformerNameAvailable, - updateUserDefinedTransformer, - validateUserJavascriptCode, -} from '@neosync/sdk/connectquery'; +import { TransformersService, UserDefinedTransformer } from '@neosync/sdk'; import NextLink from 'next/link'; import { ReactElement } from 'react'; import { useForm } from 'react-hook-form'; @@ -46,10 +41,10 @@ export default function UpdateTransformerForm(props: Props): ReactElement { const { currentTransformer, onUpdated } = props; const { account } = useAccount(); const { mutateAsync: isTransformerNameAvailableAsync } = useMutation( - isTransformerNameAvailable + TransformersService.method.isTransformerNameAvailable ); const { mutateAsync: isJavascriptCodeValid } = useMutation( - validateUserJavascriptCode + TransformersService.method.validateUserJavascriptCode ); const form = useForm< @@ -71,7 +66,9 @@ export default function UpdateTransformerForm(props: Props): ReactElement { isUserJavascriptCodeValid: isJavascriptCodeValid, }, }); - const { mutateAsync } = useMutation(updateUserDefinedTransformer); + const { mutateAsync } = useMutation( + TransformersService.method.updateUserDefinedTransformer + ); async function onSubmit( values: UpdateUserDefinedTransformerFormValues diff --git a/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/page.tsx index 71dc460b01..a9515880ea 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/transformers/[id]/page.tsx @@ -4,9 +4,12 @@ import PageHeader from '@/components/headers/PageHeader'; import SkeletonForm from '@/components/skeleton/SkeletonForm'; import { PageProps } from '@/components/types'; import { getTransformerDataTypesString } from '@/util/util'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useQuery } from '@connectrpc/connect-query'; -import { GetUserDefinedTransformerByIdResponse } from '@neosync/sdk'; -import { getUserDefinedTransformerById } from '@neosync/sdk/connectquery'; +import { + GetUserDefinedTransformerByIdResponseSchema, + TransformersService, +} from '@neosync/sdk'; import { useQueryClient } from '@tanstack/react-query'; import RemoveTransformerButton from './components/RemoveTransformerButton'; import UpdateTransformerForm from './components/UpdateTransformerForm'; @@ -17,7 +20,7 @@ export default function UpdateUserDefinedTransformerPage({ const id = params?.id ?? ''; const { data, isLoading } = useQuery( - getUserDefinedTransformerById, + TransformersService.method.getUserDefinedTransformerById, { transformerId: id }, { enabled: !!id } ); @@ -56,13 +59,16 @@ export default function UpdateUserDefinedTransformerPage({ { - const key = createConnectQueryKey( - getUserDefinedTransformerById, - { transformerId: id } - ); + const key = createConnectQueryKey({ + schema: + TransformersService.method + .getUserDefinedTransformerById, + input: { transformerId: id }, + cardinality: undefined, + }); queryclient.setQueryData( key, - new GetUserDefinedTransformerByIdResponse({ + create(GetUserDefinedTransformerByIdResponseSchema, { transformer: updatedTransformer, }) ); diff --git a/frontend/apps/web/app/(mgmt)/[account]/transformers/components/SystemTransformersTable/columns.tsx b/frontend/apps/web/app/(mgmt)/[account]/transformers/components/SystemTransformersTable/columns.tsx index dc33e672ed..bcda52aa43 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/transformers/components/SystemTransformersTable/columns.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/transformers/components/SystemTransformersTable/columns.tsx @@ -6,7 +6,6 @@ import { getTransformerJobTypesString, getTransformerSourceString, } from '@/util/util'; -import { PlainMessage } from '@bufbuild/protobuf'; import { SystemTransformer } from '@neosync/sdk'; import { ColumnDef } from '@tanstack/react-table'; import NextLink from 'next/link'; @@ -19,7 +18,7 @@ interface GetSystemTransformercolumnsProps { export function getSystemTransformerColumns( props: GetSystemTransformercolumnsProps -): ColumnDef>[] { +): ColumnDef[] { const { accountName } = props; return [ { diff --git a/frontend/apps/web/app/(mgmt)/[account]/transformers/components/UserDefinedTransformersTable/columns.tsx b/frontend/apps/web/app/(mgmt)/[account]/transformers/components/UserDefinedTransformersTable/columns.tsx index 4b70a01411..00a3d414ac 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/transformers/components/UserDefinedTransformersTable/columns.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/transformers/components/UserDefinedTransformersTable/columns.tsx @@ -7,7 +7,7 @@ import { getTransformerDataTypesString, getTransformerSourceString, } from '@/util/util'; -import { PlainMessage, Timestamp } from '@bufbuild/protobuf'; +import { Timestamp, timestampDate } from '@bufbuild/protobuf/wkt'; import { UserDefinedTransformer } from '@neosync/sdk'; import { ColumnDef } from '@tanstack/react-table'; import NextLink from 'next/link'; @@ -21,7 +21,7 @@ interface getUserDefinedTransformerColumnsProps { export function getUserDefinedTransformerColumns( props: getUserDefinedTransformerColumnsProps -): ColumnDef>[] { +): ColumnDef[] { const { onTransformerDeleted, accountName } = props; return [ @@ -89,7 +89,9 @@ export function getUserDefinedTransformerColumns(
{row.original.createdAt && - formatDateTime(row.getValue('createdAt')?.toDate())} + formatDateTime( + timestampDate(row.getValue('createdAt')) + )}
); @@ -108,7 +110,9 @@ export function getUserDefinedTransformerColumns(
{row.original.updatedAt && - formatDateTime(row.getValue('updatedAt')?.toDate())} + formatDateTime( + timestampDate(row.getValue('updatedAt')) + )}
); diff --git a/frontend/apps/web/app/(mgmt)/[account]/transformers/components/UserDefinedTransformersTable/data-table-row-actions.tsx b/frontend/apps/web/app/(mgmt)/[account]/transformers/components/UserDefinedTransformersTable/data-table-row-actions.tsx index 72593b43be..97f6ec9783 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/transformers/components/UserDefinedTransformersTable/data-table-row-actions.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/transformers/components/UserDefinedTransformersTable/data-table-row-actions.tsx @@ -12,8 +12,7 @@ import { } from '@/components/ui/dropdown-menu'; import { getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; -import { UserDefinedTransformer } from '@neosync/sdk'; -import { deleteUserDefinedTransformer } from '@neosync/sdk/connectquery'; +import { TransformersService, UserDefinedTransformer } from '@neosync/sdk'; import { DotsHorizontalIcon } from '@radix-ui/react-icons'; import { Row } from '@tanstack/react-table'; import { useRouter } from 'next/navigation'; @@ -32,7 +31,7 @@ export function DataTableRowActions({ const router = useRouter(); const { account } = useAccount(); const { mutateAsync: removeTransformer } = useMutation( - deleteUserDefinedTransformer + TransformersService.method.deleteUserDefinedTransformer ); async function onDelete(): Promise { diff --git a/frontend/apps/web/app/(mgmt)/[account]/transformers/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/transformers/page.tsx index fc763a08a0..a1bc614239 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/transformers/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/transformers/page.tsx @@ -8,10 +8,7 @@ import SkeletonTable from '@/components/skeleton/SkeletonTable'; import { Button } from '@/components/ui/button'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { useQuery } from '@connectrpc/connect-query'; -import { - getSystemTransformers, - getUserDefinedTransformers, -} from '@neosync/sdk/connectquery'; +import { TransformersService } from '@neosync/sdk'; import { PlusIcon } from '@radix-ui/react-icons'; import NextLink from 'next/link'; import { ReadonlyURLSearchParams, useSearchParams } from 'next/navigation'; @@ -60,7 +57,7 @@ interface TransformersTableProps { function TransformersTable(props: TransformersTableProps): ReactElement { const { defaultTab } = props; const { data, isLoading: isSystemTransformersLoading } = useQuery( - getSystemTransformers + TransformersService.method.getSystemTransformers ); const { account } = useAccount(); const { @@ -68,7 +65,7 @@ function TransformersTable(props: TransformersTableProps): ReactElement { isLoading: userDefinedTransformersLoading, refetch: userDefinedTransformerRefetch, } = useQuery( - getUserDefinedTransformers, + TransformersService.method.getUserDefinedTransformers, { accountId: account?.id ?? '' }, { enabled: !!account?.id } ); diff --git a/frontend/apps/web/app/(mgmt)/[account]/transformers/systemTransformers/[source]/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/transformers/systemTransformers/[source]/page.tsx index 24517f055e..5c88a77c36 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/transformers/systemTransformers/[source]/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/transformers/systemTransformers/[source]/page.tsx @@ -27,8 +27,7 @@ import { convertTransformerConfigToForm, } from '@/yup-validations/jobs'; import { useQuery } from '@connectrpc/connect-query'; -import { TransformerSource } from '@neosync/sdk'; -import { getSystemTransformerBySource } from '@neosync/sdk/connectquery'; +import { TransformerSource, TransformersService } from '@neosync/sdk'; import Error from 'next/error'; import NextLink from 'next/link'; import { ReactElement } from 'react'; @@ -48,7 +47,7 @@ export default function ViewSystemTransformers({ }: PageProps): ReactElement { const sourceParam = getTransformerSource(params?.source ?? ''); const { data: systemTransformerData, isLoading } = useQuery( - getSystemTransformerBySource, + TransformersService.method.getSystemTransformerBySource, { source: sourceParam }, { enabled: !!sourceParam } ); diff --git a/frontend/apps/web/app/api/accounts/[accountId]/runs/[id]/logs/route.ts b/frontend/apps/web/app/api/accounts/[accountId]/runs/[id]/logs/route.ts index 9d26928816..bc2c05bd71 100644 --- a/frontend/apps/web/app/api/accounts/[accountId]/runs/[id]/logs/route.ts +++ b/frontend/apps/web/app/api/accounts/[accountId]/runs/[id]/logs/route.ts @@ -1,7 +1,8 @@ import { withNeosyncContext } from '@/api-only/neosync-context'; import { RequestContext } from '@/shared'; +import { create } from '@bufbuild/protobuf'; import { - GetJobRunLogsStreamRequest, + GetJobRunLogsStreamRequestSchema, GetJobRunLogsStreamResponse, LogLevel, LogWindow, @@ -16,7 +17,7 @@ export async function GET( const { searchParams } = new URL(req.url); const loglevel = searchParams.get('loglevel'); const response = ctx.client.jobs.getJobRunLogsStream( - new GetJobRunLogsStreamRequest({ + create(GetJobRunLogsStreamRequestSchema, { jobRunId: params.id, accountId: params.accountId, window: getWindow('1d'), diff --git a/frontend/apps/web/app/api/config/config.ts b/frontend/apps/web/app/api/config/config.ts index c871884061..fcf5536ae2 100644 --- a/frontend/apps/web/app/api/config/config.ts +++ b/frontend/apps/web/app/api/config/config.ts @@ -30,8 +30,6 @@ export function getSystemAppConfig(): SystemAppConfig { calendlyUpgradeLink: process.env.CALENDLY_UPGRADE_LINK ?? 'https://calendly.com/evis1/30min', isGcpCloudStorageConnectionsEnabled: isGcpConnectionsEnabled(), - isDynamoDbConnectionsEnabled: isDynamoConnectionsEnabled(), - isMsSqlServerEnabled: isMssqlConnectionsEnabled(), neosyncApiBaseUrl: process.env.NEOSYNC_API_BASE_URL ?? 'http://localhost:8080', publicNeosyncApiBaseUrl: PUBLIC_PATHNAME, // ensures that this always points to the same domain @@ -45,16 +43,6 @@ function isGcpConnectionsEnabled(): boolean { return val ? val === 'false' : true; } -function isDynamoConnectionsEnabled(): boolean { - const val = process.env.DYNAMODB_CONNECTIONS_DISABLED; - return val ? val === 'false' : true; -} - -function isMssqlConnectionsEnabled(): boolean { - const val = process.env.MSSQL_CONNECTIONS_DISABLED; - return val ? val === 'false' : true; -} - function isAnalyticsEnabled(): boolean { const val = process.env.NEOSYNC_ANALYTICS_ENABLED; return val ? val === 'true' : true; diff --git a/frontend/apps/web/app/api/users/whoami/route.ts b/frontend/apps/web/app/api/users/whoami/route.ts index c8afe62742..189de1a1b4 100644 --- a/frontend/apps/web/app/api/users/whoami/route.ts +++ b/frontend/apps/web/app/api/users/whoami/route.ts @@ -1,13 +1,19 @@ import { withNeosyncContext } from '@/api-only/neosync-context'; -import { SetPersonalAccountRequest, SetUserRequest } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { + SetPersonalAccountRequestSchema, + SetUserRequestSchema, +} from '@neosync/sdk'; import { NextRequest, NextResponse } from 'next/server'; export async function GET(req: NextRequest): Promise { return withNeosyncContext(async (ctx) => { - const setUserResp = await ctx.client.users.setUser(new SetUserRequest({})); + const setUserResp = await ctx.client.users.setUser( + create(SetUserRequestSchema, {}) + ); await ctx.client.users.setPersonalAccount( - new SetPersonalAccountRequest({}) + create(SetPersonalAccountRequestSchema, {}) ); return setUserResp; })(req); diff --git a/frontend/apps/web/app/config/app-config.ts b/frontend/apps/web/app/config/app-config.ts index dcecb9546e..06601c80a9 100644 --- a/frontend/apps/web/app/config/app-config.ts +++ b/frontend/apps/web/app/config/app-config.ts @@ -12,8 +12,6 @@ export interface SystemAppConfig { calendlyUpgradeLink: string; isGcpCloudStorageConnectionsEnabled: boolean; - isDynamoDbConnectionsEnabled: boolean; - isMsSqlServerEnabled: boolean; // server-side base url neosyncApiBaseUrl: string; // public (client-side) base url; diff --git a/frontend/apps/web/app/invite/page.tsx b/frontend/apps/web/app/invite/page.tsx index 7bd6b15959..5b331c28b6 100644 --- a/frontend/apps/web/app/invite/page.tsx +++ b/frontend/apps/web/app/invite/page.tsx @@ -7,7 +7,7 @@ import { useGetSystemAppConfig } from '@/libs/hooks/useGetSystemAppConfig'; import { useNeosyncUser } from '@/libs/hooks/useNeosyncUser'; import { getErrorMessage } from '@/util/util'; import { useMutation } from '@connectrpc/connect-query'; -import { acceptTeamAccountInvite } from '@neosync/sdk/connectquery'; +import { UserAccountService } from '@neosync/sdk'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { signIn, useSession } from 'next-auth/react'; import { useRouter, useSearchParams } from 'next/navigation'; @@ -26,7 +26,7 @@ export default function InvitePage(): ReactElement { const { data: systemData, isLoading: isSystemDataLoading } = useGetSystemAppConfig(); const { mutateAsync: acceptTeamInvite } = useMutation( - acceptTeamAccountInvite + UserAccountService.method.acceptTeamAccountInvite ); useEffect(() => { diff --git a/frontend/apps/web/components/RunTImeline/RunTimeline.tsx b/frontend/apps/web/components/RunTImeline/RunTimeline.tsx index ca48b0a6c0..4d89cb816a 100644 --- a/frontend/apps/web/components/RunTImeline/RunTimeline.tsx +++ b/frontend/apps/web/components/RunTImeline/RunTimeline.tsx @@ -5,7 +5,11 @@ import { DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; import { cn } from '@/libs/utils'; -import { Timestamp } from '@bufbuild/protobuf'; +import { + Timestamp, + timestampDate, + TimestampSchema, +} from '@bufbuild/protobuf/wkt'; import { JobRunEvent, JobRunStatus } from '@neosync/sdk'; import { @@ -14,6 +18,7 @@ import { TooltipProvider, TooltipTrigger, } from '@/components/ui/tooltip'; +import { isMessage } from '@bufbuild/protobuf'; import { JobRunStatus as JobRunStatusEnum } from '@neosync/sdk'; import { CheckCircledIcon, @@ -394,7 +399,7 @@ function TableHeader(props: TableHeaderProps): ReactElement { // converts a timestamp to a date and handles undefined values function convertTimestampToDate(timestamp: Timestamp | undefined): Date { - return timestamp ? timestamp.toDate() : new Date(); + return timestamp ? timestampDate(timestamp) : new Date(); } // calculates the last time if the job is not successful so we can give the timeline an end date @@ -512,7 +517,7 @@ function StatusFilter({ selectedStatuses, onStatusChange }: StatusFilterProps) { function formatFullDate(date: Timestamp | Date | undefined) { if (!date) return 'N/A'; - if (date instanceof Timestamp) { + if (isMessage(date, TimestampSchema)) { return format(convertTimestampToDate(date), 'MM/dd/yyyy HH:mm:ss:SSS'); } diff --git a/frontend/apps/web/components/SystemLicenseAlert.tsx b/frontend/apps/web/components/SystemLicenseAlert.tsx new file mode 100644 index 0000000000..95db195067 --- /dev/null +++ b/frontend/apps/web/components/SystemLicenseAlert.tsx @@ -0,0 +1,36 @@ +import { useQuery } from '@connectrpc/connect-query'; +import { UserAccountService } from '@neosync/sdk'; +import { ReactElement } from 'react'; +import { IoAlertCircleOutline } from 'react-icons/io5'; +import { Alert, AlertDescription, AlertTitle } from './ui/alert'; + +interface Props { + title?: string; + description?: string; +} + +// Displays an alert if the user does not have a valid license +export default function SystemLicenseAlert(props: Props): ReactElement | null { + const { + title = 'License Required', + description = 'This feature is only available to customers with a valid license.', + } = props; + + const { data: systemInfo } = useQuery( + UserAccountService.method.getSystemInformation + ); + + if (systemInfo?.license?.isValid) { + return null; + } + + return ( + +
+ + {title} +
+ {description} +
+ ); +} diff --git a/frontend/apps/web/components/connections/TestConnectionBadge.tsx b/frontend/apps/web/components/connections/TestConnectionBadge.tsx index 83394c428e..5c6d4943d4 100644 --- a/frontend/apps/web/components/connections/TestConnectionBadge.tsx +++ b/frontend/apps/web/components/connections/TestConnectionBadge.tsx @@ -1,5 +1,8 @@ 'use client'; -import { CheckConnectionConfigResponse } from '@neosync/sdk'; +import { + CheckConnectionConfigByIdResponse, + CheckConnectionConfigResponse, +} from '@neosync/sdk'; import { ArrowTopRightIcon, CheckCircledIcon } from '@radix-ui/react-icons'; import Link from 'next/link'; import { ReactElement } from 'react'; @@ -7,7 +10,10 @@ import { MdErrorOutline } from 'react-icons/md'; import { TiWarningOutline } from 'react-icons/ti'; interface TestConnectionBadgeProps { - validationResponse: CheckConnectionConfigResponse | undefined; + validationResponse: + | CheckConnectionConfigResponse + | CheckConnectionConfigByIdResponse + | undefined; connectionId: string | undefined; accountName: string; } @@ -27,7 +33,10 @@ export default function TestConnectionBadge( } interface ValidationResponseBadgeProps { - validationResponse: CheckConnectionConfigResponse | undefined; + validationResponse: + | CheckConnectionConfigResponse + | CheckConnectionConfigByIdResponse + | undefined; accountName: string; connectionId: string; } diff --git a/frontend/apps/web/components/jobs/JobMappingTable/Columns.tsx b/frontend/apps/web/components/jobs/JobMappingTable/Columns.tsx index 1f570283a2..fd7bc28f87 100644 --- a/frontend/apps/web/components/jobs/JobMappingTable/Columns.tsx +++ b/frontend/apps/web/components/jobs/JobMappingTable/Columns.tsx @@ -6,7 +6,8 @@ import { isInvalidTransformer, } from '@/util/util'; import { JobMappingTransformerForm } from '@/yup-validations/jobs'; -import { SystemTransformer } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { SystemTransformerSchema } from '@neosync/sdk'; import { ColumnDef, createColumnHelper, Row } from '@tanstack/react-table'; import { DataTableRowActions } from '../NosqlTable/data-table-row-actions'; import EditCollection from '../NosqlTable/EditCollection'; @@ -190,7 +191,7 @@ function getJobMappingColumns(): ColumnDef[] { cell({ table, row }) { const transformer = table.options.meta?.jmTable?.getTransformerFromField(row.index) ?? - new SystemTransformer(); + create(SystemTransformerSchema); const transformerForm = row.original.transformer; return (
@@ -249,6 +250,16 @@ function getJobMappingColumns(): ColumnDef[] { ]; } +function transformerFilterFn( + row: Row, + columnId: string, + fitlerValue: any // eslint-disable-line @typescript-eslint/no-explicit-any +): boolean; +function transformerFilterFn( + row: Row, + columnId: string, + fitlerValue: any // eslint-disable-line @typescript-eslint/no-explicit-any +): boolean; function transformerFilterFn( row: Row, columnId: string, @@ -370,7 +381,7 @@ function getNosqlJobMappingColumns(): ColumnDef[] { cell({ table, row }) { const transformer = table.options.meta?.jmTable?.getTransformerFromField(row.index) ?? - new SystemTransformer(); + create(SystemTransformerSchema); const transformerForm = row.original.transformer; return (
diff --git a/frontend/apps/web/components/jobs/NosqlTable/AddNewNosqlRecord.tsx b/frontend/apps/web/components/jobs/NosqlTable/AddNewNosqlRecord.tsx index 8b55941c6c..7694d80883 100644 --- a/frontend/apps/web/components/jobs/NosqlTable/AddNewNosqlRecord.tsx +++ b/frontend/apps/web/components/jobs/NosqlTable/AddNewNosqlRecord.tsx @@ -28,20 +28,19 @@ import { convertJobMappingTransformerToForm, JobMappingTransformerForm, } from '@/yup-validations/jobs'; -import { PartialMessage } from '@bufbuild/protobuf'; +import { create, MessageInitShape } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; import { ConnectError, - JobMappingTransformer, - Passthrough, - SystemTransformer, - TransformerConfig, - TransformerSource, - ValidateUserJavascriptCodeRequest, + JobMappingTransformerSchema, + PassthroughSchema, + SystemTransformerSchema, + TransformerConfigSchema, + TransformersService, + ValidateUserJavascriptCodeRequestSchema, ValidateUserJavascriptCodeResponse, } from '@neosync/sdk'; -import { validateUserJavascriptCode } from '@neosync/sdk/connectquery'; import { UseMutateAsyncFunction } from '@tanstack/react-query'; import { ReactElement } from 'react'; import { useForm } from 'react-hook-form'; @@ -99,7 +98,7 @@ interface AddNewNosqlRecordFormContext { isUserJavascriptCodeValid: UseMutateAsyncFunction< ValidateUserJavascriptCodeResponse, ConnectError, - PartialMessage, + MessageInitShape, unknown >; isDuplicateKey: (value: string, schema: string, table: string) => boolean; @@ -110,7 +109,7 @@ export default function AddNewNosqlRecord(props: Props): ReactElement { const { account } = useAccount(); const { mutateAsync: validateUserJsCodeAsync } = useMutation( - validateUserJavascriptCode + TransformersService.method.validateUserJavascriptCode ); const form = useForm< AddNewNosqlRecordFormValues, @@ -122,12 +121,11 @@ export default function AddNewNosqlRecord(props: Props): ReactElement { collection: '', key: '', transformer: convertJobMappingTransformerToForm( - new JobMappingTransformer({ - source: TransformerSource.PASSTHROUGH, - config: new TransformerConfig({ + create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'passthroughConfig', - value: new Passthrough(), + value: create(PassthroughSchema), }, }), }) @@ -239,7 +237,9 @@ export default function AddNewNosqlRecord(props: Props): ReactElement { />
{ field.onChange(newvalue); diff --git a/frontend/apps/web/components/jobs/SchemaTable/ImportJobMappingsButton.tsx b/frontend/apps/web/components/jobs/SchemaTable/ImportJobMappingsButton.tsx index 999ecc7402..40d01f4043 100644 --- a/frontend/apps/web/components/jobs/SchemaTable/ImportJobMappingsButton.tsx +++ b/frontend/apps/web/components/jobs/SchemaTable/ImportJobMappingsButton.tsx @@ -2,7 +2,8 @@ import ButtonText from '@/components/ButtonText'; import ConfirmationDialog from '@/components/ConfirmationDialog'; import SwitchCard from '@/components/switches/SwitchCard'; import { Button } from '@/components/ui/button'; -import { JobMapping } from '@neosync/sdk'; +import { fromJson } from '@bufbuild/protobuf'; +import { JobMapping, JobMappingSchema } from '@neosync/sdk'; import { filesize } from 'filesize'; import { ReactElement, @@ -199,7 +200,7 @@ function Body(props: BodyProps): ReactElement { try { if (Array.isArray(data)) { - const mappings = data.map((d) => JobMapping.fromJson(d)); + const mappings = data.map((d) => fromJson(JobMappingSchema, d)); resolve({ success: true, data: mappings, diff --git a/frontend/apps/web/components/jobs/SchemaTable/SchemaTableToolBar.tsx b/frontend/apps/web/components/jobs/SchemaTable/SchemaTableToolBar.tsx index 7795622d61..f43b891889 100644 --- a/frontend/apps/web/components/jobs/SchemaTable/SchemaTableToolBar.tsx +++ b/frontend/apps/web/components/jobs/SchemaTable/SchemaTableToolBar.tsx @@ -16,9 +16,10 @@ import { convertJobMappingTransformerToForm, JobMappingTransformerForm, } from '@/yup-validations/jobs'; +import { create } from '@bufbuild/protobuf'; import { JobMapping, - JobMappingTransformer, + JobMappingTransformerSchema, SystemTransformer, UserDefinedTransformer, } from '@neosync/sdk'; @@ -69,7 +70,7 @@ export function SchemaTableToolbar({ const [bulkTransformer, setBulkTransformer] = useState( - convertJobMappingTransformerToForm(new JobMappingTransformer()) + convertJobMappingTransformerToForm(create(JobMappingTransformerSchema)) ); const transformer = getTransformerFromField(bulkTransformer); @@ -121,7 +122,9 @@ export function SchemaTableToolbar({ } onBulkUpdate(rowIndices, bulkTransformer); setBulkTransformer( - convertJobMappingTransformerToForm(new JobMappingTransformer()) + convertJobMappingTransformerToForm( + create(JobMappingTransformerSchema) + ) ); table.resetRowSelection(true); }} diff --git a/frontend/apps/web/components/jobs/SchemaTable/TransformerSelect.tsx b/frontend/apps/web/components/jobs/SchemaTable/TransformerSelect.tsx index 9f6f011aec..3f43c2f3a3 100644 --- a/frontend/apps/web/components/jobs/SchemaTable/TransformerSelect.tsx +++ b/frontend/apps/web/components/jobs/SchemaTable/TransformerSelect.tsx @@ -18,12 +18,13 @@ import { JobMappingTransformerForm, convertJobMappingTransformerToForm, } from '@/yup-validations/jobs'; +import { create } from '@bufbuild/protobuf'; import { - JobMappingTransformer, + JobMappingTransformerSchema, SystemTransformer, - TransformerConfig, + TransformerConfigSchema, UserDefinedTransformer, - UserDefinedTransformerConfig, + UserDefinedTransformerConfigSchema, } from '@neosync/sdk'; import { CaretSortIcon, CheckIcon } from '@radix-ui/react-icons'; import { ReactElement, useEffect, useState } from 'react'; @@ -105,13 +106,16 @@ export default function TransformerSelect(props: Props): ReactElement { onSelect={() => { onSelect( convertJobMappingTransformerToForm( - new JobMappingTransformer({ - config: new TransformerConfig({ + create(JobMappingTransformerSchema, { + config: create(TransformerConfigSchema, { config: { case: 'userDefinedTransformerConfig', - value: new UserDefinedTransformerConfig({ - id: t.id, - }), + value: create( + UserDefinedTransformerConfigSchema, + { + id: t.id, + } + ), }, }), }) @@ -152,7 +156,7 @@ export default function TransformerSelect(props: Props): ReactElement { onSelect={() => { onSelect( convertJobMappingTransformerToForm( - new JobMappingTransformer({ + create(JobMappingTransformerSchema, { config: t.config, }) ) diff --git a/frontend/apps/web/components/jobs/SchemaTable/schema-constraint-handler.ts b/frontend/apps/web/components/jobs/SchemaTable/schema-constraint-handler.ts index b88f7a1821..91d5563b81 100644 --- a/frontend/apps/web/components/jobs/SchemaTable/schema-constraint-handler.ts +++ b/frontend/apps/web/components/jobs/SchemaTable/schema-constraint-handler.ts @@ -1,14 +1,19 @@ -import { PlainMessage } from '@bufbuild/protobuf'; +import { create } from '@bufbuild/protobuf'; import { DatabaseColumn, ForeignConstraintTables, + ForeignConstraintTablesSchema, ForeignKey, + ForeignKeySchema, GetConnectionSchemaResponse, PrimaryConstraint, + PrimaryConstraintSchema, TransformerDataType, UniqueConstraints, + UniqueConstraintsSchema, VirtualForeignConstraint, VirtualForeignKey, + VirtualForeignKeySchema, } from '@neosync/sdk'; export type JobType = 'sync' | 'generate'; @@ -229,13 +234,14 @@ function buildColDetailsMap( const colmap: Record = {}; // Object.entries(schema).forEach(([key, schemaResp]) => { - const tablePkeys = primaryConstraints[key] ?? new PrimaryConstraint(); + const tablePkeys = + primaryConstraints[key] ?? create(PrimaryConstraintSchema); const primaryCols = new Set(tablePkeys.columns); const foreignFkeys = - foreignConstraints[key] ?? new ForeignConstraintTables(); + foreignConstraints[key] ?? create(ForeignConstraintTablesSchema); const virtualForeignKeys = virtualForeignConstraints[key] ?? []; const tableUniqueConstraints = - uniqueConstraints[key] ?? new UniqueConstraints({}); + uniqueConstraints[key] ?? create(UniqueConstraintsSchema); const uniqueConstraintCols = tableUniqueConstraints.constraints.reduce( (prev, curr) => { curr.columns.forEach((c) => prev.add(c)); @@ -248,12 +254,12 @@ function buildColDetailsMap( fkConstraints.forEach((constraint) => { constraint.columns.forEach((col, idx) => { if (constraint.foreignKey) { - fkconstraintsMap[col] = new ForeignKey({ + fkconstraintsMap[col] = create(ForeignKeySchema, { table: constraint.foreignKey?.table, columns: [constraint.foreignKey?.columns[idx]], }); } else { - fkconstraintsMap[col] = new ForeignKey(); + fkconstraintsMap[col] = create(ForeignKeySchema); } }); }); @@ -262,13 +268,13 @@ function buildColDetailsMap( virtualForeignKeys.forEach((vfk) => { vfk.columns.forEach((col, idx) => { if (vfk.foreignKey) { - virtualFkMap[col] = new VirtualForeignKey({ + virtualFkMap[col] = create(VirtualForeignKeySchema, { schema: vfk.foreignKey.schema, table: vfk.foreignKey?.table, columns: [vfk.foreignKey?.columns[idx]], }); } else { - virtualFkMap[col] = new VirtualForeignKey(); + virtualFkMap[col] = create(VirtualForeignKeySchema); } }); }); @@ -306,6 +312,6 @@ function buildColDetailsMap( function fromColKey(key: ColumnKey): string { return `${key.schema}.${key.table}.${key.column}`; } -function fromDbCol(dbcol: PlainMessage): string { +function fromDbCol(dbcol: DatabaseColumn): string { return `${dbcol.schema}.${dbcol.table}.${dbcol.column}`; } diff --git a/frontend/apps/web/components/jobs/SchemaTable/useOnExportMappings.tsx b/frontend/apps/web/components/jobs/SchemaTable/useOnExportMappings.tsx index 657cdc16f4..318fb7796f 100644 --- a/frontend/apps/web/components/jobs/SchemaTable/useOnExportMappings.tsx +++ b/frontend/apps/web/components/jobs/SchemaTable/useOnExportMappings.tsx @@ -2,7 +2,8 @@ import { convertJobMappingTransformerFormToJobMappingTransformer, JobMappingFormValues, } from '@/yup-validations/jobs'; -import { JobMapping } from '@neosync/sdk'; +import { create, toJson } from '@bufbuild/protobuf'; +import { JobMappingSchema } from '@neosync/sdk'; import { Row } from '@tanstack/react-table'; import { toast } from 'sonner'; import { useJsonFileDownload } from '../../useJsonFileDownload'; @@ -33,14 +34,18 @@ export function useOnExportMappings( ? jobMappings : selectedRows.map((row) => jobMappings[row.index]); const jms = dataToDownload.map((d) => { - return new JobMapping({ - schema: d.schema, - table: d.table, - column: d.column, - transformer: convertJobMappingTransformerFormToJobMappingTransformer( - d.transformer - ), - }).toJson(); + return toJson( + JobMappingSchema, + create(JobMappingSchema, { + schema: d.schema, + table: d.table, + column: d.column, + transformer: + convertJobMappingTransformerFormToJobMappingTransformer( + d.transformer + ), + }) + ); }); await downloadFile({ data: jms, diff --git a/frontend/apps/web/components/jobs/subsets/EditItem.tsx b/frontend/apps/web/components/jobs/subsets/EditItem.tsx index d6af21849e..532a9ef174 100644 --- a/frontend/apps/web/components/jobs/subsets/EditItem.tsx +++ b/frontend/apps/web/components/jobs/subsets/EditItem.tsx @@ -11,10 +11,16 @@ import { } from '@/components/ui/tooltip'; import { cn } from '@/libs/utils'; import { getErrorMessage } from '@/util/util'; +import { create } from '@bufbuild/protobuf'; import { useMutation } from '@connectrpc/connect-query'; import { Editor, useMonaco } from '@monaco-editor/react'; -import { CheckSqlQueryResponse, GetTableRowCountResponse } from '@neosync/sdk'; -import { checkSqlQuery, getTableRowCount } from '@neosync/sdk/connectquery'; +import { + CheckSqlQueryResponse, + CheckSqlQueryResponseSchema, + ConnectionDataService, + ConnectionService, + GetTableRowCountResponse, +} from '@neosync/sdk'; import { editor } from 'monaco-editor'; import { useTheme } from 'next-themes'; import { ReactElement, useEffect, useRef, useState } from 'react'; @@ -121,8 +127,12 @@ export default function EditItem(props: Props): ReactElement { setValidateResp(undefined); }, [item]); - const { mutateAsync: validateSql } = useMutation(checkSqlQuery); - const { mutateAsync: getRowCountByTable } = useMutation(getTableRowCount); + const { mutateAsync: validateSql } = useMutation( + ConnectionService.method.checkSqlQuery + ); + const { mutateAsync: getRowCountByTable } = useMutation( + ConnectionDataService.method.getTableRowCount + ); async function onValidate(): Promise { if (connectionType === 'pgConfig' || connectionType === 'mysqlConfig') { @@ -137,7 +147,7 @@ export default function EditItem(props: Props): ReactElement { setValidateResp(resp); } catch (err) { setValidateResp( - new CheckSqlQueryResponse({ + create(CheckSqlQueryResponseSchema, { isValid: false, erorrMessage: getErrorMessage(err), }) diff --git a/frontend/apps/web/components/onboarding-checklist/WelcomeDialog.tsx b/frontend/apps/web/components/onboarding-checklist/WelcomeDialog.tsx index 141cbc4b95..4d9ba927f6 100644 --- a/frontend/apps/web/components/onboarding-checklist/WelcomeDialog.tsx +++ b/frontend/apps/web/components/onboarding-checklist/WelcomeDialog.tsx @@ -6,16 +6,16 @@ import { AlertDialogTitle, } from '@/components/ui/alert-dialog'; import { getErrorMessage } from '@/util/util'; +import { create } from '@bufbuild/protobuf'; import { createConnectQueryKey, useMutation, useQuery, } from '@connectrpc/connect-query'; -import { GetAccountOnboardingConfigResponse } from '@neosync/sdk'; import { - getAccountOnboardingConfig, - setAccountOnboardingConfig, -} from '@neosync/sdk/connectquery'; + GetAccountOnboardingConfigResponseSchema, + UserAccountService, +} from '@neosync/sdk'; import { useQueryClient } from '@tanstack/react-query'; import { ReactElement, useEffect, useState } from 'react'; import { toast } from 'sonner'; @@ -47,13 +47,13 @@ export default function WelcomeDialog(): ReactElement { isFetching: isValidating, error, } = useQuery( - getAccountOnboardingConfig, + UserAccountService.method.getAccountOnboardingConfig, { accountId: account?.id ?? '' }, { enabled: !!account?.id } ); const queryclient = useQueryClient(); const { mutateAsync: setOnboardingConfigAsync } = useMutation( - setAccountOnboardingConfig + UserAccountService.method.setAccountOnboardingConfig ); const [currentStep, setCurrentStep] = useState('welcome'); @@ -156,10 +156,14 @@ export default function WelcomeDialog(): ReactElement { }, }); queryclient.setQueryData( - createConnectQueryKey(getAccountOnboardingConfig, { - accountId: account.id, + createConnectQueryKey({ + schema: UserAccountService.method.getAccountOnboardingConfig, + input: { + accountId: account.id, + }, + cardinality: undefined, }), - new GetAccountOnboardingConfigResponse({ + create(GetAccountOnboardingConfigResponseSchema, { config: resp.config, }) ); diff --git a/frontend/apps/web/components/permissions/PermissionsDialog.tsx b/frontend/apps/web/components/permissions/PermissionsDialog.tsx index 17ae7da4c9..95e0137c90 100644 --- a/frontend/apps/web/components/permissions/PermissionsDialog.tsx +++ b/frontend/apps/web/components/permissions/PermissionsDialog.tsx @@ -6,7 +6,6 @@ import { DialogHeader, DialogTitle, } from '@/components/ui/dialog'; -import { PlainMessage } from '@bufbuild/protobuf'; import { CheckConnectionConfigResponse } from '@neosync/sdk'; import { CheckCircledIcon, @@ -21,7 +20,7 @@ import PermissionsDataTable from './PermissionsDataTable'; import { PermissionConnectionType, getPermissionColumns } from './columns'; interface Props { - checkResponse: PlainMessage; + checkResponse: CheckConnectionConfigResponse; openPermissionDialog: boolean; setOpenPermissionDialog(open: boolean): void; isValidating: boolean; diff --git a/frontend/apps/web/components/permissions/columns.tsx b/frontend/apps/web/components/permissions/columns.tsx index 6531f109c5..b64cb32638 100644 --- a/frontend/apps/web/components/permissions/columns.tsx +++ b/frontend/apps/web/components/permissions/columns.tsx @@ -2,7 +2,6 @@ import { ColumnDef } from '@tanstack/react-table'; -import { PlainMessage } from '@bufbuild/protobuf'; import { ConnectionRolePrivilege } from '@neosync/sdk'; import { CheckCircledIcon, CircleBackslashIcon } from '@radix-ui/react-icons'; import { DataTableColumnHeader } from './data-table-column-header'; @@ -16,7 +15,7 @@ export type PermissionConnectionType = export function getPermissionColumns( connectionType: PermissionConnectionType -): ColumnDef>[] { +): ColumnDef[] { switch (connectionType) { case 'mongodb': case 'dynamodb': diff --git a/frontend/apps/web/components/providers/account-provider.tsx b/frontend/apps/web/components/providers/account-provider.tsx index 8f1fd24036..0f1189370f 100644 --- a/frontend/apps/web/components/providers/account-provider.tsx +++ b/frontend/apps/web/components/providers/account-provider.tsx @@ -1,7 +1,6 @@ 'use client'; import { useQuery } from '@connectrpc/connect-query'; -import { UserAccount } from '@neosync/sdk'; -import { getUserAccounts } from '@neosync/sdk/connectquery'; +import { UserAccount, UserAccountService } from '@neosync/sdk'; import { useParams, useRouter } from 'next/navigation'; import { ReactElement, @@ -46,7 +45,7 @@ export default function AccountProvider(props: Props): ReactElement { data: accountsResponse, isLoading, refetch: mutate, - } = useQuery(getUserAccounts); + } = useQuery(UserAccountService.method.getUserAccounts); const router = useRouter(); const [userAccount, setUserAccount] = useState( diff --git a/frontend/apps/web/components/site-header/AccountStatusHandler.tsx b/frontend/apps/web/components/site-header/AccountStatusHandler.tsx index 67dae0b410..8764ef63f9 100644 --- a/frontend/apps/web/components/site-header/AccountStatusHandler.tsx +++ b/frontend/apps/web/components/site-header/AccountStatusHandler.tsx @@ -1,9 +1,9 @@ 'use client'; import { SystemAppConfig } from '@/app/config/app-config'; import { cn } from '@/libs/utils'; +import { timestampDate } from '@bufbuild/protobuf/wkt'; import { useQuery } from '@connectrpc/connect-query'; -import { AccountStatus } from '@neosync/sdk'; -import { isAccountStatusValid } from '@neosync/sdk/connectquery'; +import { AccountStatus, UserAccountService } from '@neosync/sdk'; import { differenceInDays } from 'date-fns'; import { useAccount } from '../providers/account-provider'; import { Skeleton } from '../ui/skeleton'; @@ -18,7 +18,7 @@ export function AccountStatusHandler(props: Props) { const { account } = useAccount(); const { data: data, isLoading } = useQuery( - isAccountStatusValid, + UserAccountService.method.isAccountStatusValid, { accountId: account?.id }, { enabled: !!account?.id } ); @@ -32,13 +32,11 @@ export function AccountStatusHandler(props: Props) { (data?.accountStatus == AccountStatus.ACCOUNT_TRIAL_ACTIVE || data?.accountStatus == AccountStatus.ACCOUNT_TRIAL_EXPIRED); - const trialEndDate = new Date( - data?.trialExpiresAt?.toDate() ?? Date.now() - ).getTime(); + const trialEndDate = data?.trialExpiresAt + ? timestampDate(data.trialExpiresAt) + : new Date(); - const daysRemaining = Math.max( - differenceInDays(Math.max(trialEndDate), Date.now()) - ); + const daysRemaining = Math.max(differenceInDays(trialEndDate, new Date())); return (
diff --git a/frontend/apps/web/components/site-header/AccountSwitcher.tsx b/frontend/apps/web/components/site-header/AccountSwitcher.tsx index 4f6ee97aa7..19fade4eb9 100644 --- a/frontend/apps/web/components/site-header/AccountSwitcher.tsx +++ b/frontend/apps/web/components/site-header/AccountSwitcher.tsx @@ -12,12 +12,7 @@ import { getErrorMessage } from '@/util/util'; import { CreateTeamFormValues } from '@/yup-validations/account-switcher'; import { useMutation, useQuery } from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { UserAccount, UserAccountType } from '@neosync/sdk'; -import { - convertPersonalToTeamAccount, - createTeamAccount, - getUserAccounts, -} from '@neosync/sdk/connectquery'; +import { UserAccount, UserAccountService, UserAccountType } from '@neosync/sdk'; import { useRouter } from 'next/navigation'; import { useState } from 'react'; import { useForm } from 'react-hook-form'; @@ -43,7 +38,9 @@ interface Props {} export default function AccountSwitcher(_: Props): ReactElement | null { const { account, setAccount } = useAccount(); - const { data, isLoading } = useQuery(getUserAccounts); + const { data, isLoading } = useQuery( + UserAccountService.method.getUserAccounts + ); const [showNewTeamDialog, setShowNewTeamDialog] = useState(false); const { data: systemAppConfigData } = useGetSystemAppConfig(); const accounts = data?.accounts ?? []; @@ -253,12 +250,15 @@ export function useGetOnCreateTeamSubmit( const { account, setAccount } = useAccount(); - const { mutateAsync: createTeamAccountAsync } = - useMutation(createTeamAccount); + const { mutateAsync: createTeamAccountAsync } = useMutation( + UserAccountService.method.createTeamAccount + ); const { mutateAsync: convertPersonalToTeamAccountAsync } = useMutation( - convertPersonalToTeamAccount + UserAccountService.method.convertPersonalToTeamAccount + ); + const { refetch: refreshUserAccountsAsync } = useQuery( + UserAccountService.method.getUserAccounts ); - const { refetch: refreshUserAccountsAsync } = useQuery(getUserAccounts); const router = useRouter(); return async (values) => { diff --git a/frontend/apps/web/components/site-header/NeosyncVersion.tsx b/frontend/apps/web/components/site-header/NeosyncVersion.tsx index 048b7dae51..94a0aa7c51 100644 --- a/frontend/apps/web/components/site-header/NeosyncVersion.tsx +++ b/frontend/apps/web/components/site-header/NeosyncVersion.tsx @@ -1,10 +1,10 @@ 'use client'; import { useQuery } from '@connectrpc/connect-query'; -import { getSystemInformation } from '@neosync/sdk/connectquery'; +import { UserAccountService } from '@neosync/sdk'; import { ReactElement } from 'react'; export default function NeosyncVersion(): ReactElement | null { - const { data } = useQuery(getSystemInformation); + const { data } = useQuery(UserAccountService.method.getSystemInformation); if (!data?.version) { return null; } diff --git a/frontend/apps/web/components/usage/DailyMetricCount.tsx b/frontend/apps/web/components/usage/DailyMetricCount.tsx index 2acd496b20..79e64cfc61 100644 --- a/frontend/apps/web/components/usage/DailyMetricCount.tsx +++ b/frontend/apps/web/components/usage/DailyMetricCount.tsx @@ -1,6 +1,12 @@ +import { create } from '@bufbuild/protobuf'; import { useQuery } from '@connectrpc/connect-query'; -import { DayResult, Date as NeosyncDate, RangedMetricName } from '@neosync/sdk'; -import { getDailyMetricCount } from '@neosync/sdk/connectquery'; +import { + DayResult, + MetricsService, + Date as NeosyncDate, + DateSchema as NeosyncDateSchema, + RangedMetricName, +} from '@neosync/sdk'; import { format } from 'date-fns'; import { useTheme } from 'next-themes'; import { ReactElement } from 'react'; @@ -42,7 +48,7 @@ export default function DailyMetricCount(props: Props): ReactElement { const { account } = useAccount(); const [start, end] = periodToDateRange(period); const { data: metricCountData, isLoading } = useQuery( - getDailyMetricCount, + MetricsService.method.getDailyMetricCount, { metric, start: dateToNeoDate(start), @@ -100,7 +106,7 @@ export default function DailyMetricCount(props: Props): ReactElement { { - const date = obj.date ?? new NeosyncDate(); + const date = obj.date ?? create(NeosyncDateSchema); return format( new Date(date.year, date.month - 1, date.day), 'MMM d' @@ -142,6 +148,6 @@ interface DayResultPlotPoint { function toDayResultPlotPoints(results: DayResult[]): DayResultPlotPoint[] { return results.map((result) => ({ count: Number(result.count), - date: result.date ?? new NeosyncDate(), + date: result.date ?? create(NeosyncDateSchema), })); } diff --git a/frontend/apps/web/components/usage/MetricCount.tsx b/frontend/apps/web/components/usage/MetricCount.tsx index 53f35e66d6..963d41baab 100644 --- a/frontend/apps/web/components/usage/MetricCount.tsx +++ b/frontend/apps/web/components/usage/MetricCount.tsx @@ -1,6 +1,5 @@ import { useQuery } from '@connectrpc/connect-query'; -import { RangedMetricName } from '@neosync/sdk'; -import { getMetricCount } from '@neosync/sdk/connectquery'; +import { MetricsService, RangedMetricName } from '@neosync/sdk'; import { ReactElement } from 'react'; import { useAccount } from '../providers/account-provider'; import { @@ -30,7 +29,7 @@ export default function MetricCount(props: Props): ReactElement { const { account } = useAccount(); const [start, end] = periodToDateRange(period); const { data: metricCountData, isLoading } = useQuery( - getMetricCount, + MetricsService.method.getMetricCount, { metric, startDay: dateToNeoDate(start), diff --git a/frontend/apps/web/components/usage/util.ts b/frontend/apps/web/components/usage/util.ts index 815566b655..6dd50f1266 100644 --- a/frontend/apps/web/components/usage/util.ts +++ b/frontend/apps/web/components/usage/util.ts @@ -1,4 +1,8 @@ -import { Date as NeosyncDate } from '@neosync/sdk'; +import { create } from '@bufbuild/protobuf'; +import { + Date as NeosyncDate, + DateSchema as NeosyncDateSchema, +} from '@neosync/sdk'; import { endOfMonth, format, startOfMonth, subMonths } from 'date-fns'; export type MetricIdentifierType = 'accountId' | 'jobId' | 'runId'; @@ -23,7 +27,7 @@ export function shortNumberFormatter( export type UsagePeriod = 'current' | 'last-month'; export function dateToNeoDate(date: Date): NeosyncDate { - return new NeosyncDate({ + return create(NeosyncDateSchema, { day: date.getDate(), month: date.getMonth() + 1, year: date.getFullYear(), diff --git a/frontend/apps/web/libs/hooks/useGetJobRunLogs.ts b/frontend/apps/web/libs/hooks/useGetJobRunLogs.ts index 69e3aa972a..bf037e2ff7 100644 --- a/frontend/apps/web/libs/hooks/useGetJobRunLogs.ts +++ b/frontend/apps/web/libs/hooks/useGetJobRunLogs.ts @@ -1,10 +1,15 @@ -import { JsonValue } from '@bufbuild/protobuf'; -import { GetJobRunLogsStreamResponse, LogLevel } from '@neosync/sdk'; +import { fromJson, isMessage } from '@bufbuild/protobuf'; +import { + GetJobRunLogsStreamResponse, + GetJobRunLogsStreamResponseSchema, + LogLevel, +} from '@neosync/sdk'; import { useQuery, UseQueryResult } from '@tanstack/react-query'; import { fetcher } from '../fetcher'; interface GetJobRunLogsOptions { - refreshIntervalFn?(data: JsonValue): number; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + refreshIntervalFn?(data: any): number; } export function useGetJobRunLogs( @@ -30,15 +35,15 @@ export function useGetJobRunLogs( queryFn: (ctx) => fetcher(ctx.queryKey.join('/')), refetchInterval(query) { return query.state.data && refreshIntervalFn - ? refreshIntervalFn(query.state.data as JsonValue) + ? refreshIntervalFn(query.state.data) : 0; }, select(data) { const dataArr = Array.isArray(data) ? data : [data]; return dataArr.map((d) => - d instanceof GetJobRunLogsStreamResponse + isMessage(GetJobRunLogsStreamResponseSchema, d) ? d - : GetJobRunLogsStreamResponse.fromJson(d) + : fromJson(GetJobRunLogsStreamResponseSchema, d) ); }, enabled: !!runId && !!accountId && !!loglevel, @@ -47,13 +52,16 @@ export function useGetJobRunLogs( const TEN_SECONDS = 5 * 1000; -export function refreshLogsWhenRunNotComplete(data: JsonValue): number { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export function refreshLogsWhenRunNotComplete(data: any): number { const dataArr = Array.isArray(data) ? data : [data]; return dataArr.some((d) => { - const converted = - d instanceof GetJobRunLogsStreamResponse - ? d - : GetJobRunLogsStreamResponse.fromJson(d); + const converted: GetJobRunLogsStreamResponse = isMessage( + GetJobRunLogsStreamResponseSchema, + d + ) + ? d + : fromJson(GetJobRunLogsStreamResponseSchema, d); return ( converted.logLine.includes('context canceled') || converted.logLine.includes('workflow completed') diff --git a/frontend/apps/web/libs/hooks/useGetTransformersHandler.ts b/frontend/apps/web/libs/hooks/useGetTransformersHandler.ts index cbe612dd9a..47b7e00acd 100644 --- a/frontend/apps/web/libs/hooks/useGetTransformersHandler.ts +++ b/frontend/apps/web/libs/hooks/useGetTransformersHandler.ts @@ -1,9 +1,6 @@ import { TransformerHandler } from '@/components/jobs/SchemaTable/transformer-handler'; import { useQuery } from '@connectrpc/connect-query'; -import { - getSystemTransformers, - getUserDefinedTransformers, -} from '@neosync/sdk/connectquery'; +import { TransformersService } from '@neosync/sdk'; import { useMemo } from 'react'; export function useGetTransformersHandler(accountId: string): { @@ -15,13 +12,13 @@ export function useGetTransformersHandler(accountId: string): { data: systemTransformersData, isLoading: isLoadingSystemTransformers, isFetching: isSystemValidating, - } = useQuery(getSystemTransformers); + } = useQuery(TransformersService.method.getSystemTransformers); const { data: customTransformersData, isLoading: isLoadingCustomTransformers, isFetching: isCustomValidating, } = useQuery( - getUserDefinedTransformers, + TransformersService.method.getUserDefinedTransformers, { accountId: accountId }, { enabled: !!accountId } ); diff --git a/frontend/apps/web/libs/util.test.ts b/frontend/apps/web/libs/util.test.ts index ca5fab4864..76ef4a7cf7 100644 --- a/frontend/apps/web/libs/util.test.ts +++ b/frontend/apps/web/libs/util.test.ts @@ -1,12 +1,14 @@ +import { create } from '@bufbuild/protobuf'; import { AwsS3ConnectionConfig, Connection, ConnectionConfig, + ConnectionSchema, DynamoDBConnectionConfig, GcpCloudStorageConnectionConfig, - GetJobRunEventsResponse, - GetJobRunResponse, - JobRun, + GetJobRunEventsResponseSchema, + GetJobRunResponseSchema, + JobRunSchema, JobRunStatus, MongoConnectionConfig, MysqlConnectionConfig, @@ -57,32 +59,32 @@ describe('getSingleOrUndefined', () => { }); describe('splitConnections', () => { - const postgres = new Connection({ + const postgres = create(ConnectionSchema, { connectionConfig: { config: { case: 'pgConfig', value: {} as PostgresConnectionConfig }, } as ConnectionConfig, }); - const mysql = new Connection({ + const mysql = create(ConnectionSchema, { connectionConfig: { config: { case: 'mysqlConfig', value: {} as MysqlConnectionConfig }, } as ConnectionConfig, }); - const s3 = new Connection({ + const s3 = create(ConnectionSchema, { connectionConfig: { config: { case: 'awsS3Config', value: {} as AwsS3ConnectionConfig }, } as ConnectionConfig, }); - const openai = new Connection({ + const openai = create(ConnectionSchema, { connectionConfig: { config: { case: 'openaiConfig', value: {} as OpenAiConnectionConfig }, } as ConnectionConfig, }); - const mongodb = new Connection({ + const mongodb = create(ConnectionSchema, { connectionConfig: { config: { case: 'mongoConfig', value: {} as MongoConnectionConfig }, } as ConnectionConfig, }); - const gcpcs = new Connection({ + const gcpcs = create(ConnectionSchema, { connectionConfig: { config: { case: 'gcpCloudstorageConfig', @@ -90,7 +92,7 @@ describe('splitConnections', () => { }, } as ConnectionConfig, }); - const dynamodb = new Connection({ + const dynamodb = create(ConnectionSchema, { connectionConfig: { config: { case: 'dynamodbConfig', @@ -169,8 +171,8 @@ describe('refreshJobRunWhenJobRunning', () => { const TEN_SECONDS = 10 * 1000; it('should return 0 since COMPLETE is not in the list of status that shoudl return 10 seconds', () => { - const data = new GetJobRunResponse({ - jobRun: new JobRun({ + const data = create(GetJobRunResponseSchema, { + jobRun: create(JobRunSchema, { status: JobRunStatus.COMPLETE, }), }); @@ -178,8 +180,8 @@ describe('refreshJobRunWhenJobRunning', () => { expect(result).toEqual(0); }); it('should return 10 seconds in milliseconds since RUNNING is in th elist of status should return 10 seconds', () => { - const data = new GetJobRunResponse({ - jobRun: new JobRun({ + const data = create(GetJobRunResponseSchema, { + jobRun: create(JobRunSchema, { status: JobRunStatus.RUNNING, }), }); @@ -187,8 +189,8 @@ describe('refreshJobRunWhenJobRunning', () => { expect(result).toEqual(TEN_SECONDS); }); it('should return 10 seconds in milliseconds since PENDING is in th elist of status should return 10 seconds', () => { - const data = new GetJobRunResponse({ - jobRun: new JobRun({ + const data = create(GetJobRunResponseSchema, { + jobRun: create(JobRunSchema, { status: JobRunStatus.PENDING, }), }); @@ -196,8 +198,8 @@ describe('refreshJobRunWhenJobRunning', () => { expect(result).toEqual(TEN_SECONDS); }); it('should return 10 seconds in milliseconds since ERROR is in th elist of status should return 10 seconds', () => { - const data = new GetJobRunResponse({ - jobRun: new JobRun({ + const data = create(GetJobRunResponseSchema, { + jobRun: create(JobRunSchema, { status: JobRunStatus.ERROR, }), }); @@ -205,8 +207,8 @@ describe('refreshJobRunWhenJobRunning', () => { expect(result).toEqual(TEN_SECONDS); }); it('should return 0 since CANCELED is not in the list of status that shoudl return 10 seconds', () => { - const data = new GetJobRunResponse({ - jobRun: new JobRun({ + const data = create(GetJobRunResponseSchema, { + jobRun: create(JobRunSchema, { status: JobRunStatus.CANCELED, }), }); @@ -214,14 +216,14 @@ describe('refreshJobRunWhenJobRunning', () => { expect(result).toEqual(0); }); it('should return 0 because there is no jobRun.status', () => { - const data = new GetJobRunResponse({ - jobRun: new JobRun({}), + const data = create(GetJobRunResponseSchema, { + jobRun: create(JobRunSchema, {}), }); const result = refreshJobRunWhenJobRunning(data); expect(result).toEqual(0); }); it('should return 0 because there is no jobRun', () => { - const data = new GetJobRunResponse({}); + const data = create(GetJobRunResponseSchema, {}); const result = refreshJobRunWhenJobRunning(data); expect(result).toEqual(0); }); @@ -229,7 +231,7 @@ describe('refreshJobRunWhenJobRunning', () => { describe('refreshEventsWhenEventsIncomplete', () => { it('should return 0 since isRunComplete is true', () => { - const input = new GetJobRunEventsResponse({ + const input = create(GetJobRunEventsResponseSchema, { events: [], isRunComplete: true, }); @@ -237,7 +239,7 @@ describe('refreshEventsWhenEventsIncomplete', () => { expect(result).toEqual(0); }); it('should return 10 seconds in milliseconds since isRunComplete is false', () => { - const input = new GetJobRunEventsResponse({ + const input = create(GetJobRunEventsResponseSchema, { events: [], isRunComplete: false, }); @@ -245,7 +247,7 @@ describe('refreshEventsWhenEventsIncomplete', () => { expect(result).toEqual(10 * 1000); }); it('should return 10 seconds in milliseconds since isRunComplete is not there', () => { - const input = new GetJobRunEventsResponse({ + const input = create(GetJobRunEventsResponseSchema, { events: [], }); const result = refreshEventsWhenEventsIncomplete(input); diff --git a/frontend/apps/web/package.json b/frontend/apps/web/package.json index 7b2ae33da9..13a3b4ce37 100644 --- a/frontend/apps/web/package.json +++ b/frontend/apps/web/package.json @@ -11,14 +11,15 @@ "knip": "knip", "knip:production": "knip --production --strict", "typecheck": "tsc --noEmit", - "test": "jest" + "test": "jest", + "clean": "rm -rf .next" }, "dependencies": { "@auth/core": "^0.34.2", - "@bufbuild/protobuf": "^1.10.0", - "@connectrpc/connect-node": "^1.5.0", - "@connectrpc/connect-query": "^1.4.2", - "@connectrpc/connect-web": "^1.5.0", + "@bufbuild/protobuf": "^2.2.3", + "@connectrpc/connect-node": "^2.0.0", + "@connectrpc/connect-query": "^2.0.1", + "@connectrpc/connect-web": "^2.0.0", "@hookform/resolvers": "^3.9.0", "@monaco-editor/react": "^4.6.0", "@neosync/sdk": "file:../../packages/sdk", diff --git a/frontend/apps/web/util/util.ts b/frontend/apps/web/util/util.ts index 8277afaae5..e9f0186cd3 100644 --- a/frontend/apps/web/util/util.ts +++ b/frontend/apps/web/util/util.ts @@ -1,6 +1,7 @@ import { TransformerHandler } from '@/components/jobs/SchemaTable/transformer-handler'; import { Transformer } from '@/shared/transformers'; import { JobMappingTransformerForm } from '@/yup-validations/jobs'; +import { create } from '@bufbuild/protobuf'; import { AccountRole, AwsS3DestinationConnectionOptions_StorageClass, @@ -9,6 +10,7 @@ import { InvalidEmailAction, SupportedJobType, SystemTransformer, + SystemTransformerSchema, TransformerDataType, TransformerSource, UserDefinedTransformer, @@ -161,12 +163,12 @@ export function getTransformerFromField( if (value.config.case === 'userDefinedTransformerConfig') { return ( handler.getUserDefinedTransformerById(value.config.value.id) ?? - new SystemTransformer() + create(SystemTransformerSchema) ); } return ( handler.getSystemTransformerByConfigCase(value.config.case) ?? - new SystemTransformer() + create(SystemTransformerSchema) ); } diff --git a/frontend/apps/web/yup-validations/connections.ts b/frontend/apps/web/yup-validations/connections.ts index f3c83de951..9a17a6b1fd 100644 --- a/frontend/apps/web/yup-validations/connections.ts +++ b/frontend/apps/web/yup-validations/connections.ts @@ -1,8 +1,8 @@ import { getErrorMessage } from '@/util/util'; -import { PartialMessage } from '@bufbuild/protobuf'; +import { create, MessageInitShape } from '@bufbuild/protobuf'; import { ConnectError, - IsConnectionNameAvailableRequest, + IsConnectionNameAvailableRequestSchema, IsConnectionNameAvailableResponse, } from '@neosync/sdk'; import { UseMutateAsyncFunction } from '@tanstack/react-query'; @@ -50,15 +50,17 @@ const connectionNameSchema = Yup.string() | UseMutateAsyncFunction< IsConnectionNameAvailableResponse, ConnectError, - PartialMessage, + MessageInitShape, unknown > | undefined = context?.options?.context?.isConnectionNameAvailable; if (isConnectionNameAvailable) { - const res = await isConnectionNameAvailable({ - accountId: accountId, - connectionName: value, - }); + const res = await isConnectionNameAvailable( + create(IsConnectionNameAvailableRequestSchema, { + accountId: accountId, + connectionName: value, + }) + ); if (!res.isAvailable) { return context.createError({ message: 'This Connection Name is already taken.', @@ -245,7 +247,7 @@ export type AwsCredentialsFormValues = Yup.InferType< typeof AwsCredentialsFormValues >; -export const AWS_FORM_SCHEMA = Yup.object({ +export const AwsFormValues = Yup.object({ connectionName: connectionNameSchema, s3: Yup.object({ bucket: Yup.string().required('The Bucket name is required.'), @@ -256,7 +258,7 @@ export const AWS_FORM_SCHEMA = Yup.object({ }).required('The AWS form fields are required.'), }); -export type AWSFormValues = Yup.InferType; +export type AwsFormValues = Yup.InferType; export const DynamoDbFormValues = Yup.object({ connectionName: connectionNameSchema, @@ -295,10 +297,11 @@ export type GcpCloudStorageFormValues = Yup.InferType< export interface CreateConnectionFormContext { accountId: string; + isConnectionNameAvailable: UseMutateAsyncFunction< IsConnectionNameAvailableResponse, ConnectError, - PartialMessage, + MessageInitShape, unknown >; } diff --git a/frontend/apps/web/yup-validations/jobs.ts b/frontend/apps/web/yup-validations/jobs.ts index f66adccf90..5817b0059e 100644 --- a/frontend/apps/web/yup-validations/jobs.ts +++ b/frontend/apps/web/yup-validations/jobs.ts @@ -1,17 +1,21 @@ -import { TransformerConfigSchema } from '@/yup-validations/transformer-validations'; +import { TransformerConfigFormValue } from '@/yup-validations/transformer-validations'; +import { create, fromJson, JsonObject, toJson } from '@bufbuild/protobuf'; import { JobMappingTransformer, + JobMappingTransformerSchema, PostgresSourceConnectionOptions_NewColumnAdditionStrategy, - PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap, - PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob, + PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMapSchema, + PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJobSchema, + PostgresSourceConnectionOptions_NewColumnAdditionStrategySchema, TransformerConfig, + TransformerConfigSchema, } from '@neosync/sdk'; import * as Yup from 'yup'; import { getDurationValidateFn } from './number'; // Yup schema form JobMappingTransformers export const JobMappingTransformerForm = Yup.object({ - config: TransformerConfigSchema, + config: TransformerConfigFormValue, }); // Simplified version of a job mapping transformer for use with react-hook-form only @@ -29,43 +33,32 @@ export function convertJobMappingTransformerToForm( export function convertJobMappingTransformerFormToJobMappingTransformer( form: JobMappingTransformerForm ): JobMappingTransformer { - return new JobMappingTransformer({ + return create(JobMappingTransformerSchema, { config: convertTransformerConfigSchemaToTransformerConfig(form.config), }); } export function convertTransformerConfigToForm( tc?: TransformerConfig -): TransformerConfigSchema { +): TransformerConfigFormValue { const config = tc?.config ?? { case: '', value: {} }; - if (!config.case) { + if (!tc || !config.case) { return { case: '', value: {} }; } + const json = toJson(TransformerConfigSchema, tc); return { case: config.case, - value: config.value.toJson(), + value: (json as JsonObject)[config.case], }; } export function convertTransformerConfigSchemaToTransformerConfig( - tcs: TransformerConfigSchema + tcs: TransformerConfigFormValue ): TransformerConfig { - // hack job that fixes bigint json transformation until we can fit this with better types - const value = tcs.value ?? {}; - Object.entries(tcs.value).forEach(([key, val]) => { - value[key] = val; - if (typeof val === 'bigint') { - value[key] = val.toString(); - } - }); - if (tcs instanceof TransformerConfig) { - return tcs; - } else { - if (tcs.case) { - return TransformerConfig.fromJson({ [tcs.case]: tcs.value }); - } - return new TransformerConfig(); + if (tcs.case) { + return fromJson(TransformerConfigSchema, { [tcs.case]: tcs.value }); } + return create(TransformerConfigSchema); } const BatchFormValues = Yup.object({ @@ -351,22 +344,30 @@ export function toJobSourcePostgresNewColumnAdditionStrategy( return undefined; } case 'automap': { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy({ - strategy: { - case: 'autoMap', - value: - new PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap(), - }, - }); + return create( + PostgresSourceConnectionOptions_NewColumnAdditionStrategySchema, + { + strategy: { + case: 'autoMap', + value: create( + PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMapSchema + ), + }, + } + ); } case 'halt': { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy({ - strategy: { - case: 'haltJob', - value: - new PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob(), - }, - }); + return create( + PostgresSourceConnectionOptions_NewColumnAdditionStrategySchema, + { + strategy: { + case: 'haltJob', + value: create( + PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJobSchema + ), + }, + } + ); } default: { return undefined; diff --git a/frontend/apps/web/yup-validations/transformer-validations.ts b/frontend/apps/web/yup-validations/transformer-validations.ts index 39a2bd836b..a2b1d51e02 100644 --- a/frontend/apps/web/yup-validations/transformer-validations.ts +++ b/frontend/apps/web/yup-validations/transformer-validations.ts @@ -8,13 +8,13 @@ import { getNumberValidateMaxFn, getNumberValidateMinFn, } from '@/yup-validations/number'; -import { PartialMessage } from '@bufbuild/protobuf'; +import { create, MessageInitShape } from '@bufbuild/protobuf'; import { ConnectError, - IsTransformerNameAvailableRequest, + IsTransformerNameAvailableRequestSchema, IsTransformerNameAvailableResponse, TransformerConfig, - ValidateUserJavascriptCodeRequest, + ValidateUserJavascriptCodeRequestSchema, ValidateUserJavascriptCodeResponse, } from '@neosync/sdk'; import { UseMutateAsyncFunction } from '@tanstack/react-query'; @@ -312,26 +312,23 @@ const JavascriptConfig = Yup.object().shape({ 'is-valid-javascript', 'The JavaScript code is invalid.', async (value, context) => { - const accountId = context?.options?.context?.accountId; - if (!accountId) { - return context.createError({ - message: 'Unable to verify Account Id.', - }); - } try { const isUserJavascriptCodeValid: | UseMutateAsyncFunction< ValidateUserJavascriptCodeResponse, ConnectError, - PartialMessage, + MessageInitShape< + typeof ValidateUserJavascriptCodeRequestSchema + >, unknown > | undefined = context?.options?.context?.isUserJavascriptCodeValid; if (isUserJavascriptCodeValid) { - const res = await isUserJavascriptCodeValid({ - accountId, - code: value, - }); + const res = await isUserJavascriptCodeValid( + create(ValidateUserJavascriptCodeRequestSchema, { + code: value, + }) + ); if (!res.valid) { return context.createError({ message: 'Javascript is not valid', @@ -448,7 +445,7 @@ const KEYED_TRANSFORMER_SCHEMA_CONFIGS: Record< Yup.ObjectSchema // eslint-disable-line @typescript-eslint/no-explicit-any > = TRANSFORMER_SCHEMA_CONFIGS; -export const TransformerConfigSchema = Yup.lazy((v) => { +export const TransformerConfigFormValue = Yup.lazy((v) => { const ccase = v?.case as TransformerConfigCase; if (!ccase) { return Yup.object({ @@ -468,8 +465,8 @@ export const TransformerConfigSchema = Yup.lazy((v) => { }); // Simplified version of a job mapping transformer config for use with react-hook-form only -export type TransformerConfigSchema = Yup.InferType< - typeof TransformerConfigSchema +export type TransformerConfigFormValue = Yup.InferType< + typeof TransformerConfigFormValue >; const transformerNameSchema = Yup.string() @@ -513,15 +510,17 @@ const transformerNameSchema = Yup.string() | UseMutateAsyncFunction< IsTransformerNameAvailableResponse, ConnectError, - PartialMessage, + MessageInitShape, unknown > | undefined = context?.options?.context?.isTransformerNameAvailable; if (isTransformerNameAvailable) { - const res = await isTransformerNameAvailable({ - accountId, - transformerName: value, - }); + const res = await isTransformerNameAvailable( + create(IsTransformerNameAvailableRequestSchema, { + accountId, + transformerName: value, + }) + ); if (!res.isAvailable) { return context.createError({ message: 'This Transformer Name is already taken.', @@ -541,7 +540,7 @@ export const CreateUserDefinedTransformerFormValues = Yup.object({ name: transformerNameSchema, source: Yup.number(), description: Yup.string().required('Description is a required field.'), - config: TransformerConfigSchema, + config: TransformerConfigFormValue, }); export type CreateUserDefinedTransformerFormValues = Yup.InferType< @@ -553,19 +552,19 @@ export interface CreateUserDefinedTransformerFormContext { isTransformerNameAvailable: UseMutateAsyncFunction< IsTransformerNameAvailableResponse, ConnectError, - PartialMessage, + MessageInitShape, unknown >; isUserJavascriptCodeValid: UseMutateAsyncFunction< ValidateUserJavascriptCodeResponse, ConnectError, - PartialMessage, + MessageInitShape, unknown >; } export const EditJobMappingTransformerConfigFormValues = Yup.object({ - config: TransformerConfigSchema, + config: TransformerConfigFormValue, }).required('The Transformer config is required.'); export type EditJobMappingTransformerConfigFormValues = Yup.InferType< typeof EditJobMappingTransformerConfigFormValues @@ -576,7 +575,7 @@ export interface EditJobMappingTransformerConfigFormContext { isUserJavascriptCodeValid: UseMutateAsyncFunction< ValidateUserJavascriptCodeResponse, ConnectError, - PartialMessage, + MessageInitShape, unknown >; } @@ -585,7 +584,7 @@ export const UpdateUserDefinedTransformerFormValues = Yup.object({ name: transformerNameSchema, id: Yup.string(), description: Yup.string().required('The Description is required.'), - config: TransformerConfigSchema, + config: TransformerConfigFormValue, }); export type UpdateUserDefinedTransformerFormValues = Yup.InferType< diff --git a/frontend/package-lock.json b/frontend/package-lock.json index e343cbb684..8502584da4 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -21,10 +21,10 @@ "version": "0.0.0", "dependencies": { "@auth/core": "^0.34.2", - "@bufbuild/protobuf": "^1.10.0", - "@connectrpc/connect-node": "^1.5.0", - "@connectrpc/connect-query": "^1.4.2", - "@connectrpc/connect-web": "^1.5.0", + "@bufbuild/protobuf": "^2.2.3", + "@connectrpc/connect-node": "^2.0.0", + "@connectrpc/connect-query": "^2.0.1", + "@connectrpc/connect-web": "^2.0.0", "@hookform/resolvers": "^3.9.0", "@monaco-editor/react": "^4.6.0", "@neosync/sdk": "file:../../packages/sdk", @@ -96,30 +96,70 @@ "ts-jest": "^29.2.4" } }, + "apps/web/node_modules/@bufbuild/protobuf": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.3.tgz", + "integrity": "sha512-tFQoXHJdkEOSwj5tRIZSPNUuXK3RaR7T1nUrPgbYX1pUbvqqaaZAsfo+NXBPsz5rZMSKVFrgK1WL8Q/MSLvprg==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "apps/web/node_modules/@connectrpc/connect": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-2.0.0.tgz", + "integrity": "sha512-Usm8jgaaULANJU8vVnhWssSA6nrZ4DJEAbkNtXSoZay2YD5fDyMukCxu8NEhCvFzfHvrhxhcjttvgpyhOM7xAQ==", + "license": "Apache-2.0", + "peer": true, + "peerDependencies": { + "@bufbuild/protobuf": "^2.2.0" + } + }, "apps/web/node_modules/@connectrpc/connect-node": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@connectrpc/connect-node/-/connect-node-1.5.0.tgz", - "integrity": "sha512-go27+V6c6/YOGMXUs7d1NbXnGpMJl5fKYfMtbBKDs9azZTg/tW9q5S0iw9upZs43bOPV8YnJAWmTW9n1Te9NAw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@connectrpc/connect-node/-/connect-node-2.0.0.tgz", + "integrity": "sha512-DoI5T+SUvlS/8QBsxt2iDoUg15dSxqhckegrgZpWOtADtmGohBIVbx1UjtWmjLBrP4RdD0FeBw+XyRUSbpKnJQ==", "license": "Apache-2.0", - "dependencies": { - "undici": "^5.28.4" - }, "engines": { - "node": ">=16.0.0" + "node": ">=18.14.1" + }, + "peerDependencies": { + "@bufbuild/protobuf": "^2.2.0", + "@connectrpc/connect": "2.0.0" + } + }, + "apps/web/node_modules/@connectrpc/connect-query": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@connectrpc/connect-query/-/connect-query-2.0.1.tgz", + "integrity": "sha512-yVGRI17c96G0xb3ST9xGJ8k6KwKHp2qHRZo/JxLvh4+5lcJHsEa5xzf7sHm0363blTWhEa06b+gcQMckpiUdGw==", + "license": "Apache-2.0", + "dependencies": { + "@connectrpc/connect-query-core": "^2.0.1" }, "peerDependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@connectrpc/connect": "1.5.0" + "@bufbuild/protobuf": "2.x", + "@connectrpc/connect": "^2.0.0", + "@tanstack/react-query": "5.x", + "react": "^18 || ^19", + "react-dom": "^18 || ^19" + } + }, + "apps/web/node_modules/@connectrpc/connect-query-core": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@connectrpc/connect-query-core/-/connect-query-core-2.0.1.tgz", + "integrity": "sha512-jCub8nPBGhZK+RumQ8vcH4q6xqQ8O52+G75DAmhhESK2FsJgwerJjcw6XrqFpeJFz5O4cy0uuJm+ZK3TsrbxTw==", + "license": "Apache-2.0", + "peerDependencies": { + "@bufbuild/protobuf": "2.x", + "@connectrpc/connect": "^2.0.0", + "@tanstack/query-core": "5.x" } }, "apps/web/node_modules/@connectrpc/connect-web": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-1.5.0.tgz", - "integrity": "sha512-xjiiQ932Kibddaka18fGZ6yQL7xjXuLcYFYh/cU+q1WWEIrFPkZfViG/Ee6yrZbrlZkjcBuDibng+q7baTndfg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-2.0.0.tgz", + "integrity": "sha512-oeCxqHXLXlWJdmcvp9L3scgAuK+FjNSn+twyhUxc8yvDbTumnt5Io+LnBzSYxAdUdYqTw5yHfTSCJ4hj0QID0g==", "license": "Apache-2.0", "peerDependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@connectrpc/connect": "1.5.0" + "@bufbuild/protobuf": "^2.2.0", + "@connectrpc/connect": "2.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -801,35 +841,6 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "node_modules/@bufbuild/protobuf": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.0.tgz", - "integrity": "sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==" - }, - "node_modules/@connectrpc/connect": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-1.5.0.tgz", - "integrity": "sha512-1gGg0M6c2Y3lnr5itis9dNj9r8hbOIuBMqoGSbUy7L7Vjw4MAttjJzJfj9HCDgytGCJkGanYEYI6MQVDijdVQw==", - "peerDependencies": { - "@bufbuild/protobuf": "^1.10.0" - } - }, - "node_modules/@connectrpc/connect-query": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@connectrpc/connect-query/-/connect-query-1.4.2.tgz", - "integrity": "sha512-ZjBLtaGoBPDMtdRu4KiX7KpSigifiZiVaenhXHUsmNRjLj9r4OxQM+O2OqvTQ1YJhP4/h1xL+HX7YB0gcQ0FoA==", - "license": "Apache-2.0", - "dependencies": { - "stable-hash": "^0.0.4" - }, - "peerDependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@connectrpc/connect": "^1.1.2", - "@tanstack/react-query": "5.x", - "react": "^18.3.1", - "react-dom": "^18.3.1" - } - }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -855,13 +866,14 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.0.tgz", - "integrity": "sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "aix" @@ -871,13 +883,14 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.0.tgz", - "integrity": "sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -887,13 +900,14 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.0.tgz", - "integrity": "sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -903,13 +917,14 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.0.tgz", - "integrity": "sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -919,13 +934,14 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.0.tgz", - "integrity": "sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -935,13 +951,14 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.0.tgz", - "integrity": "sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -951,13 +968,14 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.0.tgz", - "integrity": "sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -967,13 +985,14 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.0.tgz", - "integrity": "sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -983,13 +1002,14 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.0.tgz", - "integrity": "sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -999,13 +1019,14 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.0.tgz", - "integrity": "sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -1015,13 +1036,14 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.0.tgz", - "integrity": "sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -1031,13 +1053,14 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.0.tgz", - "integrity": "sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", "cpu": [ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -1047,13 +1070,14 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.0.tgz", - "integrity": "sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", "cpu": [ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -1063,13 +1087,14 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.0.tgz", - "integrity": "sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -1079,13 +1104,14 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.0.tgz", - "integrity": "sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -1095,13 +1121,14 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.0.tgz", - "integrity": "sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -1111,13 +1138,14 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.0.tgz", - "integrity": "sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -1127,13 +1155,14 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.0.tgz", - "integrity": "sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" @@ -1143,13 +1172,14 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.0.tgz", - "integrity": "sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -1159,13 +1189,14 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.0.tgz", - "integrity": "sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -1175,13 +1206,14 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.0.tgz", - "integrity": "sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" @@ -1191,13 +1223,14 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.0.tgz", - "integrity": "sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -1207,13 +1240,14 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.0.tgz", - "integrity": "sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -1223,13 +1257,14 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.0.tgz", - "integrity": "sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -1294,14 +1329,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@fastify/busboy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", - "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", - "engines": { - "node": ">=14" - } - }, "node_modules/@floating-ui/core": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.2.tgz", @@ -3165,208 +3192,266 @@ "integrity": "sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.0.tgz", - "integrity": "sha512-JlPfZ/C7yn5S5p0yKk7uhHTTnFlvTgLetl2VxqE518QgyM7C9bSfFTYvB/Q/ftkq0RIPY4ySxTz+/wKJ/dXC0w==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz", + "integrity": "sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.0.tgz", - "integrity": "sha512-RDxUSY8D1tWYfn00DDi5myxKgOk6RvWPxhmWexcICt/MEC6yEMr4HNCu1sXXYLw8iAsg0D44NuU+qNq7zVWCrw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.1.tgz", + "integrity": "sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.0.tgz", - "integrity": "sha512-emvKHL4B15x6nlNTBMtIaC9tLPRpeA5jMvRLXVbl/W9Ie7HhkrE7KQjvgS9uxgatL1HmHWDXk5TTS4IaNJxbAA==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.1.tgz", + "integrity": "sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.0.tgz", - "integrity": "sha512-fO28cWA1dC57qCd+D0rfLC4VPbh6EOJXrreBmFLWPGI9dpMlER2YwSPZzSGfq11XgcEpPukPTfEVFtw2q2nYJg==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.1.tgz", + "integrity": "sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.1.tgz", + "integrity": "sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.1.tgz", + "integrity": "sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.0.tgz", - "integrity": "sha512-2Rn36Ubxdv32NUcfm0wB1tgKqkQuft00PtM23VqLuCUR4N5jcNWDoV5iBC9jeGdgS38WK66ElncprqgMUOyomw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.1.tgz", + "integrity": "sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.0.tgz", - "integrity": "sha512-gJuzIVdq/X1ZA2bHeCGCISe0VWqCoNT8BvkQ+BfsixXwTOndhtLUpOg0A1Fcx/+eA6ei6rMBzlOz4JzmiDw7JQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.1.tgz", + "integrity": "sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.0.tgz", - "integrity": "sha512-0EkX2HYPkSADo9cfeGFoQ7R0/wTKb7q6DdwI4Yn/ULFE1wuRRCHybxpl2goQrx4c/yzK3I8OlgtBu4xvted0ug==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.1.tgz", + "integrity": "sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.0.tgz", - "integrity": "sha512-GlIQRj9px52ISomIOEUq/IojLZqzkvRpdP3cLgIE1wUWaiU5Takwlzpz002q0Nxxr1y2ZgxC2obWxjr13lvxNQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.1.tgz", + "integrity": "sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.28.1.tgz", + "integrity": "sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.0.tgz", - "integrity": "sha512-N6cFJzssruDLUOKfEKeovCKiHcdwVYOT1Hs6dovDQ61+Y9n3Ek4zXvtghPPelt6U0AH4aDGnDLb83uiJMkWYzQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.1.tgz", + "integrity": "sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.0.tgz", - "integrity": "sha512-2DnD3mkS2uuam/alF+I7M84koGwvn3ZVD7uG+LEWpyzo/bq8+kKnus2EVCkcvh6PlNB8QPNFOz6fWd5N8o1CYg==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.1.tgz", + "integrity": "sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.0.tgz", - "integrity": "sha512-D6pkaF7OpE7lzlTOFCB2m3Ngzu2ykw40Nka9WmKGUOTS3xcIieHe82slQlNq69sVB04ch73thKYIWz/Ian8DUA==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.1.tgz", + "integrity": "sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.0.tgz", - "integrity": "sha512-HBndjQLP8OsdJNSxpNIN0einbDmRFg9+UQeZV1eiYupIRuZsDEoeGU43NQsS34Pp166DtwQOnpcbV/zQxM+rWA==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.1.tgz", + "integrity": "sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.0.tgz", - "integrity": "sha512-HxfbvfCKJe/RMYJJn0a12eiOI9OOtAUF4G6ozrFUK95BNyoJaSiBjIOHjZskTUffUrB84IPKkFG9H9nEvJGW6A==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.1.tgz", + "integrity": "sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.0.tgz", - "integrity": "sha512-HxDMKIhmcguGTiP5TsLNolwBUK3nGGUEoV/BO9ldUBoMLBssvh4J0X8pf11i1fTV7WShWItB1bKAKjX4RQeYmg==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.1.tgz", + "integrity": "sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.0.tgz", - "integrity": "sha512-xItlIAZZaiG/u0wooGzRsx11rokP4qyc/79LkAOdznGRAbOFc+SfEdfUOszG1odsHNgwippUJavag/+W/Etc6Q==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.1.tgz", + "integrity": "sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.0.tgz", - "integrity": "sha512-xNo5fV5ycvCCKqiZcpB65VMR11NJB+StnxHz20jdqRAktfdfzhgjTiJ2doTDQE/7dqGaV5I7ZGqKpgph6lCIag==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz", + "integrity": "sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -3648,10 +3733,11 @@ "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==" }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" }, "node_modules/@types/graceful-fs": { "version": "4.1.9", @@ -5533,12 +5619,13 @@ } }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -5934,11 +6021,12 @@ } }, "node_modules/esbuild": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.0.tgz", - "integrity": "sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -5946,30 +6034,30 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.23.0", - "@esbuild/android-arm": "0.23.0", - "@esbuild/android-arm64": "0.23.0", - "@esbuild/android-x64": "0.23.0", - "@esbuild/darwin-arm64": "0.23.0", - "@esbuild/darwin-x64": "0.23.0", - "@esbuild/freebsd-arm64": "0.23.0", - "@esbuild/freebsd-x64": "0.23.0", - "@esbuild/linux-arm": "0.23.0", - "@esbuild/linux-arm64": "0.23.0", - "@esbuild/linux-ia32": "0.23.0", - "@esbuild/linux-loong64": "0.23.0", - "@esbuild/linux-mips64el": "0.23.0", - "@esbuild/linux-ppc64": "0.23.0", - "@esbuild/linux-riscv64": "0.23.0", - "@esbuild/linux-s390x": "0.23.0", - "@esbuild/linux-x64": "0.23.0", - "@esbuild/netbsd-x64": "0.23.0", - "@esbuild/openbsd-arm64": "0.23.0", - "@esbuild/openbsd-x64": "0.23.0", - "@esbuild/sunos-x64": "0.23.0", - "@esbuild/win32-arm64": "0.23.0", - "@esbuild/win32-ia32": "0.23.0", - "@esbuild/win32-x64": "0.23.0" + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" } }, "node_modules/escalade": { @@ -9031,10 +9119,11 @@ "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" }, "node_modules/mz": { "version": "2.7.0", @@ -9609,9 +9698,10 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -10401,12 +10491,13 @@ } }, "node_modules/rollup": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.0.tgz", - "integrity": "sha512-5r7EYSQIowHsK4eTZ0Y81qpZuJz+MUuYeqmmYmRMl1nwhdmbiYqt5jwzf6u7wyOzJgYqtCRMtVRKOtHANBz7rA==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.1.tgz", + "integrity": "sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==", "dev": true, + "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -10416,22 +10507,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.19.0", - "@rollup/rollup-android-arm64": "4.19.0", - "@rollup/rollup-darwin-arm64": "4.19.0", - "@rollup/rollup-darwin-x64": "4.19.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.19.0", - "@rollup/rollup-linux-arm-musleabihf": "4.19.0", - "@rollup/rollup-linux-arm64-gnu": "4.19.0", - "@rollup/rollup-linux-arm64-musl": "4.19.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.19.0", - "@rollup/rollup-linux-riscv64-gnu": "4.19.0", - "@rollup/rollup-linux-s390x-gnu": "4.19.0", - "@rollup/rollup-linux-x64-gnu": "4.19.0", - "@rollup/rollup-linux-x64-musl": "4.19.0", - "@rollup/rollup-win32-arm64-msvc": "4.19.0", - "@rollup/rollup-win32-ia32-msvc": "4.19.0", - "@rollup/rollup-win32-x64-msvc": "4.19.0", + "@rollup/rollup-android-arm-eabi": "4.28.1", + "@rollup/rollup-android-arm64": "4.28.1", + "@rollup/rollup-darwin-arm64": "4.28.1", + "@rollup/rollup-darwin-x64": "4.28.1", + "@rollup/rollup-freebsd-arm64": "4.28.1", + "@rollup/rollup-freebsd-x64": "4.28.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.28.1", + "@rollup/rollup-linux-arm-musleabihf": "4.28.1", + "@rollup/rollup-linux-arm64-gnu": "4.28.1", + "@rollup/rollup-linux-arm64-musl": "4.28.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.28.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.28.1", + "@rollup/rollup-linux-riscv64-gnu": "4.28.1", + "@rollup/rollup-linux-s390x-gnu": "4.28.1", + "@rollup/rollup-linux-x64-gnu": "4.28.1", + "@rollup/rollup-linux-x64-musl": "4.28.1", + "@rollup/rollup-win32-arm64-msvc": "4.28.1", + "@rollup/rollup-win32-ia32-msvc": "4.28.1", + "@rollup/rollup-win32-x64-msvc": "4.28.1", "fsevents": "~2.3.2" } }, @@ -10697,11 +10791,6 @@ "sql-formatter": "bin/sql-formatter-cli.cjs" } }, - "node_modules/stable-hash": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.4.tgz", - "integrity": "sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==" - }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -11165,6 +11254,13 @@ "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" }, + "node_modules/tinyexec": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", + "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", + "dev": true, + "license": "MIT" + }, "node_modules/tinyglobby": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.9.tgz", @@ -11407,26 +11503,27 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsup": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.3.0.tgz", - "integrity": "sha512-ALscEeyS03IomcuNdFdc0YWGVIkwH1Ws7nfTbAPuoILvEV2hpGQAY72LIOjglGo4ShWpZfpBqP/jpQVCzqYQag==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.3.5.tgz", + "integrity": "sha512-Tunf6r6m6tnZsG9GYWndg0z8dEV7fD733VBFzFJ5Vcm1FtlXB8xBD/rtrBi2a3YKEV7hHtxiZtW5EAVADoe1pA==", "dev": true, + "license": "MIT", "dependencies": { "bundle-require": "^5.0.0", "cac": "^6.7.14", - "chokidar": "^3.6.0", + "chokidar": "^4.0.1", "consola": "^3.2.3", - "debug": "^4.3.5", - "esbuild": "^0.23.0", - "execa": "^5.1.1", + "debug": "^4.3.7", + "esbuild": "^0.24.0", "joycon": "^3.1.1", - "picocolors": "^1.0.1", + "picocolors": "^1.1.1", "postcss-load-config": "^6.0.1", "resolve-from": "^5.0.0", - "rollup": "^4.19.0", + "rollup": "^4.24.0", "source-map": "0.8.0-beta.0", "sucrase": "^3.35.0", - "tinyglobby": "^0.2.1", + "tinyexec": "^0.3.1", + "tinyglobby": "^0.2.9", "tree-kill": "^1.2.2" }, "bin": { @@ -11457,6 +11554,22 @@ } } }, + "node_modules/tsup/node_modules/chokidar": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.2.tgz", + "integrity": "sha512-/b57FK+bblSU+dfewfFe0rT1YjVDfOmeLQwCAuC+vwvgLkXboATqqmy+Ipux6JrF6L5joe5CBnFOw+gLWH6yKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/tsup/node_modules/lilconfig": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", @@ -11511,6 +11624,20 @@ } } }, + "node_modules/tsup/node_modules/readdirp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/tsup/node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -11741,17 +11868,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/undici": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", - "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -12315,11 +12431,26 @@ "version": "0.0.0", "license": "MIT", "dependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@connectrpc/connect": "^1.5.0" + "@bufbuild/protobuf": "^2.2.3", + "@connectrpc/connect": "^2.0.0" }, "devDependencies": { - "tsup": "^8.3.0" + "tsup": "^8.3.5" + } + }, + "packages/sdk/node_modules/@bufbuild/protobuf": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.3.tgz", + "integrity": "sha512-tFQoXHJdkEOSwj5tRIZSPNUuXK3RaR7T1nUrPgbYX1pUbvqqaaZAsfo+NXBPsz5rZMSKVFrgK1WL8Q/MSLvprg==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "packages/sdk/node_modules/@connectrpc/connect": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-2.0.0.tgz", + "integrity": "sha512-Usm8jgaaULANJU8vVnhWssSA6nrZ4DJEAbkNtXSoZay2YD5fDyMukCxu8NEhCvFzfHvrhxhcjttvgpyhOM7xAQ==", + "license": "Apache-2.0", + "peerDependencies": { + "@bufbuild/protobuf": "^2.2.0" } } } diff --git a/frontend/package.json b/frontend/package.json index a5ceae4cc5..f3b60917cf 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -3,7 +3,7 @@ "build": "turbo run build --env-mode=loose", "build:packages": "turbo run build --env-mode=loose --filter=./packages/*", "build:pkgs": "npm run build:packages", - "clean": "turbo run clean", + "clean": "turbo run clean && rm -rf .turbo", "dev": "turbo run dev --env-mode=loose", "lint": "turbo run lint", "test": "turbo run test", diff --git a/frontend/packages/sdk/README.md b/frontend/packages/sdk/README.md index 7083515dc7..1c3d91547b 100644 --- a/frontend/packages/sdk/README.md +++ b/frontend/packages/sdk/README.md @@ -6,9 +6,15 @@ This SDK is dogfooded by the main Neosync webapp to ensure its durability. ## Installation ```sh -npm install @neosync/sdk +npm install @neosync/sdk @bufbuild/protobuf ``` +## Detailed Docs + +This README shows the basics of how to use the SDK. + +For more detailed docs, go [here](https://docs.neosync.dev/api/typescript). + ## Usage For a prime example of how to us this SDK, view the [withNeosyncContext](https://github.com/nucleuscloud/neosync/blob/main/frontend/apps/web/api-only/neosync-context.ts#L23) method in the Neosync app's BFF layer. diff --git a/frontend/packages/sdk/package.json b/frontend/packages/sdk/package.json index e3b3fca551..ac979203e8 100644 --- a/frontend/packages/sdk/package.json +++ b/frontend/packages/sdk/package.json @@ -19,34 +19,24 @@ "types": "./dist/index.d.cts", "default": "./dist/index.cjs" } - }, - "./connectquery": { - "import": { - "types": "./dist/connectquery.d.ts", - "default": "./dist/connectquery.js" - }, - "require": { - "types": "./dist/connectquery.d.cts", - "default": "./dist/connectquery.cjs" - } } }, "scripts": { "test": "echo \"Error: no test specified\" && exit 0", - "clean": "rm -rf dist", - "build": "tsup src/index.ts src/connectquery.ts --format cjs,esm --dts", - "dev": "tsup src/index.ts src/connectquery.ts --format esm,cjs --dts --watch", + "clean": "rm -rf dist && rm -rf .turbo", + "build": "tsup src/index.ts --format cjs,esm --dts", + "dev": "tsup src/index.ts --format esm,cjs --dts --watch", "lint": "eslint 'src/**/*.{js,ts,tsx}'", "typecheck": "tsc --noEmit" }, "author": "nickzelei", "license": "MIT", "devDependencies": { - "tsup": "^8.3.0" + "tsup": "^8.3.5" }, "dependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@connectrpc/connect": "^1.5.0" + "@bufbuild/protobuf": "^2.2.3", + "@connectrpc/connect": "^2.0.0" }, "repository": { "type": "git", diff --git a/frontend/packages/sdk/src/client/buf/validate/validate_pb.ts b/frontend/packages/sdk/src/client/buf/validate/validate_pb.ts new file mode 100644 index 0000000000..01a37abb42 --- /dev/null +++ b/frontend/packages/sdk/src/client/buf/validate/validate_pb.ts @@ -0,0 +1,4471 @@ +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.3 with parameter "target=ts,import_extension=.js" +// @generated from file buf/validate/validate.proto (package buf.validate, syntax proto2) +/* eslint-disable */ + +import type { GenEnum, GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, extDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Duration, FieldOptions, MessageOptions, OneofOptions, Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_descriptor, file_google_protobuf_duration, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file buf/validate/validate.proto. + */ +export const file_buf_validate_validate: GenFile = /*@__PURE__*/ + fileDesc("ChtidWYvdmFsaWRhdGUvdmFsaWRhdGUucHJvdG8SDGJ1Zi52YWxpZGF0ZSI9CgpDb25zdHJhaW50EgoKAmlkGAEgASgJEg8KB21lc3NhZ2UYAiABKAkSEgoKZXhwcmVzc2lvbhgDIAEoCSJNChJNZXNzYWdlQ29uc3RyYWludHMSEAoIZGlzYWJsZWQYASABKAgSJQoDY2VsGAMgAygLMhguYnVmLnZhbGlkYXRlLkNvbnN0cmFpbnQiJAoQT25lb2ZDb25zdHJhaW50cxIQCghyZXF1aXJlZBgBIAEoCCLXCAoQRmllbGRDb25zdHJhaW50cxIlCgNjZWwYFyADKAsyGC5idWYudmFsaWRhdGUuQ29uc3RyYWludBIQCghyZXF1aXJlZBgZIAEoCBIkCgZpZ25vcmUYGyABKA4yFC5idWYudmFsaWRhdGUuSWdub3JlEikKBWZsb2F0GAEgASgLMhguYnVmLnZhbGlkYXRlLkZsb2F0UnVsZXNIABIrCgZkb3VibGUYAiABKAsyGS5idWYudmFsaWRhdGUuRG91YmxlUnVsZXNIABIpCgVpbnQzMhgDIAEoCzIYLmJ1Zi52YWxpZGF0ZS5JbnQzMlJ1bGVzSAASKQoFaW50NjQYBCABKAsyGC5idWYudmFsaWRhdGUuSW50NjRSdWxlc0gAEisKBnVpbnQzMhgFIAEoCzIZLmJ1Zi52YWxpZGF0ZS5VSW50MzJSdWxlc0gAEisKBnVpbnQ2NBgGIAEoCzIZLmJ1Zi52YWxpZGF0ZS5VSW50NjRSdWxlc0gAEisKBnNpbnQzMhgHIAEoCzIZLmJ1Zi52YWxpZGF0ZS5TSW50MzJSdWxlc0gAEisKBnNpbnQ2NBgIIAEoCzIZLmJ1Zi52YWxpZGF0ZS5TSW50NjRSdWxlc0gAEi0KB2ZpeGVkMzIYCSABKAsyGi5idWYudmFsaWRhdGUuRml4ZWQzMlJ1bGVzSAASLQoHZml4ZWQ2NBgKIAEoCzIaLmJ1Zi52YWxpZGF0ZS5GaXhlZDY0UnVsZXNIABIvCghzZml4ZWQzMhgLIAEoCzIbLmJ1Zi52YWxpZGF0ZS5TRml4ZWQzMlJ1bGVzSAASLwoIc2ZpeGVkNjQYDCABKAsyGy5idWYudmFsaWRhdGUuU0ZpeGVkNjRSdWxlc0gAEicKBGJvb2wYDSABKAsyFy5idWYudmFsaWRhdGUuQm9vbFJ1bGVzSAASKwoGc3RyaW5nGA4gASgLMhkuYnVmLnZhbGlkYXRlLlN0cmluZ1J1bGVzSAASKQoFYnl0ZXMYDyABKAsyGC5idWYudmFsaWRhdGUuQnl0ZXNSdWxlc0gAEicKBGVudW0YECABKAsyFy5idWYudmFsaWRhdGUuRW51bVJ1bGVzSAASLwoIcmVwZWF0ZWQYEiABKAsyGy5idWYudmFsaWRhdGUuUmVwZWF0ZWRSdWxlc0gAEiUKA21hcBgTIAEoCzIWLmJ1Zi52YWxpZGF0ZS5NYXBSdWxlc0gAEiUKA2FueRgUIAEoCzIWLmJ1Zi52YWxpZGF0ZS5BbnlSdWxlc0gAEi8KCGR1cmF0aW9uGBUgASgLMhsuYnVmLnZhbGlkYXRlLkR1cmF0aW9uUnVsZXNIABIxCgl0aW1lc3RhbXAYFiABKAsyHC5idWYudmFsaWRhdGUuVGltZXN0YW1wUnVsZXNIABITCgdza2lwcGVkGBggASgIQgIYARIYCgxpZ25vcmVfZW1wdHkYGiABKAhCAhgBQgYKBHR5cGUiPgoVUHJlZGVmaW5lZENvbnN0cmFpbnRzEiUKA2NlbBgBIAMoCzIYLmJ1Zi52YWxpZGF0ZS5Db25zdHJhaW50IrUXCgpGbG9hdFJ1bGVzEmkKBWNvbnN0GAEgASgCQlrCSFcKVQoLZmxvYXQuY29uc3QaRnRoaXMgIT0gcnVsZXMuY29uc3QgPyAndmFsdWUgbXVzdCBlcXVhbCAlcycuZm9ybWF0KFtydWxlcy5jb25zdF0pIDogJycSnwEKAmx0GAIgASgCQpABwkiMAQqJAQoIZmxvYXQubHQafSFoYXMocnVsZXMuZ3RlKSAmJiAhaGFzKHJ1bGVzLmd0KSAmJiAodGhpcy5pc05hbigpIHx8IHRoaXMgPj0gcnVsZXMubHQpPyAndmFsdWUgbXVzdCBiZSBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMubHRdKSA6ICcnSAASrwEKA2x0ZRgDIAEoAkKfAcJImwEKmAEKCWZsb2F0Lmx0ZRqKASFoYXMocnVsZXMuZ3RlKSAmJiAhaGFzKHJ1bGVzLmd0KSAmJiAodGhpcy5pc05hbigpIHx8IHRoaXMgPiBydWxlcy5sdGUpPyAndmFsdWUgbXVzdCBiZSBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMubHRlXSkgOiAnJ0gAEu8HCgJndBgEIAEoAkLgB8JI3AcKjQEKCGZsb2F0Lmd0GoABIWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmICh0aGlzLmlzTmFuKCkgfHwgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndF0pIDogJycKwwEKC2Zsb2F0Lmd0X2x0GrMBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA+PSBydWxlcy5ndCAmJiAodGhpcy5pc05hbigpIHx8IHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdF0pIDogJycKzQEKFWZsb2F0Lmd0X2x0X2V4Y2x1c2l2ZRqzAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPCBydWxlcy5ndCAmJiAodGhpcy5pc05hbigpIHx8IChydWxlcy5sdCA8PSB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIG9yIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCtMBCgxmbG9hdC5ndF9sdGUawgFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPj0gcnVsZXMuZ3QgJiYgKHRoaXMuaXNOYW4oKSB8fCB0aGlzID4gcnVsZXMubHRlIHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRlXSkgOiAnJwrdAQoWZmxvYXQuZ3RfbHRlX2V4Y2x1c2l2ZRrCAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ICYmICh0aGlzLmlzTmFuKCkgfHwgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8PSBydWxlcy5ndCkpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnSAESuggKA2d0ZRgFIAEoAkKqCMJIpggKmwEKCWZsb2F0Lmd0ZRqNASFoYXMocnVsZXMubHQpICYmICFoYXMocnVsZXMubHRlKSAmJiAodGhpcy5pc05hbigpIHx8IHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlXSkgOiAnJwrSAQoMZmxvYXQuZ3RlX2x0GsEBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA+PSBydWxlcy5ndGUgJiYgKHRoaXMuaXNOYW4oKSB8fCB0aGlzID49IHJ1bGVzLmx0IHx8IHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgYW5kIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0XSkgOiAnJwrcAQoWZmxvYXQuZ3RlX2x0X2V4Y2x1c2l2ZRrBAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPCBydWxlcy5ndGUgJiYgKHRoaXMuaXNOYW4oKSB8fCAocnVsZXMubHQgPD0gdGhpcyAmJiB0aGlzIDwgcnVsZXMuZ3RlKSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdF0pIDogJycK4gEKDWZsb2F0Lmd0ZV9sdGUa0AFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPj0gcnVsZXMuZ3RlICYmICh0aGlzLmlzTmFuKCkgfHwgdGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnCuwBChdmbG9hdC5ndGVfbHRlX2V4Y2x1c2l2ZRrQAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ZSAmJiAodGhpcy5pc05hbigpIHx8IChydWxlcy5sdGUgPCB0aGlzICYmIHRoaXMgPCBydWxlcy5ndGUpKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIG9yIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJydIARJ1CgJpbhgGIAMoAkJpwkhmCmQKCGZsb2F0LmluGlghKHRoaXMgaW4gZHluKHJ1bGVzKVsnaW4nXSkgPyAndmFsdWUgbXVzdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW2R5bihydWxlcylbJ2luJ11dKSA6ICcnEnYKBm5vdF9pbhgHIAMoAkJmwkhjCmEKDGZsb2F0Lm5vdF9pbhpRdGhpcyBpbiBydWxlcy5ub3RfaW4gPyAndmFsdWUgbXVzdCBub3QgYmUgaW4gbGlzdCAlcycuZm9ybWF0KFtydWxlcy5ub3RfaW5dKSA6ICcnEnUKBmZpbml0ZRgIIAEoCEJlwkhiCmAKDGZsb2F0LmZpbml0ZRpQcnVsZXMuZmluaXRlID8gKHRoaXMuaXNOYW4oKSB8fCB0aGlzLmlzSW5mKCkgPyAndmFsdWUgbXVzdCBiZSBmaW5pdGUnIDogJycpIDogJycSKwoHZXhhbXBsZRgJIAMoAkIawkgXChUKDWZsb2F0LmV4YW1wbGUaBHRydWUqCQjoBxCAgICAAkILCglsZXNzX3RoYW5CDgoMZ3JlYXRlcl90aGFuIscXCgtEb3VibGVSdWxlcxJqCgVjb25zdBgBIAEoAUJbwkhYClYKDGRvdWJsZS5jb25zdBpGdGhpcyAhPSBydWxlcy5jb25zdCA/ICd2YWx1ZSBtdXN0IGVxdWFsICVzJy5mb3JtYXQoW3J1bGVzLmNvbnN0XSkgOiAnJxKgAQoCbHQYAiABKAFCkQHCSI0BCooBCglkb3VibGUubHQafSFoYXMocnVsZXMuZ3RlKSAmJiAhaGFzKHJ1bGVzLmd0KSAmJiAodGhpcy5pc05hbigpIHx8IHRoaXMgPj0gcnVsZXMubHQpPyAndmFsdWUgbXVzdCBiZSBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMubHRdKSA6ICcnSAASsAEKA2x0ZRgDIAEoAUKgAcJInAEKmQEKCmRvdWJsZS5sdGUaigEhaGFzKHJ1bGVzLmd0ZSkgJiYgIWhhcyhydWxlcy5ndCkgJiYgKHRoaXMuaXNOYW4oKSB8fCB0aGlzID4gcnVsZXMubHRlKT8gJ3ZhbHVlIG11c3QgYmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmx0ZV0pIDogJydIABL0BwoCZ3QYBCABKAFC5QfCSOEHCo4BCglkb3VibGUuZ3QagAEhaGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgKHRoaXMuaXNOYW4oKSB8fCB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0XSkgOiAnJwrEAQoMZG91YmxlLmd0X2x0GrMBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA+PSBydWxlcy5ndCAmJiAodGhpcy5pc05hbigpIHx8IHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdF0pIDogJycKzgEKFmRvdWJsZS5ndF9sdF9leGNsdXNpdmUaswFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3QgJiYgKHRoaXMuaXNOYW4oKSB8fCAocnVsZXMubHQgPD0gdGhpcyAmJiB0aGlzIDw9IHJ1bGVzLmd0KSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0XSkgOiAnJwrUAQoNZG91YmxlLmd0X2x0ZRrCAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA+PSBydWxlcy5ndCAmJiAodGhpcy5pc05hbigpIHx8IHRoaXMgPiBydWxlcy5sdGUgfHwgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBhbmQgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnCt4BChdkb3VibGUuZ3RfbHRlX2V4Y2x1c2l2ZRrCAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ICYmICh0aGlzLmlzTmFuKCkgfHwgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8PSBydWxlcy5ndCkpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnSAESvwgKA2d0ZRgFIAEoAUKvCMJIqwgKnAEKCmRvdWJsZS5ndGUajQEhaGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgKHRoaXMuaXNOYW4oKSB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZV0pIDogJycK0wEKDWRvdWJsZS5ndGVfbHQawQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ZSAmJiAodGhpcy5pc05hbigpIHx8IHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCt0BChdkb3VibGUuZ3RlX2x0X2V4Y2x1c2l2ZRrBAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPCBydWxlcy5ndGUgJiYgKHRoaXMuaXNOYW4oKSB8fCAocnVsZXMubHQgPD0gdGhpcyAmJiB0aGlzIDwgcnVsZXMuZ3RlKSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdF0pIDogJycK4wEKDmRvdWJsZS5ndGVfbHRlGtABaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlID49IHJ1bGVzLmd0ZSAmJiAodGhpcy5pc05hbigpIHx8IHRoaXMgPiBydWxlcy5sdGUgfHwgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBhbmQgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRlXSkgOiAnJwrtAQoYZG91YmxlLmd0ZV9sdGVfZXhjbHVzaXZlGtABaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlIDwgcnVsZXMuZ3RlICYmICh0aGlzLmlzTmFuKCkgfHwgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8IHJ1bGVzLmd0ZSkpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRlXSkgOiAnJ0gBEnYKAmluGAYgAygBQmrCSGcKZQoJZG91YmxlLmluGlghKHRoaXMgaW4gZHluKHJ1bGVzKVsnaW4nXSkgPyAndmFsdWUgbXVzdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW2R5bihydWxlcylbJ2luJ11dKSA6ICcnEncKBm5vdF9pbhgHIAMoAUJnwkhkCmIKDWRvdWJsZS5ub3RfaW4aUXRoaXMgaW4gcnVsZXMubm90X2luID8gJ3ZhbHVlIG11c3Qgbm90IGJlIGluIGxpc3QgJXMnLmZvcm1hdChbcnVsZXMubm90X2luXSkgOiAnJxJ2CgZmaW5pdGUYCCABKAhCZsJIYwphCg1kb3VibGUuZmluaXRlGlBydWxlcy5maW5pdGUgPyAodGhpcy5pc05hbigpIHx8IHRoaXMuaXNJbmYoKSA/ICd2YWx1ZSBtdXN0IGJlIGZpbml0ZScgOiAnJykgOiAnJxIsCgdleGFtcGxlGAkgAygBQhvCSBgKFgoOZG91YmxlLmV4YW1wbGUaBHRydWUqCQjoBxCAgICAAkILCglsZXNzX3RoYW5CDgoMZ3JlYXRlcl90aGFuIucUCgpJbnQzMlJ1bGVzEmkKBWNvbnN0GAEgASgFQlrCSFcKVQoLaW50MzIuY29uc3QaRnRoaXMgIT0gcnVsZXMuY29uc3QgPyAndmFsdWUgbXVzdCBlcXVhbCAlcycuZm9ybWF0KFtydWxlcy5jb25zdF0pIDogJycSigEKAmx0GAIgASgFQnzCSHkKdwoIaW50MzIubHQaayFoYXMocnVsZXMuZ3RlKSAmJiAhaGFzKHJ1bGVzLmd0KSAmJiB0aGlzID49IHJ1bGVzLmx0PyAndmFsdWUgbXVzdCBiZSBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMubHRdKSA6ICcnSAASnAEKA2x0ZRgDIAEoBUKMAcJIiAEKhQEKCWludDMyLmx0ZRp4IWhhcyhydWxlcy5ndGUpICYmICFoYXMocnVsZXMuZ3QpICYmIHRoaXMgPiBydWxlcy5sdGU/ICd2YWx1ZSBtdXN0IGJlIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5sdGVdKSA6ICcnSAASlwcKAmd0GAQgASgFQogHwkiEBwp6CghpbnQzMi5ndBpuIWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmIHRoaXMgPD0gcnVsZXMuZ3Q/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndF0pIDogJycKswEKC2ludDMyLmd0X2x0GqMBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA+PSBydWxlcy5ndCAmJiAodGhpcyA+PSBydWxlcy5sdCB8fCB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIGFuZCBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0XSkgOiAnJwq7AQoVaW50MzIuZ3RfbHRfZXhjbHVzaXZlGqEBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA8IHJ1bGVzLmd0ICYmIChydWxlcy5sdCA8PSB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdF0pIDogJycKwwEKDGludDMyLmd0X2x0ZRqyAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA+PSBydWxlcy5ndCAmJiAodGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0ZV0pIDogJycKywEKFmludDMyLmd0X2x0ZV9leGNsdXNpdmUasAFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPCBydWxlcy5ndCAmJiAocnVsZXMubHRlIDwgdGhpcyAmJiB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIG9yIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRlXSkgOiAnJ0gBEuMHCgNndGUYBSABKAVC0wfCSM8HCogBCglpbnQzMi5ndGUaeyFoYXMocnVsZXMubHQpICYmICFoYXMocnVsZXMubHRlKSAmJiB0aGlzIDwgcnVsZXMuZ3RlPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlXSkgOiAnJwrCAQoMaW50MzIuZ3RlX2x0GrEBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA+PSBydWxlcy5ndGUgJiYgKHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCsoBChZpbnQzMi5ndGVfbHRfZXhjbHVzaXZlGq8BaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA8IHJ1bGVzLmd0ZSAmJiAocnVsZXMubHQgPD0gdGhpcyAmJiB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIG9yIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0XSkgOiAnJwrSAQoNaW50MzIuZ3RlX2x0ZRrAAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA+PSBydWxlcy5ndGUgJiYgKHRoaXMgPiBydWxlcy5sdGUgfHwgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBhbmQgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRlXSkgOiAnJwraAQoXaW50MzIuZ3RlX2x0ZV9leGNsdXNpdmUavgFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPCBydWxlcy5ndGUgJiYgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBvciBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnSAESdQoCaW4YBiADKAVCacJIZgpkCghpbnQzMi5pbhpYISh0aGlzIGluIGR5bihydWxlcylbJ2luJ10pID8gJ3ZhbHVlIG11c3QgYmUgaW4gbGlzdCAlcycuZm9ybWF0KFtkeW4ocnVsZXMpWydpbiddXSkgOiAnJxJ2CgZub3RfaW4YByADKAVCZsJIYwphCgxpbnQzMi5ub3RfaW4aUXRoaXMgaW4gcnVsZXMubm90X2luID8gJ3ZhbHVlIG11c3Qgbm90IGJlIGluIGxpc3QgJXMnLmZvcm1hdChbcnVsZXMubm90X2luXSkgOiAnJxIrCgdleGFtcGxlGAggAygFQhrCSBcKFQoNaW50MzIuZXhhbXBsZRoEdHJ1ZSoJCOgHEICAgIACQgsKCWxlc3NfdGhhbkIOCgxncmVhdGVyX3RoYW4i5xQKCkludDY0UnVsZXMSaQoFY29uc3QYASABKANCWsJIVwpVCgtpbnQ2NC5jb25zdBpGdGhpcyAhPSBydWxlcy5jb25zdCA/ICd2YWx1ZSBtdXN0IGVxdWFsICVzJy5mb3JtYXQoW3J1bGVzLmNvbnN0XSkgOiAnJxKKAQoCbHQYAiABKANCfMJIeQp3CghpbnQ2NC5sdBprIWhhcyhydWxlcy5ndGUpICYmICFoYXMocnVsZXMuZ3QpICYmIHRoaXMgPj0gcnVsZXMubHQ/ICd2YWx1ZSBtdXN0IGJlIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5sdF0pIDogJydIABKcAQoDbHRlGAMgASgDQowBwkiIAQqFAQoJaW50NjQubHRlGnghaGFzKHJ1bGVzLmd0ZSkgJiYgIWhhcyhydWxlcy5ndCkgJiYgdGhpcyA+IHJ1bGVzLmx0ZT8gJ3ZhbHVlIG11c3QgYmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmx0ZV0pIDogJydIABKXBwoCZ3QYBCABKANCiAfCSIQHCnoKCGludDY0Lmd0Gm4haGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgdGhpcyA8PSBydWxlcy5ndD8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0XSkgOiAnJwqzAQoLaW50NjQuZ3RfbHQaowFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ICYmICh0aGlzID49IHJ1bGVzLmx0IHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCrsBChVpbnQ2NC5ndF9sdF9leGNsdXNpdmUaoQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3QgJiYgKHJ1bGVzLmx0IDw9IHRoaXMgJiYgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0XSkgOiAnJwrDAQoMaW50NjQuZ3RfbHRlGrIBaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlID49IHJ1bGVzLmd0ICYmICh0aGlzID4gcnVsZXMubHRlIHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRlXSkgOiAnJwrLAQoWaW50NjQuZ3RfbHRlX2V4Y2x1c2l2ZRqwAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ICYmIChydWxlcy5sdGUgPCB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnSAES4wcKA2d0ZRgFIAEoA0LTB8JIzwcKiAEKCWludDY0Lmd0ZRp7IWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmIHRoaXMgPCBydWxlcy5ndGU/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGVdKSA6ICcnCsIBCgxpbnQ2NC5ndGVfbHQasQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ZSAmJiAodGhpcyA+PSBydWxlcy5sdCB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdF0pIDogJycKygEKFmludDY0Lmd0ZV9sdF9leGNsdXNpdmUarwFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3RlICYmIChydWxlcy5sdCA8PSB0aGlzICYmIHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgb3IgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCtIBCg1pbnQ2NC5ndGVfbHRlGsABaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlID49IHJ1bGVzLmd0ZSAmJiAodGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnCtoBChdpbnQ2NC5ndGVfbHRlX2V4Y2x1c2l2ZRq+AWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ZSAmJiAocnVsZXMubHRlIDwgdGhpcyAmJiB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIG9yIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJydIARJ1CgJpbhgGIAMoA0JpwkhmCmQKCGludDY0LmluGlghKHRoaXMgaW4gZHluKHJ1bGVzKVsnaW4nXSkgPyAndmFsdWUgbXVzdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW2R5bihydWxlcylbJ2luJ11dKSA6ICcnEnYKBm5vdF9pbhgHIAMoA0JmwkhjCmEKDGludDY0Lm5vdF9pbhpRdGhpcyBpbiBydWxlcy5ub3RfaW4gPyAndmFsdWUgbXVzdCBub3QgYmUgaW4gbGlzdCAlcycuZm9ybWF0KFtydWxlcy5ub3RfaW5dKSA6ICcnEisKB2V4YW1wbGUYCSADKANCGsJIFwoVCg1pbnQ2NC5leGFtcGxlGgR0cnVlKgkI6AcQgICAgAJCCwoJbGVzc190aGFuQg4KDGdyZWF0ZXJfdGhhbiL4FAoLVUludDMyUnVsZXMSagoFY29uc3QYASABKA1CW8JIWApWCgx1aW50MzIuY29uc3QaRnRoaXMgIT0gcnVsZXMuY29uc3QgPyAndmFsdWUgbXVzdCBlcXVhbCAlcycuZm9ybWF0KFtydWxlcy5jb25zdF0pIDogJycSiwEKAmx0GAIgASgNQn3CSHoKeAoJdWludDMyLmx0GmshaGFzKHJ1bGVzLmd0ZSkgJiYgIWhhcyhydWxlcy5ndCkgJiYgdGhpcyA+PSBydWxlcy5sdD8gJ3ZhbHVlIG11c3QgYmUgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmx0XSkgOiAnJ0gAEp0BCgNsdGUYAyABKA1CjQHCSIkBCoYBCgp1aW50MzIubHRlGnghaGFzKHJ1bGVzLmd0ZSkgJiYgIWhhcyhydWxlcy5ndCkgJiYgdGhpcyA+IHJ1bGVzLmx0ZT8gJ3ZhbHVlIG11c3QgYmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmx0ZV0pIDogJydIABKcBwoCZ3QYBCABKA1CjQfCSIkHCnsKCXVpbnQzMi5ndBpuIWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmIHRoaXMgPD0gcnVsZXMuZ3Q/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndF0pIDogJycKtAEKDHVpbnQzMi5ndF9sdBqjAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPj0gcnVsZXMuZ3QgJiYgKHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdF0pIDogJycKvAEKFnVpbnQzMi5ndF9sdF9leGNsdXNpdmUaoQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3QgJiYgKHJ1bGVzLmx0IDw9IHRoaXMgJiYgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0XSkgOiAnJwrEAQoNdWludDMyLmd0X2x0ZRqyAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA+PSBydWxlcy5ndCAmJiAodGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0ZV0pIDogJycKzAEKF3VpbnQzMi5ndF9sdGVfZXhjbHVzaXZlGrABaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlIDwgcnVsZXMuZ3QgJiYgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBvciBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0ZV0pIDogJydIARLoBwoDZ3RlGAUgASgNQtgHwkjUBwqJAQoKdWludDMyLmd0ZRp7IWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmIHRoaXMgPCBydWxlcy5ndGU/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGVdKSA6ICcnCsMBCg11aW50MzIuZ3RlX2x0GrEBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA+PSBydWxlcy5ndGUgJiYgKHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCssBChd1aW50MzIuZ3RlX2x0X2V4Y2x1c2l2ZRqvAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPCBydWxlcy5ndGUgJiYgKHJ1bGVzLmx0IDw9IHRoaXMgJiYgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdF0pIDogJycK0wEKDnVpbnQzMi5ndGVfbHRlGsABaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlID49IHJ1bGVzLmd0ZSAmJiAodGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnCtsBChh1aW50MzIuZ3RlX2x0ZV9leGNsdXNpdmUavgFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPCBydWxlcy5ndGUgJiYgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBvciBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnSAESdgoCaW4YBiADKA1CasJIZwplCgl1aW50MzIuaW4aWCEodGhpcyBpbiBkeW4ocnVsZXMpWydpbiddKSA/ICd2YWx1ZSBtdXN0IGJlIGluIGxpc3QgJXMnLmZvcm1hdChbZHluKHJ1bGVzKVsnaW4nXV0pIDogJycSdwoGbm90X2luGAcgAygNQmfCSGQKYgoNdWludDMyLm5vdF9pbhpRdGhpcyBpbiBydWxlcy5ub3RfaW4gPyAndmFsdWUgbXVzdCBub3QgYmUgaW4gbGlzdCAlcycuZm9ybWF0KFtydWxlcy5ub3RfaW5dKSA6ICcnEiwKB2V4YW1wbGUYCCADKA1CG8JIGAoWCg51aW50MzIuZXhhbXBsZRoEdHJ1ZSoJCOgHEICAgIACQgsKCWxlc3NfdGhhbkIOCgxncmVhdGVyX3RoYW4i+BQKC1VJbnQ2NFJ1bGVzEmoKBWNvbnN0GAEgASgEQlvCSFgKVgoMdWludDY0LmNvbnN0GkZ0aGlzICE9IHJ1bGVzLmNvbnN0ID8gJ3ZhbHVlIG11c3QgZXF1YWwgJXMnLmZvcm1hdChbcnVsZXMuY29uc3RdKSA6ICcnEosBCgJsdBgCIAEoBEJ9wkh6CngKCXVpbnQ2NC5sdBprIWhhcyhydWxlcy5ndGUpICYmICFoYXMocnVsZXMuZ3QpICYmIHRoaXMgPj0gcnVsZXMubHQ/ICd2YWx1ZSBtdXN0IGJlIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5sdF0pIDogJydIABKdAQoDbHRlGAMgASgEQo0BwkiJAQqGAQoKdWludDY0Lmx0ZRp4IWhhcyhydWxlcy5ndGUpICYmICFoYXMocnVsZXMuZ3QpICYmIHRoaXMgPiBydWxlcy5sdGU/ICd2YWx1ZSBtdXN0IGJlIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5sdGVdKSA6ICcnSAASnAcKAmd0GAQgASgEQo0HwkiJBwp7Cgl1aW50NjQuZ3QabiFoYXMocnVsZXMubHQpICYmICFoYXMocnVsZXMubHRlKSAmJiB0aGlzIDw9IHJ1bGVzLmd0PyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RdKSA6ICcnCrQBCgx1aW50NjQuZ3RfbHQaowFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ICYmICh0aGlzID49IHJ1bGVzLmx0IHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCrwBChZ1aW50NjQuZ3RfbHRfZXhjbHVzaXZlGqEBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA8IHJ1bGVzLmd0ICYmIChydWxlcy5sdCA8PSB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdF0pIDogJycKxAEKDXVpbnQ2NC5ndF9sdGUasgFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPj0gcnVsZXMuZ3QgJiYgKHRoaXMgPiBydWxlcy5sdGUgfHwgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBhbmQgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnCswBChd1aW50NjQuZ3RfbHRlX2V4Y2x1c2l2ZRqwAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ICYmIChydWxlcy5sdGUgPCB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnSAES6AcKA2d0ZRgFIAEoBELYB8JI1AcKiQEKCnVpbnQ2NC5ndGUaeyFoYXMocnVsZXMubHQpICYmICFoYXMocnVsZXMubHRlKSAmJiB0aGlzIDwgcnVsZXMuZ3RlPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlXSkgOiAnJwrDAQoNdWludDY0Lmd0ZV9sdBqxAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPj0gcnVsZXMuZ3RlICYmICh0aGlzID49IHJ1bGVzLmx0IHx8IHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgYW5kIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0XSkgOiAnJwrLAQoXdWludDY0Lmd0ZV9sdF9leGNsdXNpdmUarwFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3RlICYmIChydWxlcy5sdCA8PSB0aGlzICYmIHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgb3IgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCtMBCg51aW50NjQuZ3RlX2x0ZRrAAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA+PSBydWxlcy5ndGUgJiYgKHRoaXMgPiBydWxlcy5sdGUgfHwgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBhbmQgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRlXSkgOiAnJwrbAQoYdWludDY0Lmd0ZV9sdGVfZXhjbHVzaXZlGr4BaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlIDwgcnVsZXMuZ3RlICYmIChydWxlcy5sdGUgPCB0aGlzICYmIHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRlXSkgOiAnJ0gBEnYKAmluGAYgAygEQmrCSGcKZQoJdWludDY0LmluGlghKHRoaXMgaW4gZHluKHJ1bGVzKVsnaW4nXSkgPyAndmFsdWUgbXVzdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW2R5bihydWxlcylbJ2luJ11dKSA6ICcnEncKBm5vdF9pbhgHIAMoBEJnwkhkCmIKDXVpbnQ2NC5ub3RfaW4aUXRoaXMgaW4gcnVsZXMubm90X2luID8gJ3ZhbHVlIG11c3Qgbm90IGJlIGluIGxpc3QgJXMnLmZvcm1hdChbcnVsZXMubm90X2luXSkgOiAnJxIsCgdleGFtcGxlGAggAygEQhvCSBgKFgoOdWludDY0LmV4YW1wbGUaBHRydWUqCQjoBxCAgICAAkILCglsZXNzX3RoYW5CDgoMZ3JlYXRlcl90aGFuIvgUCgtTSW50MzJSdWxlcxJqCgVjb25zdBgBIAEoEUJbwkhYClYKDHNpbnQzMi5jb25zdBpGdGhpcyAhPSBydWxlcy5jb25zdCA/ICd2YWx1ZSBtdXN0IGVxdWFsICVzJy5mb3JtYXQoW3J1bGVzLmNvbnN0XSkgOiAnJxKLAQoCbHQYAiABKBFCfcJIegp4CglzaW50MzIubHQaayFoYXMocnVsZXMuZ3RlKSAmJiAhaGFzKHJ1bGVzLmd0KSAmJiB0aGlzID49IHJ1bGVzLmx0PyAndmFsdWUgbXVzdCBiZSBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMubHRdKSA6ICcnSAASnQEKA2x0ZRgDIAEoEUKNAcJIiQEKhgEKCnNpbnQzMi5sdGUaeCFoYXMocnVsZXMuZ3RlKSAmJiAhaGFzKHJ1bGVzLmd0KSAmJiB0aGlzID4gcnVsZXMubHRlPyAndmFsdWUgbXVzdCBiZSBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMubHRlXSkgOiAnJ0gAEpwHCgJndBgEIAEoEUKNB8JIiQcKewoJc2ludDMyLmd0Gm4haGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgdGhpcyA8PSBydWxlcy5ndD8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0XSkgOiAnJwq0AQoMc2ludDMyLmd0X2x0GqMBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA+PSBydWxlcy5ndCAmJiAodGhpcyA+PSBydWxlcy5sdCB8fCB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIGFuZCBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0XSkgOiAnJwq8AQoWc2ludDMyLmd0X2x0X2V4Y2x1c2l2ZRqhAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPCBydWxlcy5ndCAmJiAocnVsZXMubHQgPD0gdGhpcyAmJiB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIG9yIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCsQBCg1zaW50MzIuZ3RfbHRlGrIBaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlID49IHJ1bGVzLmd0ICYmICh0aGlzID4gcnVsZXMubHRlIHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRlXSkgOiAnJwrMAQoXc2ludDMyLmd0X2x0ZV9leGNsdXNpdmUasAFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPCBydWxlcy5ndCAmJiAocnVsZXMubHRlIDwgdGhpcyAmJiB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIG9yIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRlXSkgOiAnJ0gBEugHCgNndGUYBSABKBFC2AfCSNQHCokBCgpzaW50MzIuZ3RlGnshaGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgdGhpcyA8IHJ1bGVzLmd0ZT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZV0pIDogJycKwwEKDXNpbnQzMi5ndGVfbHQasQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ZSAmJiAodGhpcyA+PSBydWxlcy5sdCB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdF0pIDogJycKywEKF3NpbnQzMi5ndGVfbHRfZXhjbHVzaXZlGq8BaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA8IHJ1bGVzLmd0ZSAmJiAocnVsZXMubHQgPD0gdGhpcyAmJiB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIG9yIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0XSkgOiAnJwrTAQoOc2ludDMyLmd0ZV9sdGUawAFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPj0gcnVsZXMuZ3RlICYmICh0aGlzID4gcnVsZXMubHRlIHx8IHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgYW5kIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJycK2wEKGHNpbnQzMi5ndGVfbHRlX2V4Y2x1c2l2ZRq+AWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ZSAmJiAocnVsZXMubHRlIDwgdGhpcyAmJiB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIG9yIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJydIARJ2CgJpbhgGIAMoEUJqwkhnCmUKCXNpbnQzMi5pbhpYISh0aGlzIGluIGR5bihydWxlcylbJ2luJ10pID8gJ3ZhbHVlIG11c3QgYmUgaW4gbGlzdCAlcycuZm9ybWF0KFtkeW4ocnVsZXMpWydpbiddXSkgOiAnJxJ3CgZub3RfaW4YByADKBFCZ8JIZApiCg1zaW50MzIubm90X2luGlF0aGlzIGluIHJ1bGVzLm5vdF9pbiA/ICd2YWx1ZSBtdXN0IG5vdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW3J1bGVzLm5vdF9pbl0pIDogJycSLAoHZXhhbXBsZRgIIAMoEUIbwkgYChYKDnNpbnQzMi5leGFtcGxlGgR0cnVlKgkI6AcQgICAgAJCCwoJbGVzc190aGFuQg4KDGdyZWF0ZXJfdGhhbiL4FAoLU0ludDY0UnVsZXMSagoFY29uc3QYASABKBJCW8JIWApWCgxzaW50NjQuY29uc3QaRnRoaXMgIT0gcnVsZXMuY29uc3QgPyAndmFsdWUgbXVzdCBlcXVhbCAlcycuZm9ybWF0KFtydWxlcy5jb25zdF0pIDogJycSiwEKAmx0GAIgASgSQn3CSHoKeAoJc2ludDY0Lmx0GmshaGFzKHJ1bGVzLmd0ZSkgJiYgIWhhcyhydWxlcy5ndCkgJiYgdGhpcyA+PSBydWxlcy5sdD8gJ3ZhbHVlIG11c3QgYmUgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmx0XSkgOiAnJ0gAEp0BCgNsdGUYAyABKBJCjQHCSIkBCoYBCgpzaW50NjQubHRlGnghaGFzKHJ1bGVzLmd0ZSkgJiYgIWhhcyhydWxlcy5ndCkgJiYgdGhpcyA+IHJ1bGVzLmx0ZT8gJ3ZhbHVlIG11c3QgYmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmx0ZV0pIDogJydIABKcBwoCZ3QYBCABKBJCjQfCSIkHCnsKCXNpbnQ2NC5ndBpuIWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmIHRoaXMgPD0gcnVsZXMuZ3Q/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndF0pIDogJycKtAEKDHNpbnQ2NC5ndF9sdBqjAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPj0gcnVsZXMuZ3QgJiYgKHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdF0pIDogJycKvAEKFnNpbnQ2NC5ndF9sdF9leGNsdXNpdmUaoQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3QgJiYgKHJ1bGVzLmx0IDw9IHRoaXMgJiYgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0XSkgOiAnJwrEAQoNc2ludDY0Lmd0X2x0ZRqyAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA+PSBydWxlcy5ndCAmJiAodGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0ZV0pIDogJycKzAEKF3NpbnQ2NC5ndF9sdGVfZXhjbHVzaXZlGrABaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlIDwgcnVsZXMuZ3QgJiYgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBvciBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0ZV0pIDogJydIARLoBwoDZ3RlGAUgASgSQtgHwkjUBwqJAQoKc2ludDY0Lmd0ZRp7IWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmIHRoaXMgPCBydWxlcy5ndGU/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGVdKSA6ICcnCsMBCg1zaW50NjQuZ3RlX2x0GrEBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA+PSBydWxlcy5ndGUgJiYgKHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCssBChdzaW50NjQuZ3RlX2x0X2V4Y2x1c2l2ZRqvAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPCBydWxlcy5ndGUgJiYgKHJ1bGVzLmx0IDw9IHRoaXMgJiYgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdF0pIDogJycK0wEKDnNpbnQ2NC5ndGVfbHRlGsABaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlID49IHJ1bGVzLmd0ZSAmJiAodGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnCtsBChhzaW50NjQuZ3RlX2x0ZV9leGNsdXNpdmUavgFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPCBydWxlcy5ndGUgJiYgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBvciBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnSAESdgoCaW4YBiADKBJCasJIZwplCglzaW50NjQuaW4aWCEodGhpcyBpbiBkeW4ocnVsZXMpWydpbiddKSA/ICd2YWx1ZSBtdXN0IGJlIGluIGxpc3QgJXMnLmZvcm1hdChbZHluKHJ1bGVzKVsnaW4nXV0pIDogJycSdwoGbm90X2luGAcgAygSQmfCSGQKYgoNc2ludDY0Lm5vdF9pbhpRdGhpcyBpbiBydWxlcy5ub3RfaW4gPyAndmFsdWUgbXVzdCBub3QgYmUgaW4gbGlzdCAlcycuZm9ybWF0KFtydWxlcy5ub3RfaW5dKSA6ICcnEiwKB2V4YW1wbGUYCCADKBJCG8JIGAoWCg5zaW50NjQuZXhhbXBsZRoEdHJ1ZSoJCOgHEICAgIACQgsKCWxlc3NfdGhhbkIOCgxncmVhdGVyX3RoYW4iiRUKDEZpeGVkMzJSdWxlcxJrCgVjb25zdBgBIAEoB0JcwkhZClcKDWZpeGVkMzIuY29uc3QaRnRoaXMgIT0gcnVsZXMuY29uc3QgPyAndmFsdWUgbXVzdCBlcXVhbCAlcycuZm9ybWF0KFtydWxlcy5jb25zdF0pIDogJycSjAEKAmx0GAIgASgHQn7CSHsKeQoKZml4ZWQzMi5sdBprIWhhcyhydWxlcy5ndGUpICYmICFoYXMocnVsZXMuZ3QpICYmIHRoaXMgPj0gcnVsZXMubHQ/ICd2YWx1ZSBtdXN0IGJlIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5sdF0pIDogJydIABKeAQoDbHRlGAMgASgHQo4BwkiKAQqHAQoLZml4ZWQzMi5sdGUaeCFoYXMocnVsZXMuZ3RlKSAmJiAhaGFzKHJ1bGVzLmd0KSAmJiB0aGlzID4gcnVsZXMubHRlPyAndmFsdWUgbXVzdCBiZSBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMubHRlXSkgOiAnJ0gAEqEHCgJndBgEIAEoB0KSB8JIjgcKfAoKZml4ZWQzMi5ndBpuIWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmIHRoaXMgPD0gcnVsZXMuZ3Q/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndF0pIDogJycKtQEKDWZpeGVkMzIuZ3RfbHQaowFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ICYmICh0aGlzID49IHJ1bGVzLmx0IHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCr0BChdmaXhlZDMyLmd0X2x0X2V4Y2x1c2l2ZRqhAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPCBydWxlcy5ndCAmJiAocnVsZXMubHQgPD0gdGhpcyAmJiB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIG9yIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCsUBCg5maXhlZDMyLmd0X2x0ZRqyAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA+PSBydWxlcy5ndCAmJiAodGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0ZV0pIDogJycKzQEKGGZpeGVkMzIuZ3RfbHRlX2V4Y2x1c2l2ZRqwAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ICYmIChydWxlcy5sdGUgPCB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnSAES7QcKA2d0ZRgFIAEoB0LdB8JI2QcKigEKC2ZpeGVkMzIuZ3RlGnshaGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgdGhpcyA8IHJ1bGVzLmd0ZT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZV0pIDogJycKxAEKDmZpeGVkMzIuZ3RlX2x0GrEBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA+PSBydWxlcy5ndGUgJiYgKHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCswBChhmaXhlZDMyLmd0ZV9sdF9leGNsdXNpdmUarwFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3RlICYmIChydWxlcy5sdCA8PSB0aGlzICYmIHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgb3IgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCtQBCg9maXhlZDMyLmd0ZV9sdGUawAFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPj0gcnVsZXMuZ3RlICYmICh0aGlzID4gcnVsZXMubHRlIHx8IHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgYW5kIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJycK3AEKGWZpeGVkMzIuZ3RlX2x0ZV9leGNsdXNpdmUavgFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPCBydWxlcy5ndGUgJiYgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBvciBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnSAESdwoCaW4YBiADKAdCa8JIaApmCgpmaXhlZDMyLmluGlghKHRoaXMgaW4gZHluKHJ1bGVzKVsnaW4nXSkgPyAndmFsdWUgbXVzdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW2R5bihydWxlcylbJ2luJ11dKSA6ICcnEngKBm5vdF9pbhgHIAMoB0JowkhlCmMKDmZpeGVkMzIubm90X2luGlF0aGlzIGluIHJ1bGVzLm5vdF9pbiA/ICd2YWx1ZSBtdXN0IG5vdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW3J1bGVzLm5vdF9pbl0pIDogJycSLQoHZXhhbXBsZRgIIAMoB0IcwkgZChcKD2ZpeGVkMzIuZXhhbXBsZRoEdHJ1ZSoJCOgHEICAgIACQgsKCWxlc3NfdGhhbkIOCgxncmVhdGVyX3RoYW4iiRUKDEZpeGVkNjRSdWxlcxJrCgVjb25zdBgBIAEoBkJcwkhZClcKDWZpeGVkNjQuY29uc3QaRnRoaXMgIT0gcnVsZXMuY29uc3QgPyAndmFsdWUgbXVzdCBlcXVhbCAlcycuZm9ybWF0KFtydWxlcy5jb25zdF0pIDogJycSjAEKAmx0GAIgASgGQn7CSHsKeQoKZml4ZWQ2NC5sdBprIWhhcyhydWxlcy5ndGUpICYmICFoYXMocnVsZXMuZ3QpICYmIHRoaXMgPj0gcnVsZXMubHQ/ICd2YWx1ZSBtdXN0IGJlIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5sdF0pIDogJydIABKeAQoDbHRlGAMgASgGQo4BwkiKAQqHAQoLZml4ZWQ2NC5sdGUaeCFoYXMocnVsZXMuZ3RlKSAmJiAhaGFzKHJ1bGVzLmd0KSAmJiB0aGlzID4gcnVsZXMubHRlPyAndmFsdWUgbXVzdCBiZSBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMubHRlXSkgOiAnJ0gAEqEHCgJndBgEIAEoBkKSB8JIjgcKfAoKZml4ZWQ2NC5ndBpuIWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmIHRoaXMgPD0gcnVsZXMuZ3Q/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndF0pIDogJycKtQEKDWZpeGVkNjQuZ3RfbHQaowFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ICYmICh0aGlzID49IHJ1bGVzLmx0IHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCr0BChdmaXhlZDY0Lmd0X2x0X2V4Y2x1c2l2ZRqhAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPCBydWxlcy5ndCAmJiAocnVsZXMubHQgPD0gdGhpcyAmJiB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIG9yIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCsUBCg5maXhlZDY0Lmd0X2x0ZRqyAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA+PSBydWxlcy5ndCAmJiAodGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0ZV0pIDogJycKzQEKGGZpeGVkNjQuZ3RfbHRlX2V4Y2x1c2l2ZRqwAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ICYmIChydWxlcy5sdGUgPCB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnSAES7QcKA2d0ZRgFIAEoBkLdB8JI2QcKigEKC2ZpeGVkNjQuZ3RlGnshaGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgdGhpcyA8IHJ1bGVzLmd0ZT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZV0pIDogJycKxAEKDmZpeGVkNjQuZ3RlX2x0GrEBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA+PSBydWxlcy5ndGUgJiYgKHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCswBChhmaXhlZDY0Lmd0ZV9sdF9leGNsdXNpdmUarwFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3RlICYmIChydWxlcy5sdCA8PSB0aGlzICYmIHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgb3IgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCtQBCg9maXhlZDY0Lmd0ZV9sdGUawAFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPj0gcnVsZXMuZ3RlICYmICh0aGlzID4gcnVsZXMubHRlIHx8IHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgYW5kIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJycK3AEKGWZpeGVkNjQuZ3RlX2x0ZV9leGNsdXNpdmUavgFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPCBydWxlcy5ndGUgJiYgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBvciBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnSAESdwoCaW4YBiADKAZCa8JIaApmCgpmaXhlZDY0LmluGlghKHRoaXMgaW4gZHluKHJ1bGVzKVsnaW4nXSkgPyAndmFsdWUgbXVzdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW2R5bihydWxlcylbJ2luJ11dKSA6ICcnEngKBm5vdF9pbhgHIAMoBkJowkhlCmMKDmZpeGVkNjQubm90X2luGlF0aGlzIGluIHJ1bGVzLm5vdF9pbiA/ICd2YWx1ZSBtdXN0IG5vdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW3J1bGVzLm5vdF9pbl0pIDogJycSLQoHZXhhbXBsZRgIIAMoBkIcwkgZChcKD2ZpeGVkNjQuZXhhbXBsZRoEdHJ1ZSoJCOgHEICAgIACQgsKCWxlc3NfdGhhbkIOCgxncmVhdGVyX3RoYW4imhUKDVNGaXhlZDMyUnVsZXMSbAoFY29uc3QYASABKA9CXcJIWgpYCg5zZml4ZWQzMi5jb25zdBpGdGhpcyAhPSBydWxlcy5jb25zdCA/ICd2YWx1ZSBtdXN0IGVxdWFsICVzJy5mb3JtYXQoW3J1bGVzLmNvbnN0XSkgOiAnJxKNAQoCbHQYAiABKA9Cf8JIfAp6CgtzZml4ZWQzMi5sdBprIWhhcyhydWxlcy5ndGUpICYmICFoYXMocnVsZXMuZ3QpICYmIHRoaXMgPj0gcnVsZXMubHQ/ICd2YWx1ZSBtdXN0IGJlIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5sdF0pIDogJydIABKfAQoDbHRlGAMgASgPQo8BwkiLAQqIAQoMc2ZpeGVkMzIubHRlGnghaGFzKHJ1bGVzLmd0ZSkgJiYgIWhhcyhydWxlcy5ndCkgJiYgdGhpcyA+IHJ1bGVzLmx0ZT8gJ3ZhbHVlIG11c3QgYmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmx0ZV0pIDogJydIABKmBwoCZ3QYBCABKA9ClwfCSJMHCn0KC3NmaXhlZDMyLmd0Gm4haGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgdGhpcyA8PSBydWxlcy5ndD8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0XSkgOiAnJwq2AQoOc2ZpeGVkMzIuZ3RfbHQaowFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ICYmICh0aGlzID49IHJ1bGVzLmx0IHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCr4BChhzZml4ZWQzMi5ndF9sdF9leGNsdXNpdmUaoQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3QgJiYgKHJ1bGVzLmx0IDw9IHRoaXMgJiYgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0XSkgOiAnJwrGAQoPc2ZpeGVkMzIuZ3RfbHRlGrIBaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlID49IHJ1bGVzLmd0ICYmICh0aGlzID4gcnVsZXMubHRlIHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRlXSkgOiAnJwrOAQoZc2ZpeGVkMzIuZ3RfbHRlX2V4Y2x1c2l2ZRqwAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ICYmIChydWxlcy5sdGUgPCB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnSAES8gcKA2d0ZRgFIAEoD0LiB8JI3gcKiwEKDHNmaXhlZDMyLmd0ZRp7IWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmIHRoaXMgPCBydWxlcy5ndGU/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGVdKSA6ICcnCsUBCg9zZml4ZWQzMi5ndGVfbHQasQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ZSAmJiAodGhpcyA+PSBydWxlcy5sdCB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdF0pIDogJycKzQEKGXNmaXhlZDMyLmd0ZV9sdF9leGNsdXNpdmUarwFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3RlICYmIChydWxlcy5sdCA8PSB0aGlzICYmIHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgb3IgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCtUBChBzZml4ZWQzMi5ndGVfbHRlGsABaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlID49IHJ1bGVzLmd0ZSAmJiAodGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnCt0BChpzZml4ZWQzMi5ndGVfbHRlX2V4Y2x1c2l2ZRq+AWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ZSAmJiAocnVsZXMubHRlIDwgdGhpcyAmJiB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIG9yIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJydIARJ4CgJpbhgGIAMoD0JswkhpCmcKC3NmaXhlZDMyLmluGlghKHRoaXMgaW4gZHluKHJ1bGVzKVsnaW4nXSkgPyAndmFsdWUgbXVzdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW2R5bihydWxlcylbJ2luJ11dKSA6ICcnEnkKBm5vdF9pbhgHIAMoD0JpwkhmCmQKD3NmaXhlZDMyLm5vdF9pbhpRdGhpcyBpbiBydWxlcy5ub3RfaW4gPyAndmFsdWUgbXVzdCBub3QgYmUgaW4gbGlzdCAlcycuZm9ybWF0KFtydWxlcy5ub3RfaW5dKSA6ICcnEi4KB2V4YW1wbGUYCCADKA9CHcJIGgoYChBzZml4ZWQzMi5leGFtcGxlGgR0cnVlKgkI6AcQgICAgAJCCwoJbGVzc190aGFuQg4KDGdyZWF0ZXJfdGhhbiKaFQoNU0ZpeGVkNjRSdWxlcxJsCgVjb25zdBgBIAEoEEJdwkhaClgKDnNmaXhlZDY0LmNvbnN0GkZ0aGlzICE9IHJ1bGVzLmNvbnN0ID8gJ3ZhbHVlIG11c3QgZXF1YWwgJXMnLmZvcm1hdChbcnVsZXMuY29uc3RdKSA6ICcnEo0BCgJsdBgCIAEoEEJ/wkh8CnoKC3NmaXhlZDY0Lmx0GmshaGFzKHJ1bGVzLmd0ZSkgJiYgIWhhcyhydWxlcy5ndCkgJiYgdGhpcyA+PSBydWxlcy5sdD8gJ3ZhbHVlIG11c3QgYmUgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmx0XSkgOiAnJ0gAEp8BCgNsdGUYAyABKBBCjwHCSIsBCogBCgxzZml4ZWQ2NC5sdGUaeCFoYXMocnVsZXMuZ3RlKSAmJiAhaGFzKHJ1bGVzLmd0KSAmJiB0aGlzID4gcnVsZXMubHRlPyAndmFsdWUgbXVzdCBiZSBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMubHRlXSkgOiAnJ0gAEqYHCgJndBgEIAEoEEKXB8JIkwcKfQoLc2ZpeGVkNjQuZ3QabiFoYXMocnVsZXMubHQpICYmICFoYXMocnVsZXMubHRlKSAmJiB0aGlzIDw9IHJ1bGVzLmd0PyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RdKSA6ICcnCrYBCg5zZml4ZWQ2NC5ndF9sdBqjAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPj0gcnVsZXMuZ3QgJiYgKHRoaXMgPj0gcnVsZXMubHQgfHwgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBhbmQgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdF0pIDogJycKvgEKGHNmaXhlZDY0Lmd0X2x0X2V4Y2x1c2l2ZRqhAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPCBydWxlcy5ndCAmJiAocnVsZXMubHQgPD0gdGhpcyAmJiB0aGlzIDw9IHJ1bGVzLmd0KT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzIG9yIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCsYBCg9zZml4ZWQ2NC5ndF9sdGUasgFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPj0gcnVsZXMuZ3QgJiYgKHRoaXMgPiBydWxlcy5sdGUgfHwgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBhbmQgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnCs4BChlzZml4ZWQ2NC5ndF9sdGVfZXhjbHVzaXZlGrABaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlIDwgcnVsZXMuZ3QgJiYgKHJ1bGVzLmx0ZSA8IHRoaXMgJiYgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBvciBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0ZV0pIDogJydIARLyBwoDZ3RlGAUgASgQQuIHwkjeBwqLAQoMc2ZpeGVkNjQuZ3RlGnshaGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgdGhpcyA8IHJ1bGVzLmd0ZT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZV0pIDogJycKxQEKD3NmaXhlZDY0Lmd0ZV9sdBqxAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPj0gcnVsZXMuZ3RlICYmICh0aGlzID49IHJ1bGVzLmx0IHx8IHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgYW5kIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0XSkgOiAnJwrNAQoZc2ZpeGVkNjQuZ3RlX2x0X2V4Y2x1c2l2ZRqvAWhhcyhydWxlcy5sdCkgJiYgcnVsZXMubHQgPCBydWxlcy5ndGUgJiYgKHJ1bGVzLmx0IDw9IHRoaXMgJiYgdGhpcyA8IHJ1bGVzLmd0ZSk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdF0pIDogJycK1QEKEHNmaXhlZDY0Lmd0ZV9sdGUawAFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPj0gcnVsZXMuZ3RlICYmICh0aGlzID4gcnVsZXMubHRlIHx8IHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgYW5kIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJycK3QEKGnNmaXhlZDY0Lmd0ZV9sdGVfZXhjbHVzaXZlGr4BaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlIDwgcnVsZXMuZ3RlICYmIChydWxlcy5sdGUgPCB0aGlzICYmIHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRlXSkgOiAnJ0gBEngKAmluGAYgAygQQmzCSGkKZwoLc2ZpeGVkNjQuaW4aWCEodGhpcyBpbiBkeW4ocnVsZXMpWydpbiddKSA/ICd2YWx1ZSBtdXN0IGJlIGluIGxpc3QgJXMnLmZvcm1hdChbZHluKHJ1bGVzKVsnaW4nXV0pIDogJycSeQoGbm90X2luGAcgAygQQmnCSGYKZAoPc2ZpeGVkNjQubm90X2luGlF0aGlzIGluIHJ1bGVzLm5vdF9pbiA/ICd2YWx1ZSBtdXN0IG5vdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW3J1bGVzLm5vdF9pbl0pIDogJycSLgoHZXhhbXBsZRgIIAMoEEIdwkgaChgKEHNmaXhlZDY0LmV4YW1wbGUaBHRydWUqCQjoBxCAgICAAkILCglsZXNzX3RoYW5CDgoMZ3JlYXRlcl90aGFuIqwBCglCb29sUnVsZXMSaAoFY29uc3QYASABKAhCWcJIVgpUCgpib29sLmNvbnN0GkZ0aGlzICE9IHJ1bGVzLmNvbnN0ID8gJ3ZhbHVlIG11c3QgZXF1YWwgJXMnLmZvcm1hdChbcnVsZXMuY29uc3RdKSA6ICcnEioKB2V4YW1wbGUYAiADKAhCGcJIFgoUCgxib29sLmV4YW1wbGUaBHRydWUqCQjoBxCAgICAAiLgNgoLU3RyaW5nUnVsZXMSbAoFY29uc3QYASABKAlCXcJIWgpYCgxzdHJpbmcuY29uc3QaSHRoaXMgIT0gcnVsZXMuY29uc3QgPyAndmFsdWUgbXVzdCBlcXVhbCBgJXNgJy5mb3JtYXQoW3J1bGVzLmNvbnN0XSkgOiAnJxJ+CgNsZW4YEyABKARCccJIbgpsCgpzdHJpbmcubGVuGl51aW50KHRoaXMuc2l6ZSgpKSAhPSBydWxlcy5sZW4gPyAndmFsdWUgbGVuZ3RoIG11c3QgYmUgJXMgY2hhcmFjdGVycycuZm9ybWF0KFtydWxlcy5sZW5dKSA6ICcnEpkBCgdtaW5fbGVuGAIgASgEQocBwkiDAQqAAQoOc3RyaW5nLm1pbl9sZW4abnVpbnQodGhpcy5zaXplKCkpIDwgcnVsZXMubWluX2xlbiA/ICd2YWx1ZSBsZW5ndGggbXVzdCBiZSBhdCBsZWFzdCAlcyBjaGFyYWN0ZXJzJy5mb3JtYXQoW3J1bGVzLm1pbl9sZW5dKSA6ICcnEpcBCgdtYXhfbGVuGAMgASgEQoUBwkiBAQp/Cg5zdHJpbmcubWF4X2xlbhptdWludCh0aGlzLnNpemUoKSkgPiBydWxlcy5tYXhfbGVuID8gJ3ZhbHVlIGxlbmd0aCBtdXN0IGJlIGF0IG1vc3QgJXMgY2hhcmFjdGVycycuZm9ybWF0KFtydWxlcy5tYXhfbGVuXSkgOiAnJxKbAQoJbGVuX2J5dGVzGBQgASgEQocBwkiDAQqAAQoQc3RyaW5nLmxlbl9ieXRlcxpsdWludChieXRlcyh0aGlzKS5zaXplKCkpICE9IHJ1bGVzLmxlbl9ieXRlcyA/ICd2YWx1ZSBsZW5ndGggbXVzdCBiZSAlcyBieXRlcycuZm9ybWF0KFtydWxlcy5sZW5fYnl0ZXNdKSA6ICcnEqMBCgltaW5fYnl0ZXMYBCABKARCjwHCSIsBCogBChBzdHJpbmcubWluX2J5dGVzGnR1aW50KGJ5dGVzKHRoaXMpLnNpemUoKSkgPCBydWxlcy5taW5fYnl0ZXMgPyAndmFsdWUgbGVuZ3RoIG11c3QgYmUgYXQgbGVhc3QgJXMgYnl0ZXMnLmZvcm1hdChbcnVsZXMubWluX2J5dGVzXSkgOiAnJxKiAQoJbWF4X2J5dGVzGAUgASgEQo4BwkiKAQqHAQoQc3RyaW5nLm1heF9ieXRlcxpzdWludChieXRlcyh0aGlzKS5zaXplKCkpID4gcnVsZXMubWF4X2J5dGVzID8gJ3ZhbHVlIGxlbmd0aCBtdXN0IGJlIGF0IG1vc3QgJXMgYnl0ZXMnLmZvcm1hdChbcnVsZXMubWF4X2J5dGVzXSkgOiAnJxKNAQoHcGF0dGVybhgGIAEoCUJ8wkh5CncKDnN0cmluZy5wYXR0ZXJuGmUhdGhpcy5tYXRjaGVzKHJ1bGVzLnBhdHRlcm4pID8gJ3ZhbHVlIGRvZXMgbm90IG1hdGNoIHJlZ2V4IHBhdHRlcm4gYCVzYCcuZm9ybWF0KFtydWxlcy5wYXR0ZXJuXSkgOiAnJxKEAQoGcHJlZml4GAcgASgJQnTCSHEKbwoNc3RyaW5nLnByZWZpeBpeIXRoaXMuc3RhcnRzV2l0aChydWxlcy5wcmVmaXgpID8gJ3ZhbHVlIGRvZXMgbm90IGhhdmUgcHJlZml4IGAlc2AnLmZvcm1hdChbcnVsZXMucHJlZml4XSkgOiAnJxKCAQoGc3VmZml4GAggASgJQnLCSG8KbQoNc3RyaW5nLnN1ZmZpeBpcIXRoaXMuZW5kc1dpdGgocnVsZXMuc3VmZml4KSA/ICd2YWx1ZSBkb2VzIG5vdCBoYXZlIHN1ZmZpeCBgJXNgJy5mb3JtYXQoW3J1bGVzLnN1ZmZpeF0pIDogJycSkAEKCGNvbnRhaW5zGAkgASgJQn7CSHsKeQoPc3RyaW5nLmNvbnRhaW5zGmYhdGhpcy5jb250YWlucyhydWxlcy5jb250YWlucykgPyAndmFsdWUgZG9lcyBub3QgY29udGFpbiBzdWJzdHJpbmcgYCVzYCcuZm9ybWF0KFtydWxlcy5jb250YWluc10pIDogJycSmAEKDG5vdF9jb250YWlucxgXIAEoCUKBAcJIfgp8ChNzdHJpbmcubm90X2NvbnRhaW5zGmV0aGlzLmNvbnRhaW5zKHJ1bGVzLm5vdF9jb250YWlucykgPyAndmFsdWUgY29udGFpbnMgc3Vic3RyaW5nIGAlc2AnLmZvcm1hdChbcnVsZXMubm90X2NvbnRhaW5zXSkgOiAnJxJ2CgJpbhgKIAMoCUJqwkhnCmUKCXN0cmluZy5pbhpYISh0aGlzIGluIGR5bihydWxlcylbJ2luJ10pID8gJ3ZhbHVlIG11c3QgYmUgaW4gbGlzdCAlcycuZm9ybWF0KFtkeW4ocnVsZXMpWydpbiddXSkgOiAnJxJ3CgZub3RfaW4YCyADKAlCZ8JIZApiCg1zdHJpbmcubm90X2luGlF0aGlzIGluIHJ1bGVzLm5vdF9pbiA/ICd2YWx1ZSBtdXN0IG5vdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW3J1bGVzLm5vdF9pbl0pIDogJycS3wEKBWVtYWlsGAwgASgIQs0BwkjJAQphCgxzdHJpbmcuZW1haWwSI3ZhbHVlIG11c3QgYmUgYSB2YWxpZCBlbWFpbCBhZGRyZXNzGiwhcnVsZXMuZW1haWwgfHwgdGhpcyA9PSAnJyB8fCB0aGlzLmlzRW1haWwoKQpkChJzdHJpbmcuZW1haWxfZW1wdHkSMnZhbHVlIGlzIGVtcHR5LCB3aGljaCBpcyBub3QgYSB2YWxpZCBlbWFpbCBhZGRyZXNzGhohcnVsZXMuZW1haWwgfHwgdGhpcyAhPSAnJ0gAEucBCghob3N0bmFtZRgNIAEoCELSAcJIzgEKZQoPc3RyaW5nLmhvc3RuYW1lEh52YWx1ZSBtdXN0IGJlIGEgdmFsaWQgaG9zdG5hbWUaMiFydWxlcy5ob3N0bmFtZSB8fCB0aGlzID09ICcnIHx8IHRoaXMuaXNIb3N0bmFtZSgpCmUKFXN0cmluZy5ob3N0bmFtZV9lbXB0eRItdmFsdWUgaXMgZW1wdHksIHdoaWNoIGlzIG5vdCBhIHZhbGlkIGhvc3RuYW1lGh0hcnVsZXMuaG9zdG5hbWUgfHwgdGhpcyAhPSAnJ0gAEscBCgJpcBgOIAEoCEK4AcJItAEKVQoJc3RyaW5nLmlwEiB2YWx1ZSBtdXN0IGJlIGEgdmFsaWQgSVAgYWRkcmVzcxomIXJ1bGVzLmlwIHx8IHRoaXMgPT0gJycgfHwgdGhpcy5pc0lwKCkKWwoPc3RyaW5nLmlwX2VtcHR5Ei92YWx1ZSBpcyBlbXB0eSwgd2hpY2ggaXMgbm90IGEgdmFsaWQgSVAgYWRkcmVzcxoXIXJ1bGVzLmlwIHx8IHRoaXMgIT0gJydIABLWAQoEaXB2NBgPIAEoCELFAcJIwQEKXAoLc3RyaW5nLmlwdjQSInZhbHVlIG11c3QgYmUgYSB2YWxpZCBJUHY0IGFkZHJlc3MaKSFydWxlcy5pcHY0IHx8IHRoaXMgPT0gJycgfHwgdGhpcy5pc0lwKDQpCmEKEXN0cmluZy5pcHY0X2VtcHR5EjF2YWx1ZSBpcyBlbXB0eSwgd2hpY2ggaXMgbm90IGEgdmFsaWQgSVB2NCBhZGRyZXNzGhkhcnVsZXMuaXB2NCB8fCB0aGlzICE9ICcnSAAS1gEKBGlwdjYYECABKAhCxQHCSMEBClwKC3N0cmluZy5pcHY2EiJ2YWx1ZSBtdXN0IGJlIGEgdmFsaWQgSVB2NiBhZGRyZXNzGikhcnVsZXMuaXB2NiB8fCB0aGlzID09ICcnIHx8IHRoaXMuaXNJcCg2KQphChFzdHJpbmcuaXB2Nl9lbXB0eRIxdmFsdWUgaXMgZW1wdHksIHdoaWNoIGlzIG5vdCBhIHZhbGlkIElQdjYgYWRkcmVzcxoZIXJ1bGVzLmlwdjYgfHwgdGhpcyAhPSAnJ0gAEr8BCgN1cmkYESABKAhCrwHCSKsBClEKCnN0cmluZy51cmkSGXZhbHVlIG11c3QgYmUgYSB2YWxpZCBVUkkaKCFydWxlcy51cmkgfHwgdGhpcyA9PSAnJyB8fCB0aGlzLmlzVXJpKCkKVgoQc3RyaW5nLnVyaV9lbXB0eRIodmFsdWUgaXMgZW1wdHksIHdoaWNoIGlzIG5vdCBhIHZhbGlkIFVSSRoYIXJ1bGVzLnVyaSB8fCB0aGlzICE9ICcnSAASZgoHdXJpX3JlZhgSIAEoCEJTwkhQCk4KDnN0cmluZy51cmlfcmVmEhl2YWx1ZSBtdXN0IGJlIGEgdmFsaWQgVVJJGiEhcnVsZXMudXJpX3JlZiB8fCB0aGlzLmlzVXJpUmVmKClIABKQAgoHYWRkcmVzcxgVIAEoCEL8AcJI+AEKgQEKDnN0cmluZy5hZGRyZXNzEi12YWx1ZSBtdXN0IGJlIGEgdmFsaWQgaG9zdG5hbWUsIG9yIGlwIGFkZHJlc3MaQCFydWxlcy5hZGRyZXNzIHx8IHRoaXMgPT0gJycgfHwgdGhpcy5pc0hvc3RuYW1lKCkgfHwgdGhpcy5pc0lwKCkKcgoUc3RyaW5nLmFkZHJlc3NfZW1wdHkSPHZhbHVlIGlzIGVtcHR5LCB3aGljaCBpcyBub3QgYSB2YWxpZCBob3N0bmFtZSwgb3IgaXAgYWRkcmVzcxocIXJ1bGVzLmFkZHJlc3MgfHwgdGhpcyAhPSAnJ0gAEpgCCgR1dWlkGBYgASgIQocCwkiDAgqlAQoLc3RyaW5nLnV1aWQSGnZhbHVlIG11c3QgYmUgYSB2YWxpZCBVVUlEGnohcnVsZXMudXVpZCB8fCB0aGlzID09ICcnIHx8IHRoaXMubWF0Y2hlcygnXlswLTlhLWZBLUZdezh9LVswLTlhLWZBLUZdezR9LVswLTlhLWZBLUZdezR9LVswLTlhLWZBLUZdezR9LVswLTlhLWZBLUZdezEyfSQnKQpZChFzdHJpbmcudXVpZF9lbXB0eRIpdmFsdWUgaXMgZW1wdHksIHdoaWNoIGlzIG5vdCBhIHZhbGlkIFVVSUQaGSFydWxlcy51dWlkIHx8IHRoaXMgIT0gJydIABLwAQoFdHV1aWQYISABKAhC3gHCSNoBCnMKDHN0cmluZy50dXVpZBIidmFsdWUgbXVzdCBiZSBhIHZhbGlkIHRyaW1tZWQgVVVJRBo/IXJ1bGVzLnR1dWlkIHx8IHRoaXMgPT0gJycgfHwgdGhpcy5tYXRjaGVzKCdeWzAtOWEtZkEtRl17MzJ9JCcpCmMKEnN0cmluZy50dXVpZF9lbXB0eRIxdmFsdWUgaXMgZW1wdHksIHdoaWNoIGlzIG5vdCBhIHZhbGlkIHRyaW1tZWQgVVVJRBoaIXJ1bGVzLnR1dWlkIHx8IHRoaXMgIT0gJydIABKWAgoRaXBfd2l0aF9wcmVmaXhsZW4YGiABKAhC+AHCSPQBCngKGHN0cmluZy5pcF93aXRoX3ByZWZpeGxlbhIfdmFsdWUgbXVzdCBiZSBhIHZhbGlkIElQIHByZWZpeBo7IXJ1bGVzLmlwX3dpdGhfcHJlZml4bGVuIHx8IHRoaXMgPT0gJycgfHwgdGhpcy5pc0lwUHJlZml4KCkKeAoec3RyaW5nLmlwX3dpdGhfcHJlZml4bGVuX2VtcHR5Ei52YWx1ZSBpcyBlbXB0eSwgd2hpY2ggaXMgbm90IGEgdmFsaWQgSVAgcHJlZml4GiYhcnVsZXMuaXBfd2l0aF9wcmVmaXhsZW4gfHwgdGhpcyAhPSAnJ0gAEs8CChNpcHY0X3dpdGhfcHJlZml4bGVuGBsgASgIQq8CwkirAgqTAQoac3RyaW5nLmlwdjRfd2l0aF9wcmVmaXhsZW4SNXZhbHVlIG11c3QgYmUgYSB2YWxpZCBJUHY0IGFkZHJlc3Mgd2l0aCBwcmVmaXggbGVuZ3RoGj4hcnVsZXMuaXB2NF93aXRoX3ByZWZpeGxlbiB8fCB0aGlzID09ICcnIHx8IHRoaXMuaXNJcFByZWZpeCg0KQqSAQogc3RyaW5nLmlwdjRfd2l0aF9wcmVmaXhsZW5fZW1wdHkSRHZhbHVlIGlzIGVtcHR5LCB3aGljaCBpcyBub3QgYSB2YWxpZCBJUHY0IGFkZHJlc3Mgd2l0aCBwcmVmaXggbGVuZ3RoGighcnVsZXMuaXB2NF93aXRoX3ByZWZpeGxlbiB8fCB0aGlzICE9ICcnSAASzwIKE2lwdjZfd2l0aF9wcmVmaXhsZW4YHCABKAhCrwLCSKsCCpMBChpzdHJpbmcuaXB2Nl93aXRoX3ByZWZpeGxlbhI1dmFsdWUgbXVzdCBiZSBhIHZhbGlkIElQdjYgYWRkcmVzcyB3aXRoIHByZWZpeCBsZW5ndGgaPiFydWxlcy5pcHY2X3dpdGhfcHJlZml4bGVuIHx8IHRoaXMgPT0gJycgfHwgdGhpcy5pc0lwUHJlZml4KDYpCpIBCiBzdHJpbmcuaXB2Nl93aXRoX3ByZWZpeGxlbl9lbXB0eRJEdmFsdWUgaXMgZW1wdHksIHdoaWNoIGlzIG5vdCBhIHZhbGlkIElQdjYgYWRkcmVzcyB3aXRoIHByZWZpeCBsZW5ndGgaKCFydWxlcy5pcHY2X3dpdGhfcHJlZml4bGVuIHx8IHRoaXMgIT0gJydIABLyAQoJaXBfcHJlZml4GB0gASgIQtwBwkjYAQpsChBzdHJpbmcuaXBfcHJlZml4Eh92YWx1ZSBtdXN0IGJlIGEgdmFsaWQgSVAgcHJlZml4GjchcnVsZXMuaXBfcHJlZml4IHx8IHRoaXMgPT0gJycgfHwgdGhpcy5pc0lwUHJlZml4KHRydWUpCmgKFnN0cmluZy5pcF9wcmVmaXhfZW1wdHkSLnZhbHVlIGlzIGVtcHR5LCB3aGljaCBpcyBub3QgYSB2YWxpZCBJUCBwcmVmaXgaHiFydWxlcy5pcF9wcmVmaXggfHwgdGhpcyAhPSAnJ0gAEoMCCgtpcHY0X3ByZWZpeBgeIAEoCELrAcJI5wEKdQoSc3RyaW5nLmlwdjRfcHJlZml4EiF2YWx1ZSBtdXN0IGJlIGEgdmFsaWQgSVB2NCBwcmVmaXgaPCFydWxlcy5pcHY0X3ByZWZpeCB8fCB0aGlzID09ICcnIHx8IHRoaXMuaXNJcFByZWZpeCg0LCB0cnVlKQpuChhzdHJpbmcuaXB2NF9wcmVmaXhfZW1wdHkSMHZhbHVlIGlzIGVtcHR5LCB3aGljaCBpcyBub3QgYSB2YWxpZCBJUHY0IHByZWZpeBogIXJ1bGVzLmlwdjRfcHJlZml4IHx8IHRoaXMgIT0gJydIABKDAgoLaXB2Nl9wcmVmaXgYHyABKAhC6wHCSOcBCnUKEnN0cmluZy5pcHY2X3ByZWZpeBIhdmFsdWUgbXVzdCBiZSBhIHZhbGlkIElQdjYgcHJlZml4GjwhcnVsZXMuaXB2Nl9wcmVmaXggfHwgdGhpcyA9PSAnJyB8fCB0aGlzLmlzSXBQcmVmaXgoNiwgdHJ1ZSkKbgoYc3RyaW5nLmlwdjZfcHJlZml4X2VtcHR5EjB2YWx1ZSBpcyBlbXB0eSwgd2hpY2ggaXMgbm90IGEgdmFsaWQgSVB2NiBwcmVmaXgaICFydWxlcy5pcHY2X3ByZWZpeCB8fCB0aGlzICE9ICcnSAAStQIKDWhvc3RfYW5kX3BvcnQYICABKAhCmwLCSJcCCpkBChRzdHJpbmcuaG9zdF9hbmRfcG9ydBJBdmFsdWUgbXVzdCBiZSBhIHZhbGlkIGhvc3QgKGhvc3RuYW1lIG9yIElQIGFkZHJlc3MpIGFuZCBwb3J0IHBhaXIaPiFydWxlcy5ob3N0X2FuZF9wb3J0IHx8IHRoaXMgPT0gJycgfHwgdGhpcy5pc0hvc3RBbmRQb3J0KHRydWUpCnkKGnN0cmluZy5ob3N0X2FuZF9wb3J0X2VtcHR5Ejd2YWx1ZSBpcyBlbXB0eSwgd2hpY2ggaXMgbm90IGEgdmFsaWQgaG9zdCBhbmQgcG9ydCBwYWlyGiIhcnVsZXMuaG9zdF9hbmRfcG9ydCB8fCB0aGlzICE9ICcnSAASqAUKEHdlbGxfa25vd25fcmVnZXgYGCABKA4yGC5idWYudmFsaWRhdGUuS25vd25SZWdleELxBMJI7QQK8AEKI3N0cmluZy53ZWxsX2tub3duX3JlZ2V4LmhlYWRlcl9uYW1lEiZ2YWx1ZSBtdXN0IGJlIGEgdmFsaWQgSFRUUCBoZWFkZXIgbmFtZRqgAXJ1bGVzLndlbGxfa25vd25fcmVnZXggIT0gMSB8fCB0aGlzID09ICcnIHx8IHRoaXMubWF0Y2hlcyghaGFzKHJ1bGVzLnN0cmljdCkgfHwgcnVsZXMuc3RyaWN0ID8nXjo/WzAtOWEtekEtWiEjJCUmXCcqKy0uXl98flx4NjBdKyQnIDonXlteXHUwMDAwXHUwMDBBXHUwMDBEXSskJykKjQEKKXN0cmluZy53ZWxsX2tub3duX3JlZ2V4LmhlYWRlcl9uYW1lX2VtcHR5EjV2YWx1ZSBpcyBlbXB0eSwgd2hpY2ggaXMgbm90IGEgdmFsaWQgSFRUUCBoZWFkZXIgbmFtZRopcnVsZXMud2VsbF9rbm93bl9yZWdleCAhPSAxIHx8IHRoaXMgIT0gJycK5wEKJHN0cmluZy53ZWxsX2tub3duX3JlZ2V4LmhlYWRlcl92YWx1ZRIndmFsdWUgbXVzdCBiZSBhIHZhbGlkIEhUVFAgaGVhZGVyIHZhbHVlGpUBcnVsZXMud2VsbF9rbm93bl9yZWdleCAhPSAyIHx8IHRoaXMubWF0Y2hlcyghaGFzKHJ1bGVzLnN0cmljdCkgfHwgcnVsZXMuc3RyaWN0ID8nXlteXHUwMDAwLVx1MDAwOFx1MDAwQS1cdTAwMUZcdTAwN0ZdKiQnIDonXlteXHUwMDAwXHUwMDBBXHUwMDBEXSokJylIABIOCgZzdHJpY3QYGSABKAgSLAoHZXhhbXBsZRgiIAMoCUIbwkgYChYKDnN0cmluZy5leGFtcGxlGgR0cnVlKgkI6AcQgICAgAJCDAoKd2VsbF9rbm93biK/EAoKQnl0ZXNSdWxlcxJmCgVjb25zdBgBIAEoDEJXwkhUClIKC2J5dGVzLmNvbnN0GkN0aGlzICE9IHJ1bGVzLmNvbnN0ID8gJ3ZhbHVlIG11c3QgYmUgJXgnLmZvcm1hdChbcnVsZXMuY29uc3RdKSA6ICcnEngKA2xlbhgNIAEoBEJrwkhoCmYKCWJ5dGVzLmxlbhpZdWludCh0aGlzLnNpemUoKSkgIT0gcnVsZXMubGVuID8gJ3ZhbHVlIGxlbmd0aCBtdXN0IGJlICVzIGJ5dGVzJy5mb3JtYXQoW3J1bGVzLmxlbl0pIDogJycSkAEKB21pbl9sZW4YAiABKARCf8JIfAp6Cg1ieXRlcy5taW5fbGVuGml1aW50KHRoaXMuc2l6ZSgpKSA8IHJ1bGVzLm1pbl9sZW4gPyAndmFsdWUgbGVuZ3RoIG11c3QgYmUgYXQgbGVhc3QgJXMgYnl0ZXMnLmZvcm1hdChbcnVsZXMubWluX2xlbl0pIDogJycSiAEKB21heF9sZW4YAyABKARCd8JIdApyCg1ieXRlcy5tYXhfbGVuGmF1aW50KHRoaXMuc2l6ZSgpKSA+IHJ1bGVzLm1heF9sZW4gPyAndmFsdWUgbXVzdCBiZSBhdCBtb3N0ICVzIGJ5dGVzJy5mb3JtYXQoW3J1bGVzLm1heF9sZW5dKSA6ICcnEpABCgdwYXR0ZXJuGAQgASgJQn/CSHwKegoNYnl0ZXMucGF0dGVybhppIXN0cmluZyh0aGlzKS5tYXRjaGVzKHJ1bGVzLnBhdHRlcm4pID8gJ3ZhbHVlIG11c3QgbWF0Y2ggcmVnZXggcGF0dGVybiBgJXNgJy5mb3JtYXQoW3J1bGVzLnBhdHRlcm5dKSA6ICcnEoEBCgZwcmVmaXgYBSABKAxCccJIbgpsCgxieXRlcy5wcmVmaXgaXCF0aGlzLnN0YXJ0c1dpdGgocnVsZXMucHJlZml4KSA/ICd2YWx1ZSBkb2VzIG5vdCBoYXZlIHByZWZpeCAleCcuZm9ybWF0KFtydWxlcy5wcmVmaXhdKSA6ICcnEn8KBnN1ZmZpeBgGIAEoDEJvwkhsCmoKDGJ5dGVzLnN1ZmZpeBpaIXRoaXMuZW5kc1dpdGgocnVsZXMuc3VmZml4KSA/ICd2YWx1ZSBkb2VzIG5vdCBoYXZlIHN1ZmZpeCAleCcuZm9ybWF0KFtydWxlcy5zdWZmaXhdKSA6ICcnEoMBCghjb250YWlucxgHIAEoDEJxwkhuCmwKDmJ5dGVzLmNvbnRhaW5zGlohdGhpcy5jb250YWlucyhydWxlcy5jb250YWlucykgPyAndmFsdWUgZG9lcyBub3QgY29udGFpbiAleCcuZm9ybWF0KFtydWxlcy5jb250YWluc10pIDogJycSlwEKAmluGAggAygMQooBwkiGAQqDAQoIYnl0ZXMuaW4ad2R5bihydWxlcylbJ2luJ10uc2l6ZSgpID4gMCAmJiAhKHRoaXMgaW4gZHluKHJ1bGVzKVsnaW4nXSkgPyAndmFsdWUgbXVzdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW2R5bihydWxlcylbJ2luJ11dKSA6ICcnEnYKBm5vdF9pbhgJIAMoDEJmwkhjCmEKDGJ5dGVzLm5vdF9pbhpRdGhpcyBpbiBydWxlcy5ub3RfaW4gPyAndmFsdWUgbXVzdCBub3QgYmUgaW4gbGlzdCAlcycuZm9ybWF0KFtydWxlcy5ub3RfaW5dKSA6ICcnEusBCgJpcBgKIAEoCELcAcJI2AEKdAoIYnl0ZXMuaXASIHZhbHVlIG11c3QgYmUgYSB2YWxpZCBJUCBhZGRyZXNzGkYhcnVsZXMuaXAgfHwgdGhpcy5zaXplKCkgPT0gMCB8fCB0aGlzLnNpemUoKSA9PSA0IHx8IHRoaXMuc2l6ZSgpID09IDE2CmAKDmJ5dGVzLmlwX2VtcHR5Ei92YWx1ZSBpcyBlbXB0eSwgd2hpY2ggaXMgbm90IGEgdmFsaWQgSVAgYWRkcmVzcxodIXJ1bGVzLmlwIHx8IHRoaXMuc2l6ZSgpICE9IDBIABLkAQoEaXB2NBgLIAEoCELTAcJIzwEKZQoKYnl0ZXMuaXB2NBIidmFsdWUgbXVzdCBiZSBhIHZhbGlkIElQdjQgYWRkcmVzcxozIXJ1bGVzLmlwdjQgfHwgdGhpcy5zaXplKCkgPT0gMCB8fCB0aGlzLnNpemUoKSA9PSA0CmYKEGJ5dGVzLmlwdjRfZW1wdHkSMXZhbHVlIGlzIGVtcHR5LCB3aGljaCBpcyBub3QgYSB2YWxpZCBJUHY0IGFkZHJlc3MaHyFydWxlcy5pcHY0IHx8IHRoaXMuc2l6ZSgpICE9IDBIABLlAQoEaXB2NhgMIAEoCELUAcJI0AEKZgoKYnl0ZXMuaXB2NhIidmFsdWUgbXVzdCBiZSBhIHZhbGlkIElQdjYgYWRkcmVzcxo0IXJ1bGVzLmlwdjYgfHwgdGhpcy5zaXplKCkgPT0gMCB8fCB0aGlzLnNpemUoKSA9PSAxNgpmChBieXRlcy5pcHY2X2VtcHR5EjF2YWx1ZSBpcyBlbXB0eSwgd2hpY2ggaXMgbm90IGEgdmFsaWQgSVB2NiBhZGRyZXNzGh8hcnVsZXMuaXB2NiB8fCB0aGlzLnNpemUoKSAhPSAwSAASKwoHZXhhbXBsZRgOIAMoDEIawkgXChUKDWJ5dGVzLmV4YW1wbGUaBHRydWUqCQjoBxCAgICAAkIMCgp3ZWxsX2tub3duIq8DCglFbnVtUnVsZXMSaAoFY29uc3QYASABKAVCWcJIVgpUCgplbnVtLmNvbnN0GkZ0aGlzICE9IHJ1bGVzLmNvbnN0ID8gJ3ZhbHVlIG11c3QgZXF1YWwgJXMnLmZvcm1hdChbcnVsZXMuY29uc3RdKSA6ICcnEhQKDGRlZmluZWRfb25seRgCIAEoCBJ0CgJpbhgDIAMoBUJowkhlCmMKB2VudW0uaW4aWCEodGhpcyBpbiBkeW4ocnVsZXMpWydpbiddKSA/ICd2YWx1ZSBtdXN0IGJlIGluIGxpc3QgJXMnLmZvcm1hdChbZHluKHJ1bGVzKVsnaW4nXV0pIDogJycSdQoGbm90X2luGAQgAygFQmXCSGIKYAoLZW51bS5ub3RfaW4aUXRoaXMgaW4gcnVsZXMubm90X2luID8gJ3ZhbHVlIG11c3Qgbm90IGJlIGluIGxpc3QgJXMnLmZvcm1hdChbcnVsZXMubm90X2luXSkgOiAnJxIqCgdleGFtcGxlGAUgAygFQhnCSBYKFAoMZW51bS5leGFtcGxlGgR0cnVlKgkI6AcQgICAgAIigQQKDVJlcGVhdGVkUnVsZXMSngEKCW1pbl9pdGVtcxgBIAEoBEKKAcJIhgEKgwEKEnJlcGVhdGVkLm1pbl9pdGVtcxptdWludCh0aGlzLnNpemUoKSkgPCBydWxlcy5taW5faXRlbXMgPyAndmFsdWUgbXVzdCBjb250YWluIGF0IGxlYXN0ICVkIGl0ZW0ocyknLmZvcm1hdChbcnVsZXMubWluX2l0ZW1zXSkgOiAnJxKiAQoJbWF4X2l0ZW1zGAIgASgEQo4BwkiKAQqHAQoScmVwZWF0ZWQubWF4X2l0ZW1zGnF1aW50KHRoaXMuc2l6ZSgpKSA+IHJ1bGVzLm1heF9pdGVtcyA/ICd2YWx1ZSBtdXN0IGNvbnRhaW4gbm8gbW9yZSB0aGFuICVzIGl0ZW0ocyknLmZvcm1hdChbcnVsZXMubWF4X2l0ZW1zXSkgOiAnJxJwCgZ1bmlxdWUYAyABKAhCYMJIXQpbCg9yZXBlYXRlZC51bmlxdWUSKHJlcGVhdGVkIHZhbHVlIG11c3QgY29udGFpbiB1bmlxdWUgaXRlbXMaHiFydWxlcy51bmlxdWUgfHwgdGhpcy51bmlxdWUoKRItCgVpdGVtcxgEIAEoCzIeLmJ1Zi52YWxpZGF0ZS5GaWVsZENvbnN0cmFpbnRzKgkI6AcQgICAgAIilgMKCE1hcFJ1bGVzEo8BCgltaW5fcGFpcnMYASABKARCfMJIeQp3Cg1tYXAubWluX3BhaXJzGmZ1aW50KHRoaXMuc2l6ZSgpKSA8IHJ1bGVzLm1pbl9wYWlycyA/ICdtYXAgbXVzdCBiZSBhdCBsZWFzdCAlZCBlbnRyaWVzJy5mb3JtYXQoW3J1bGVzLm1pbl9wYWlyc10pIDogJycSjgEKCW1heF9wYWlycxgCIAEoBEJ7wkh4CnYKDW1hcC5tYXhfcGFpcnMaZXVpbnQodGhpcy5zaXplKCkpID4gcnVsZXMubWF4X3BhaXJzID8gJ21hcCBtdXN0IGJlIGF0IG1vc3QgJWQgZW50cmllcycuZm9ybWF0KFtydWxlcy5tYXhfcGFpcnNdKSA6ICcnEiwKBGtleXMYBCABKAsyHi5idWYudmFsaWRhdGUuRmllbGRDb25zdHJhaW50cxIuCgZ2YWx1ZXMYBSABKAsyHi5idWYudmFsaWRhdGUuRmllbGRDb25zdHJhaW50cyoJCOgHEICAgIACIiYKCEFueVJ1bGVzEgoKAmluGAIgAygJEg4KBm5vdF9pbhgDIAMoCSL1FgoNRHVyYXRpb25SdWxlcxKHAQoFY29uc3QYAiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25CXcJIWgpYCg5kdXJhdGlvbi5jb25zdBpGdGhpcyAhPSBydWxlcy5jb25zdCA/ICd2YWx1ZSBtdXN0IGVxdWFsICVzJy5mb3JtYXQoW3J1bGVzLmNvbnN0XSkgOiAnJxKoAQoCbHQYAyABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25Cf8JIfAp6CgtkdXJhdGlvbi5sdBprIWhhcyhydWxlcy5ndGUpICYmICFoYXMocnVsZXMuZ3QpICYmIHRoaXMgPj0gcnVsZXMubHQ/ICd2YWx1ZSBtdXN0IGJlIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5sdF0pIDogJydIABK6AQoDbHRlGAQgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uQo8BwkiLAQqIAQoMZHVyYXRpb24ubHRlGnghaGFzKHJ1bGVzLmd0ZSkgJiYgIWhhcyhydWxlcy5ndCkgJiYgdGhpcyA+IHJ1bGVzLmx0ZT8gJ3ZhbHVlIG11c3QgYmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmx0ZV0pIDogJydIABLBBwoCZ3QYBSABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25ClwfCSJMHCn0KC2R1cmF0aW9uLmd0Gm4haGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgdGhpcyA8PSBydWxlcy5ndD8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0XSkgOiAnJwq2AQoOZHVyYXRpb24uZ3RfbHQaowFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ICYmICh0aGlzID49IHJ1bGVzLmx0IHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCr4BChhkdXJhdGlvbi5ndF9sdF9leGNsdXNpdmUaoQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3QgJiYgKHJ1bGVzLmx0IDw9IHRoaXMgJiYgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBvciBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3QsIHJ1bGVzLmx0XSkgOiAnJwrGAQoPZHVyYXRpb24uZ3RfbHRlGrIBaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlID49IHJ1bGVzLmd0ICYmICh0aGlzID4gcnVsZXMubHRlIHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRlXSkgOiAnJwrOAQoZZHVyYXRpb24uZ3RfbHRlX2V4Y2x1c2l2ZRqwAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ICYmIChydWxlcy5sdGUgPCB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnSAESjQgKA2d0ZRgGIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkLiB8JI3gcKiwEKDGR1cmF0aW9uLmd0ZRp7IWhhcyhydWxlcy5sdCkgJiYgIWhhcyhydWxlcy5sdGUpICYmIHRoaXMgPCBydWxlcy5ndGU/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGVdKSA6ICcnCsUBCg9kdXJhdGlvbi5ndGVfbHQasQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ZSAmJiAodGhpcyA+PSBydWxlcy5sdCB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdF0pIDogJycKzQEKGWR1cmF0aW9uLmd0ZV9sdF9leGNsdXNpdmUarwFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0IDwgcnVsZXMuZ3RlICYmIChydWxlcy5sdCA8PSB0aGlzICYmIHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgb3IgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0ZSwgcnVsZXMubHRdKSA6ICcnCtUBChBkdXJhdGlvbi5ndGVfbHRlGsABaGFzKHJ1bGVzLmx0ZSkgJiYgcnVsZXMubHRlID49IHJ1bGVzLmd0ZSAmJiAodGhpcyA+IHJ1bGVzLmx0ZSB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdGVdKSA6ICcnCt0BChpkdXJhdGlvbi5ndGVfbHRlX2V4Y2x1c2l2ZRq+AWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ZSAmJiAocnVsZXMubHRlIDwgdGhpcyAmJiB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIG9yIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJydIARKTAQoCaW4YByADKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25CbMJIaQpnCgtkdXJhdGlvbi5pbhpYISh0aGlzIGluIGR5bihydWxlcylbJ2luJ10pID8gJ3ZhbHVlIG11c3QgYmUgaW4gbGlzdCAlcycuZm9ybWF0KFtkeW4ocnVsZXMpWydpbiddXSkgOiAnJxKUAQoGbm90X2luGAggAygLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uQmnCSGYKZAoPZHVyYXRpb24ubm90X2luGlF0aGlzIGluIHJ1bGVzLm5vdF9pbiA/ICd2YWx1ZSBtdXN0IG5vdCBiZSBpbiBsaXN0ICVzJy5mb3JtYXQoW3J1bGVzLm5vdF9pbl0pIDogJycSSQoHZXhhbXBsZRgJIAMoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkIdwkgaChgKEGR1cmF0aW9uLmV4YW1wbGUaBHRydWUqCQjoBxCAgICAAkILCglsZXNzX3RoYW5CDgoMZ3JlYXRlcl90aGFuIvgXCg5UaW1lc3RhbXBSdWxlcxKJAQoFY29uc3QYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQl7CSFsKWQoPdGltZXN0YW1wLmNvbnN0GkZ0aGlzICE9IHJ1bGVzLmNvbnN0ID8gJ3ZhbHVlIG11c3QgZXF1YWwgJXMnLmZvcm1hdChbcnVsZXMuY29uc3RdKSA6ICcnEqsBCgJsdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCgAHCSH0KewoMdGltZXN0YW1wLmx0GmshaGFzKHJ1bGVzLmd0ZSkgJiYgIWhhcyhydWxlcy5ndCkgJiYgdGhpcyA+PSBydWxlcy5sdD8gJ3ZhbHVlIG11c3QgYmUgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmx0XSkgOiAnJ0gAErwBCgNsdGUYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQpABwkiMAQqJAQoNdGltZXN0YW1wLmx0ZRp4IWhhcyhydWxlcy5ndGUpICYmICFoYXMocnVsZXMuZ3QpICYmIHRoaXMgPiBydWxlcy5sdGU/ICd2YWx1ZSBtdXN0IGJlIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5sdGVdKSA6ICcnSAASbAoGbHRfbm93GAcgASgIQlrCSFcKVQoQdGltZXN0YW1wLmx0X25vdxpBKHJ1bGVzLmx0X25vdyAmJiB0aGlzID4gbm93KSA/ICd2YWx1ZSBtdXN0IGJlIGxlc3MgdGhhbiBub3cnIDogJydIABLHBwoCZ3QYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQpwHwkiYBwp+Cgx0aW1lc3RhbXAuZ3QabiFoYXMocnVsZXMubHQpICYmICFoYXMocnVsZXMubHRlKSAmJiB0aGlzIDw9IHJ1bGVzLmd0PyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RdKSA6ICcnCrcBCg90aW1lc3RhbXAuZ3RfbHQaowFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ICYmICh0aGlzID49IHJ1bGVzLmx0IHx8IHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgYW5kIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndCwgcnVsZXMubHRdKSA6ICcnCr8BChl0aW1lc3RhbXAuZ3RfbHRfZXhjbHVzaXZlGqEBaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA8IHJ1bGVzLmd0ICYmIChydWxlcy5sdCA8PSB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdF0pIDogJycKxwEKEHRpbWVzdGFtcC5ndF9sdGUasgFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPj0gcnVsZXMuZ3QgJiYgKHRoaXMgPiBydWxlcy5sdGUgfHwgdGhpcyA8PSBydWxlcy5ndCk/ICd2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAlcyBhbmQgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnCs8BChp0aW1lc3RhbXAuZ3RfbHRlX2V4Y2x1c2l2ZRqwAWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ICYmIChydWxlcy5sdGUgPCB0aGlzICYmIHRoaXMgPD0gcnVsZXMuZ3QpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gJXMgb3IgbGVzcyB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0LCBydWxlcy5sdGVdKSA6ICcnSAESkwgKA2d0ZRgGIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBC5wfCSOMHCowBCg10aW1lc3RhbXAuZ3RlGnshaGFzKHJ1bGVzLmx0KSAmJiAhaGFzKHJ1bGVzLmx0ZSkgJiYgdGhpcyA8IHJ1bGVzLmd0ZT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzJy5mb3JtYXQoW3J1bGVzLmd0ZV0pIDogJycKxgEKEHRpbWVzdGFtcC5ndGVfbHQasQFoYXMocnVsZXMubHQpICYmIHJ1bGVzLmx0ID49IHJ1bGVzLmd0ZSAmJiAodGhpcyA+PSBydWxlcy5sdCB8fCB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIGFuZCBsZXNzIHRoYW4gJXMnLmZvcm1hdChbcnVsZXMuZ3RlLCBydWxlcy5sdF0pIDogJycKzgEKGnRpbWVzdGFtcC5ndGVfbHRfZXhjbHVzaXZlGq8BaGFzKHJ1bGVzLmx0KSAmJiBydWxlcy5sdCA8IHJ1bGVzLmd0ZSAmJiAocnVsZXMubHQgPD0gdGhpcyAmJiB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIG9yIGxlc3MgdGhhbiAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0XSkgOiAnJwrWAQoRdGltZXN0YW1wLmd0ZV9sdGUawAFoYXMocnVsZXMubHRlKSAmJiBydWxlcy5sdGUgPj0gcnVsZXMuZ3RlICYmICh0aGlzID4gcnVsZXMubHRlIHx8IHRoaXMgPCBydWxlcy5ndGUpPyAndmFsdWUgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJXMgYW5kIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJycK3gEKG3RpbWVzdGFtcC5ndGVfbHRlX2V4Y2x1c2l2ZRq+AWhhcyhydWxlcy5sdGUpICYmIHJ1bGVzLmx0ZSA8IHJ1bGVzLmd0ZSAmJiAocnVsZXMubHRlIDwgdGhpcyAmJiB0aGlzIDwgcnVsZXMuZ3RlKT8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvICVzIG9yIGxlc3MgdGhhbiBvciBlcXVhbCB0byAlcycuZm9ybWF0KFtydWxlcy5ndGUsIHJ1bGVzLmx0ZV0pIDogJydIARJvCgZndF9ub3cYCCABKAhCXcJIWgpYChB0aW1lc3RhbXAuZ3Rfbm93GkQocnVsZXMuZ3Rfbm93ICYmIHRoaXMgPCBub3cpID8gJ3ZhbHVlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG5vdycgOiAnJ0gBErgBCgZ3aXRoaW4YCSABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25CjAHCSIgBCoUBChB0aW1lc3RhbXAud2l0aGluGnF0aGlzIDwgbm93LXJ1bGVzLndpdGhpbiB8fCB0aGlzID4gbm93K3J1bGVzLndpdGhpbiA/ICd2YWx1ZSBtdXN0IGJlIHdpdGhpbiAlcyBvZiBub3cnLmZvcm1hdChbcnVsZXMud2l0aGluXSkgOiAnJxJLCgdleGFtcGxlGAogAygLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEIewkgbChkKEXRpbWVzdGFtcC5leGFtcGxlGgR0cnVlKgkI6AcQgICAgAJCCwoJbGVzc190aGFuQg4KDGdyZWF0ZXJfdGhhbiI5CgpWaW9sYXRpb25zEisKCnZpb2xhdGlvbnMYASADKAsyFy5idWYudmFsaWRhdGUuVmlvbGF0aW9uIlgKCVZpb2xhdGlvbhISCgpmaWVsZF9wYXRoGAEgASgJEhUKDWNvbnN0cmFpbnRfaWQYAiABKAkSDwoHbWVzc2FnZRgDIAEoCRIPCgdmb3Jfa2V5GAQgASgIKp0BCgZJZ25vcmUSFgoSSUdOT1JFX1VOU1BFQ0lGSUVEEAASGQoVSUdOT1JFX0lGX1VOUE9QVUxBVEVEEAESGwoXSUdOT1JFX0lGX0RFRkFVTFRfVkFMVUUQAhIRCg1JR05PUkVfQUxXQVlTEAMSFAoMSUdOT1JFX0VNUFRZEAEaAggBEhYKDklHTk9SRV9ERUZBVUxUEAIaAggBGgIQASpuCgpLbm93blJlZ2V4EhsKF0tOT1dOX1JFR0VYX1VOU1BFQ0lGSUVEEAASIAocS05PV05fUkVHRVhfSFRUUF9IRUFERVJfTkFNRRABEiEKHUtOT1dOX1JFR0VYX0hUVFBfSEVBREVSX1ZBTFVFEAI6XAoHbWVzc2FnZRIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxiHCSABKAsyIC5idWYudmFsaWRhdGUuTWVzc2FnZUNvbnN0cmFpbnRzUgdtZXNzYWdlOlQKBW9uZW9mEh0uZ29vZ2xlLnByb3RvYnVmLk9uZW9mT3B0aW9ucxiHCSABKAsyHi5idWYudmFsaWRhdGUuT25lb2ZDb25zdHJhaW50c1IFb25lb2Y6VAoFZmllbGQSHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGIcJIAEoCzIeLmJ1Zi52YWxpZGF0ZS5GaWVsZENvbnN0cmFpbnRzUgVmaWVsZDpjCgpwcmVkZWZpbmVkEh0uZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucxiICSABKAsyIy5idWYudmFsaWRhdGUuUHJlZGVmaW5lZENvbnN0cmFpbnRzUgpwcmVkZWZpbmVkQrsBChBjb20uYnVmLnZhbGlkYXRlQg1WYWxpZGF0ZVByb3RvUAFaR2J1Zi5idWlsZC9nZW4vZ28vYnVmYnVpbGQvcHJvdG92YWxpZGF0ZS9wcm90b2NvbGJ1ZmZlcnMvZ28vYnVmL3ZhbGlkYXRlogIDQlZYqgIMQnVmLlZhbGlkYXRlygIMQnVmXFZhbGlkYXRl4gIYQnVmXFZhbGlkYXRlXEdQQk1ldGFkYXRh6gINQnVmOjpWYWxpZGF0ZQ", [file_google_protobuf_descriptor, file_google_protobuf_duration, file_google_protobuf_timestamp]); + +/** + * `Constraint` represents a validation rule written in the Common Expression + * Language (CEL) syntax. Each Constraint includes a unique identifier, an + * optional error message, and the CEL expression to evaluate. For more + * information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * ```proto + * message Foo { + * option (buf.validate.message).cel = { + * id: "foo.bar" + * message: "bar must be greater than 0" + * expression: "this.bar > 0" + * }; + * int32 bar = 1; + * } + * ``` + * + * @generated from message buf.validate.Constraint + */ +export type Constraint = Message<"buf.validate.Constraint"> & { + /** + * `id` is a string that serves as a machine-readable name for this Constraint. + * It should be unique within its scope, which could be either a message or a field. + * + * @generated from field: optional string id = 1; + */ + id: string; + + /** + * `message` is an optional field that provides a human-readable error message + * for this Constraint when the CEL expression evaluates to false. If a + * non-empty message is provided, any strings resulting from the CEL + * expression evaluation are ignored. + * + * @generated from field: optional string message = 2; + */ + message: string; + + /** + * `expression` is the actual CEL expression that will be evaluated for + * validation. This string must resolve to either a boolean or a string + * value. If the expression evaluates to false or a non-empty string, the + * validation is considered failed, and the message is rejected. + * + * @generated from field: optional string expression = 3; + */ + expression: string; +}; + +/** + * Describes the message buf.validate.Constraint. + * Use `create(ConstraintSchema)` to create a new message. + */ +export const ConstraintSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 0); + +/** + * MessageConstraints represents validation rules that are applied to the entire message. + * It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules. + * + * @generated from message buf.validate.MessageConstraints + */ +export type MessageConstraints = Message<"buf.validate.MessageConstraints"> & { + /** + * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message. + * This includes any fields within the message that would otherwise support validation. + * + * ```proto + * message MyMessage { + * // validation will be bypassed for this message + * option (buf.validate.message).disabled = true; + * } + * ``` + * + * @generated from field: optional bool disabled = 1; + */ + disabled: boolean; + + /** + * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. + * These constraints are written in Common Expression Language (CEL) syntax. For more information on + * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * + * ```proto + * message MyMessage { + * // The field `foo` must be greater than 42. + * option (buf.validate.message).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this.foo > 42", + * }; + * optional int32 foo = 1; + * } + * ``` + * + * @generated from field: repeated buf.validate.Constraint cel = 3; + */ + cel: Constraint[]; +}; + +/** + * Describes the message buf.validate.MessageConstraints. + * Use `create(MessageConstraintsSchema)` to create a new message. + */ +export const MessageConstraintsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 1); + +/** + * The `OneofConstraints` message type enables you to manage constraints for + * oneof fields in your protobuf messages. + * + * @generated from message buf.validate.OneofConstraints + */ +export type OneofConstraints = Message<"buf.validate.OneofConstraints"> & { + /** + * If `required` is true, exactly one field of the oneof must be present. A + * validation error is returned if no fields in the oneof are present. The + * field itself may still be a default value; further constraints + * should be placed on the fields themselves to ensure they are valid values, + * such as `min_len` or `gt`. + * + * ```proto + * message MyMessage { + * oneof value { + * // Either `a` or `b` must be set. If `a` is set, it must also be + * // non-empty; whereas if `b` is set, it can still be an empty string. + * option (buf.validate.oneof).required = true; + * string a = 1 [(buf.validate.field).string.min_len = 1]; + * string b = 2; + * } + * } + * ``` + * + * @generated from field: optional bool required = 1; + */ + required: boolean; +}; + +/** + * Describes the message buf.validate.OneofConstraints. + * Use `create(OneofConstraintsSchema)` to create a new message. + */ +export const OneofConstraintsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 2); + +/** + * FieldConstraints encapsulates the rules for each type of field. Depending on + * the field, the correct set should be used to ensure proper validations. + * + * @generated from message buf.validate.FieldConstraints + */ +export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & { + /** + * `cel` is a repeated field used to represent a textual expression + * in the Common Expression Language (CEL) syntax. For more information on + * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * ```proto + * message MyMessage { + * // The field `value` must be greater than 42. + * optional int32 value = 1 [(buf.validate.field).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this > 42", + * }]; + * } + * ``` + * + * @generated from field: repeated buf.validate.Constraint cel = 23; + */ + cel: Constraint[]; + + /** + * If `required` is true, the field must be populated. A populated field can be + * described as "serialized in the wire format," which includes: + * + * - the following "nullable" fields must be explicitly set to be considered populated: + * - singular message fields (whose fields may be unpopulated/default values) + * - member fields of a oneof (may be their default value) + * - proto3 optional fields (may be their default value) + * - proto2 scalar fields (both optional and required) + * - proto3 scalar fields must be non-zero to be considered populated + * - repeated and map fields must be non-empty to be considered populated + * + * ```proto + * message MyMessage { + * // The field `value` must be set to a non-null value. + * optional MyOtherMessage value = 1 [(buf.validate.field).required = true]; + * } + * ``` + * + * @generated from field: optional bool required = 25; + */ + required: boolean; + + /** + * Skip validation on the field if its value matches the specified criteria. + * See Ignore enum for details. + * + * ```proto + * message UpdateRequest { + * // The uri rule only applies if the field is populated and not an empty + * // string. + * optional string url = 1 [ + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE, + * (buf.validate.field).string.uri = true, + * ]; + * } + * ``` + * + * @generated from field: optional buf.validate.Ignore ignore = 27; + */ + ignore: Ignore; + + /** + * @generated from oneof buf.validate.FieldConstraints.type + */ + type: { + /** + * Scalar Field Types + * + * @generated from field: buf.validate.FloatRules float = 1; + */ + value: FloatRules; + case: "float"; + } | { + /** + * @generated from field: buf.validate.DoubleRules double = 2; + */ + value: DoubleRules; + case: "double"; + } | { + /** + * @generated from field: buf.validate.Int32Rules int32 = 3; + */ + value: Int32Rules; + case: "int32"; + } | { + /** + * @generated from field: buf.validate.Int64Rules int64 = 4; + */ + value: Int64Rules; + case: "int64"; + } | { + /** + * @generated from field: buf.validate.UInt32Rules uint32 = 5; + */ + value: UInt32Rules; + case: "uint32"; + } | { + /** + * @generated from field: buf.validate.UInt64Rules uint64 = 6; + */ + value: UInt64Rules; + case: "uint64"; + } | { + /** + * @generated from field: buf.validate.SInt32Rules sint32 = 7; + */ + value: SInt32Rules; + case: "sint32"; + } | { + /** + * @generated from field: buf.validate.SInt64Rules sint64 = 8; + */ + value: SInt64Rules; + case: "sint64"; + } | { + /** + * @generated from field: buf.validate.Fixed32Rules fixed32 = 9; + */ + value: Fixed32Rules; + case: "fixed32"; + } | { + /** + * @generated from field: buf.validate.Fixed64Rules fixed64 = 10; + */ + value: Fixed64Rules; + case: "fixed64"; + } | { + /** + * @generated from field: buf.validate.SFixed32Rules sfixed32 = 11; + */ + value: SFixed32Rules; + case: "sfixed32"; + } | { + /** + * @generated from field: buf.validate.SFixed64Rules sfixed64 = 12; + */ + value: SFixed64Rules; + case: "sfixed64"; + } | { + /** + * @generated from field: buf.validate.BoolRules bool = 13; + */ + value: BoolRules; + case: "bool"; + } | { + /** + * @generated from field: buf.validate.StringRules string = 14; + */ + value: StringRules; + case: "string"; + } | { + /** + * @generated from field: buf.validate.BytesRules bytes = 15; + */ + value: BytesRules; + case: "bytes"; + } | { + /** + * Complex Field Types + * + * @generated from field: buf.validate.EnumRules enum = 16; + */ + value: EnumRules; + case: "enum"; + } | { + /** + * @generated from field: buf.validate.RepeatedRules repeated = 18; + */ + value: RepeatedRules; + case: "repeated"; + } | { + /** + * @generated from field: buf.validate.MapRules map = 19; + */ + value: MapRules; + case: "map"; + } | { + /** + * Well-Known Field Types + * + * @generated from field: buf.validate.AnyRules any = 20; + */ + value: AnyRules; + case: "any"; + } | { + /** + * @generated from field: buf.validate.DurationRules duration = 21; + */ + value: DurationRules; + case: "duration"; + } | { + /** + * @generated from field: buf.validate.TimestampRules timestamp = 22; + */ + value: TimestampRules; + case: "timestamp"; + } | { case: undefined; value?: undefined }; + + /** + * DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1. + * + * @generated from field: optional bool skipped = 24 [deprecated = true]; + * @deprecated + */ + skipped: boolean; + + /** + * DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1. + * + * @generated from field: optional bool ignore_empty = 26 [deprecated = true]; + * @deprecated + */ + ignoreEmpty: boolean; +}; + +/** + * Describes the message buf.validate.FieldConstraints. + * Use `create(FieldConstraintsSchema)` to create a new message. + */ +export const FieldConstraintsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 3); + +/** + * PredefinedConstraints are custom constraints that can be re-used with + * multiple fields. + * + * @generated from message buf.validate.PredefinedConstraints + */ +export type PredefinedConstraints = Message<"buf.validate.PredefinedConstraints"> & { + /** + * `cel` is a repeated field used to represent a textual expression + * in the Common Expression Language (CEL) syntax. For more information on + * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * ```proto + * message MyMessage { + * // The field `value` must be greater than 42. + * optional int32 value = 1 [(buf.validate.predefined).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this > 42", + * }]; + * } + * ``` + * + * @generated from field: repeated buf.validate.Constraint cel = 1; + */ + cel: Constraint[]; +}; + +/** + * Describes the message buf.validate.PredefinedConstraints. + * Use `create(PredefinedConstraintsSchema)` to create a new message. + */ +export const PredefinedConstraintsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 4); + +/** + * FloatRules describes the constraints applied to `float` values. These + * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type. + * + * @generated from message buf.validate.FloatRules + */ +export type FloatRules = Message<"buf.validate.FloatRules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFloat { + * // value must equal 42.0 + * float value = 1 [(buf.validate.field).float.const = 42.0]; + * } + * ``` + * + * @generated from field: optional float const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.FloatRules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be less than 10.0 + * float value = 1 [(buf.validate.field).float.lt = 10.0]; + * } + * ``` + * + * @generated from field: float lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be less than or equal to 10.0 + * float value = 1 [(buf.validate.field).float.lte = 10.0]; + * } + * ``` + * + * @generated from field: float lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.FloatRules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be greater than 5.0 [float.gt] + * float value = 1 [(buf.validate.field).float.gt = 5.0]; + * + * // value must be greater than 5 and less than 10.0 [float.gt_lt] + * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }]; + * + * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive] + * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: float gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be greater than or equal to 5.0 [float.gte] + * float value = 1 [(buf.validate.field).float.gte = 5.0]; + * + * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt] + * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }]; + * + * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive] + * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: float gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MyFloat { + * // value must be in list [1.0, 2.0, 3.0] + * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from field: repeated float in = 6; + */ + in: number[]; + + /** + * `in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFloat { + * // value must not be in list [1.0, 2.0, 3.0] + * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from field: repeated float not_in = 7; + */ + notIn: number[]; + + /** + * `finite` requires the field value to be finite. If the field value is + * infinite or NaN, an error message is generated. + * + * @generated from field: optional bool finite = 8; + */ + finite: boolean; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyFloat { + * float value = 1 [ + * (buf.validate.field).float.example = 1.0, + * (buf.validate.field).float.example = "Infinity" + * ]; + * } + * ``` + * + * @generated from field: repeated float example = 9; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.FloatRules. + * Use `create(FloatRulesSchema)` to create a new message. + */ +export const FloatRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 5); + +/** + * DoubleRules describes the constraints applied to `double` values. These + * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type. + * + * @generated from message buf.validate.DoubleRules + */ +export type DoubleRules = Message<"buf.validate.DoubleRules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyDouble { + * // value must equal 42.0 + * double value = 1 [(buf.validate.field).double.const = 42.0]; + * } + * ``` + * + * @generated from field: optional double const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.DoubleRules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be less than 10.0 + * double value = 1 [(buf.validate.field).double.lt = 10.0]; + * } + * ``` + * + * @generated from field: double lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified value + * (field <= value). If the field value is greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be less than or equal to 10.0 + * double value = 1 [(buf.validate.field).double.lte = 10.0]; + * } + * ``` + * + * @generated from field: double lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.DoubleRules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, + * the range is reversed, and the field value must be outside the specified + * range. If the field value doesn't meet the required conditions, an error + * message is generated. + * + * ```proto + * message MyDouble { + * // value must be greater than 5.0 [double.gt] + * double value = 1 [(buf.validate.field).double.gt = 5.0]; + * + * // value must be greater than 5 and less than 10.0 [double.gt_lt] + * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }]; + * + * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive] + * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: double gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be greater than or equal to 5.0 [double.gte] + * double value = 1 [(buf.validate.field).double.gte = 5.0]; + * + * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt] + * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }]; + * + * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive] + * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: double gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyDouble { + * // value must be in list [1.0, 2.0, 3.0] + * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from field: repeated double in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyDouble { + * // value must not be in list [1.0, 2.0, 3.0] + * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from field: repeated double not_in = 7; + */ + notIn: number[]; + + /** + * `finite` requires the field value to be finite. If the field value is + * infinite or NaN, an error message is generated. + * + * @generated from field: optional bool finite = 8; + */ + finite: boolean; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyDouble { + * double value = 1 [ + * (buf.validate.field).double.example = 1.0, + * (buf.validate.field).double.example = "Infinity" + * ]; + * } + * ``` + * + * @generated from field: repeated double example = 9; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.DoubleRules. + * Use `create(DoubleRulesSchema)` to create a new message. + */ +export const DoubleRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 6); + +/** + * Int32Rules describes the constraints applied to `int32` values. These + * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type. + * + * @generated from message buf.validate.Int32Rules + */ +export type Int32Rules = Message<"buf.validate.Int32Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must equal 42 + * int32 value = 1 [(buf.validate.field).int32.const = 42]; + * } + * ``` + * + * @generated from field: optional int32 const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.Int32Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be less than 10 + * int32 value = 1 [(buf.validate.field).int32.lt = 10]; + * } + * ``` + * + * @generated from field: int32 lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be less than or equal to 10 + * int32 value = 1 [(buf.validate.field).int32.lte = 10]; + * } + * ``` + * + * @generated from field: int32 lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.Int32Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be greater than 5 [int32.gt] + * int32 value = 1 [(buf.validate.field).int32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [int32.gt_lt] + * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive] + * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int32 gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified value + * (exclusive). If the value of `gte` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be greater than or equal to 5 [int32.gte] + * int32 value = 1 [(buf.validate.field).int32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt] + * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive] + * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int32 gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyInt32 { + * // value must be in list [1, 2, 3] + * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated int32 in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error message + * is generated. + * + * ```proto + * message MyInt32 { + * // value must not be in list [1, 2, 3] + * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated int32 not_in = 7; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyInt32 { + * int32 value = 1 [ + * (buf.validate.field).int32.example = 1, + * (buf.validate.field).int32.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated int32 example = 8; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.Int32Rules. + * Use `create(Int32RulesSchema)` to create a new message. + */ +export const Int32RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 7); + +/** + * Int64Rules describes the constraints applied to `int64` values. These + * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type. + * + * @generated from message buf.validate.Int64Rules + */ +export type Int64Rules = Message<"buf.validate.Int64Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must equal 42 + * int64 value = 1 [(buf.validate.field).int64.const = 42]; + * } + * ``` + * + * @generated from field: optional int64 const = 1; + */ + const: bigint; + + /** + * @generated from oneof buf.validate.Int64Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be less than 10 + * int64 value = 1 [(buf.validate.field).int64.lt = 10]; + * } + * ``` + * + * @generated from field: int64 lt = 2; + */ + value: bigint; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be less than or equal to 10 + * int64 value = 1 [(buf.validate.field).int64.lte = 10]; + * } + * ``` + * + * @generated from field: int64 lte = 3; + */ + value: bigint; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.Int64Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be greater than 5 [int64.gt] + * int64 value = 1 [(buf.validate.field).int64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [int64.gt_lt] + * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive] + * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int64 gt = 4; + */ + value: bigint; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be greater than or equal to 5 [int64.gte] + * int64 value = 1 [(buf.validate.field).int64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt] + * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive] + * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int64 gte = 5; + */ + value: bigint; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyInt64 { + * // value must be in list [1, 2, 3] + * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated int64 in = 6; + */ + in: bigint[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyInt64 { + * // value must not be in list [1, 2, 3] + * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated int64 not_in = 7; + */ + notIn: bigint[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyInt64 { + * int64 value = 1 [ + * (buf.validate.field).int64.example = 1, + * (buf.validate.field).int64.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated int64 example = 9; + */ + example: bigint[]; +}; + +/** + * Describes the message buf.validate.Int64Rules. + * Use `create(Int64RulesSchema)` to create a new message. + */ +export const Int64RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 8); + +/** + * UInt32Rules describes the constraints applied to `uint32` values. These + * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type. + * + * @generated from message buf.validate.UInt32Rules + */ +export type UInt32Rules = Message<"buf.validate.UInt32Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must equal 42 + * uint32 value = 1 [(buf.validate.field).uint32.const = 42]; + * } + * ``` + * + * @generated from field: optional uint32 const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.UInt32Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be less than 10 + * uint32 value = 1 [(buf.validate.field).uint32.lt = 10]; + * } + * ``` + * + * @generated from field: uint32 lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be less than or equal to 10 + * uint32 value = 1 [(buf.validate.field).uint32.lte = 10]; + * } + * ``` + * + * @generated from field: uint32 lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.UInt32Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be greater than 5 [uint32.gt] + * uint32 value = 1 [(buf.validate.field).uint32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [uint32.gt_lt] + * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive] + * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint32 gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be greater than or equal to 5 [uint32.gte] + * uint32 value = 1 [(buf.validate.field).uint32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt] + * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive] + * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint32 gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyUInt32 { + * // value must be in list [1, 2, 3] + * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated uint32 in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyUInt32 { + * // value must not be in list [1, 2, 3] + * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated uint32 not_in = 7; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyUInt32 { + * uint32 value = 1 [ + * (buf.validate.field).uint32.example = 1, + * (buf.validate.field).uint32.example = 10 + * ]; + * } + * ``` + * + * @generated from field: repeated uint32 example = 8; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.UInt32Rules. + * Use `create(UInt32RulesSchema)` to create a new message. + */ +export const UInt32RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 9); + +/** + * UInt64Rules describes the constraints applied to `uint64` values. These + * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type. + * + * @generated from message buf.validate.UInt64Rules + */ +export type UInt64Rules = Message<"buf.validate.UInt64Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must equal 42 + * uint64 value = 1 [(buf.validate.field).uint64.const = 42]; + * } + * ``` + * + * @generated from field: optional uint64 const = 1; + */ + const: bigint; + + /** + * @generated from oneof buf.validate.UInt64Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be less than 10 + * uint64 value = 1 [(buf.validate.field).uint64.lt = 10]; + * } + * ``` + * + * @generated from field: uint64 lt = 2; + */ + value: bigint; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be less than or equal to 10 + * uint64 value = 1 [(buf.validate.field).uint64.lte = 10]; + * } + * ``` + * + * @generated from field: uint64 lte = 3; + */ + value: bigint; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.UInt64Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be greater than 5 [uint64.gt] + * uint64 value = 1 [(buf.validate.field).uint64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [uint64.gt_lt] + * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive] + * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint64 gt = 4; + */ + value: bigint; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be greater than or equal to 5 [uint64.gte] + * uint64 value = 1 [(buf.validate.field).uint64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt] + * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive] + * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint64 gte = 5; + */ + value: bigint; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyUInt64 { + * // value must be in list [1, 2, 3] + * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated uint64 in = 6; + */ + in: bigint[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyUInt64 { + * // value must not be in list [1, 2, 3] + * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated uint64 not_in = 7; + */ + notIn: bigint[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyUInt64 { + * uint64 value = 1 [ + * (buf.validate.field).uint64.example = 1, + * (buf.validate.field).uint64.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated uint64 example = 8; + */ + example: bigint[]; +}; + +/** + * Describes the message buf.validate.UInt64Rules. + * Use `create(UInt64RulesSchema)` to create a new message. + */ +export const UInt64RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 10); + +/** + * SInt32Rules describes the constraints applied to `sint32` values. + * + * @generated from message buf.validate.SInt32Rules + */ +export type SInt32Rules = Message<"buf.validate.SInt32Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must equal 42 + * sint32 value = 1 [(buf.validate.field).sint32.const = 42]; + * } + * ``` + * + * @generated from field: optional sint32 const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.SInt32Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be less than 10 + * sint32 value = 1 [(buf.validate.field).sint32.lt = 10]; + * } + * ``` + * + * @generated from field: sint32 lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be less than or equal to 10 + * sint32 value = 1 [(buf.validate.field).sint32.lte = 10]; + * } + * ``` + * + * @generated from field: sint32 lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.SInt32Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be greater than 5 [sint32.gt] + * sint32 value = 1 [(buf.validate.field).sint32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sint32.gt_lt] + * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive] + * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint32 gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be greater than or equal to 5 [sint32.gte] + * sint32 value = 1 [(buf.validate.field).sint32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt] + * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive] + * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint32 gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySInt32 { + * // value must be in list [1, 2, 3] + * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sint32 in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySInt32 { + * // value must not be in list [1, 2, 3] + * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sint32 not_in = 7; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySInt32 { + * sint32 value = 1 [ + * (buf.validate.field).sint32.example = 1, + * (buf.validate.field).sint32.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated sint32 example = 8; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.SInt32Rules. + * Use `create(SInt32RulesSchema)` to create a new message. + */ +export const SInt32RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 11); + +/** + * SInt64Rules describes the constraints applied to `sint64` values. + * + * @generated from message buf.validate.SInt64Rules + */ +export type SInt64Rules = Message<"buf.validate.SInt64Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must equal 42 + * sint64 value = 1 [(buf.validate.field).sint64.const = 42]; + * } + * ``` + * + * @generated from field: optional sint64 const = 1; + */ + const: bigint; + + /** + * @generated from oneof buf.validate.SInt64Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be less than 10 + * sint64 value = 1 [(buf.validate.field).sint64.lt = 10]; + * } + * ``` + * + * @generated from field: sint64 lt = 2; + */ + value: bigint; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be less than or equal to 10 + * sint64 value = 1 [(buf.validate.field).sint64.lte = 10]; + * } + * ``` + * + * @generated from field: sint64 lte = 3; + */ + value: bigint; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.SInt64Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be greater than 5 [sint64.gt] + * sint64 value = 1 [(buf.validate.field).sint64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sint64.gt_lt] + * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive] + * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint64 gt = 4; + */ + value: bigint; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be greater than or equal to 5 [sint64.gte] + * sint64 value = 1 [(buf.validate.field).sint64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt] + * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive] + * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint64 gte = 5; + */ + value: bigint; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MySInt64 { + * // value must be in list [1, 2, 3] + * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sint64 in = 6; + */ + in: bigint[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySInt64 { + * // value must not be in list [1, 2, 3] + * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sint64 not_in = 7; + */ + notIn: bigint[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySInt64 { + * sint64 value = 1 [ + * (buf.validate.field).sint64.example = 1, + * (buf.validate.field).sint64.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated sint64 example = 8; + */ + example: bigint[]; +}; + +/** + * Describes the message buf.validate.SInt64Rules. + * Use `create(SInt64RulesSchema)` to create a new message. + */ +export const SInt64RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 12); + +/** + * Fixed32Rules describes the constraints applied to `fixed32` values. + * + * @generated from message buf.validate.Fixed32Rules + */ +export type Fixed32Rules = Message<"buf.validate.Fixed32Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must equal 42 + * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42]; + * } + * ``` + * + * @generated from field: optional fixed32 const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.Fixed32Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be less than 10 + * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10]; + * } + * ``` + * + * @generated from field: fixed32 lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be less than or equal to 10 + * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10]; + * } + * ``` + * + * @generated from field: fixed32 lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.Fixed32Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be greater than 5 [fixed32.gt] + * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [fixed32.gt_lt] + * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive] + * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed32 gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be greater than or equal to 5 [fixed32.gte] + * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt] + * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive] + * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed32 gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MyFixed32 { + * // value must be in list [1, 2, 3] + * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated fixed32 in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFixed32 { + * // value must not be in list [1, 2, 3] + * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated fixed32 not_in = 7; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyFixed32 { + * fixed32 value = 1 [ + * (buf.validate.field).fixed32.example = 1, + * (buf.validate.field).fixed32.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated fixed32 example = 8; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.Fixed32Rules. + * Use `create(Fixed32RulesSchema)` to create a new message. + */ +export const Fixed32RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 13); + +/** + * Fixed64Rules describes the constraints applied to `fixed64` values. + * + * @generated from message buf.validate.Fixed64Rules + */ +export type Fixed64Rules = Message<"buf.validate.Fixed64Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must equal 42 + * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42]; + * } + * ``` + * + * @generated from field: optional fixed64 const = 1; + */ + const: bigint; + + /** + * @generated from oneof buf.validate.Fixed64Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be less than 10 + * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10]; + * } + * ``` + * + * @generated from field: fixed64 lt = 2; + */ + value: bigint; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be less than or equal to 10 + * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10]; + * } + * ``` + * + * @generated from field: fixed64 lte = 3; + */ + value: bigint; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.Fixed64Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be greater than 5 [fixed64.gt] + * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [fixed64.gt_lt] + * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive] + * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed64 gt = 4; + */ + value: bigint; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be greater than or equal to 5 [fixed64.gte] + * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt] + * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive] + * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed64 gte = 5; + */ + value: bigint; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyFixed64 { + * // value must be in list [1, 2, 3] + * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated fixed64 in = 6; + */ + in: bigint[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFixed64 { + * // value must not be in list [1, 2, 3] + * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated fixed64 not_in = 7; + */ + notIn: bigint[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyFixed64 { + * fixed64 value = 1 [ + * (buf.validate.field).fixed64.example = 1, + * (buf.validate.field).fixed64.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated fixed64 example = 8; + */ + example: bigint[]; +}; + +/** + * Describes the message buf.validate.Fixed64Rules. + * Use `create(Fixed64RulesSchema)` to create a new message. + */ +export const Fixed64RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 14); + +/** + * SFixed32Rules describes the constraints applied to `fixed32` values. + * + * @generated from message buf.validate.SFixed32Rules + */ +export type SFixed32Rules = Message<"buf.validate.SFixed32Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must equal 42 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42]; + * } + * ``` + * + * @generated from field: optional sfixed32 const = 1; + */ + const: number; + + /** + * @generated from oneof buf.validate.SFixed32Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be less than 10 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10]; + * } + * ``` + * + * @generated from field: sfixed32 lt = 2; + */ + value: number; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be less than or equal to 10 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10]; + * } + * ``` + * + * @generated from field: sfixed32 lte = 3; + */ + value: number; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.SFixed32Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be greater than 5 [sfixed32.gt] + * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sfixed32.gt_lt] + * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive] + * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed32 gt = 4; + */ + value: number; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be greater than or equal to 5 [sfixed32.gte] + * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt] + * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive] + * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed32 gte = 5; + */ + value: number; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySFixed32 { + * // value must be in list [1, 2, 3] + * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sfixed32 in = 6; + */ + in: number[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySFixed32 { + * // value must not be in list [1, 2, 3] + * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sfixed32 not_in = 7; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySFixed32 { + * sfixed32 value = 1 [ + * (buf.validate.field).sfixed32.example = 1, + * (buf.validate.field).sfixed32.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated sfixed32 example = 8; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.SFixed32Rules. + * Use `create(SFixed32RulesSchema)` to create a new message. + */ +export const SFixed32RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 15); + +/** + * SFixed64Rules describes the constraints applied to `fixed64` values. + * + * @generated from message buf.validate.SFixed64Rules + */ +export type SFixed64Rules = Message<"buf.validate.SFixed64Rules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must equal 42 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42]; + * } + * ``` + * + * @generated from field: optional sfixed64 const = 1; + */ + const: bigint; + + /** + * @generated from oneof buf.validate.SFixed64Rules.less_than + */ + lessThan: { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be less than 10 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10]; + * } + * ``` + * + * @generated from field: sfixed64 lt = 2; + */ + value: bigint; + case: "lt"; + } | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be less than or equal to 10 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10]; + * } + * ``` + * + * @generated from field: sfixed64 lte = 3; + */ + value: bigint; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.SFixed64Rules.greater_than + */ + greaterThan: { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be greater than 5 [sfixed64.gt] + * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sfixed64.gt_lt] + * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive] + * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed64 gt = 4; + */ + value: bigint; + case: "gt"; + } | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be greater than or equal to 5 [sfixed64.gte] + * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt] + * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive] + * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed64 gte = 5; + */ + value: bigint; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySFixed64 { + * // value must be in list [1, 2, 3] + * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sfixed64 in = 6; + */ + in: bigint[]; + + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySFixed64 { + * // value must not be in list [1, 2, 3] + * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from field: repeated sfixed64 not_in = 7; + */ + notIn: bigint[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySFixed64 { + * sfixed64 value = 1 [ + * (buf.validate.field).sfixed64.example = 1, + * (buf.validate.field).sfixed64.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated sfixed64 example = 8; + */ + example: bigint[]; +}; + +/** + * Describes the message buf.validate.SFixed64Rules. + * Use `create(SFixed64RulesSchema)` to create a new message. + */ +export const SFixed64RulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 16); + +/** + * BoolRules describes the constraints applied to `bool` values. These rules + * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type. + * + * @generated from message buf.validate.BoolRules + */ +export type BoolRules = Message<"buf.validate.BoolRules"> & { + /** + * `const` requires the field value to exactly match the specified boolean value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBool { + * // value must equal true + * bool value = 1 [(buf.validate.field).bool.const = true]; + * } + * ``` + * + * @generated from field: optional bool const = 1; + */ + const: boolean; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyBool { + * bool value = 1 [ + * (buf.validate.field).bool.example = 1, + * (buf.validate.field).bool.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated bool example = 2; + */ + example: boolean[]; +}; + +/** + * Describes the message buf.validate.BoolRules. + * Use `create(BoolRulesSchema)` to create a new message. + */ +export const BoolRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 17); + +/** + * StringRules describes the constraints applied to `string` values These + * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type. + * + * @generated from message buf.validate.StringRules + */ +export type StringRules = Message<"buf.validate.StringRules"> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyString { + * // value must equal `hello` + * string value = 1 [(buf.validate.field).string.const = "hello"]; + * } + * ``` + * + * @generated from field: optional string const = 1; + */ + const: string; + + /** + * `len` dictates that the field value must have the specified + * number of characters (Unicode code points), which may differ from the number + * of bytes in the string. If the field value does not meet the specified + * length, an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be 5 characters + * string value = 1 [(buf.validate.field).string.len = 5]; + * } + * ``` + * + * @generated from field: optional uint64 len = 19; + */ + len: bigint; + + /** + * `min_len` specifies that the field value must have at least the specified + * number of characters (Unicode code points), which may differ from the number + * of bytes in the string. If the field value contains fewer characters, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value length must be at least 3 characters + * string value = 1 [(buf.validate.field).string.min_len = 3]; + * } + * ``` + * + * @generated from field: optional uint64 min_len = 2; + */ + minLen: bigint; + + /** + * `max_len` specifies that the field value must have no more than the specified + * number of characters (Unicode code points), which may differ from the + * number of bytes in the string. If the field value contains more characters, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be at most 10 characters + * string value = 1 [(buf.validate.field).string.max_len = 10]; + * } + * ``` + * + * @generated from field: optional uint64 max_len = 3; + */ + maxLen: bigint; + + /** + * `len_bytes` dictates that the field value must have the specified number of + * bytes. If the field value does not match the specified length in bytes, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be 6 bytes + * string value = 1 [(buf.validate.field).string.len_bytes = 6]; + * } + * ``` + * + * @generated from field: optional uint64 len_bytes = 20; + */ + lenBytes: bigint; + + /** + * `min_bytes` specifies that the field value must have at least the specified + * number of bytes. If the field value contains fewer bytes, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value length must be at least 4 bytes + * string value = 1 [(buf.validate.field).string.min_bytes = 4]; + * } + * + * ``` + * + * @generated from field: optional uint64 min_bytes = 4; + */ + minBytes: bigint; + + /** + * `max_bytes` specifies that the field value must have no more than the + * specified number of bytes. If the field value contains more bytes, an + * error message will be generated. + * + * ```proto + * message MyString { + * // value length must be at most 8 bytes + * string value = 1 [(buf.validate.field).string.max_bytes = 8]; + * } + * ``` + * + * @generated from field: optional uint64 max_bytes = 5; + */ + maxBytes: bigint; + + /** + * `pattern` specifies that the field value must match the specified + * regular expression (RE2 syntax), with the expression provided without any + * delimiters. If the field value doesn't match the regular expression, an + * error message will be generated. + * + * ```proto + * message MyString { + * // value does not match regex pattern `^[a-zA-Z]//$` + * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"]; + * } + * ``` + * + * @generated from field: optional string pattern = 6; + */ + pattern: string; + + /** + * `prefix` specifies that the field value must have the + * specified substring at the beginning of the string. If the field value + * doesn't start with the specified prefix, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value does not have prefix `pre` + * string value = 1 [(buf.validate.field).string.prefix = "pre"]; + * } + * ``` + * + * @generated from field: optional string prefix = 7; + */ + prefix: string; + + /** + * `suffix` specifies that the field value must have the + * specified substring at the end of the string. If the field value doesn't + * end with the specified suffix, an error message will be generated. + * + * ```proto + * message MyString { + * // value does not have suffix `post` + * string value = 1 [(buf.validate.field).string.suffix = "post"]; + * } + * ``` + * + * @generated from field: optional string suffix = 8; + */ + suffix: string; + + /** + * `contains` specifies that the field value must have the + * specified substring anywhere in the string. If the field value doesn't + * contain the specified substring, an error message will be generated. + * + * ```proto + * message MyString { + * // value does not contain substring `inside`. + * string value = 1 [(buf.validate.field).string.contains = "inside"]; + * } + * ``` + * + * @generated from field: optional string contains = 9; + */ + contains: string; + + /** + * `not_contains` specifies that the field value must not have the + * specified substring anywhere in the string. If the field value contains + * the specified substring, an error message will be generated. + * + * ```proto + * message MyString { + * // value contains substring `inside`. + * string value = 1 [(buf.validate.field).string.not_contains = "inside"]; + * } + * ``` + * + * @generated from field: optional string not_contains = 23; + */ + notContains: string; + + /** + * `in` specifies that the field value must be equal to one of the specified + * values. If the field value isn't one of the specified values, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value must be in list ["apple", "banana"] + * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; + * } + * ``` + * + * @generated from field: repeated string in = 10; + */ + in: string[]; + + /** + * `not_in` specifies that the field value cannot be equal to any + * of the specified values. If the field value is one of the specified values, + * an error message will be generated. + * ```proto + * message MyString { + * // value must not be in list ["orange", "grape"] + * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; + * } + * ``` + * + * @generated from field: repeated string not_in = 11; + */ + notIn: string[]; + + /** + * `WellKnown` rules provide advanced constraints against common string + * patterns + * + * @generated from oneof buf.validate.StringRules.well_known + */ + wellKnown: { + /** + * `email` specifies that the field value must be a valid email address + * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1). + * If the field value isn't a valid email address, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid email address + * string value = 1 [(buf.validate.field).string.email = true]; + * } + * ``` + * + * @generated from field: bool email = 12; + */ + value: boolean; + case: "email"; + } | { + /** + * `hostname` specifies that the field value must be a valid + * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support + * internationalized domain names (IDNs). If the field value isn't a + * valid hostname, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid hostname + * string value = 1 [(buf.validate.field).string.hostname = true]; + * } + * ``` + * + * @generated from field: bool hostname = 13; + */ + value: boolean; + case: "hostname"; + } | { + /** + * `ip` specifies that the field value must be a valid IP + * (v4 or v6) address, without surrounding square brackets for IPv6 addresses. + * If the field value isn't a valid IP address, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value must be a valid IP address + * string value = 1 [(buf.validate.field).string.ip = true]; + * } + * ``` + * + * @generated from field: bool ip = 14; + */ + value: boolean; + case: "ip"; + } | { + /** + * `ipv4` specifies that the field value must be a valid IPv4 + * address. If the field value isn't a valid IPv4 address, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv4 address + * string value = 1 [(buf.validate.field).string.ipv4 = true]; + * } + * ``` + * + * @generated from field: bool ipv4 = 15; + */ + value: boolean; + case: "ipv4"; + } | { + /** + * `ipv6` specifies that the field value must be a valid + * IPv6 address, without surrounding square brackets. If the field value is + * not a valid IPv6 address, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv6 address + * string value = 1 [(buf.validate.field).string.ipv6 = true]; + * } + * ``` + * + * @generated from field: bool ipv6 = 16; + */ + value: boolean; + case: "ipv6"; + } | { + /** + * `uri` specifies that the field value must be a valid, + * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid, + * absolute URI, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid URI + * string value = 1 [(buf.validate.field).string.uri = true]; + * } + * ``` + * + * @generated from field: bool uri = 17; + */ + value: boolean; + case: "uri"; + } | { + /** + * `uri_ref` specifies that the field value must be a valid URI + * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the + * field value isn't a valid URI, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid URI + * string value = 1 [(buf.validate.field).string.uri_ref = true]; + * } + * ``` + * + * @generated from field: bool uri_ref = 18; + */ + value: boolean; + case: "uriRef"; + } | { + /** + * `address` specifies that the field value must be either a valid hostname + * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5) + * (which doesn't support internationalized domain names or IDNs) or a valid + * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid hostname, or ip address + * string value = 1 [(buf.validate.field).string.address = true]; + * } + * ``` + * + * @generated from field: bool address = 21; + */ + value: boolean; + case: "address"; + } | { + /** + * `uuid` specifies that the field value must be a valid UUID as defined by + * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the + * field value isn't a valid UUID, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid UUID + * string value = 1 [(buf.validate.field).string.uuid = true]; + * } + * ``` + * + * @generated from field: bool uuid = 22; + */ + value: boolean; + case: "uuid"; + } | { + /** + * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as + * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes + * omitted. If the field value isn't a valid UUID without dashes, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value must be a valid trimmed UUID + * string value = 1 [(buf.validate.field).string.tuuid = true]; + * } + * ``` + * + * @generated from field: bool tuuid = 33; + */ + value: boolean; + case: "tuuid"; + } | { + /** + * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6) + * address with prefix length. If the field value isn't a valid IP with prefix + * length, an error message will be generated. + * + * + * ```proto + * message MyString { + * // value must be a valid IP with prefix length + * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; + * } + * ``` + * + * @generated from field: bool ip_with_prefixlen = 26; + */ + value: boolean; + case: "ipWithPrefixlen"; + } | { + /** + * `ipv4_with_prefixlen` specifies that the field value must be a valid + * IPv4 address with prefix. + * If the field value isn't a valid IPv4 address with prefix length, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv4 address with prefix length + * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; + * } + * ``` + * + * @generated from field: bool ipv4_with_prefixlen = 27; + */ + value: boolean; + case: "ipv4WithPrefixlen"; + } | { + /** + * `ipv6_with_prefixlen` specifies that the field value must be a valid + * IPv6 address with prefix length. + * If the field value is not a valid IPv6 address with prefix length, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv6 address prefix length + * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; + * } + * ``` + * + * @generated from field: bool ipv6_with_prefixlen = 28; + */ + value: boolean; + case: "ipv6WithPrefixlen"; + } | { + /** + * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix. + * If the field value isn't a valid IP prefix, an error message will be + * generated. The prefix must have all zeros for the masked bits of the prefix (e.g., + * `127.0.0.0/16`, not `127.0.0.1/16`). + * + * ```proto + * message MyString { + * // value must be a valid IP prefix + * string value = 1 [(buf.validate.field).string.ip_prefix = true]; + * } + * ``` + * + * @generated from field: bool ip_prefix = 29; + */ + value: boolean; + case: "ipPrefix"; + } | { + /** + * `ipv4_prefix` specifies that the field value must be a valid IPv4 + * prefix. If the field value isn't a valid IPv4 prefix, an error message + * will be generated. The prefix must have all zeros for the masked bits of + * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`). + * + * ```proto + * message MyString { + * // value must be a valid IPv4 prefix + * string value = 1 [(buf.validate.field).string.ipv4_prefix = true]; + * } + * ``` + * + * @generated from field: bool ipv4_prefix = 30; + */ + value: boolean; + case: "ipv4Prefix"; + } | { + /** + * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix. + * If the field value is not a valid IPv6 prefix, an error message will be + * generated. The prefix must have all zeros for the masked bits of the prefix + * (e.g., `2001:db8::/48`, not `2001:db8::1/48`). + * + * ```proto + * message MyString { + * // value must be a valid IPv6 prefix + * string value = 1 [(buf.validate.field).string.ipv6_prefix = true]; + * } + * ``` + * + * @generated from field: bool ipv6_prefix = 31; + */ + value: boolean; + case: "ipv6Prefix"; + } | { + /** + * `host_and_port` specifies the field value must be a valid host and port + * pair. The host must be a valid hostname or IP address while the port + * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited + * with square brackets (e.g., `[::1]:1234`). + * + * @generated from field: bool host_and_port = 32; + */ + value: boolean; + case: "hostAndPort"; + } | { + /** + * `well_known_regex` specifies a common well-known pattern + * defined as a regex. If the field value doesn't match the well-known + * regex, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid HTTP header value + * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE]; + * } + * ``` + * + * #### KnownRegex + * + * `well_known_regex` contains some well-known patterns. + * + * | Name | Number | Description | + * |-------------------------------|--------|-------------------------------------------| + * | KNOWN_REGEX_UNSPECIFIED | 0 | | + * | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2) | + * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) | + * + * @generated from field: buf.validate.KnownRegex well_known_regex = 24; + */ + value: KnownRegex; + case: "wellKnownRegex"; + } | { case: undefined; value?: undefined }; + + /** + * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to + * enable strict header validation. By default, this is true, and HTTP header + * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser + * validations that only disallow `\r\n\0` characters, which can be used to + * bypass header matching rules. + * + * ```proto + * message MyString { + * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules. + * string value = 1 [(buf.validate.field).string.strict = false]; + * } + * ``` + * + * @generated from field: optional bool strict = 25; + */ + strict: boolean; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyString { + * string value = 1 [ + * (buf.validate.field).string.example = 1, + * (buf.validate.field).string.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated string example = 34; + */ + example: string[]; +}; + +/** + * Describes the message buf.validate.StringRules. + * Use `create(StringRulesSchema)` to create a new message. + */ +export const StringRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 18); + +/** + * BytesRules describe the constraints applied to `bytes` values. These rules + * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type. + * + * @generated from message buf.validate.BytesRules + */ +export type BytesRules = Message<"buf.validate.BytesRules"> & { + /** + * `const` requires the field value to exactly match the specified bytes + * value. If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be "\x01\x02\x03\x04" + * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; + * } + * ``` + * + * @generated from field: optional bytes const = 1; + */ + const: Uint8Array; + + /** + * `len` requires the field value to have the specified length in bytes. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBytes { + * // value length must be 4 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; + * } + * ``` + * + * @generated from field: optional uint64 len = 13; + */ + len: bigint; + + /** + * `min_len` requires the field value to have at least the specified minimum + * length in bytes. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value length must be at least 2 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; + * } + * ``` + * + * @generated from field: optional uint64 min_len = 2; + */ + minLen: bigint; + + /** + * `max_len` requires the field value to have at most the specified maximum + * length in bytes. + * If the field value exceeds the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be at most 6 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; + * } + * ``` + * + * @generated from field: optional uint64 max_len = 3; + */ + maxLen: bigint; + + /** + * `pattern` requires the field value to match the specified regular + * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). + * The value of the field must be valid UTF-8 or validation will fail with a + * runtime error. + * If the field value doesn't match the pattern, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must match regex pattern "^[a-zA-Z0-9]+$". + * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; + * } + * ``` + * + * @generated from field: optional string pattern = 4; + */ + pattern: string; + + /** + * `prefix` requires the field value to have the specified bytes at the + * beginning of the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value does not have prefix \x01\x02 + * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; + * } + * ``` + * + * @generated from field: optional bytes prefix = 5; + */ + prefix: Uint8Array; + + /** + * `suffix` requires the field value to have the specified bytes at the end + * of the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value does not have suffix \x03\x04 + * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; + * } + * ``` + * + * @generated from field: optional bytes suffix = 6; + */ + suffix: Uint8Array; + + /** + * `contains` requires the field value to have the specified bytes anywhere in + * the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```protobuf + * message MyBytes { + * // value does not contain \x02\x03 + * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; + * } + * ``` + * + * @generated from field: optional bytes contains = 7; + */ + contains: Uint8Array; + + /** + * `in` requires the field value to be equal to one of the specified + * values. If the field value doesn't match any of the specified values, an + * error message is generated. + * + * ```protobuf + * message MyBytes { + * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] + * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + * } + * ``` + * + * @generated from field: repeated bytes in = 8; + */ + in: Uint8Array[]; + + /** + * `not_in` requires the field value to be not equal to any of the specified + * values. + * If the field value matches any of the specified values, an error message is + * generated. + * + * ```proto + * message MyBytes { + * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] + * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + * } + * ``` + * + * @generated from field: repeated bytes not_in = 9; + */ + notIn: Uint8Array[]; + + /** + * WellKnown rules provide advanced constraints against common byte + * patterns + * + * @generated from oneof buf.validate.BytesRules.well_known + */ + wellKnown: { + /** + * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. + * If the field value doesn't meet this constraint, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be a valid IP address + * optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; + * } + * ``` + * + * @generated from field: bool ip = 10; + */ + value: boolean; + case: "ip"; + } | { + /** + * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. + * If the field value doesn't meet this constraint, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be a valid IPv4 address + * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; + * } + * ``` + * + * @generated from field: bool ipv4 = 11; + */ + value: boolean; + case: "ipv4"; + } | { + /** + * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. + * If the field value doesn't meet this constraint, an error message is generated. + * ```proto + * message MyBytes { + * // value must be a valid IPv6 address + * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; + * } + * ``` + * + * @generated from field: bool ipv6 = 12; + */ + value: boolean; + case: "ipv6"; + } | { case: undefined; value?: undefined }; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyBytes { + * bytes value = 1 [ + * (buf.validate.field).bytes.example = "\x01\x02", + * (buf.validate.field).bytes.example = "\x02\x03" + * ]; + * } + * ``` + * + * @generated from field: repeated bytes example = 14; + */ + example: Uint8Array[]; +}; + +/** + * Describes the message buf.validate.BytesRules. + * Use `create(BytesRulesSchema)` to create a new message. + */ +export const BytesRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 19); + +/** + * EnumRules describe the constraints applied to `enum` values. + * + * @generated from message buf.validate.EnumRules + */ +export type EnumRules = Message<"buf.validate.EnumRules"> & { + /** + * `const` requires the field value to exactly match the specified enum value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be exactly MY_ENUM_VALUE1. + * MyEnum value = 1 [(buf.validate.field).enum.const = 1]; + * } + * ``` + * + * @generated from field: optional int32 const = 1; + */ + const: number; + + /** + * `defined_only` requires the field value to be one of the defined values for + * this enum, failing on any undefined value. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be a defined value of MyEnum. + * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true]; + * } + * ``` + * + * @generated from field: optional bool defined_only = 2; + */ + definedOnly: boolean; + + /** + * `in` requires the field value to be equal to one of the + * specified enum values. If the field value doesn't match any of the + * specified values, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be equal to one of the specified values. + * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}]; + * } + * ``` + * + * @generated from field: repeated int32 in = 3; + */ + in: number[]; + + /** + * `not_in` requires the field value to be not equal to any of the + * specified enum values. If the field value matches one of the specified + * values, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must not be equal to any of the specified values. + * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}]; + * } + * ``` + * + * @generated from field: repeated int32 not_in = 4; + */ + notIn: number[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * (buf.validate.field).enum.example = 1, + * (buf.validate.field).enum.example = 2 + * } + * ``` + * + * @generated from field: repeated int32 example = 5; + */ + example: number[]; +}; + +/** + * Describes the message buf.validate.EnumRules. + * Use `create(EnumRulesSchema)` to create a new message. + */ +export const EnumRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 20); + +/** + * RepeatedRules describe the constraints applied to `repeated` values. + * + * @generated from message buf.validate.RepeatedRules + */ +export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & { + /** + * `min_items` requires that this field must contain at least the specified + * minimum number of items. + * + * Note that `min_items = 1` is equivalent to setting a field as `required`. + * + * ```proto + * message MyRepeated { + * // value must contain at least 2 items + * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2]; + * } + * ``` + * + * @generated from field: optional uint64 min_items = 1; + */ + minItems: bigint; + + /** + * `max_items` denotes that this field must not exceed a + * certain number of items as the upper limit. If the field contains more + * items than specified, an error message will be generated, requiring the + * field to maintain no more than the specified number of items. + * + * ```proto + * message MyRepeated { + * // value must contain no more than 3 item(s) + * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3]; + * } + * ``` + * + * @generated from field: optional uint64 max_items = 2; + */ + maxItems: bigint; + + /** + * `unique` indicates that all elements in this field must + * be unique. This constraint is strictly applicable to scalar and enum + * types, with message types not being supported. + * + * ```proto + * message MyRepeated { + * // repeated value must contain unique items + * repeated string value = 1 [(buf.validate.field).repeated.unique = true]; + * } + * ``` + * + * @generated from field: optional bool unique = 3; + */ + unique: boolean; + + /** + * `items` details the constraints to be applied to each item + * in the field. Even for repeated message fields, validation is executed + * against each item unless skip is explicitly specified. + * + * ```proto + * message MyRepeated { + * // The items in the field `value` must follow the specified constraints. + * repeated string value = 1 [(buf.validate.field).repeated.items = { + * string: { + * min_len: 3 + * max_len: 10 + * } + * }]; + * } + * ``` + * + * @generated from field: optional buf.validate.FieldConstraints items = 4; + */ + items?: FieldConstraints; +}; + +/** + * Describes the message buf.validate.RepeatedRules. + * Use `create(RepeatedRulesSchema)` to create a new message. + */ +export const RepeatedRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 21); + +/** + * MapRules describe the constraints applied to `map` values. + * + * @generated from message buf.validate.MapRules + */ +export type MapRules = Message<"buf.validate.MapRules"> & { + /** + * Specifies the minimum number of key-value pairs allowed. If the field has + * fewer key-value pairs than specified, an error message is generated. + * + * ```proto + * message MyMap { + * // The field `value` must have at least 2 key-value pairs. + * map value = 1 [(buf.validate.field).map.min_pairs = 2]; + * } + * ``` + * + * @generated from field: optional uint64 min_pairs = 1; + */ + minPairs: bigint; + + /** + * Specifies the maximum number of key-value pairs allowed. If the field has + * more key-value pairs than specified, an error message is generated. + * + * ```proto + * message MyMap { + * // The field `value` must have at most 3 key-value pairs. + * map value = 1 [(buf.validate.field).map.max_pairs = 3]; + * } + * ``` + * + * @generated from field: optional uint64 max_pairs = 2; + */ + maxPairs: bigint; + + /** + * Specifies the constraints to be applied to each key in the field. + * + * ```proto + * message MyMap { + * // The keys in the field `value` must follow the specified constraints. + * map value = 1 [(buf.validate.field).map.keys = { + * string: { + * min_len: 3 + * max_len: 10 + * } + * }]; + * } + * ``` + * + * @generated from field: optional buf.validate.FieldConstraints keys = 4; + */ + keys?: FieldConstraints; + + /** + * Specifies the constraints to be applied to the value of each key in the + * field. Message values will still have their validations evaluated unless + * skip is specified here. + * + * ```proto + * message MyMap { + * // The values in the field `value` must follow the specified constraints. + * map value = 1 [(buf.validate.field).map.values = { + * string: { + * min_len: 5 + * max_len: 20 + * } + * }]; + * } + * ``` + * + * @generated from field: optional buf.validate.FieldConstraints values = 5; + */ + values?: FieldConstraints; +}; + +/** + * Describes the message buf.validate.MapRules. + * Use `create(MapRulesSchema)` to create a new message. + */ +export const MapRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 22); + +/** + * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type. + * + * @generated from message buf.validate.AnyRules + */ +export type AnyRules = Message<"buf.validate.AnyRules"> & { + /** + * `in` requires the field's `type_url` to be equal to one of the + * specified values. If it doesn't match any of the specified values, an error + * message is generated. + * + * ```proto + * message MyAny { + * // The `value` field must have a `type_url` equal to one of the specified values. + * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; + * } + * ``` + * + * @generated from field: repeated string in = 2; + */ + in: string[]; + + /** + * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. + * + * ```proto + * message MyAny { + * // The field `value` must not have a `type_url` equal to any of the specified values. + * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; + * } + * ``` + * + * @generated from field: repeated string not_in = 3; + */ + notIn: string[]; +}; + +/** + * Describes the message buf.validate.AnyRules. + * Use `create(AnyRulesSchema)` to create a new message. + */ +export const AnyRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 23); + +/** + * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type. + * + * @generated from message buf.validate.DurationRules + */ +export type DurationRules = Message<"buf.validate.DurationRules"> & { + /** + * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. + * If the field's value deviates from the specified value, an error message + * will be generated. + * + * ```proto + * message MyDuration { + * // value must equal 5s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"]; + * } + * ``` + * + * @generated from field: optional google.protobuf.Duration const = 2; + */ + const?: Duration; + + /** + * @generated from oneof buf.validate.DurationRules.less_than + */ + lessThan: { + /** + * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, + * exclusive. If the field's value is greater than or equal to the specified + * value, an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be less than 5s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration lt = 3; + */ + value: Duration; + case: "lt"; + } | { + /** + * `lte` indicates that the field must be less than or equal to the specified + * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value, + * an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be less than or equal to 10s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration lte = 4; + */ + value: Duration; + case: "lte"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.DurationRules.greater_than + */ + greaterThan: { + /** + * `gt` requires the duration field value to be greater than the specified + * value (exclusive). If the value of `gt` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be greater than 5s [duration.gt] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }]; + * + * // duration must be greater than 5s and less than 10s [duration.gt_lt] + * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }]; + * + * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive] + * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration gt = 5; + */ + value: Duration; + case: "gt"; + } | { + /** + * `gte` requires the duration field value to be greater than or equal to the + * specified value (exclusive). If the value of `gte` is larger than a + * specified `lt` or `lte`, the range is reversed, and the field value must + * be outside the specified range. If the field value doesn't meet the + * required conditions, an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be greater than or equal to 5s [duration.gte] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }]; + * + * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt] + * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }]; + * + * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive] + * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration gte = 6; + */ + value: Duration; + case: "gte"; + } | { case: undefined; value?: undefined }; + + /** + * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type. + * If the field's value doesn't correspond to any of the specified values, + * an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be in list [1s, 2s, 3s] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]]; + * } + * ``` + * + * @generated from field: repeated google.protobuf.Duration in = 7; + */ + in: Duration[]; + + /** + * `not_in` denotes that the field must not be equal to + * any of the specified values of the `google.protobuf.Duration` type. + * If the field's value matches any of these values, an error message will be + * generated. + * + * ```proto + * message MyDuration { + * // value must not be in list [1s, 2s, 3s] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]]; + * } + * ``` + * + * @generated from field: repeated google.protobuf.Duration not_in = 8; + */ + notIn: Duration[]; + + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other constraints. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyDuration { + * google.protobuf.Duration value = 1 [ + * (buf.validate.field).duration.example = { seconds: 1 }, + * (buf.validate.field).duration.example = { seconds: 2 }, + * ]; + * } + * ``` + * + * @generated from field: repeated google.protobuf.Duration example = 9; + */ + example: Duration[]; +}; + +/** + * Describes the message buf.validate.DurationRules. + * Use `create(DurationRulesSchema)` to create a new message. + */ +export const DurationRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 24); + +/** + * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type. + * + * @generated from message buf.validate.TimestampRules + */ +export type TimestampRules = Message<"buf.validate.TimestampRules"> & { + /** + * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. + * + * ```proto + * message MyTimestamp { + * // value must equal 2023-05-03T10:00:00Z + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}]; + * } + * ``` + * + * @generated from field: optional google.protobuf.Timestamp const = 2; + */ + const?: Timestamp; + + /** + * @generated from oneof buf.validate.TimestampRules.less_than + */ + lessThan: { + /** + * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be less than 'P3D' [duration.lt] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp lt = 3; + */ + value: Timestamp; + case: "lt"; + } | { + /** + * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp lte = 4; + */ + value: Timestamp; + case: "lte"; + } | { + /** + * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule. + * + * ```proto + * message MyTimestamp { + * // value must be less than now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true]; + * } + * ``` + * + * @generated from field: bool lt_now = 7; + */ + value: boolean; + case: "ltNow"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof buf.validate.TimestampRules.greater_than + */ + greaterThan: { + /** + * `gt` requires the timestamp field value to be greater than the specified + * value (exclusive). If the value of `gt` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }]; + * + * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt] + * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + * + * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive] + * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp gt = 5; + */ + value: Timestamp; + case: "gt"; + } | { + /** + * `gte` requires the timestamp field value to be greater than or equal to the + * specified value (exclusive). If the value of `gte` is larger than a + * specified `lt` or `lte`, the range is reversed, and the field value + * must be outside the specified range. If the field value doesn't meet + * the required conditions, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }]; + * + * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt] + * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + * + * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive] + * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp gte = 6; + */ + value: Timestamp; + case: "gte"; + } | { + /** + * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule. + * + * ```proto + * message MyTimestamp { + * // value must be greater than now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true]; + * } + * ``` + * + * @generated from field: bool gt_now = 8; + */ + value: boolean; + case: "gtNow"; + } | { case: undefined; value?: undefined }; + + /** + * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // value must be within 1 hour of now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}]; + * } + * ``` + * + * @generated from field: optional google.protobuf.Duration within = 9; + */ + within?: Duration; + + /** + * @generated from field: repeated google.protobuf.Timestamp example = 10; + */ + example: Timestamp[]; +}; + +/** + * Describes the message buf.validate.TimestampRules. + * Use `create(TimestampRulesSchema)` to create a new message. + */ +export const TimestampRulesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 25); + +/** + * `Violations` is a collection of `Violation` messages. This message type is returned by + * protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules. + * Each individual violation is represented by a `Violation` message. + * + * @generated from message buf.validate.Violations + */ +export type Violations = Message<"buf.validate.Violations"> & { + /** + * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. + * + * @generated from field: repeated buf.validate.Violation violations = 1; + */ + violations: Violation[]; +}; + +/** + * Describes the message buf.validate.Violations. + * Use `create(ViolationsSchema)` to create a new message. + */ +export const ViolationsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 26); + +/** + * `Violation` represents a single instance where a validation rule, expressed + * as a `Constraint`, was not met. It provides information about the field that + * caused the violation, the specific constraint that wasn't fulfilled, and a + * human-readable error message. + * + * ```json + * { + * "fieldPath": "bar", + * "constraintId": "foo.bar", + * "message": "bar must be greater than 0" + * } + * ``` + * + * @generated from message buf.validate.Violation + */ +export type Violation = Message<"buf.validate.Violation"> & { + /** + * `field_path` is a machine-readable identifier that points to the specific field that failed the validation. + * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. + * + * @generated from field: optional string field_path = 1; + */ + fieldPath: string; + + /** + * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled. + * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated. + * + * @generated from field: optional string constraint_id = 2; + */ + constraintId: string; + + /** + * `message` is a human-readable error message that describes the nature of the violation. + * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation. + * + * @generated from field: optional string message = 3; + */ + message: string; + + /** + * `for_key` indicates whether the violation was caused by a map key, rather than a value. + * + * @generated from field: optional bool for_key = 4; + */ + forKey: boolean; +}; + +/** + * Describes the message buf.validate.Violation. + * Use `create(ViolationSchema)` to create a new message. + */ +export const ViolationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 27); + +/** + * Specifies how FieldConstraints.ignore behaves. See the documentation for + * FieldConstraints.required for definitions of "populated" and "nullable". + * + * @generated from enum buf.validate.Ignore + */ +export enum Ignore { + /** + * Validation is only skipped if it's an unpopulated nullable fields. + * + * ```proto + * syntax="proto3"; + * + * message Request { + * // The uri rule applies to any value, including the empty string. + * string foo = 1 [ + * (buf.validate.field).string.uri = true + * ]; + * + * // The uri rule only applies if the field is set, including if it's + * // set to the empty string. + * optional string bar = 2 [ + * (buf.validate.field).string.uri = true + * ]; + * + * // The min_items rule always applies, even if the list is empty. + * repeated string baz = 3 [ + * (buf.validate.field).repeated.min_items = 3 + * ]; + * + * // The custom CEL rule applies only if the field is set, including if + * // it's the "zero" value of that message. + * SomeMessage quux = 4 [ + * (buf.validate.field).cel = {/* ... *\/} + * ]; + * } + * ``` + * + * @generated from enum value: IGNORE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Validation is skipped if the field is unpopulated. This rule is redundant + * if the field is already nullable. This value is equivalent behavior to the + * deprecated ignore_empty rule. + * + * ```proto + * syntax="proto3 + * + * message Request { + * // The uri rule applies only if the value is not the empty string. + * string foo = 1 [ + * (buf.validate.field).string.uri = true, + * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + * ]; + * + * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this + * // case: the uri rule only applies if the field is set, including if + * // it's set to the empty string. + * optional string bar = 2 [ + * (buf.validate.field).string.uri = true, + * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + * ]; + * + * // The min_items rule only applies if the list has at least one item. + * repeated string baz = 3 [ + * (buf.validate.field).repeated.min_items = 3, + * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + * ]; + * + * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this + * // case: the custom CEL rule applies only if the field is set, including + * // if it's the "zero" value of that message. + * SomeMessage quux = 4 [ + * (buf.validate.field).cel = {/* ... *\/}, + * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + * ]; + * } + * ``` + * + * @generated from enum value: IGNORE_IF_UNPOPULATED = 1; + */ + IF_UNPOPULATED = 1, + + /** + * Validation is skipped if the field is unpopulated or if it is a nullable + * field populated with its default value. This is typically the zero or + * empty value, but proto2 scalars support custom defaults. For messages, the + * default is a non-null message with all its fields unpopulated. + * + * ```proto + * syntax="proto3 + * + * message Request { + * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in + * // this case; the uri rule applies only if the value is not the empty + * // string. + * string foo = 1 [ + * (buf.validate.field).string.uri = true, + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + * ]; + * + * // The uri rule only applies if the field is set to a value other than + * // the empty string. + * optional string bar = 2 [ + * (buf.validate.field).string.uri = true, + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + * ]; + * + * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in + * // this case; the min_items rule only applies if the list has at least + * // one item. + * repeated string baz = 3 [ + * (buf.validate.field).repeated.min_items = 3, + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + * ]; + * + * // The custom CEL rule only applies if the field is set to a value other + * // than an empty message (i.e., fields are unpopulated). + * SomeMessage quux = 4 [ + * (buf.validate.field).cel = {/* ... *\/}, + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + * ]; + * } + * ``` + * + * This rule is affected by proto2 custom default values: + * + * ```proto + * syntax="proto2"; + * + * message Request { + * // The gt rule only applies if the field is set and it's value is not + * the default (i.e., not -42). The rule even applies if the field is set + * to zero since the default value differs. + * optional int32 value = 1 [ + * default = -42, + * (buf.validate.field).int32.gt = 0, + * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + * ]; + * } + * + * @generated from enum value: IGNORE_IF_DEFAULT_VALUE = 2; + */ + IF_DEFAULT_VALUE = 2, + + /** + * The validation rules of this field will be skipped and not evaluated. This + * is useful for situations that necessitate turning off the rules of a field + * containing a message that may not make sense in the current context, or to + * temporarily disable constraints during development. + * + * ```proto + * message MyMessage { + * // The field's rules will always be ignored, including any validation's + * // on value's fields. + * MyOtherMessage value = 1 [ + * (buf.validate.field).ignore = IGNORE_ALWAYS]; + * } + * ``` + * + * @generated from enum value: IGNORE_ALWAYS = 3; + */ + ALWAYS = 3, + + /** + * Deprecated: Use IGNORE_IF_UNPOPULATED instead. TODO: Remove this value pre-v1. + * + * @generated from enum value: IGNORE_EMPTY = 1 [deprecated = true]; + * @deprecated + */ + EMPTY = 1, + + /** + * Deprecated: Use IGNORE_IF_DEFAULT_VALUE. TODO: Remove this value pre-v1. + * + * @generated from enum value: IGNORE_DEFAULT = 2 [deprecated = true]; + * @deprecated + */ + DEFAULT = 2, +} + +/** + * Describes the enum buf.validate.Ignore. + */ +export const IgnoreSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_buf_validate_validate, 0); + +/** + * WellKnownRegex contain some well-known patterns. + * + * @generated from enum buf.validate.KnownRegex + */ +export enum KnownRegex { + /** + * @generated from enum value: KNOWN_REGEX_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2). + * + * @generated from enum value: KNOWN_REGEX_HTTP_HEADER_NAME = 1; + */ + HTTP_HEADER_NAME = 1, + + /** + * HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4). + * + * @generated from enum value: KNOWN_REGEX_HTTP_HEADER_VALUE = 2; + */ + HTTP_HEADER_VALUE = 2, +} + +/** + * Describes the enum buf.validate.KnownRegex. + */ +export const KnownRegexSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_buf_validate_validate, 1); + +/** + * Rules specify the validations to be performed on this message. By default, + * no validation is performed against a message. + * + * @generated from extension: optional buf.validate.MessageConstraints message = 1159; + */ +export const message: GenExtension = /*@__PURE__*/ + extDesc(file_buf_validate_validate, 0); + +/** + * Rules specify the validations to be performed on this oneof. By default, + * no validation is performed against a oneof. + * + * @generated from extension: optional buf.validate.OneofConstraints oneof = 1159; + */ +export const oneof: GenExtension = /*@__PURE__*/ + extDesc(file_buf_validate_validate, 1); + +/** + * Rules specify the validations to be performed on this field. By default, + * no validation is performed against a field. + * + * @generated from extension: optional buf.validate.FieldConstraints field = 1159; + */ +export const field: GenExtension = /*@__PURE__*/ + extDesc(file_buf_validate_validate, 2); + +/** + * Specifies predefined rules. When extending a standard constraint message, + * this adds additional CEL expressions that apply when the extension is used. + * + * ```proto + * extend buf.validate.Int32Rules { + * bool is_zero [(buf.validate.predefined).cel = { + * id: "int32.is_zero", + * message: "value must be zero", + * expression: "!rule || this == 0", + * }]; + * } + * + * message Foo { + * int32 reserved = 1 [(buf.validate.field).int32.(is_zero) = true]; + * } + * ``` + * + * @generated from extension: optional buf.validate.PredefinedConstraints predefined = 1160; + */ +export const predefined: GenExtension = /*@__PURE__*/ + extDesc(file_buf_validate_validate, 3); + diff --git a/frontend/packages/sdk/src/client/client.ts b/frontend/packages/sdk/src/client/client.ts index 70e0269967..dbcb6f8052 100644 --- a/frontend/packages/sdk/src/client/client.ts +++ b/frontend/packages/sdk/src/client/client.ts @@ -1,31 +1,31 @@ import { + Client, Interceptor, - PromiseClient, Transport, - createPromiseClient, + createClient, } from '@connectrpc/connect'; -import { AnonymizationService } from './mgmt/v1alpha1/anonymization_connect.js'; -import { ApiKeyService } from './mgmt/v1alpha1/api_key_connect.js'; -import { ConnectionService } from './mgmt/v1alpha1/connection_connect.js'; -import { ConnectionDataService } from './mgmt/v1alpha1/connection_data_connect.js'; -import { JobService } from './mgmt/v1alpha1/job_connect.js'; -import { MetricsService } from './mgmt/v1alpha1/metrics_connect.js'; -import { TransformersService } from './mgmt/v1alpha1/transformer_connect.js'; -import { UserAccountService } from './mgmt/v1alpha1/user_account_connect.js'; +import { AnonymizationService } from './mgmt/v1alpha1/anonymization_pb.js'; +import { ApiKeyService } from './mgmt/v1alpha1/api_key_pb.js'; +import { ConnectionDataService } from './mgmt/v1alpha1/connection_data_pb.js'; +import { ConnectionService } from './mgmt/v1alpha1/connection_pb.js'; +import { JobService } from './mgmt/v1alpha1/job_pb.js'; +import { MetricsService } from './mgmt/v1alpha1/metrics_pb.js'; +import { TransformersService } from './mgmt/v1alpha1/transformer_pb.js'; +import { UserAccountService } from './mgmt/v1alpha1/user_account_pb.js'; export type NeosyncClient = NeosyncV1alpha1Client; export type ClientVersion = 'v1alpha1' | 'latest'; export interface NeosyncV1alpha1Client { - connections: PromiseClient; - users: PromiseClient; - jobs: PromiseClient; - transformers: PromiseClient; - apikeys: PromiseClient; - connectiondata: PromiseClient; - metrics: PromiseClient; - anonymization: PromiseClient; + connections: Client; + users: Client; + jobs: Client; + transformers: Client; + apikeys: Client; + connectiondata: Client; + metrics: Client; + anonymization: Client; } /** @@ -84,14 +84,14 @@ export function getNeosyncV1alpha1Client( : []; const transport = config.getTransport(interceptors); return { - connections: createPromiseClient(ConnectionService, transport), - users: createPromiseClient(UserAccountService, transport), - jobs: createPromiseClient(JobService, transport), - transformers: createPromiseClient(TransformersService, transport), - apikeys: createPromiseClient(ApiKeyService, transport), - connectiondata: createPromiseClient(ConnectionDataService, transport), - metrics: createPromiseClient(MetricsService, transport), - anonymization: createPromiseClient(AnonymizationService, transport), + connections: createClient(ConnectionService, transport), + users: createClient(UserAccountService, transport), + jobs: createClient(JobService, transport), + transformers: createClient(TransformersService, transport), + apikeys: createClient(ApiKeyService, transport), + connectiondata: createClient(ConnectionDataService, transport), + metrics: createClient(MetricsService, transport), + anonymization: createClient(AnonymizationService, transport), }; } diff --git a/frontend/packages/sdk/src/client/index.ts b/frontend/packages/sdk/src/client/index.ts index 2ca76f8310..1dd8f6ec04 100644 --- a/frontend/packages/sdk/src/client/index.ts +++ b/frontend/packages/sdk/src/client/index.ts @@ -1,11 +1,3 @@ -export { ApiKeyService } from './mgmt/v1alpha1/api_key_connect.js'; -export { ConnectionService } from './mgmt/v1alpha1/connection_connect.js'; -export { ConnectionDataService } from './mgmt/v1alpha1/connection_data_connect.js'; -export { JobService } from './mgmt/v1alpha1/job_connect.js'; -export { MetricsService } from './mgmt/v1alpha1/metrics_connect.js'; -export { TransformersService } from './mgmt/v1alpha1/transformer_connect.js'; -export { UserAccountService } from './mgmt/v1alpha1/user_account_connect.js'; - export * from './mgmt/v1alpha1/anonymization_pb.js'; export * from './mgmt/v1alpha1/api_key_pb.js'; export * from './mgmt/v1alpha1/connection_data_pb.js'; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/anonymization-AnonymizationService_connectquery.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/anonymization-AnonymizationService_connectquery.ts deleted file mode 100644 index 66baf0ec91..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/anonymization-AnonymizationService_connectquery.ts +++ /dev/null @@ -1,39 +0,0 @@ -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/anonymization.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { MethodKind } from "@bufbuild/protobuf"; -import { AnonymizeManyRequest, AnonymizeManyResponse, AnonymizeSingleRequest, AnonymizeSingleResponse } from "./anonymization_pb.js"; - -/** - * Anonymizes many JSON strings by applying specified transformation mappings. - * - * @generated from rpc mgmt.v1alpha1.AnonymizationService.AnonymizeMany - */ -export const anonymizeMany = { - localName: "anonymizeMany", - name: "AnonymizeMany", - kind: MethodKind.Unary, - I: AnonymizeManyRequest, - O: AnonymizeManyResponse, - service: { - typeName: "mgmt.v1alpha1.AnonymizationService" - } -} as const; - -/** - * Anonymizes a single JSON strings by applying specified transformation mappings. - * - * @generated from rpc mgmt.v1alpha1.AnonymizationService.AnonymizeSingle - */ -export const anonymizeSingle = { - localName: "anonymizeSingle", - name: "AnonymizeSingle", - kind: MethodKind.Unary, - I: AnonymizeSingleRequest, - O: AnonymizeSingleResponse, - service: { - typeName: "mgmt.v1alpha1.AnonymizationService" - } -} as const; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/anonymization_connect.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/anonymization_connect.ts deleted file mode 100644 index 7cce7d4ea7..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/anonymization_connect.ts +++ /dev/null @@ -1,39 +0,0 @@ -// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/anonymization.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { AnonymizeManyRequest, AnonymizeManyResponse, AnonymizeSingleRequest, AnonymizeSingleResponse } from "./anonymization_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service mgmt.v1alpha1.AnonymizationService - */ -export const AnonymizationService = { - typeName: "mgmt.v1alpha1.AnonymizationService", - methods: { - /** - * Anonymizes many JSON strings by applying specified transformation mappings. - * - * @generated from rpc mgmt.v1alpha1.AnonymizationService.AnonymizeMany - */ - anonymizeMany: { - name: "AnonymizeMany", - I: AnonymizeManyRequest, - O: AnonymizeManyResponse, - kind: MethodKind.Unary, - }, - /** - * Anonymizes a single JSON strings by applying specified transformation mappings. - * - * @generated from rpc mgmt.v1alpha1.AnonymizationService.AnonymizeSingle - */ - anonymizeSingle: { - name: "AnonymizeSingle", - I: AnonymizeSingleRequest, - O: AnonymizeSingleResponse, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/anonymization_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/anonymization_pb.ts index 41b64b1175..a83a14fcd8 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/anonymization_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/anonymization_pb.ts @@ -1,29 +1,37 @@ -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js" +// @generated by protoc-gen-es v2.2.3 with parameter "target=ts,import_extension=.js" // @generated from file mgmt/v1alpha1/anonymization.proto (package mgmt.v1alpha1, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { TransformerConfig } from "./transformer_pb.js"; +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { TransformerConfig } from "./transformer_pb.js"; +import { file_mgmt_v1alpha1_transformer } from "./transformer_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file mgmt/v1alpha1/anonymization.proto. + */ +export const file_mgmt_v1alpha1_anonymization: GenFile = /*@__PURE__*/ + fileDesc("CiFtZ210L3YxYWxwaGExL2Fub255bWl6YXRpb24ucHJvdG8SDW1nbXQudjFhbHBoYTEimgIKFEFub255bWl6ZU1hbnlSZXF1ZXN0EiQKCmlucHV0X2RhdGEYASADKAlCELpIDZIBCggBEBkiBHICEAESPwoUdHJhbnNmb3JtZXJfbWFwcGluZ3MYAiADKAsyIS5tZ210LnYxYWxwaGExLlRyYW5zZm9ybWVyTWFwcGluZxJLChRkZWZhdWx0X3RyYW5zZm9ybWVycxgDIAEoCzIoLm1nbXQudjFhbHBoYTEuRGVmYXVsdFRyYW5zZm9ybWVyc0NvbmZpZ0gAiAEBEhcKD2hhbHRfb25fZmFpbHVyZRgEIAEoCBIcCgphY2NvdW50X2lkGAUgASgJQgi6SAVyA7ABAUIXChVfZGVmYXVsdF90cmFuc2Zvcm1lcnMiYAoVQW5vbnltaXplTWFueVJlc3BvbnNlEhMKC291dHB1dF9kYXRhGAEgAygJEjIKBmVycm9ycxgCIAMoCzIiLm1nbXQudjFhbHBoYTEuQW5vbnltaXplTWFueUVycm9ycyJvChJUcmFuc2Zvcm1lck1hcHBpbmcSGgoKZXhwcmVzc2lvbhgBIAEoCUIGukgDyAEBEj0KC3RyYW5zZm9ybWVyGAIgASgLMiAubWdtdC52MWFscGhhMS5UcmFuc2Zvcm1lckNvbmZpZ0IGukgDyAEBIqgBChlEZWZhdWx0VHJhbnNmb3JtZXJzQ29uZmlnEjEKB2Jvb2xlYW4YAiABKAsyIC5tZ210LnYxYWxwaGExLlRyYW5zZm9ybWVyQ29uZmlnEisKAW4YAyABKAsyIC5tZ210LnYxYWxwaGExLlRyYW5zZm9ybWVyQ29uZmlnEisKAXMYBCABKAsyIC5tZ210LnYxYWxwaGExLlRyYW5zZm9ybWVyQ29uZmlnIkEKE0Fub255bWl6ZU1hbnlFcnJvcnMSEwoLaW5wdXRfaW5kZXgYASABKAMSFQoNZXJyb3JfbWVzc2FnZRgCIAEoCSLxAQoWQW5vbnltaXplU2luZ2xlUmVxdWVzdBISCgppbnB1dF9kYXRhGAEgASgJEj8KFHRyYW5zZm9ybWVyX21hcHBpbmdzGAIgAygLMiEubWdtdC52MWFscGhhMS5UcmFuc2Zvcm1lck1hcHBpbmcSSwoUZGVmYXVsdF90cmFuc2Zvcm1lcnMYAyABKAsyKC5tZ210LnYxYWxwaGExLkRlZmF1bHRUcmFuc2Zvcm1lcnNDb25maWdIAIgBARIcCgphY2NvdW50X2lkGAQgASgJQgi6SAVyA7ABAUIXChVfZGVmYXVsdF90cmFuc2Zvcm1lcnMiLgoXQW5vbnltaXplU2luZ2xlUmVzcG9uc2USEwoLb3V0cHV0X2RhdGEYASABKAky2AEKFEFub255bWl6YXRpb25TZXJ2aWNlElwKDUFub255bWl6ZU1hbnkSIy5tZ210LnYxYWxwaGExLkFub255bWl6ZU1hbnlSZXF1ZXN0GiQubWdtdC52MWFscGhhMS5Bbm9ueW1pemVNYW55UmVzcG9uc2UiABJiCg9Bbm9ueW1pemVTaW5nbGUSJS5tZ210LnYxYWxwaGExLkFub255bWl6ZVNpbmdsZVJlcXVlc3QaJi5tZ210LnYxYWxwaGExLkFub255bWl6ZVNpbmdsZVJlc3BvbnNlIgBCzgEKEWNvbS5tZ210LnYxYWxwaGExQhJBbm9ueW1pemF0aW9uUHJvdG9QAVpQZ2l0aHViLmNvbS9udWNsZXVzY2xvdWQvbmVvc3luYy9iYWNrZW5kL2dlbi9nby9wcm90b3MvbWdtdC92MWFscGhhMTttZ210djFhbHBoYTGiAgNNWFiqAg1NZ210LlYxYWxwaGExygINTWdtdFxWMWFscGhhMeICGU1nbXRcVjFhbHBoYTFcR1BCTWV0YWRhdGHqAg5NZ210OjpWMWFscGhhMWIGcHJvdG8z", [file_buf_validate_validate, file_mgmt_v1alpha1_transformer]); /** * @generated from message mgmt.v1alpha1.AnonymizeManyRequest */ -export class AnonymizeManyRequest extends Message { +export type AnonymizeManyRequest = Message<"mgmt.v1alpha1.AnonymizeManyRequest"> & { /** * Array of stringified JSON data to be anonymized (up to 25 items) * * @generated from field: repeated string input_data = 1; */ - inputData: string[] = []; + inputData: string[]; /** * Array of Transformer mappings * * @generated from field: repeated mgmt.v1alpha1.TransformerMapping transformer_mappings = 2; */ - transformerMappings: TransformerMapping[] = []; + transformerMappings: TransformerMapping[]; /** * Optional default transformations for any unmapped keys @@ -38,104 +46,59 @@ export class AnonymizeManyRequest extends Message { * * @generated from field: bool halt_on_failure = 4; */ - haltOnFailure = false; + haltOnFailure: boolean; /** * The unique account identifier * * @generated from field: string account_id = 5; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AnonymizeManyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "input_data", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 2, name: "transformer_mappings", kind: "message", T: TransformerMapping, repeated: true }, - { no: 3, name: "default_transformers", kind: "message", T: DefaultTransformersConfig, opt: true }, - { no: 4, name: "halt_on_failure", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnonymizeManyRequest { - return new AnonymizeManyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnonymizeManyRequest { - return new AnonymizeManyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnonymizeManyRequest { - return new AnonymizeManyRequest().fromJsonString(jsonString, options); - } + accountId: string; +}; - static equals(a: AnonymizeManyRequest | PlainMessage | undefined, b: AnonymizeManyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(AnonymizeManyRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AnonymizeManyRequest. + * Use `create(AnonymizeManyRequestSchema)` to create a new message. + */ +export const AnonymizeManyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_anonymization, 0); /** * @generated from message mgmt.v1alpha1.AnonymizeManyResponse */ -export class AnonymizeManyResponse extends Message { +export type AnonymizeManyResponse = Message<"mgmt.v1alpha1.AnonymizeManyResponse"> & { /** * Array of anonymized JSON data * * @generated from field: repeated string output_data = 1; */ - outputData: string[] = []; + outputData: string[]; /** * Array of errors that occured during anonymization * * @generated from field: repeated mgmt.v1alpha1.AnonymizeManyErrors errors = 2; */ - errors: AnonymizeManyErrors[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AnonymizeManyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "output_data", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 2, name: "errors", kind: "message", T: AnonymizeManyErrors, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnonymizeManyResponse { - return new AnonymizeManyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnonymizeManyResponse { - return new AnonymizeManyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnonymizeManyResponse { - return new AnonymizeManyResponse().fromJsonString(jsonString, options); - } + errors: AnonymizeManyErrors[]; +}; - static equals(a: AnonymizeManyResponse | PlainMessage | undefined, b: AnonymizeManyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(AnonymizeManyResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AnonymizeManyResponse. + * Use `create(AnonymizeManyResponseSchema)` to create a new message. + */ +export const AnonymizeManyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_anonymization, 1); /** * @generated from message mgmt.v1alpha1.TransformerMapping */ -export class TransformerMapping extends Message { +export type TransformerMapping = Message<"mgmt.v1alpha1.TransformerMapping"> & { /** * JQ Expression or Field Path to apply the transformation to * * @generated from field: string expression = 1; */ - expression = ""; + expression: string; /** * Configuration of Transformer to apply @@ -143,40 +106,19 @@ export class TransformerMapping extends Message { * @generated from field: mgmt.v1alpha1.TransformerConfig transformer = 2; */ transformer?: TransformerConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformerMapping"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "expression", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "transformer", kind: "message", T: TransformerConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransformerMapping { - return new TransformerMapping().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransformerMapping { - return new TransformerMapping().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TransformerMapping { - return new TransformerMapping().fromJsonString(jsonString, options); - } - - static equals(a: TransformerMapping | PlainMessage | undefined, b: TransformerMapping | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformerMapping, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.TransformerMapping. + * Use `create(TransformerMappingSchema)` to create a new message. + */ +export const TransformerMappingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_anonymization, 2); /** * @generated from message mgmt.v1alpha1.DefaultTransformersConfig */ -export class DefaultTransformersConfig extends Message { +export type DefaultTransformersConfig = Message<"mgmt.v1alpha1.DefaultTransformersConfig"> & { /** * Boolean * @@ -197,101 +139,58 @@ export class DefaultTransformersConfig extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DefaultTransformersConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "boolean", kind: "message", T: TransformerConfig }, - { no: 3, name: "n", kind: "message", T: TransformerConfig }, - { no: 4, name: "s", kind: "message", T: TransformerConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DefaultTransformersConfig { - return new DefaultTransformersConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DefaultTransformersConfig { - return new DefaultTransformersConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DefaultTransformersConfig { - return new DefaultTransformersConfig().fromJsonString(jsonString, options); - } - - static equals(a: DefaultTransformersConfig | PlainMessage | undefined, b: DefaultTransformersConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(DefaultTransformersConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DefaultTransformersConfig. + * Use `create(DefaultTransformersConfigSchema)` to create a new message. + */ +export const DefaultTransformersConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_anonymization, 3); /** * @generated from message mgmt.v1alpha1.AnonymizeManyErrors */ -export class AnonymizeManyErrors extends Message { +export type AnonymizeManyErrors = Message<"mgmt.v1alpha1.AnonymizeManyErrors"> & { /** * Index of input data that caused error * * @generated from field: int64 input_index = 1; */ - inputIndex = protoInt64.zero; + inputIndex: bigint; /** * Error message * * @generated from field: string error_message = 2; */ - errorMessage = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AnonymizeManyErrors"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "input_index", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 2, name: "error_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnonymizeManyErrors { - return new AnonymizeManyErrors().fromBinary(bytes, options); - } + errorMessage: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): AnonymizeManyErrors { - return new AnonymizeManyErrors().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnonymizeManyErrors { - return new AnonymizeManyErrors().fromJsonString(jsonString, options); - } - - static equals(a: AnonymizeManyErrors | PlainMessage | undefined, b: AnonymizeManyErrors | PlainMessage | undefined): boolean { - return proto3.util.equals(AnonymizeManyErrors, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AnonymizeManyErrors. + * Use `create(AnonymizeManyErrorsSchema)` to create a new message. + */ +export const AnonymizeManyErrorsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_anonymization, 4); /** * @generated from message mgmt.v1alpha1.AnonymizeSingleRequest */ -export class AnonymizeSingleRequest extends Message { +export type AnonymizeSingleRequest = Message<"mgmt.v1alpha1.AnonymizeSingleRequest"> & { /** * Stringified JSON data to be anonymized * * @generated from field: string input_data = 1; */ - inputData = ""; + inputData: string; /** * Array of Transformer mappings * * @generated from field: repeated mgmt.v1alpha1.TransformerMapping transformer_mappings = 2; */ - transformerMappings: TransformerMapping[] = []; + transformerMappings: TransformerMapping[]; /** * Optional default transformations for any unmapped keys @@ -305,75 +204,59 @@ export class AnonymizeSingleRequest extends Message { * * @generated from field: string account_id = 4; */ - accountId = ""; + accountId: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AnonymizeSingleRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "input_data", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "transformer_mappings", kind: "message", T: TransformerMapping, repeated: true }, - { no: 3, name: "default_transformers", kind: "message", T: DefaultTransformersConfig, opt: true }, - { no: 4, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnonymizeSingleRequest { - return new AnonymizeSingleRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnonymizeSingleRequest { - return new AnonymizeSingleRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnonymizeSingleRequest { - return new AnonymizeSingleRequest().fromJsonString(jsonString, options); - } - - static equals(a: AnonymizeSingleRequest | PlainMessage | undefined, b: AnonymizeSingleRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(AnonymizeSingleRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AnonymizeSingleRequest. + * Use `create(AnonymizeSingleRequestSchema)` to create a new message. + */ +export const AnonymizeSingleRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_anonymization, 5); /** * @generated from message mgmt.v1alpha1.AnonymizeSingleResponse */ -export class AnonymizeSingleResponse extends Message { +export type AnonymizeSingleResponse = Message<"mgmt.v1alpha1.AnonymizeSingleResponse"> & { /** * Anonymized JSON data * * @generated from field: string output_data = 1; */ - outputData = ""; + outputData: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AnonymizeSingleResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "output_data", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnonymizeSingleResponse { - return new AnonymizeSingleResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnonymizeSingleResponse { - return new AnonymizeSingleResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnonymizeSingleResponse { - return new AnonymizeSingleResponse().fromJsonString(jsonString, options); - } +/** + * Describes the message mgmt.v1alpha1.AnonymizeSingleResponse. + * Use `create(AnonymizeSingleResponseSchema)` to create a new message. + */ +export const AnonymizeSingleResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_anonymization, 6); - static equals(a: AnonymizeSingleResponse | PlainMessage | undefined, b: AnonymizeSingleResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(AnonymizeSingleResponse, a, b); - } -} +/** + * @generated from service mgmt.v1alpha1.AnonymizationService + */ +export const AnonymizationService: GenService<{ + /** + * Anonymizes many JSON strings by applying specified transformation mappings. + * + * @generated from rpc mgmt.v1alpha1.AnonymizationService.AnonymizeMany + */ + anonymizeMany: { + methodKind: "unary"; + input: typeof AnonymizeManyRequestSchema; + output: typeof AnonymizeManyResponseSchema; + }, + /** + * Anonymizes a single JSON strings by applying specified transformation mappings. + * + * @generated from rpc mgmt.v1alpha1.AnonymizationService.AnonymizeSingle + */ + anonymizeSingle: { + methodKind: "unary"; + input: typeof AnonymizeSingleRequestSchema; + output: typeof AnonymizeSingleResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_mgmt_v1alpha1_anonymization, 0); diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/api_key-ApiKeyService_connectquery.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/api_key-ApiKeyService_connectquery.ts deleted file mode 100644 index 383eab8415..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/api_key-ApiKeyService_connectquery.ts +++ /dev/null @@ -1,89 +0,0 @@ -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/api_key.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { MethodKind } from "@bufbuild/protobuf"; -import { CreateAccountApiKeyRequest, CreateAccountApiKeyResponse, DeleteAccountApiKeyRequest, DeleteAccountApiKeyResponse, GetAccountApiKeyRequest, GetAccountApiKeyResponse, GetAccountApiKeysRequest, GetAccountApiKeysResponse, RegenerateAccountApiKeyRequest, RegenerateAccountApiKeyResponse } from "./api_key_pb.js"; - -/** - * Retrieves a list of Account API Keys - * - * @generated from rpc mgmt.v1alpha1.ApiKeyService.GetAccountApiKeys - */ -export const getAccountApiKeys = { - localName: "getAccountApiKeys", - name: "GetAccountApiKeys", - kind: MethodKind.Unary, - I: GetAccountApiKeysRequest, - O: GetAccountApiKeysResponse, - service: { - typeName: "mgmt.v1alpha1.ApiKeyService" - } -} as const; - -/** - * Retrieves a single API Key - * - * @generated from rpc mgmt.v1alpha1.ApiKeyService.GetAccountApiKey - */ -export const getAccountApiKey = { - localName: "getAccountApiKey", - name: "GetAccountApiKey", - kind: MethodKind.Unary, - I: GetAccountApiKeyRequest, - O: GetAccountApiKeyResponse, - service: { - typeName: "mgmt.v1alpha1.ApiKeyService" - } -} as const; - -/** - * Creates a single API Key - * This method will return the decrypted contents of the API key - * - * @generated from rpc mgmt.v1alpha1.ApiKeyService.CreateAccountApiKey - */ -export const createAccountApiKey = { - localName: "createAccountApiKey", - name: "CreateAccountApiKey", - kind: MethodKind.Unary, - I: CreateAccountApiKeyRequest, - O: CreateAccountApiKeyResponse, - service: { - typeName: "mgmt.v1alpha1.ApiKeyService" - } -} as const; - -/** - * Regenerates a single API Key with a new expiration time - * This method will return the decrypted contents of the API key - * - * @generated from rpc mgmt.v1alpha1.ApiKeyService.RegenerateAccountApiKey - */ -export const regenerateAccountApiKey = { - localName: "regenerateAccountApiKey", - name: "RegenerateAccountApiKey", - kind: MethodKind.Unary, - I: RegenerateAccountApiKeyRequest, - O: RegenerateAccountApiKeyResponse, - service: { - typeName: "mgmt.v1alpha1.ApiKeyService" - } -} as const; - -/** - * Deletes an API Key from the system. - * - * @generated from rpc mgmt.v1alpha1.ApiKeyService.DeleteAccountApiKey - */ -export const deleteAccountApiKey = { - localName: "deleteAccountApiKey", - name: "DeleteAccountApiKey", - kind: MethodKind.Unary, - I: DeleteAccountApiKeyRequest, - O: DeleteAccountApiKeyResponse, - service: { - typeName: "mgmt.v1alpha1.ApiKeyService" - } -} as const; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/api_key_connect.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/api_key_connect.ts deleted file mode 100644 index f4c8a3e8a9..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/api_key_connect.ts +++ /dev/null @@ -1,76 +0,0 @@ -// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/api_key.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateAccountApiKeyRequest, CreateAccountApiKeyResponse, DeleteAccountApiKeyRequest, DeleteAccountApiKeyResponse, GetAccountApiKeyRequest, GetAccountApiKeyResponse, GetAccountApiKeysRequest, GetAccountApiKeysResponse, RegenerateAccountApiKeyRequest, RegenerateAccountApiKeyResponse } from "./api_key_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * Service that manages the lifecycle of API Keys that are associated with a specific Account. - * - * @generated from service mgmt.v1alpha1.ApiKeyService - */ -export const ApiKeyService = { - typeName: "mgmt.v1alpha1.ApiKeyService", - methods: { - /** - * Retrieves a list of Account API Keys - * - * @generated from rpc mgmt.v1alpha1.ApiKeyService.GetAccountApiKeys - */ - getAccountApiKeys: { - name: "GetAccountApiKeys", - I: GetAccountApiKeysRequest, - O: GetAccountApiKeysResponse, - kind: MethodKind.Unary, - }, - /** - * Retrieves a single API Key - * - * @generated from rpc mgmt.v1alpha1.ApiKeyService.GetAccountApiKey - */ - getAccountApiKey: { - name: "GetAccountApiKey", - I: GetAccountApiKeyRequest, - O: GetAccountApiKeyResponse, - kind: MethodKind.Unary, - }, - /** - * Creates a single API Key - * This method will return the decrypted contents of the API key - * - * @generated from rpc mgmt.v1alpha1.ApiKeyService.CreateAccountApiKey - */ - createAccountApiKey: { - name: "CreateAccountApiKey", - I: CreateAccountApiKeyRequest, - O: CreateAccountApiKeyResponse, - kind: MethodKind.Unary, - }, - /** - * Regenerates a single API Key with a new expiration time - * This method will return the decrypted contents of the API key - * - * @generated from rpc mgmt.v1alpha1.ApiKeyService.RegenerateAccountApiKey - */ - regenerateAccountApiKey: { - name: "RegenerateAccountApiKey", - I: RegenerateAccountApiKeyRequest, - O: RegenerateAccountApiKeyResponse, - kind: MethodKind.Unary, - }, - /** - * Deletes an API Key from the system. - * - * @generated from rpc mgmt.v1alpha1.ApiKeyService.DeleteAccountApiKey - */ - deleteAccountApiKey: { - name: "DeleteAccountApiKey", - I: DeleteAccountApiKeyRequest, - O: DeleteAccountApiKeyResponse, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/api_key_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/api_key_pb.ts index edd347d6a2..61f2fad7a8 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/api_key_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/api_key_pb.ts @@ -1,24 +1,33 @@ -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js" +// @generated by protoc-gen-es v2.2.3 with parameter "target=ts,import_extension=.js" // @generated from file mgmt/v1alpha1/api_key.proto (package mgmt.v1alpha1, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, Timestamp } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file mgmt/v1alpha1/api_key.proto. + */ +export const file_mgmt_v1alpha1_api_key: GenFile = /*@__PURE__*/ + fileDesc("ChttZ210L3YxYWxwaGExL2FwaV9rZXkucHJvdG8SDW1nbXQudjFhbHBoYTEipwEKGkNyZWF0ZUFjY291bnRBcGlLZXlSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBEicKBG5hbWUYAiABKAlCGbpIFnIUMhJeW2EtejAtOS1dezMsMTAwfSQSQgoKZXhwaXJlc19hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCErpID8gBAbIBCUoFCIDnhA9AASJMChtDcmVhdGVBY2NvdW50QXBpS2V5UmVzcG9uc2USLQoHYXBpX2tleRgBIAEoCzIcLm1nbXQudjFhbHBoYTEuQWNjb3VudEFwaUtleSKyAgoNQWNjb3VudEFwaUtleRIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEhIKCmFjY291bnRfaWQYAyABKAkSFQoNY3JlYXRlZF9ieV9pZBgEIAEoCRIuCgpjcmVhdGVkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIVCg11cGRhdGVkX2J5X2lkGAYgASgJEi4KCnVwZGF0ZWRfYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhYKCWtleV92YWx1ZRgIIAEoCUgAiAEBEg8KB3VzZXJfaWQYCSABKAkSLgoKZXhwaXJlc19hdBgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCDAoKX2tleV92YWx1ZSI4ChhHZXRBY2NvdW50QXBpS2V5c1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQEiSwoZR2V0QWNjb3VudEFwaUtleXNSZXNwb25zZRIuCghhcGlfa2V5cxgBIAMoCzIcLm1nbXQudjFhbHBoYTEuQWNjb3VudEFwaUtleSIvChdHZXRBY2NvdW50QXBpS2V5UmVxdWVzdBIUCgJpZBgBIAEoCUIIukgFcgOwAQEiSQoYR2V0QWNjb3VudEFwaUtleVJlc3BvbnNlEi0KB2FwaV9rZXkYASABKAsyHC5tZ210LnYxYWxwaGExLkFjY291bnRBcGlLZXkiegoeUmVnZW5lcmF0ZUFjY291bnRBcGlLZXlSZXF1ZXN0EhQKAmlkGAEgASgJQgi6SAVyA7ABARJCCgpleHBpcmVzX2F0GAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEISukgPyAEBsgEJSgUIgOeED0ABIlAKH1JlZ2VuZXJhdGVBY2NvdW50QXBpS2V5UmVzcG9uc2USLQoHYXBpX2tleRgBIAEoCzIcLm1nbXQudjFhbHBoYTEuQWNjb3VudEFwaUtleSIyChpEZWxldGVBY2NvdW50QXBpS2V5UmVxdWVzdBIUCgJpZBgBIAEoCUIIukgFcgOwAQEiHQobRGVsZXRlQWNjb3VudEFwaUtleVJlc3BvbnNlMrwECg1BcGlLZXlTZXJ2aWNlEmgKEUdldEFjY291bnRBcGlLZXlzEicubWdtdC52MWFscGhhMS5HZXRBY2NvdW50QXBpS2V5c1JlcXVlc3QaKC5tZ210LnYxYWxwaGExLkdldEFjY291bnRBcGlLZXlzUmVzcG9uc2UiABJlChBHZXRBY2NvdW50QXBpS2V5EiYubWdtdC52MWFscGhhMS5HZXRBY2NvdW50QXBpS2V5UmVxdWVzdBonLm1nbXQudjFhbHBoYTEuR2V0QWNjb3VudEFwaUtleVJlc3BvbnNlIgASbgoTQ3JlYXRlQWNjb3VudEFwaUtleRIpLm1nbXQudjFhbHBoYTEuQ3JlYXRlQWNjb3VudEFwaUtleVJlcXVlc3QaKi5tZ210LnYxYWxwaGExLkNyZWF0ZUFjY291bnRBcGlLZXlSZXNwb25zZSIAEnoKF1JlZ2VuZXJhdGVBY2NvdW50QXBpS2V5Ei0ubWdtdC52MWFscGhhMS5SZWdlbmVyYXRlQWNjb3VudEFwaUtleVJlcXVlc3QaLi5tZ210LnYxYWxwaGExLlJlZ2VuZXJhdGVBY2NvdW50QXBpS2V5UmVzcG9uc2UiABJuChNEZWxldGVBY2NvdW50QXBpS2V5EikubWdtdC52MWFscGhhMS5EZWxldGVBY2NvdW50QXBpS2V5UmVxdWVzdBoqLm1nbXQudjFhbHBoYTEuRGVsZXRlQWNjb3VudEFwaUtleVJlc3BvbnNlIgBCxwEKEWNvbS5tZ210LnYxYWxwaGExQgtBcGlLZXlQcm90b1ABWlBnaXRodWIuY29tL251Y2xldXNjbG91ZC9uZW9zeW5jL2JhY2tlbmQvZ2VuL2dvL3Byb3Rvcy9tZ210L3YxYWxwaGExO21nbXR2MWFscGhhMaICA01YWKoCDU1nbXQuVjFhbHBoYTHKAg1NZ210XFYxYWxwaGEx4gIZTWdtdFxWMWFscGhhMVxHUEJNZXRhZGF0YeoCDk1nbXQ6OlYxYWxwaGExYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_timestamp]); /** * @generated from message mgmt.v1alpha1.CreateAccountApiKeyRequest */ -export class CreateAccountApiKeyRequest extends Message { +export type CreateAccountApiKeyRequest = Message<"mgmt.v1alpha1.CreateAccountApiKeyRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * @generated from field: string name = 2; */ - name = ""; + name: string; /** * Validate between now and one year: now < x < 365 days @@ -26,99 +35,57 @@ export class CreateAccountApiKeyRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateAccountApiKeyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "expires_at", kind: "message", T: Timestamp }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAccountApiKeyRequest { - return new CreateAccountApiKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAccountApiKeyRequest { - return new CreateAccountApiKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateAccountApiKeyRequest { - return new CreateAccountApiKeyRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateAccountApiKeyRequest | PlainMessage | undefined, b: CreateAccountApiKeyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateAccountApiKeyRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateAccountApiKeyRequest. + * Use `create(CreateAccountApiKeyRequestSchema)` to create a new message. + */ +export const CreateAccountApiKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 0); /** * @generated from message mgmt.v1alpha1.CreateAccountApiKeyResponse */ -export class CreateAccountApiKeyResponse extends Message { +export type CreateAccountApiKeyResponse = Message<"mgmt.v1alpha1.CreateAccountApiKeyResponse"> & { /** * @generated from field: mgmt.v1alpha1.AccountApiKey api_key = 1; */ apiKey?: AccountApiKey; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateAccountApiKeyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_key", kind: "message", T: AccountApiKey }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAccountApiKeyResponse { - return new CreateAccountApiKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAccountApiKeyResponse { - return new CreateAccountApiKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateAccountApiKeyResponse { - return new CreateAccountApiKeyResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateAccountApiKeyResponse | PlainMessage | undefined, b: CreateAccountApiKeyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateAccountApiKeyResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateAccountApiKeyResponse. + * Use `create(CreateAccountApiKeyResponseSchema)` to create a new message. + */ +export const CreateAccountApiKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 1); /** * @generated from message mgmt.v1alpha1.AccountApiKey */ -export class AccountApiKey extends Message { +export type AccountApiKey = Message<"mgmt.v1alpha1.AccountApiKey"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; /** * The friendly name of the API Key * * @generated from field: string name = 2; */ - name = ""; + name: string; /** * @generated from field: string account_id = 3; */ - accountId = ""; + accountId: string; /** * @generated from field: string created_by_id = 4; */ - createdById = ""; + createdById: string; /** * @generated from field: google.protobuf.Timestamp created_at = 5; @@ -128,7 +95,7 @@ export class AccountApiKey extends Message { /** * @generated from field: string updated_by_id = 6; */ - updatedById = ""; + updatedById: string; /** * @generated from field: google.protobuf.Timestamp updated_at = 7; @@ -145,7 +112,7 @@ export class AccountApiKey extends Message { /** * @generated from field: string user_id = 9; */ - userId = ""; + userId: string; /** * The timestamp of what the API key expires and will not longer be usable. @@ -153,200 +120,91 @@ export class AccountApiKey extends Message { * @generated from field: google.protobuf.Timestamp expires_at = 10; */ expiresAt?: Timestamp; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AccountApiKey"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "created_by_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "created_at", kind: "message", T: Timestamp }, - { no: 6, name: "updated_by_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "updated_at", kind: "message", T: Timestamp }, - { no: 8, name: "key_value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 9, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 10, name: "expires_at", kind: "message", T: Timestamp }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AccountApiKey { - return new AccountApiKey().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AccountApiKey { - return new AccountApiKey().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AccountApiKey { - return new AccountApiKey().fromJsonString(jsonString, options); - } - - static equals(a: AccountApiKey | PlainMessage | undefined, b: AccountApiKey | PlainMessage | undefined): boolean { - return proto3.util.equals(AccountApiKey, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AccountApiKey. + * Use `create(AccountApiKeySchema)` to create a new message. + */ +export const AccountApiKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 2); /** * @generated from message mgmt.v1alpha1.GetAccountApiKeysRequest */ -export class GetAccountApiKeysRequest extends Message { +export type GetAccountApiKeysRequest = Message<"mgmt.v1alpha1.GetAccountApiKeysRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountApiKeysRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountApiKeysRequest { - return new GetAccountApiKeysRequest().fromBinary(bytes, options); - } + accountId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountApiKeysRequest { - return new GetAccountApiKeysRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountApiKeysRequest { - return new GetAccountApiKeysRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountApiKeysRequest | PlainMessage | undefined, b: GetAccountApiKeysRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountApiKeysRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountApiKeysRequest. + * Use `create(GetAccountApiKeysRequestSchema)` to create a new message. + */ +export const GetAccountApiKeysRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 3); /** * @generated from message mgmt.v1alpha1.GetAccountApiKeysResponse */ -export class GetAccountApiKeysResponse extends Message { +export type GetAccountApiKeysResponse = Message<"mgmt.v1alpha1.GetAccountApiKeysResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.AccountApiKey api_keys = 1; */ - apiKeys: AccountApiKey[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountApiKeysResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_keys", kind: "message", T: AccountApiKey, repeated: true }, - ]); + apiKeys: AccountApiKey[]; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountApiKeysResponse { - return new GetAccountApiKeysResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountApiKeysResponse { - return new GetAccountApiKeysResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountApiKeysResponse { - return new GetAccountApiKeysResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountApiKeysResponse | PlainMessage | undefined, b: GetAccountApiKeysResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountApiKeysResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountApiKeysResponse. + * Use `create(GetAccountApiKeysResponseSchema)` to create a new message. + */ +export const GetAccountApiKeysResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 4); /** * @generated from message mgmt.v1alpha1.GetAccountApiKeyRequest */ -export class GetAccountApiKeyRequest extends Message { +export type GetAccountApiKeyRequest = Message<"mgmt.v1alpha1.GetAccountApiKeyRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountApiKeyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountApiKeyRequest { - return new GetAccountApiKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountApiKeyRequest { - return new GetAccountApiKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountApiKeyRequest { - return new GetAccountApiKeyRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountApiKeyRequest | PlainMessage | undefined, b: GetAccountApiKeyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountApiKeyRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountApiKeyRequest. + * Use `create(GetAccountApiKeyRequestSchema)` to create a new message. + */ +export const GetAccountApiKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 5); /** * @generated from message mgmt.v1alpha1.GetAccountApiKeyResponse */ -export class GetAccountApiKeyResponse extends Message { +export type GetAccountApiKeyResponse = Message<"mgmt.v1alpha1.GetAccountApiKeyResponse"> & { /** * @generated from field: mgmt.v1alpha1.AccountApiKey api_key = 1; */ apiKey?: AccountApiKey; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountApiKeyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_key", kind: "message", T: AccountApiKey }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountApiKeyResponse { - return new GetAccountApiKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountApiKeyResponse { - return new GetAccountApiKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountApiKeyResponse { - return new GetAccountApiKeyResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountApiKeyResponse | PlainMessage | undefined, b: GetAccountApiKeyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountApiKeyResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountApiKeyResponse. + * Use `create(GetAccountApiKeyResponseSchema)` to create a new message. + */ +export const GetAccountApiKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 6); /** * @generated from message mgmt.v1alpha1.RegenerateAccountApiKeyRequest */ -export class RegenerateAccountApiKeyRequest extends Message { +export type RegenerateAccountApiKeyRequest = Message<"mgmt.v1alpha1.RegenerateAccountApiKeyRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; /** * Validate between now and one year: now < x < 365 days @@ -354,138 +212,120 @@ export class RegenerateAccountApiKeyRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.RegenerateAccountApiKeyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "expires_at", kind: "message", T: Timestamp }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RegenerateAccountApiKeyRequest { - return new RegenerateAccountApiKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RegenerateAccountApiKeyRequest { - return new RegenerateAccountApiKeyRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RegenerateAccountApiKeyRequest { - return new RegenerateAccountApiKeyRequest().fromJsonString(jsonString, options); - } - - static equals(a: RegenerateAccountApiKeyRequest | PlainMessage | undefined, b: RegenerateAccountApiKeyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(RegenerateAccountApiKeyRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.RegenerateAccountApiKeyRequest. + * Use `create(RegenerateAccountApiKeyRequestSchema)` to create a new message. + */ +export const RegenerateAccountApiKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 7); /** * @generated from message mgmt.v1alpha1.RegenerateAccountApiKeyResponse */ -export class RegenerateAccountApiKeyResponse extends Message { +export type RegenerateAccountApiKeyResponse = Message<"mgmt.v1alpha1.RegenerateAccountApiKeyResponse"> & { /** * @generated from field: mgmt.v1alpha1.AccountApiKey api_key = 1; */ apiKey?: AccountApiKey; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.RegenerateAccountApiKeyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_key", kind: "message", T: AccountApiKey }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RegenerateAccountApiKeyResponse { - return new RegenerateAccountApiKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RegenerateAccountApiKeyResponse { - return new RegenerateAccountApiKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RegenerateAccountApiKeyResponse { - return new RegenerateAccountApiKeyResponse().fromJsonString(jsonString, options); - } - - static equals(a: RegenerateAccountApiKeyResponse | PlainMessage | undefined, b: RegenerateAccountApiKeyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(RegenerateAccountApiKeyResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.RegenerateAccountApiKeyResponse. + * Use `create(RegenerateAccountApiKeyResponseSchema)` to create a new message. + */ +export const RegenerateAccountApiKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 8); /** * @generated from message mgmt.v1alpha1.DeleteAccountApiKeyRequest */ -export class DeleteAccountApiKeyRequest extends Message { +export type DeleteAccountApiKeyRequest = Message<"mgmt.v1alpha1.DeleteAccountApiKeyRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteAccountApiKeyRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteAccountApiKeyRequest { - return new DeleteAccountApiKeyRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteAccountApiKeyRequest { - return new DeleteAccountApiKeyRequest().fromJson(jsonValue, options); - } +/** + * Describes the message mgmt.v1alpha1.DeleteAccountApiKeyRequest. + * Use `create(DeleteAccountApiKeyRequestSchema)` to create a new message. + */ +export const DeleteAccountApiKeyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 9); - static fromJsonString(jsonString: string, options?: Partial): DeleteAccountApiKeyRequest { - return new DeleteAccountApiKeyRequest().fromJsonString(jsonString, options); - } +/** + * @generated from message mgmt.v1alpha1.DeleteAccountApiKeyResponse + */ +export type DeleteAccountApiKeyResponse = Message<"mgmt.v1alpha1.DeleteAccountApiKeyResponse"> & { +}; - static equals(a: DeleteAccountApiKeyRequest | PlainMessage | undefined, b: DeleteAccountApiKeyRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteAccountApiKeyRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteAccountApiKeyResponse. + * Use `create(DeleteAccountApiKeyResponseSchema)` to create a new message. + */ +export const DeleteAccountApiKeyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_api_key, 10); /** - * @generated from message mgmt.v1alpha1.DeleteAccountApiKeyResponse + * Service that manages the lifecycle of API Keys that are associated with a specific Account. + * + * @generated from service mgmt.v1alpha1.ApiKeyService */ -export class DeleteAccountApiKeyResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteAccountApiKeyResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteAccountApiKeyResponse { - return new DeleteAccountApiKeyResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteAccountApiKeyResponse { - return new DeleteAccountApiKeyResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteAccountApiKeyResponse { - return new DeleteAccountApiKeyResponse().fromJsonString(jsonString, options); - } - - static equals(a: DeleteAccountApiKeyResponse | PlainMessage | undefined, b: DeleteAccountApiKeyResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteAccountApiKeyResponse, a, b); - } -} +export const ApiKeyService: GenService<{ + /** + * Retrieves a list of Account API Keys + * + * @generated from rpc mgmt.v1alpha1.ApiKeyService.GetAccountApiKeys + */ + getAccountApiKeys: { + methodKind: "unary"; + input: typeof GetAccountApiKeysRequestSchema; + output: typeof GetAccountApiKeysResponseSchema; + }, + /** + * Retrieves a single API Key + * + * @generated from rpc mgmt.v1alpha1.ApiKeyService.GetAccountApiKey + */ + getAccountApiKey: { + methodKind: "unary"; + input: typeof GetAccountApiKeyRequestSchema; + output: typeof GetAccountApiKeyResponseSchema; + }, + /** + * Creates a single API Key + * This method will return the decrypted contents of the API key + * + * @generated from rpc mgmt.v1alpha1.ApiKeyService.CreateAccountApiKey + */ + createAccountApiKey: { + methodKind: "unary"; + input: typeof CreateAccountApiKeyRequestSchema; + output: typeof CreateAccountApiKeyResponseSchema; + }, + /** + * Regenerates a single API Key with a new expiration time + * This method will return the decrypted contents of the API key + * + * @generated from rpc mgmt.v1alpha1.ApiKeyService.RegenerateAccountApiKey + */ + regenerateAccountApiKey: { + methodKind: "unary"; + input: typeof RegenerateAccountApiKeyRequestSchema; + output: typeof RegenerateAccountApiKeyResponseSchema; + }, + /** + * Deletes an API Key from the system. + * + * @generated from rpc mgmt.v1alpha1.ApiKeyService.DeleteAccountApiKey + */ + deleteAccountApiKey: { + methodKind: "unary"; + input: typeof DeleteAccountApiKeyRequestSchema; + output: typeof DeleteAccountApiKeyResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_mgmt_v1alpha1_api_key, 0); diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/auth-AuthService_connectquery.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/auth-AuthService_connectquery.ts deleted file mode 100644 index 2e71c024ab..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/auth-AuthService_connectquery.ts +++ /dev/null @@ -1,106 +0,0 @@ -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/auth.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { MethodKind } from "@bufbuild/protobuf"; -import { CheckTokenRequest, CheckTokenResponse, GetAuthorizeUrlRequest, GetAuthorizeUrlResponse, GetAuthStatusRequest, GetAuthStatusResponse, GetCliIssuerRequest, GetCliIssuerResponse, LoginCliRequest, LoginCliResponse, RefreshCliRequest, RefreshCliResponse } from "./auth_pb.js"; - -/** - * Used by the CLI to login to Neosync with OAuth. - * - * @generated from rpc mgmt.v1alpha1.AuthService.LoginCli - */ -export const loginCli = { - localName: "loginCli", - name: "LoginCli", - kind: MethodKind.Unary, - I: LoginCliRequest, - O: LoginCliResponse, - service: { - typeName: "mgmt.v1alpha1.AuthService" - } -} as const; - -/** - * Used by the CLI to refresh an expired Neosync accesss token. - * This should only be used if an access token was previously retrieved from the `LoginCli` or `RefreshCli` methods. - * - * @generated from rpc mgmt.v1alpha1.AuthService.RefreshCli - */ -export const refreshCli = { - localName: "refreshCli", - name: "RefreshCli", - kind: MethodKind.Unary, - I: RefreshCliRequest, - O: RefreshCliResponse, - service: { - typeName: "mgmt.v1alpha1.AuthService" - } -} as const; - -/** - * Empty endpoint to simply check if the provided access token is valid - * - * @generated from rpc mgmt.v1alpha1.AuthService.CheckToken - */ -export const checkToken = { - localName: "checkToken", - name: "CheckToken", - kind: MethodKind.Unary, - I: CheckTokenRequest, - O: CheckTokenResponse, - service: { - typeName: "mgmt.v1alpha1.AuthService" - } -} as const; - -/** - * Used by the CLI to retrieve Auth Issuer information - * @deprecated - * - * @generated from rpc mgmt.v1alpha1.AuthService.GetCliIssuer - */ -export const getCliIssuer = { - localName: "getCliIssuer", - name: "GetCliIssuer", - kind: MethodKind.Unary, - I: GetCliIssuerRequest, - O: GetCliIssuerResponse, - service: { - typeName: "mgmt.v1alpha1.AuthService" - } -} as const; - -/** - * Used by the CLI to retrieve an Authorize URL for use with OAuth login. - * - * @generated from rpc mgmt.v1alpha1.AuthService.GetAuthorizeUrl - */ -export const getAuthorizeUrl = { - localName: "getAuthorizeUrl", - name: "GetAuthorizeUrl", - kind: MethodKind.Unary, - I: GetAuthorizeUrlRequest, - O: GetAuthorizeUrlResponse, - service: { - typeName: "mgmt.v1alpha1.AuthService" - } -} as const; - -/** - * Returns the auth status of the API server. Whether or not the backend has authentication enabled. - * This is used by clients to make decisions on whether or not they should send access tokens to the API. - * - * @generated from rpc mgmt.v1alpha1.AuthService.GetAuthStatus - */ -export const getAuthStatus = { - localName: "getAuthStatus", - name: "GetAuthStatus", - kind: MethodKind.Unary, - I: GetAuthStatusRequest, - O: GetAuthStatusResponse, - service: { - typeName: "mgmt.v1alpha1.AuthService" - } -} as const; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/auth_connect.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/auth_connect.ts deleted file mode 100644 index 6c53f15625..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/auth_connect.ts +++ /dev/null @@ -1,89 +0,0 @@ -// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/auth.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CheckTokenRequest, CheckTokenResponse, GetAuthorizeUrlRequest, GetAuthorizeUrlResponse, GetAuthStatusRequest, GetAuthStatusResponse, GetCliIssuerRequest, GetCliIssuerResponse, LoginCliRequest, LoginCliResponse, RefreshCliRequest, RefreshCliResponse } from "./auth_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * Service that handles generic Authentication for Neosync - * Today this is mostly used by the CLI to receive authentication information - * - * @generated from service mgmt.v1alpha1.AuthService - */ -export const AuthService = { - typeName: "mgmt.v1alpha1.AuthService", - methods: { - /** - * Used by the CLI to login to Neosync with OAuth. - * - * @generated from rpc mgmt.v1alpha1.AuthService.LoginCli - */ - loginCli: { - name: "LoginCli", - I: LoginCliRequest, - O: LoginCliResponse, - kind: MethodKind.Unary, - }, - /** - * Used by the CLI to refresh an expired Neosync accesss token. - * This should only be used if an access token was previously retrieved from the `LoginCli` or `RefreshCli` methods. - * - * @generated from rpc mgmt.v1alpha1.AuthService.RefreshCli - */ - refreshCli: { - name: "RefreshCli", - I: RefreshCliRequest, - O: RefreshCliResponse, - kind: MethodKind.Unary, - }, - /** - * Empty endpoint to simply check if the provided access token is valid - * - * @generated from rpc mgmt.v1alpha1.AuthService.CheckToken - */ - checkToken: { - name: "CheckToken", - I: CheckTokenRequest, - O: CheckTokenResponse, - kind: MethodKind.Unary, - }, - /** - * Used by the CLI to retrieve Auth Issuer information - * @deprecated - * - * @generated from rpc mgmt.v1alpha1.AuthService.GetCliIssuer - */ - getCliIssuer: { - name: "GetCliIssuer", - I: GetCliIssuerRequest, - O: GetCliIssuerResponse, - kind: MethodKind.Unary, - }, - /** - * Used by the CLI to retrieve an Authorize URL for use with OAuth login. - * - * @generated from rpc mgmt.v1alpha1.AuthService.GetAuthorizeUrl - */ - getAuthorizeUrl: { - name: "GetAuthorizeUrl", - I: GetAuthorizeUrlRequest, - O: GetAuthorizeUrlResponse, - kind: MethodKind.Unary, - }, - /** - * Returns the auth status of the API server. Whether or not the backend has authentication enabled. - * This is used by clients to make decisions on whether or not they should send access tokens to the API. - * - * @generated from rpc mgmt.v1alpha1.AuthService.GetAuthStatus - */ - getAuthStatus: { - name: "GetAuthStatus", - I: GetAuthStatusRequest, - O: GetAuthStatusResponse, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/auth_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/auth_pb.ts index fea532fed7..c113372d94 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/auth_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/auth_pb.ts @@ -1,180 +1,108 @@ -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js" +// @generated by protoc-gen-es v2.2.3 with parameter "target=ts,import_extension=.js" // @generated from file mgmt/v1alpha1/auth.proto (package mgmt.v1alpha1, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file mgmt/v1alpha1/auth.proto. + */ +export const file_mgmt_v1alpha1_auth: GenFile = /*@__PURE__*/ + fileDesc("ChhtZ210L3YxYWxwaGExL2F1dGgucHJvdG8SDW1nbXQudjFhbHBoYTEiRwoPTG9naW5DbGlSZXF1ZXN0EhUKBGNvZGUYASABKAlCB7pIBHICEAESHQoMcmVkaXJlY3RfdXJpGAIgASgJQge6SARyAhABIkQKEExvZ2luQ2xpUmVzcG9uc2USMAoMYWNjZXNzX3Rva2VuGAEgASgLMhoubWdtdC52MWFscGhhMS5BY2Nlc3NUb2tlbiIWChRHZXRBdXRoU3RhdHVzUmVxdWVzdCIrChVHZXRBdXRoU3RhdHVzUmVzcG9uc2USEgoKaXNfZW5hYmxlZBgBIAEoCCKsAQoLQWNjZXNzVG9rZW4SFAoMYWNjZXNzX3Rva2VuGAEgASgJEhoKDXJlZnJlc2hfdG9rZW4YAiABKAlIAIgBARISCgpleHBpcmVzX2luGAMgASgDEg0KBXNjb3BlGAQgASgJEhUKCGlkX3Rva2VuGAUgASgJSAGIAQESEgoKdG9rZW5fdHlwZRgGIAEoCUIQCg5fcmVmcmVzaF90b2tlbkILCglfaWRfdG9rZW4iZwoWR2V0QXV0aG9yaXplVXJsUmVxdWVzdBIWCgVzdGF0ZRgBIAEoCUIHukgEcgIQARIdCgxyZWRpcmVjdF91cmkYAiABKAlCB7pIBHICEAESFgoFc2NvcGUYAyABKAlCB7pIBHICEAEiJgoXR2V0QXV0aG9yaXplVXJsUmVzcG9uc2USCwoDdXJsGAEgASgJIjMKEVJlZnJlc2hDbGlSZXF1ZXN0Eh4KDXJlZnJlc2hfdG9rZW4YASABKAlCB7pIBHICEAEiRgoSUmVmcmVzaENsaVJlc3BvbnNlEjAKDGFjY2Vzc190b2tlbhgBIAEoCzIaLm1nbXQudjFhbHBoYTEuQWNjZXNzVG9rZW4iEwoRQ2hlY2tUb2tlblJlcXVlc3QiFAoSQ2hlY2tUb2tlblJlc3BvbnNlMsgDCgtBdXRoU2VydmljZRJNCghMb2dpbkNsaRIeLm1nbXQudjFhbHBoYTEuTG9naW5DbGlSZXF1ZXN0Gh8ubWdtdC52MWFscGhhMS5Mb2dpbkNsaVJlc3BvbnNlIgASUwoKUmVmcmVzaENsaRIgLm1nbXQudjFhbHBoYTEuUmVmcmVzaENsaVJlcXVlc3QaIS5tZ210LnYxYWxwaGExLlJlZnJlc2hDbGlSZXNwb25zZSIAElMKCkNoZWNrVG9rZW4SIC5tZ210LnYxYWxwaGExLkNoZWNrVG9rZW5SZXF1ZXN0GiEubWdtdC52MWFscGhhMS5DaGVja1Rva2VuUmVzcG9uc2UiABJiCg9HZXRBdXRob3JpemVVcmwSJS5tZ210LnYxYWxwaGExLkdldEF1dGhvcml6ZVVybFJlcXVlc3QaJi5tZ210LnYxYWxwaGExLkdldEF1dGhvcml6ZVVybFJlc3BvbnNlIgASXAoNR2V0QXV0aFN0YXR1cxIjLm1nbXQudjFhbHBoYTEuR2V0QXV0aFN0YXR1c1JlcXVlc3QaJC5tZ210LnYxYWxwaGExLkdldEF1dGhTdGF0dXNSZXNwb25zZSIAQsUBChFjb20ubWdtdC52MWFscGhhMUIJQXV0aFByb3RvUAFaUGdpdGh1Yi5jb20vbnVjbGV1c2Nsb3VkL25lb3N5bmMvYmFja2VuZC9nZW4vZ28vcHJvdG9zL21nbXQvdjFhbHBoYTE7bWdtdHYxYWxwaGExogIDTVhYqgINTWdtdC5WMWFscGhhMcoCDU1nbXRcVjFhbHBoYTHiAhlNZ210XFYxYWxwaGExXEdQQk1ldGFkYXRh6gIOTWdtdDo6VjFhbHBoYTFiBnByb3RvMw", [file_buf_validate_validate]); /** * @generated from message mgmt.v1alpha1.LoginCliRequest */ -export class LoginCliRequest extends Message { +export type LoginCliRequest = Message<"mgmt.v1alpha1.LoginCliRequest"> & { /** * The oauth code * * @generated from field: string code = 1; */ - code = ""; + code: string; /** * The oauth redirect uri that the client uses during the oauth request * * @generated from field: string redirect_uri = 2; */ - redirectUri = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.LoginCliRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "redirect_uri", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LoginCliRequest { - return new LoginCliRequest().fromBinary(bytes, options); - } + redirectUri: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): LoginCliRequest { - return new LoginCliRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LoginCliRequest { - return new LoginCliRequest().fromJsonString(jsonString, options); - } - - static equals(a: LoginCliRequest | PlainMessage | undefined, b: LoginCliRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(LoginCliRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.LoginCliRequest. + * Use `create(LoginCliRequestSchema)` to create a new message. + */ +export const LoginCliRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 0); /** * @generated from message mgmt.v1alpha1.LoginCliResponse */ -export class LoginCliResponse extends Message { +export type LoginCliResponse = Message<"mgmt.v1alpha1.LoginCliResponse"> & { /** * The access token that is returned on successful login * * @generated from field: mgmt.v1alpha1.AccessToken access_token = 1; */ accessToken?: AccessToken; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.LoginCliResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "access_token", kind: "message", T: AccessToken }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LoginCliResponse { - return new LoginCliResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): LoginCliResponse { - return new LoginCliResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LoginCliResponse { - return new LoginCliResponse().fromJsonString(jsonString, options); - } - - static equals(a: LoginCliResponse | PlainMessage | undefined, b: LoginCliResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(LoginCliResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.LoginCliResponse. + * Use `create(LoginCliResponseSchema)` to create a new message. + */ +export const LoginCliResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 1); /** * @generated from message mgmt.v1alpha1.GetAuthStatusRequest */ -export class GetAuthStatusRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAuthStatusRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAuthStatusRequest { - return new GetAuthStatusRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAuthStatusRequest { - return new GetAuthStatusRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAuthStatusRequest { - return new GetAuthStatusRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetAuthStatusRequest | PlainMessage | undefined, b: GetAuthStatusRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAuthStatusRequest, a, b); - } -} +export type GetAuthStatusRequest = Message<"mgmt.v1alpha1.GetAuthStatusRequest"> & { +}; + +/** + * Describes the message mgmt.v1alpha1.GetAuthStatusRequest. + * Use `create(GetAuthStatusRequestSchema)` to create a new message. + */ +export const GetAuthStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 2); /** * @generated from message mgmt.v1alpha1.GetAuthStatusResponse */ -export class GetAuthStatusResponse extends Message { +export type GetAuthStatusResponse = Message<"mgmt.v1alpha1.GetAuthStatusResponse"> & { /** * Whether or not the server has authentication enabled. * This tells the client if it is expected to send access tokens. * * @generated from field: bool is_enabled = 1; */ - isEnabled = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAuthStatusResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "is_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAuthStatusResponse { - return new GetAuthStatusResponse().fromBinary(bytes, options); - } + isEnabled: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetAuthStatusResponse { - return new GetAuthStatusResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAuthStatusResponse { - return new GetAuthStatusResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetAuthStatusResponse | PlainMessage | undefined, b: GetAuthStatusResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAuthStatusResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAuthStatusResponse. + * Use `create(GetAuthStatusResponseSchema)` to create a new message. + */ +export const GetAuthStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 3); /** * A decoded representation of an Access token from the backing auth server * * @generated from message mgmt.v1alpha1.AccessToken */ -export class AccessToken extends Message { +export type AccessToken = Message<"mgmt.v1alpha1.AccessToken"> & { /** * The access token that will be provided in subsequent requests to provide authenticated access to the Api * * @generated from field: string access_token = 1; */ - accessToken = ""; + accessToken: string; /** * Token that can be used to retrieve a refreshed access token. @@ -189,14 +117,14 @@ export class AccessToken extends Message { * * @generated from field: int64 expires_in = 3; */ - expiresIn = protoInt64.zero; + expiresIn: bigint; /** * The scopes that the access token have * * @generated from field: string scope = 4; */ - scope = ""; + scope: string; /** * The identity token of the authenticated user @@ -210,350 +138,191 @@ export class AccessToken extends Message { * * @generated from field: string token_type = 6; */ - tokenType = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AccessToken"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "access_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "refresh_token", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "expires_in", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 4, name: "scope", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "id_token", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "token_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AccessToken { - return new AccessToken().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AccessToken { - return new AccessToken().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AccessToken { - return new AccessToken().fromJsonString(jsonString, options); - } - - static equals(a: AccessToken | PlainMessage | undefined, b: AccessToken | PlainMessage | undefined): boolean { - return proto3.util.equals(AccessToken, a, b); - } -} + tokenType: string; +}; + +/** + * Describes the message mgmt.v1alpha1.AccessToken. + * Use `create(AccessTokenSchema)` to create a new message. + */ +export const AccessTokenSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 4); /** * @generated from message mgmt.v1alpha1.GetAuthorizeUrlRequest */ -export class GetAuthorizeUrlRequest extends Message { +export type GetAuthorizeUrlRequest = Message<"mgmt.v1alpha1.GetAuthorizeUrlRequest"> & { /** * The state that's generated by the client that is passed along to prevent tampering * * @generated from field: string state = 1; */ - state = ""; + state: string; /** * The redirect uri that the client will be redirected back to during the auth request * * @generated from field: string redirect_uri = 2; */ - redirectUri = ""; + redirectUri: string; /** * The scopes the client is requesting as a part of the oauth login request * * @generated from field: string scope = 3; */ - scope = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAuthorizeUrlRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "redirect_uri", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "scope", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAuthorizeUrlRequest { - return new GetAuthorizeUrlRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAuthorizeUrlRequest { - return new GetAuthorizeUrlRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAuthorizeUrlRequest { - return new GetAuthorizeUrlRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetAuthorizeUrlRequest | PlainMessage | undefined, b: GetAuthorizeUrlRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAuthorizeUrlRequest, a, b); - } -} + scope: string; +}; + +/** + * Describes the message mgmt.v1alpha1.GetAuthorizeUrlRequest. + * Use `create(GetAuthorizeUrlRequestSchema)` to create a new message. + */ +export const GetAuthorizeUrlRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 5); /** * @generated from message mgmt.v1alpha1.GetAuthorizeUrlResponse */ -export class GetAuthorizeUrlResponse extends Message { +export type GetAuthorizeUrlResponse = Message<"mgmt.v1alpha1.GetAuthorizeUrlResponse"> & { /** * The generated url that is the client will be redirected to during the Oauth flow * * @generated from field: string url = 1; */ - url = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAuthorizeUrlResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAuthorizeUrlResponse { - return new GetAuthorizeUrlResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAuthorizeUrlResponse { - return new GetAuthorizeUrlResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAuthorizeUrlResponse { - return new GetAuthorizeUrlResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetAuthorizeUrlResponse | PlainMessage | undefined, b: GetAuthorizeUrlResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAuthorizeUrlResponse, a, b); - } -} + url: string; +}; /** - * @generated from message mgmt.v1alpha1.GetCliIssuerRequest + * Describes the message mgmt.v1alpha1.GetAuthorizeUrlResponse. + * Use `create(GetAuthorizeUrlResponseSchema)` to create a new message. */ -export class GetCliIssuerRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetCliIssuerRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetCliIssuerRequest { - return new GetCliIssuerRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetCliIssuerRequest { - return new GetCliIssuerRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetCliIssuerRequest { - return new GetCliIssuerRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetCliIssuerRequest | PlainMessage | undefined, b: GetCliIssuerRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetCliIssuerRequest, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.GetCliIssuerResponse - */ -export class GetCliIssuerResponse extends Message { - /** - * The backing authentication issuer url - * - * @generated from field: string issuer_url = 1; - */ - issuerUrl = ""; - - /** - * The audience that will be used in the access token. This corresponds to the "aud" claim - * - * @generated from field: string audience = 2; - */ - audience = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetCliIssuerResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "issuer_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "audience", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetCliIssuerResponse { - return new GetCliIssuerResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetCliIssuerResponse { - return new GetCliIssuerResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetCliIssuerResponse { - return new GetCliIssuerResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetCliIssuerResponse | PlainMessage | undefined, b: GetCliIssuerResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetCliIssuerResponse, a, b); - } -} +export const GetAuthorizeUrlResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 6); /** * @generated from message mgmt.v1alpha1.RefreshCliRequest */ -export class RefreshCliRequest extends Message { +export type RefreshCliRequest = Message<"mgmt.v1alpha1.RefreshCliRequest"> & { /** * The token used to retrieve a new access token. * * @generated from field: string refresh_token = 1; */ - refreshToken = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.RefreshCliRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "refresh_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RefreshCliRequest { - return new RefreshCliRequest().fromBinary(bytes, options); - } + refreshToken: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): RefreshCliRequest { - return new RefreshCliRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RefreshCliRequest { - return new RefreshCliRequest().fromJsonString(jsonString, options); - } - - static equals(a: RefreshCliRequest | PlainMessage | undefined, b: RefreshCliRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(RefreshCliRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.RefreshCliRequest. + * Use `create(RefreshCliRequestSchema)` to create a new message. + */ +export const RefreshCliRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 7); /** * @generated from message mgmt.v1alpha1.RefreshCliResponse */ -export class RefreshCliResponse extends Message { +export type RefreshCliResponse = Message<"mgmt.v1alpha1.RefreshCliResponse"> & { /** * The access token that is returned on successful refresh * * @generated from field: mgmt.v1alpha1.AccessToken access_token = 1; */ accessToken?: AccessToken; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.RefreshCliResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "access_token", kind: "message", T: AccessToken }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RefreshCliResponse { - return new RefreshCliResponse().fromBinary(bytes, options); - } +/** + * Describes the message mgmt.v1alpha1.RefreshCliResponse. + * Use `create(RefreshCliResponseSchema)` to create a new message. + */ +export const RefreshCliResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 8); - static fromJson(jsonValue: JsonValue, options?: Partial): RefreshCliResponse { - return new RefreshCliResponse().fromJson(jsonValue, options); - } +/** + * @generated from message mgmt.v1alpha1.CheckTokenRequest + */ +export type CheckTokenRequest = Message<"mgmt.v1alpha1.CheckTokenRequest"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): RefreshCliResponse { - return new RefreshCliResponse().fromJsonString(jsonString, options); - } +/** + * Describes the message mgmt.v1alpha1.CheckTokenRequest. + * Use `create(CheckTokenRequestSchema)` to create a new message. + */ +export const CheckTokenRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 9); - static equals(a: RefreshCliResponse | PlainMessage | undefined, b: RefreshCliResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(RefreshCliResponse, a, b); - } -} +/** + * @generated from message mgmt.v1alpha1.CheckTokenResponse + */ +export type CheckTokenResponse = Message<"mgmt.v1alpha1.CheckTokenResponse"> & { +}; /** - * @generated from message mgmt.v1alpha1.CheckTokenRequest + * Describes the message mgmt.v1alpha1.CheckTokenResponse. + * Use `create(CheckTokenResponseSchema)` to create a new message. */ -export class CheckTokenRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CheckTokenRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CheckTokenRequest { - return new CheckTokenRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CheckTokenRequest { - return new CheckTokenRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CheckTokenRequest { - return new CheckTokenRequest().fromJsonString(jsonString, options); - } - - static equals(a: CheckTokenRequest | PlainMessage | undefined, b: CheckTokenRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CheckTokenRequest, a, b); - } -} +export const CheckTokenResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_auth, 10); /** - * @generated from message mgmt.v1alpha1.CheckTokenResponse + * Service that handles generic Authentication for Neosync + * Today this is mostly used by the CLI to receive authentication information + * + * @generated from service mgmt.v1alpha1.AuthService */ -export class CheckTokenResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CheckTokenResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CheckTokenResponse { - return new CheckTokenResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CheckTokenResponse { - return new CheckTokenResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CheckTokenResponse { - return new CheckTokenResponse().fromJsonString(jsonString, options); - } - - static equals(a: CheckTokenResponse | PlainMessage | undefined, b: CheckTokenResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CheckTokenResponse, a, b); - } -} +export const AuthService: GenService<{ + /** + * Used by the CLI to login to Neosync with OAuth. + * + * @generated from rpc mgmt.v1alpha1.AuthService.LoginCli + */ + loginCli: { + methodKind: "unary"; + input: typeof LoginCliRequestSchema; + output: typeof LoginCliResponseSchema; + }, + /** + * Used by the CLI to refresh an expired Neosync accesss token. + * This should only be used if an access token was previously retrieved from the `LoginCli` or `RefreshCli` methods. + * + * @generated from rpc mgmt.v1alpha1.AuthService.RefreshCli + */ + refreshCli: { + methodKind: "unary"; + input: typeof RefreshCliRequestSchema; + output: typeof RefreshCliResponseSchema; + }, + /** + * Empty endpoint to simply check if the provided access token is valid + * + * @generated from rpc mgmt.v1alpha1.AuthService.CheckToken + */ + checkToken: { + methodKind: "unary"; + input: typeof CheckTokenRequestSchema; + output: typeof CheckTokenResponseSchema; + }, + /** + * Used by the CLI to retrieve an Authorize URL for use with OAuth login. + * + * @generated from rpc mgmt.v1alpha1.AuthService.GetAuthorizeUrl + */ + getAuthorizeUrl: { + methodKind: "unary"; + input: typeof GetAuthorizeUrlRequestSchema; + output: typeof GetAuthorizeUrlResponseSchema; + }, + /** + * Returns the auth status of the API server. Whether or not the backend has authentication enabled. + * This is used by clients to make decisions on whether or not they should send access tokens to the API. + * + * @generated from rpc mgmt.v1alpha1.AuthService.GetAuthStatus + */ + getAuthStatus: { + methodKind: "unary"; + input: typeof GetAuthStatusRequestSchema; + output: typeof GetAuthStatusResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_mgmt_v1alpha1_auth, 0); diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection-ConnectionService_connectquery.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection-ConnectionService_connectquery.ts deleted file mode 100644 index 5a2bfb969c..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection-ConnectionService_connectquery.ts +++ /dev/null @@ -1,154 +0,0 @@ -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/connection.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { MethodKind } from "@bufbuild/protobuf"; -import { CheckConnectionConfigByIdRequest, CheckConnectionConfigByIdResponse, CheckConnectionConfigRequest, CheckConnectionConfigResponse, CheckSqlQueryRequest, CheckSqlQueryResponse, CreateConnectionRequest, CreateConnectionResponse, DeleteConnectionRequest, DeleteConnectionResponse, GetConnectionRequest, GetConnectionResponse, GetConnectionsRequest, GetConnectionsResponse, IsConnectionNameAvailableRequest, IsConnectionNameAvailableResponse, UpdateConnectionRequest, UpdateConnectionResponse } from "./connection_pb.js"; - -/** - * Returns a list of connections associated with the account - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.GetConnections - */ -export const getConnections = { - localName: "getConnections", - name: "GetConnections", - kind: MethodKind.Unary, - I: GetConnectionsRequest, - O: GetConnectionsResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionService" - } -} as const; - -/** - * Returns a single connection - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.GetConnection - */ -export const getConnection = { - localName: "getConnection", - name: "GetConnection", - kind: MethodKind.Unary, - I: GetConnectionRequest, - O: GetConnectionResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionService" - } -} as const; - -/** - * Creates a new connection - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.CreateConnection - */ -export const createConnection = { - localName: "createConnection", - name: "CreateConnection", - kind: MethodKind.Unary, - I: CreateConnectionRequest, - O: CreateConnectionResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionService" - } -} as const; - -/** - * Updates an existing connection - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.UpdateConnection - */ -export const updateConnection = { - localName: "updateConnection", - name: "UpdateConnection", - kind: MethodKind.Unary, - I: UpdateConnectionRequest, - O: UpdateConnectionResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionService" - } -} as const; - -/** - * Removes a connection from the system. - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.DeleteConnection - */ -export const deleteConnection = { - localName: "deleteConnection", - name: "DeleteConnection", - kind: MethodKind.Unary, - I: DeleteConnectionRequest, - O: DeleteConnectionResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionService" - } -} as const; - -/** - * Connections have friendly names, this method checks if the requested name is available in the system based on the account - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.IsConnectionNameAvailable - */ -export const isConnectionNameAvailable = { - localName: "isConnectionNameAvailable", - name: "IsConnectionNameAvailable", - kind: MethodKind.Unary, - I: IsConnectionNameAvailableRequest, - O: IsConnectionNameAvailableResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionService" - } -} as const; - -/** - * Checks if the connection config is connectable by the backend. - * Used mostly to verify that a connection is valid prior to creating a Connection object. - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.CheckConnectionConfig - */ -export const checkConnectionConfig = { - localName: "checkConnectionConfig", - name: "CheckConnectionConfig", - kind: MethodKind.Unary, - I: CheckConnectionConfigRequest, - O: CheckConnectionConfigResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionService" - } -} as const; - -/** - * Checks if the connection id is connectable by the backend. - * Used to verify that a connection is still connectable. - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.CheckConnectionConfigById - */ -export const checkConnectionConfigById = { - localName: "checkConnectionConfigById", - name: "CheckConnectionConfigById", - kind: MethodKind.Unary, - I: CheckConnectionConfigByIdRequest, - O: CheckConnectionConfigByIdResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionService" - } -} as const; - -/** - * Checks a constructed SQL query against a sql-based connection to see if it's valid based on that connection's data schema - * This is useful when constructing subsets to see if the WHERE clause is correct - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.CheckSqlQuery - */ -export const checkSqlQuery = { - localName: "checkSqlQuery", - name: "CheckSqlQuery", - kind: MethodKind.Unary, - I: CheckSqlQueryRequest, - O: CheckSqlQueryResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionService" - } -} as const; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_connect.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_connect.ts deleted file mode 100644 index a272728618..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_connect.ts +++ /dev/null @@ -1,122 +0,0 @@ -// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/connection.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CheckConnectionConfigByIdRequest, CheckConnectionConfigByIdResponse, CheckConnectionConfigRequest, CheckConnectionConfigResponse, CheckSqlQueryRequest, CheckSqlQueryResponse, CreateConnectionRequest, CreateConnectionResponse, DeleteConnectionRequest, DeleteConnectionResponse, GetConnectionRequest, GetConnectionResponse, GetConnectionsRequest, GetConnectionsResponse, IsConnectionNameAvailableRequest, IsConnectionNameAvailableResponse, UpdateConnectionRequest, UpdateConnectionResponse } from "./connection_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * Service for managing datasource connections. - * This is a primary data model in Neosync and is used in reference when hooking up Jobs to synchronize and generate data. - * - * @generated from service mgmt.v1alpha1.ConnectionService - */ -export const ConnectionService = { - typeName: "mgmt.v1alpha1.ConnectionService", - methods: { - /** - * Returns a list of connections associated with the account - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.GetConnections - */ - getConnections: { - name: "GetConnections", - I: GetConnectionsRequest, - O: GetConnectionsResponse, - kind: MethodKind.Unary, - }, - /** - * Returns a single connection - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.GetConnection - */ - getConnection: { - name: "GetConnection", - I: GetConnectionRequest, - O: GetConnectionResponse, - kind: MethodKind.Unary, - }, - /** - * Creates a new connection - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.CreateConnection - */ - createConnection: { - name: "CreateConnection", - I: CreateConnectionRequest, - O: CreateConnectionResponse, - kind: MethodKind.Unary, - }, - /** - * Updates an existing connection - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.UpdateConnection - */ - updateConnection: { - name: "UpdateConnection", - I: UpdateConnectionRequest, - O: UpdateConnectionResponse, - kind: MethodKind.Unary, - }, - /** - * Removes a connection from the system. - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.DeleteConnection - */ - deleteConnection: { - name: "DeleteConnection", - I: DeleteConnectionRequest, - O: DeleteConnectionResponse, - kind: MethodKind.Unary, - }, - /** - * Connections have friendly names, this method checks if the requested name is available in the system based on the account - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.IsConnectionNameAvailable - */ - isConnectionNameAvailable: { - name: "IsConnectionNameAvailable", - I: IsConnectionNameAvailableRequest, - O: IsConnectionNameAvailableResponse, - kind: MethodKind.Unary, - }, - /** - * Checks if the connection config is connectable by the backend. - * Used mostly to verify that a connection is valid prior to creating a Connection object. - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.CheckConnectionConfig - */ - checkConnectionConfig: { - name: "CheckConnectionConfig", - I: CheckConnectionConfigRequest, - O: CheckConnectionConfigResponse, - kind: MethodKind.Unary, - }, - /** - * Checks if the connection id is connectable by the backend. - * Used to verify that a connection is still connectable. - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.CheckConnectionConfigById - */ - checkConnectionConfigById: { - name: "CheckConnectionConfigById", - I: CheckConnectionConfigByIdRequest, - O: CheckConnectionConfigByIdResponse, - kind: MethodKind.Unary, - }, - /** - * Checks a constructed SQL query against a sql-based connection to see if it's valid based on that connection's data schema - * This is useful when constructing subsets to see if the WHERE clause is correct - * - * @generated from rpc mgmt.v1alpha1.ConnectionService.CheckSqlQuery - */ - checkSqlQuery: { - name: "CheckSqlQuery", - I: CheckSqlQueryRequest, - O: CheckSqlQueryResponse, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_data-ConnectionDataService_connectquery.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_data-ConnectionDataService_connectquery.ts deleted file mode 100644 index 53e0b85751..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_data-ConnectionDataService_connectquery.ts +++ /dev/null @@ -1,170 +0,0 @@ -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/connection_data.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { MethodKind } from "@bufbuild/protobuf"; -import { GetAiGeneratedDataRequest, GetAiGeneratedDataResponse, GetConnectionForeignConstraintsRequest, GetConnectionForeignConstraintsResponse, GetConnectionInitStatementsRequest, GetConnectionInitStatementsResponse, GetConnectionPrimaryConstraintsRequest, GetConnectionPrimaryConstraintsResponse, GetConnectionSchemaMapRequest, GetConnectionSchemaMapResponse, GetConnectionSchemaMapsRequest, GetConnectionSchemaMapsResponse, GetConnectionSchemaRequest, GetConnectionSchemaResponse, GetConnectionTableConstraintsRequest, GetConnectionTableConstraintsResponse, GetConnectionUniqueConstraintsRequest, GetConnectionUniqueConstraintsResponse, GetTableRowCountRequest, GetTableRowCountResponse } from "./connection_data_pb.js"; - -/** - * Returns the schema for a specific connection. Used mostly for SQL-based connections - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionSchema - */ -export const getConnectionSchema = { - localName: "getConnectionSchema", - name: "GetConnectionSchema", - kind: MethodKind.Unary, - I: GetConnectionSchemaRequest, - O: GetConnectionSchemaResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionDataService" - } -} as const; - -/** - * Returns the schema in map format. The keys are the fully qualified table in the format .
- * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMap - */ -export const getConnectionSchemaMap = { - localName: "getConnectionSchemaMap", - name: "GetConnectionSchemaMap", - kind: MethodKind.Unary, - I: GetConnectionSchemaMapRequest, - O: GetConnectionSchemaMapResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionDataService" - } -} as const; - -/** - * Returns the schema in map format for every request provided - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMaps - */ -export const getConnectionSchemaMaps = { - localName: "getConnectionSchemaMaps", - name: "GetConnectionSchemaMaps", - kind: MethodKind.Unary, - I: GetConnectionSchemaMapsRequest, - O: GetConnectionSchemaMapsResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionDataService" - } -} as const; - -/** - * For a specific connection, returns the table constraints. Mostly useful for SQL-based Connections. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionTableConstraints - */ -export const getConnectionTableConstraints = { - localName: "getConnectionTableConstraints", - name: "GetConnectionTableConstraints", - kind: MethodKind.Unary, - I: GetConnectionTableConstraintsRequest, - O: GetConnectionTableConstraintsResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionDataService" - } -} as const; - -/** - * For a specific connection, returns the foreign key constraints. Mostly useful for SQL-based Connections. - * Used primarily by the CLI sync command to determine stream order. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionForeignConstraints - */ -export const getConnectionForeignConstraints = { - localName: "getConnectionForeignConstraints", - name: "GetConnectionForeignConstraints", - kind: MethodKind.Unary, - I: GetConnectionForeignConstraintsRequest, - O: GetConnectionForeignConstraintsResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionDataService" - } -} as const; - -/** - * For a specific connection, returns the primary key constraints. Mostly useful for SQL-based Connections. - * Used primarily by the CLI sync command to determine stream order. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionPrimaryConstraints - */ -export const getConnectionPrimaryConstraints = { - localName: "getConnectionPrimaryConstraints", - name: "GetConnectionPrimaryConstraints", - kind: MethodKind.Unary, - I: GetConnectionPrimaryConstraintsRequest, - O: GetConnectionPrimaryConstraintsResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionDataService" - } -} as const; - -/** - * For a specific connection, returns the init table statements. Mostly useful for SQL-based Connections. - * Used primarily by the CLI sync command to create table schema init statement. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionInitStatements - */ -export const getConnectionInitStatements = { - localName: "getConnectionInitStatements", - name: "GetConnectionInitStatements", - kind: MethodKind.Unary, - I: GetConnectionInitStatementsRequest, - O: GetConnectionInitStatementsResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionDataService" - } -} as const; - -/** - * For a specific connection, returns the unique constraints. Mostly useful for SQL-based connections. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionUniqueConstraints - */ -export const getConnectionUniqueConstraints = { - localName: "getConnectionUniqueConstraints", - name: "GetConnectionUniqueConstraints", - kind: MethodKind.Unary, - I: GetConnectionUniqueConstraintsRequest, - O: GetConnectionUniqueConstraintsResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionDataService" - } -} as const; - -/** - * Query an AI connection by providing the necessary values. Typically used for generating preview data - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetAiGeneratedData - */ -export const getAiGeneratedData = { - localName: "getAiGeneratedData", - name: "GetAiGeneratedData", - kind: MethodKind.Unary, - I: GetAiGeneratedDataRequest, - O: GetAiGeneratedDataResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionDataService" - } -} as const; - -/** - * Query table with subset to get row count - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetTableRowCount - */ -export const getTableRowCount = { - localName: "getTableRowCount", - name: "GetTableRowCount", - kind: MethodKind.Unary, - I: GetTableRowCountRequest, - O: GetTableRowCountResponse, - service: { - typeName: "mgmt.v1alpha1.ConnectionDataService" - } -} as const; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_data_connect.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_data_connect.ts deleted file mode 100644 index f1fa26ae5e..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_data_connect.ts +++ /dev/null @@ -1,145 +0,0 @@ -// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/connection_data.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { GetAiGeneratedDataRequest, GetAiGeneratedDataResponse, GetConnectionDataStreamRequest, GetConnectionDataStreamResponse, GetConnectionForeignConstraintsRequest, GetConnectionForeignConstraintsResponse, GetConnectionInitStatementsRequest, GetConnectionInitStatementsResponse, GetConnectionPrimaryConstraintsRequest, GetConnectionPrimaryConstraintsResponse, GetConnectionSchemaMapRequest, GetConnectionSchemaMapResponse, GetConnectionSchemaMapsRequest, GetConnectionSchemaMapsResponse, GetConnectionSchemaRequest, GetConnectionSchemaResponse, GetConnectionTableConstraintsRequest, GetConnectionTableConstraintsResponse, GetConnectionUniqueConstraintsRequest, GetConnectionUniqueConstraintsResponse, GetTableRowCountRequest, GetTableRowCountResponse } from "./connection_data_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * Service for managing connection data. - * This is used in handle data from a connection - * - * @generated from service mgmt.v1alpha1.ConnectionDataService - */ -export const ConnectionDataService = { - typeName: "mgmt.v1alpha1.ConnectionDataService", - methods: { - /** - * Streaming endpoint that will stream the data available from the Connection to the client. - * Used primarily by the CLI sync command. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionDataStream - */ - getConnectionDataStream: { - name: "GetConnectionDataStream", - I: GetConnectionDataStreamRequest, - O: GetConnectionDataStreamResponse, - kind: MethodKind.ServerStreaming, - }, - /** - * Returns the schema for a specific connection. Used mostly for SQL-based connections - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionSchema - */ - getConnectionSchema: { - name: "GetConnectionSchema", - I: GetConnectionSchemaRequest, - O: GetConnectionSchemaResponse, - kind: MethodKind.Unary, - }, - /** - * Returns the schema in map format. The keys are the fully qualified table in the format .
- * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMap - */ - getConnectionSchemaMap: { - name: "GetConnectionSchemaMap", - I: GetConnectionSchemaMapRequest, - O: GetConnectionSchemaMapResponse, - kind: MethodKind.Unary, - }, - /** - * Returns the schema in map format for every request provided - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMaps - */ - getConnectionSchemaMaps: { - name: "GetConnectionSchemaMaps", - I: GetConnectionSchemaMapsRequest, - O: GetConnectionSchemaMapsResponse, - kind: MethodKind.Unary, - }, - /** - * For a specific connection, returns the table constraints. Mostly useful for SQL-based Connections. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionTableConstraints - */ - getConnectionTableConstraints: { - name: "GetConnectionTableConstraints", - I: GetConnectionTableConstraintsRequest, - O: GetConnectionTableConstraintsResponse, - kind: MethodKind.Unary, - }, - /** - * For a specific connection, returns the foreign key constraints. Mostly useful for SQL-based Connections. - * Used primarily by the CLI sync command to determine stream order. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionForeignConstraints - */ - getConnectionForeignConstraints: { - name: "GetConnectionForeignConstraints", - I: GetConnectionForeignConstraintsRequest, - O: GetConnectionForeignConstraintsResponse, - kind: MethodKind.Unary, - }, - /** - * For a specific connection, returns the primary key constraints. Mostly useful for SQL-based Connections. - * Used primarily by the CLI sync command to determine stream order. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionPrimaryConstraints - */ - getConnectionPrimaryConstraints: { - name: "GetConnectionPrimaryConstraints", - I: GetConnectionPrimaryConstraintsRequest, - O: GetConnectionPrimaryConstraintsResponse, - kind: MethodKind.Unary, - }, - /** - * For a specific connection, returns the init table statements. Mostly useful for SQL-based Connections. - * Used primarily by the CLI sync command to create table schema init statement. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionInitStatements - */ - getConnectionInitStatements: { - name: "GetConnectionInitStatements", - I: GetConnectionInitStatementsRequest, - O: GetConnectionInitStatementsResponse, - kind: MethodKind.Unary, - }, - /** - * For a specific connection, returns the unique constraints. Mostly useful for SQL-based connections. - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionUniqueConstraints - */ - getConnectionUniqueConstraints: { - name: "GetConnectionUniqueConstraints", - I: GetConnectionUniqueConstraintsRequest, - O: GetConnectionUniqueConstraintsResponse, - kind: MethodKind.Unary, - }, - /** - * Query an AI connection by providing the necessary values. Typically used for generating preview data - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetAiGeneratedData - */ - getAiGeneratedData: { - name: "GetAiGeneratedData", - I: GetAiGeneratedDataRequest, - O: GetAiGeneratedDataResponse, - kind: MethodKind.Unary, - }, - /** - * Query table with subset to get row count - * - * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetTableRowCount - */ - getTableRowCount: { - name: "GetTableRowCount", - I: GetTableRowCountRequest, - O: GetTableRowCountResponse, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_data_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_data_pb.ts index 95ce63309c..bf894b2221 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_data_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_data_pb.ts @@ -1,108 +1,62 @@ -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js" +// @generated by protoc-gen-es v2.2.3 with parameter "target=ts,import_extension=.js" // @generated from file mgmt/v1alpha1/connection_data.proto (package mgmt.v1alpha1, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64, Struct } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import { file_google_protobuf_struct } from "@bufbuild/protobuf/wkt"; +import type { JsonObject, Message } from "@bufbuild/protobuf"; /** - * @generated from message mgmt.v1alpha1.PostgresStreamConfig + * Describes the file mgmt/v1alpha1/connection_data.proto. */ -export class PostgresStreamConfig extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresStreamConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresStreamConfig { - return new PostgresStreamConfig().fromBinary(bytes, options); - } +export const file_mgmt_v1alpha1_connection_data: GenFile = /*@__PURE__*/ + fileDesc("CiNtZ210L3YxYWxwaGExL2Nvbm5lY3Rpb25fZGF0YS5wcm90bxINbWdtdC52MWFscGhhMSIWChRQb3N0Z3Jlc1N0cmVhbUNvbmZpZyITChFNeXNxbFN0cmVhbUNvbmZpZyIZChdBd3NEeW5hbW9EQlN0cmVhbUNvbmZpZyJUChFBd3NTM1N0cmVhbUNvbmZpZxIaCgZqb2JfaWQYASABKAlCCLpIBXIDsAEBSAASHQoKam9iX3J1bl9pZBgCIAEoCUIHukgEcgIQAUgAQgQKAmlkIl4KG0djcENsb3VkU3RvcmFnZVN0cmVhbUNvbmZpZxIaCgZqb2JfaWQYASABKAlCCLpIBXIDsAEBSAASHQoKam9iX3J1bl9pZBgCIAEoCUIHukgEcgIQAUgAQgQKAmlkIuoCChZDb25uZWN0aW9uU3RyZWFtQ29uZmlnEjgKCXBnX2NvbmZpZxgBIAEoCzIjLm1nbXQudjFhbHBoYTEuUG9zdGdyZXNTdHJlYW1Db25maWdIABI5Cg1hd3NfczNfY29uZmlnGAIgASgLMiAubWdtdC52MWFscGhhMS5Bd3NTM1N0cmVhbUNvbmZpZ0gAEjgKDG15c3FsX2NvbmZpZxgDIAEoCzIgLm1nbXQudjFhbHBoYTEuTXlzcWxTdHJlYW1Db25maWdIABJNChdnY3BfY2xvdWRzdG9yYWdlX2NvbmZpZxgEIAEoCzIqLm1nbXQudjFhbHBoYTEuR2NwQ2xvdWRTdG9yYWdlU3RyZWFtQ29uZmlnSAASQQoPZHluYW1vZGJfY29uZmlnGAUgASgLMiYubWdtdC52MWFscGhhMS5Bd3NEeW5hbW9EQlN0cmVhbUNvbmZpZ0gAQg8KBmNvbmZpZxIFukgCCAEingEKHkdldENvbm5lY3Rpb25EYXRhU3RyZWFtUmVxdWVzdBIfCg1jb25uZWN0aW9uX2lkGAEgASgJQgi6SAVyA7ABARI8Cg1zdHJlYW1fY29uZmlnGAIgASgLMiUubWdtdC52MWFscGhhMS5Db25uZWN0aW9uU3RyZWFtQ29uZmlnEg4KBnNjaGVtYRgDIAEoCRINCgV0YWJsZRgEIAEoCSI6Ch9HZXRDb25uZWN0aW9uRGF0YVN0cmVhbVJlc3BvbnNlEhEKCXJvd19ieXRlcxgCIAEoDEoECAEQAiIWChRQb3N0Z3Jlc1NjaGVtYUNvbmZpZyITChFNeXNxbFNjaGVtYUNvbmZpZyITChFNc3NxbFNjaGVtYUNvbmZpZyJUChFBd3NTM1NjaGVtYUNvbmZpZxIaCgZqb2JfaWQYASABKAlCCLpIBXIDsAEBSAASHQoKam9iX3J1bl9pZBgCIAEoCUIHukgEcgIQAUgAQgQKAmlkIhMKEU1vbmdvU2NoZW1hQ29uZmlnIhYKFER5bmFtb0RCU2NoZW1hQ29uZmlnIl4KG0djcENsb3VkU3RvcmFnZVNjaGVtYUNvbmZpZxIaCgZqb2JfaWQYASABKAlCCLpIBXIDsAEBSAASHQoKam9iX3J1bl9pZBgCIAEoCUIHukgEcgIQAUgAQgQKAmlkItsDChZDb25uZWN0aW9uU2NoZW1hQ29uZmlnEjgKCXBnX2NvbmZpZxgBIAEoCzIjLm1nbXQudjFhbHBoYTEuUG9zdGdyZXNTY2hlbWFDb25maWdIABI5Cg1hd3NfczNfY29uZmlnGAIgASgLMiAubWdtdC52MWFscGhhMS5Bd3NTM1NjaGVtYUNvbmZpZ0gAEjgKDG15c3FsX2NvbmZpZxgDIAEoCzIgLm1nbXQudjFhbHBoYTEuTXlzcWxTY2hlbWFDb25maWdIABI4Cgxtb25nb19jb25maWcYBCABKAsyIC5tZ210LnYxYWxwaGExLk1vbmdvU2NoZW1hQ29uZmlnSAASTQoXZ2NwX2Nsb3Vkc3RvcmFnZV9jb25maWcYBSABKAsyKi5tZ210LnYxYWxwaGExLkdjcENsb3VkU3RvcmFnZVNjaGVtYUNvbmZpZ0gAEj4KD2R5bmFtb2RiX2NvbmZpZxgGIAEoCzIjLm1nbXQudjFhbHBoYTEuRHluYW1vREJTY2hlbWFDb25maWdIABI4Cgxtc3NxbF9jb25maWcYByABKAsyIC5tZ210LnYxYWxwaGExLk1zc3FsU2NoZW1hQ29uZmlnSABCDwoGY29uZmlnEgW6SAIIASKBAgoORGF0YWJhc2VDb2x1bW4SDgoGc2NoZW1hGAEgASgJEg0KBXRhYmxlGAIgASgJEg4KBmNvbHVtbhgDIAEoCRIRCglkYXRhX3R5cGUYBCABKAkSEwoLaXNfbnVsbGFibGUYBSABKAkSGwoOY29sdW1uX2RlZmF1bHQYBiABKAlIAIgBARIbCg5nZW5lcmF0ZWRfdHlwZRgHIAEoCUgBiAEBEiAKE2lkZW50aXR5X2dlbmVyYXRpb24YCCABKAlIAogBAUIRCg9fY29sdW1uX2RlZmF1bHRCEQoPX2dlbmVyYXRlZF90eXBlQhYKFF9pZGVudGl0eV9nZW5lcmF0aW9uInsKGkdldENvbm5lY3Rpb25TY2hlbWFSZXF1ZXN0Eh8KDWNvbm5lY3Rpb25faWQYASABKAlCCLpIBXIDsAEBEjwKDXNjaGVtYV9jb25maWcYAiABKAsyJS5tZ210LnYxYWxwaGExLkNvbm5lY3Rpb25TY2hlbWFDb25maWciTQobR2V0Q29ubmVjdGlvblNjaGVtYVJlc3BvbnNlEi4KB3NjaGVtYXMYASADKAsyHS5tZ210LnYxYWxwaGExLkRhdGFiYXNlQ29sdW1uIn4KHUdldENvbm5lY3Rpb25TY2hlbWFNYXBSZXF1ZXN0Eh8KDWNvbm5lY3Rpb25faWQYASABKAlCCLpIBXIDsAEBEjwKDXNjaGVtYV9jb25maWcYAiABKAsyJS5tZ210LnYxYWxwaGExLkNvbm5lY3Rpb25TY2hlbWFDb25maWci0AEKHkdldENvbm5lY3Rpb25TY2hlbWFNYXBSZXNwb25zZRJQCgpzY2hlbWFfbWFwGAEgAygLMjwubWdtdC52MWFscGhhMS5HZXRDb25uZWN0aW9uU2NoZW1hTWFwUmVzcG9uc2UuU2NoZW1hTWFwRW50cnkaXAoOU2NoZW1hTWFwRW50cnkSCwoDa2V5GAEgASgJEjkKBXZhbHVlGAIgASgLMioubWdtdC52MWFscGhhMS5HZXRDb25uZWN0aW9uU2NoZW1hUmVzcG9uc2U6AjgBImAKHkdldENvbm5lY3Rpb25TY2hlbWFNYXBzUmVxdWVzdBI+CghyZXF1ZXN0cxgBIAMoCzIsLm1nbXQudjFhbHBoYTEuR2V0Q29ubmVjdGlvblNjaGVtYU1hcFJlcXVlc3QiewofR2V0Q29ubmVjdGlvblNjaGVtYU1hcHNSZXNwb25zZRJACglyZXNwb25zZXMYASADKAsyLS5tZ210LnYxYWxwaGExLkdldENvbm5lY3Rpb25TY2hlbWFNYXBSZXNwb25zZRIWCg5jb25uZWN0aW9uX2lkcxgCIAMoCSIyCgpGb3JlaWduS2V5Eg0KBXRhYmxlGAEgASgJEg8KB2NvbHVtbnMYAyADKAlKBAgCEAMidgoRRm9yZWlnbkNvbnN0cmFpbnQSLgoLZm9yZWlnbl9rZXkYAyABKAsyGS5tZ210LnYxYWxwaGExLkZvcmVpZ25LZXkSDwoHY29sdW1ucxgEIAMoCRIUCgxub3RfbnVsbGFibGUYBSADKAhKBAgBEAJKBAgCEAMiUAoXRm9yZWlnbkNvbnN0cmFpbnRUYWJsZXMSNQoLY29uc3RyYWludHMYASADKAsyIC5tZ210LnYxYWxwaGExLkZvcmVpZ25Db25zdHJhaW50ImUKFEluaXRTdGF0ZW1lbnRPcHRpb25zEhMKC2luaXRfc2NoZW1hGAEgASgIEh4KFnRydW5jYXRlX2JlZm9yZV9pbnNlcnQYAiABKAgSGAoQdHJ1bmNhdGVfY2FzY2FkZRgDIAEoCCJ7CiJHZXRDb25uZWN0aW9uSW5pdFN0YXRlbWVudHNSZXF1ZXN0Eh8KDWNvbm5lY3Rpb25faWQYASABKAlCCLpIBXIDsAEBEjQKB29wdGlvbnMYAiABKAsyIy5tZ210LnYxYWxwaGExLkluaXRTdGF0ZW1lbnRPcHRpb25zIjkKFFNjaGVtYUluaXRTdGF0ZW1lbnRzEg0KBWxhYmVsGAEgASgJEhIKCnN0YXRlbWVudHMYAiADKAkixgMKI0dldENvbm5lY3Rpb25Jbml0U3RhdGVtZW50c1Jlc3BvbnNlEmoKFXRhYmxlX2luaXRfc3RhdGVtZW50cxgBIAMoCzJLLm1nbXQudjFhbHBoYTEuR2V0Q29ubmVjdGlvbkluaXRTdGF0ZW1lbnRzUmVzcG9uc2UuVGFibGVJbml0U3RhdGVtZW50c0VudHJ5EnIKGXRhYmxlX3RydW5jYXRlX3N0YXRlbWVudHMYAiADKAsyTy5tZ210LnYxYWxwaGExLkdldENvbm5lY3Rpb25Jbml0U3RhdGVtZW50c1Jlc3BvbnNlLlRhYmxlVHJ1bmNhdGVTdGF0ZW1lbnRzRW50cnkSQwoWc2NoZW1hX2luaXRfc3RhdGVtZW50cxgDIAMoCzIjLm1nbXQudjFhbHBoYTEuU2NoZW1hSW5pdFN0YXRlbWVudHMaOgoYVGFibGVJbml0U3RhdGVtZW50c0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEaPgocVGFibGVUcnVuY2F0ZVN0YXRlbWVudHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIiQKEVByaW1hcnlDb25zdHJhaW50Eg8KB2NvbHVtbnMYASADKAkiIwoQVW5pcXVlQ29uc3RyYWludBIPCgdjb2x1bW5zGAEgAygJIvMBChlHZXRBaUdlbmVyYXRlZERhdGFSZXF1ZXN0EiIKEGFpX2Nvbm5lY3Rpb25faWQYASABKAlCCLpIBXIDsAEBEhgKBWNvdW50GAIgASgDQgm6SAYiBBgKKAESGwoKbW9kZWxfbmFtZRgDIAEoCUIHukgEcgIQARIYCgt1c2VyX3Byb21wdBgEIAEoCUgAiAEBEiQKEmRhdGFfY29ubmVjdGlvbl9pZBgFIAEoCUIIukgFcgOwAQESKwoFdGFibGUYBiABKAsyHC5tZ210LnYxYWxwaGExLkRhdGFiYXNlVGFibGVCDgoMX3VzZXJfcHJvbXB0IkAKDURhdGFiYXNlVGFibGUSFwoGc2NoZW1hGAEgASgJQge6SARyAhABEhYKBXRhYmxlGAIgASgJQge6SARyAhABIkYKGkdldEFpR2VuZXJhdGVkRGF0YVJlc3BvbnNlEigKB3JlY29yZHMYASADKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0IkcKJEdldENvbm5lY3Rpb25UYWJsZUNvbnN0cmFpbnRzUmVxdWVzdBIfCg1jb25uZWN0aW9uX2lkGAEgASgJQgi6SAVyA7ABASJJChFVbmlxdWVDb25zdHJhaW50cxI0Cgtjb25zdHJhaW50cxgBIAMoCzIfLm1nbXQudjFhbHBoYTEuVW5pcXVlQ29uc3RyYWludCKWBQolR2V0Q29ubmVjdGlvblRhYmxlQ29uc3RyYWludHNSZXNwb25zZRJwChdmb3JlaWduX2tleV9jb25zdHJhaW50cxgBIAMoCzJPLm1nbXQudjFhbHBoYTEuR2V0Q29ubmVjdGlvblRhYmxlQ29uc3RyYWludHNSZXNwb25zZS5Gb3JlaWduS2V5Q29uc3RyYWludHNFbnRyeRJwChdwcmltYXJ5X2tleV9jb25zdHJhaW50cxgCIAMoCzJPLm1nbXQudjFhbHBoYTEuR2V0Q29ubmVjdGlvblRhYmxlQ29uc3RyYWludHNSZXNwb25zZS5QcmltYXJ5S2V5Q29uc3RyYWludHNFbnRyeRJnChJ1bmlxdWVfY29uc3RyYWludHMYAyADKAsySy5tZ210LnYxYWxwaGExLkdldENvbm5lY3Rpb25UYWJsZUNvbnN0cmFpbnRzUmVzcG9uc2UuVW5pcXVlQ29uc3RyYWludHNFbnRyeRpkChpGb3JlaWduS2V5Q29uc3RyYWludHNFbnRyeRILCgNrZXkYASABKAkSNQoFdmFsdWUYAiABKAsyJi5tZ210LnYxYWxwaGExLkZvcmVpZ25Db25zdHJhaW50VGFibGVzOgI4ARpeChpQcmltYXJ5S2V5Q29uc3RyYWludHNFbnRyeRILCgNrZXkYASABKAkSLwoFdmFsdWUYAiABKAsyIC5tZ210LnYxYWxwaGExLlByaW1hcnlDb25zdHJhaW50OgI4ARpaChZVbmlxdWVDb25zdHJhaW50c0VudHJ5EgsKA2tleRgBIAEoCRIvCgV2YWx1ZRgCIAEoCzIgLm1nbXQudjFhbHBoYTEuVW5pcXVlQ29uc3RyYWludHM6AjgBInsKF0dldFRhYmxlUm93Q291bnRSZXF1ZXN0EhUKDWNvbm5lY3Rpb25faWQYASABKAkSDgoGc2NoZW1hGAIgASgJEg0KBXRhYmxlGAMgASgJEhkKDHdoZXJlX2NsYXVzZRgEIAEoCUgAiAEBQg8KDV93aGVyZV9jbGF1c2UiKQoYR2V0VGFibGVSb3dDb3VudFJlc3BvbnNlEg0KBWNvdW50GAEgASgDMuYHChVDb25uZWN0aW9uRGF0YVNlcnZpY2USfAoXR2V0Q29ubmVjdGlvbkRhdGFTdHJlYW0SLS5tZ210LnYxYWxwaGExLkdldENvbm5lY3Rpb25EYXRhU3RyZWFtUmVxdWVzdBouLm1nbXQudjFhbHBoYTEuR2V0Q29ubmVjdGlvbkRhdGFTdHJlYW1SZXNwb25zZSIAMAESbgoTR2V0Q29ubmVjdGlvblNjaGVtYRIpLm1nbXQudjFhbHBoYTEuR2V0Q29ubmVjdGlvblNjaGVtYVJlcXVlc3QaKi5tZ210LnYxYWxwaGExLkdldENvbm5lY3Rpb25TY2hlbWFSZXNwb25zZSIAEncKFkdldENvbm5lY3Rpb25TY2hlbWFNYXASLC5tZ210LnYxYWxwaGExLkdldENvbm5lY3Rpb25TY2hlbWFNYXBSZXF1ZXN0Gi0ubWdtdC52MWFscGhhMS5HZXRDb25uZWN0aW9uU2NoZW1hTWFwUmVzcG9uc2UiABJ6ChdHZXRDb25uZWN0aW9uU2NoZW1hTWFwcxItLm1nbXQudjFhbHBoYTEuR2V0Q29ubmVjdGlvblNjaGVtYU1hcHNSZXF1ZXN0Gi4ubWdtdC52MWFscGhhMS5HZXRDb25uZWN0aW9uU2NoZW1hTWFwc1Jlc3BvbnNlIgASjAEKHUdldENvbm5lY3Rpb25UYWJsZUNvbnN0cmFpbnRzEjMubWdtdC52MWFscGhhMS5HZXRDb25uZWN0aW9uVGFibGVDb25zdHJhaW50c1JlcXVlc3QaNC5tZ210LnYxYWxwaGExLkdldENvbm5lY3Rpb25UYWJsZUNvbnN0cmFpbnRzUmVzcG9uc2UiABKGAQobR2V0Q29ubmVjdGlvbkluaXRTdGF0ZW1lbnRzEjEubWdtdC52MWFscGhhMS5HZXRDb25uZWN0aW9uSW5pdFN0YXRlbWVudHNSZXF1ZXN0GjIubWdtdC52MWFscGhhMS5HZXRDb25uZWN0aW9uSW5pdFN0YXRlbWVudHNSZXNwb25zZSIAEmsKEkdldEFpR2VuZXJhdGVkRGF0YRIoLm1nbXQudjFhbHBoYTEuR2V0QWlHZW5lcmF0ZWREYXRhUmVxdWVzdBopLm1nbXQudjFhbHBoYTEuR2V0QWlHZW5lcmF0ZWREYXRhUmVzcG9uc2UiABJlChBHZXRUYWJsZVJvd0NvdW50EiYubWdtdC52MWFscGhhMS5HZXRUYWJsZVJvd0NvdW50UmVxdWVzdBonLm1nbXQudjFhbHBoYTEuR2V0VGFibGVSb3dDb3VudFJlc3BvbnNlIgBCzwEKEWNvbS5tZ210LnYxYWxwaGExQhNDb25uZWN0aW9uRGF0YVByb3RvUAFaUGdpdGh1Yi5jb20vbnVjbGV1c2Nsb3VkL25lb3N5bmMvYmFja2VuZC9nZW4vZ28vcHJvdG9zL21nbXQvdjFhbHBoYTE7bWdtdHYxYWxwaGExogIDTVhYqgINTWdtdC5WMWFscGhhMcoCDU1nbXRcVjFhbHBoYTHiAhlNZ210XFYxYWxwaGExXEdQQk1ldGFkYXRh6gIOTWdtdDo6VjFhbHBoYTFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_struct]); - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresStreamConfig { - return new PostgresStreamConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresStreamConfig { - return new PostgresStreamConfig().fromJsonString(jsonString, options); - } +/** + * @generated from message mgmt.v1alpha1.PostgresStreamConfig + */ +export type PostgresStreamConfig = Message<"mgmt.v1alpha1.PostgresStreamConfig"> & { +}; - static equals(a: PostgresStreamConfig | PlainMessage | undefined, b: PostgresStreamConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresStreamConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresStreamConfig. + * Use `create(PostgresStreamConfigSchema)` to create a new message. + */ +export const PostgresStreamConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 0); /** * @generated from message mgmt.v1alpha1.MysqlStreamConfig */ -export class MysqlStreamConfig extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlStreamConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlStreamConfig { - return new MysqlStreamConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlStreamConfig { - return new MysqlStreamConfig().fromJson(jsonValue, options); - } +export type MysqlStreamConfig = Message<"mgmt.v1alpha1.MysqlStreamConfig"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): MysqlStreamConfig { - return new MysqlStreamConfig().fromJsonString(jsonString, options); - } - - static equals(a: MysqlStreamConfig | PlainMessage | undefined, b: MysqlStreamConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlStreamConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MysqlStreamConfig. + * Use `create(MysqlStreamConfigSchema)` to create a new message. + */ +export const MysqlStreamConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 1); /** * @generated from message mgmt.v1alpha1.AwsDynamoDBStreamConfig */ -export class AwsDynamoDBStreamConfig extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AwsDynamoDBStreamConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AwsDynamoDBStreamConfig { - return new AwsDynamoDBStreamConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AwsDynamoDBStreamConfig { - return new AwsDynamoDBStreamConfig().fromJson(jsonValue, options); - } +export type AwsDynamoDBStreamConfig = Message<"mgmt.v1alpha1.AwsDynamoDBStreamConfig"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): AwsDynamoDBStreamConfig { - return new AwsDynamoDBStreamConfig().fromJsonString(jsonString, options); - } - - static equals(a: AwsDynamoDBStreamConfig | PlainMessage | undefined, b: AwsDynamoDBStreamConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(AwsDynamoDBStreamConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AwsDynamoDBStreamConfig. + * Use `create(AwsDynamoDBStreamConfigSchema)` to create a new message. + */ +export const AwsDynamoDBStreamConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 2); /** * @generated from message mgmt.v1alpha1.AwsS3StreamConfig */ -export class AwsS3StreamConfig extends Message { +export type AwsS3StreamConfig = Message<"mgmt.v1alpha1.AwsS3StreamConfig"> & { /** * @generated from oneof mgmt.v1alpha1.AwsS3StreamConfig.id */ @@ -118,41 +72,20 @@ export class AwsS3StreamConfig extends Message { */ value: string; case: "jobRunId"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AwsS3StreamConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "id" }, - { no: 2, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "id" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AwsS3StreamConfig { - return new AwsS3StreamConfig().fromBinary(bytes, options); - } + } | { case: undefined; value?: undefined }; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): AwsS3StreamConfig { - return new AwsS3StreamConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AwsS3StreamConfig { - return new AwsS3StreamConfig().fromJsonString(jsonString, options); - } - - static equals(a: AwsS3StreamConfig | PlainMessage | undefined, b: AwsS3StreamConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(AwsS3StreamConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AwsS3StreamConfig. + * Use `create(AwsS3StreamConfigSchema)` to create a new message. + */ +export const AwsS3StreamConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 3); /** * @generated from message mgmt.v1alpha1.GcpCloudStorageStreamConfig */ -export class GcpCloudStorageStreamConfig extends Message { +export type GcpCloudStorageStreamConfig = Message<"mgmt.v1alpha1.GcpCloudStorageStreamConfig"> & { /** * @generated from oneof mgmt.v1alpha1.GcpCloudStorageStreamConfig.id */ @@ -168,41 +101,20 @@ export class GcpCloudStorageStreamConfig extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GcpCloudStorageStreamConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "id" }, - { no: 2, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "id" }, - ]); + } | { case: undefined; value?: undefined }; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GcpCloudStorageStreamConfig { - return new GcpCloudStorageStreamConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GcpCloudStorageStreamConfig { - return new GcpCloudStorageStreamConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GcpCloudStorageStreamConfig { - return new GcpCloudStorageStreamConfig().fromJsonString(jsonString, options); - } - - static equals(a: GcpCloudStorageStreamConfig | PlainMessage | undefined, b: GcpCloudStorageStreamConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(GcpCloudStorageStreamConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GcpCloudStorageStreamConfig. + * Use `create(GcpCloudStorageStreamConfigSchema)` to create a new message. + */ +export const GcpCloudStorageStreamConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 4); /** * @generated from message mgmt.v1alpha1.ConnectionStreamConfig */ -export class ConnectionStreamConfig extends Message { +export type ConnectionStreamConfig = Message<"mgmt.v1alpha1.ConnectionStreamConfig"> & { /** * @generated from oneof mgmt.v1alpha1.ConnectionStreamConfig.config */ @@ -236,48 +148,24 @@ export class ConnectionStreamConfig extends Message { */ value: AwsDynamoDBStreamConfig; case: "dynamodbConfig"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + } | { case: undefined; value?: undefined }; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ConnectionStreamConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "pg_config", kind: "message", T: PostgresStreamConfig, oneof: "config" }, - { no: 2, name: "aws_s3_config", kind: "message", T: AwsS3StreamConfig, oneof: "config" }, - { no: 3, name: "mysql_config", kind: "message", T: MysqlStreamConfig, oneof: "config" }, - { no: 4, name: "gcp_cloudstorage_config", kind: "message", T: GcpCloudStorageStreamConfig, oneof: "config" }, - { no: 5, name: "dynamodb_config", kind: "message", T: AwsDynamoDBStreamConfig, oneof: "config" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionStreamConfig { - return new ConnectionStreamConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionStreamConfig { - return new ConnectionStreamConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectionStreamConfig { - return new ConnectionStreamConfig().fromJsonString(jsonString, options); - } - - static equals(a: ConnectionStreamConfig | PlainMessage | undefined, b: ConnectionStreamConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(ConnectionStreamConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ConnectionStreamConfig. + * Use `create(ConnectionStreamConfigSchema)` to create a new message. + */ +export const ConnectionStreamConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 5); /** * @generated from message mgmt.v1alpha1.GetConnectionDataStreamRequest */ -export class GetConnectionDataStreamRequest extends Message { +export type GetConnectionDataStreamRequest = Message<"mgmt.v1alpha1.GetConnectionDataStreamRequest"> & { /** * @generated from field: string connection_id = 1; */ - connectionId = ""; + connectionId: string; /** * @generated from field: mgmt.v1alpha1.ConnectionStreamConfig stream_config = 2; @@ -287,182 +175,85 @@ export class GetConnectionDataStreamRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionDataStreamRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "stream_config", kind: "message", T: ConnectionStreamConfig }, - { no: 3, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionDataStreamRequest { - return new GetConnectionDataStreamRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionDataStreamRequest { - return new GetConnectionDataStreamRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionDataStreamRequest { - return new GetConnectionDataStreamRequest().fromJsonString(jsonString, options); - } + table: string; +}; - static equals(a: GetConnectionDataStreamRequest | PlainMessage | undefined, b: GetConnectionDataStreamRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionDataStreamRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionDataStreamRequest. + * Use `create(GetConnectionDataStreamRequestSchema)` to create a new message. + */ +export const GetConnectionDataStreamRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 6); /** * Each stream response is a single row in the requested schema and table * * @generated from message mgmt.v1alpha1.GetConnectionDataStreamResponse */ -export class GetConnectionDataStreamResponse extends Message { +export type GetConnectionDataStreamResponse = Message<"mgmt.v1alpha1.GetConnectionDataStreamResponse"> & { /** - * A map of column name to the bytes value of the data that was found for that column and row + * A map of column name to column value, where the value is serialized as bytes. The value represents a map[string]any structure. * - * @generated from field: map row = 1; + * @generated from field: bytes row_bytes = 2; */ - row: { [key: string]: Uint8Array } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionDataStreamResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "row", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 12 /* ScalarType.BYTES */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionDataStreamResponse { - return new GetConnectionDataStreamResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionDataStreamResponse { - return new GetConnectionDataStreamResponse().fromJson(jsonValue, options); - } + rowBytes: Uint8Array; +}; - static fromJsonString(jsonString: string, options?: Partial): GetConnectionDataStreamResponse { - return new GetConnectionDataStreamResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionDataStreamResponse | PlainMessage | undefined, b: GetConnectionDataStreamResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionDataStreamResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionDataStreamResponse. + * Use `create(GetConnectionDataStreamResponseSchema)` to create a new message. + */ +export const GetConnectionDataStreamResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 7); /** * @generated from message mgmt.v1alpha1.PostgresSchemaConfig */ -export class PostgresSchemaConfig extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresSchemaConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresSchemaConfig { - return new PostgresSchemaConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresSchemaConfig { - return new PostgresSchemaConfig().fromJson(jsonValue, options); - } +export type PostgresSchemaConfig = Message<"mgmt.v1alpha1.PostgresSchemaConfig"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): PostgresSchemaConfig { - return new PostgresSchemaConfig().fromJsonString(jsonString, options); - } - - static equals(a: PostgresSchemaConfig | PlainMessage | undefined, b: PostgresSchemaConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresSchemaConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresSchemaConfig. + * Use `create(PostgresSchemaConfigSchema)` to create a new message. + */ +export const PostgresSchemaConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 8); /** * @generated from message mgmt.v1alpha1.MysqlSchemaConfig */ -export class MysqlSchemaConfig extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlSchemaConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlSchemaConfig { - return new MysqlSchemaConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlSchemaConfig { - return new MysqlSchemaConfig().fromJson(jsonValue, options); - } +export type MysqlSchemaConfig = Message<"mgmt.v1alpha1.MysqlSchemaConfig"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): MysqlSchemaConfig { - return new MysqlSchemaConfig().fromJsonString(jsonString, options); - } - - static equals(a: MysqlSchemaConfig | PlainMessage | undefined, b: MysqlSchemaConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlSchemaConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MysqlSchemaConfig. + * Use `create(MysqlSchemaConfigSchema)` to create a new message. + */ +export const MysqlSchemaConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 9); /** * @generated from message mgmt.v1alpha1.MssqlSchemaConfig */ -export class MssqlSchemaConfig extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MssqlSchemaConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MssqlSchemaConfig { - return new MssqlSchemaConfig().fromBinary(bytes, options); - } +export type MssqlSchemaConfig = Message<"mgmt.v1alpha1.MssqlSchemaConfig"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): MssqlSchemaConfig { - return new MssqlSchemaConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MssqlSchemaConfig { - return new MssqlSchemaConfig().fromJsonString(jsonString, options); - } - - static equals(a: MssqlSchemaConfig | PlainMessage | undefined, b: MssqlSchemaConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MssqlSchemaConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MssqlSchemaConfig. + * Use `create(MssqlSchemaConfigSchema)` to create a new message. + */ +export const MssqlSchemaConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 10); /** * @generated from message mgmt.v1alpha1.AwsS3SchemaConfig */ -export class AwsS3SchemaConfig extends Message { +export type AwsS3SchemaConfig = Message<"mgmt.v1alpha1.AwsS3SchemaConfig"> & { /** * @generated from oneof mgmt.v1alpha1.AwsS3SchemaConfig.id */ @@ -478,103 +269,46 @@ export class AwsS3SchemaConfig extends Message { */ value: string; case: "jobRunId"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AwsS3SchemaConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "id" }, - { no: 2, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "id" }, - ]); + } | { case: undefined; value?: undefined }; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): AwsS3SchemaConfig { - return new AwsS3SchemaConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AwsS3SchemaConfig { - return new AwsS3SchemaConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AwsS3SchemaConfig { - return new AwsS3SchemaConfig().fromJsonString(jsonString, options); - } - - static equals(a: AwsS3SchemaConfig | PlainMessage | undefined, b: AwsS3SchemaConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(AwsS3SchemaConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AwsS3SchemaConfig. + * Use `create(AwsS3SchemaConfigSchema)` to create a new message. + */ +export const AwsS3SchemaConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 11); /** * @generated from message mgmt.v1alpha1.MongoSchemaConfig */ -export class MongoSchemaConfig extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MongoSchemaConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +export type MongoSchemaConfig = Message<"mgmt.v1alpha1.MongoSchemaConfig"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): MongoSchemaConfig { - return new MongoSchemaConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MongoSchemaConfig { - return new MongoSchemaConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MongoSchemaConfig { - return new MongoSchemaConfig().fromJsonString(jsonString, options); - } - - static equals(a: MongoSchemaConfig | PlainMessage | undefined, b: MongoSchemaConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MongoSchemaConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MongoSchemaConfig. + * Use `create(MongoSchemaConfigSchema)` to create a new message. + */ +export const MongoSchemaConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 12); /** * @generated from message mgmt.v1alpha1.DynamoDBSchemaConfig */ -export class DynamoDBSchemaConfig extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DynamoDBSchemaConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +export type DynamoDBSchemaConfig = Message<"mgmt.v1alpha1.DynamoDBSchemaConfig"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): DynamoDBSchemaConfig { - return new DynamoDBSchemaConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DynamoDBSchemaConfig { - return new DynamoDBSchemaConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DynamoDBSchemaConfig { - return new DynamoDBSchemaConfig().fromJsonString(jsonString, options); - } - - static equals(a: DynamoDBSchemaConfig | PlainMessage | undefined, b: DynamoDBSchemaConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(DynamoDBSchemaConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DynamoDBSchemaConfig. + * Use `create(DynamoDBSchemaConfigSchema)` to create a new message. + */ +export const DynamoDBSchemaConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 13); /** * @generated from message mgmt.v1alpha1.GcpCloudStorageSchemaConfig */ -export class GcpCloudStorageSchemaConfig extends Message { +export type GcpCloudStorageSchemaConfig = Message<"mgmt.v1alpha1.GcpCloudStorageSchemaConfig"> & { /** * @generated from oneof mgmt.v1alpha1.GcpCloudStorageSchemaConfig.id */ @@ -590,41 +324,20 @@ export class GcpCloudStorageSchemaConfig extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GcpCloudStorageSchemaConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "id" }, - { no: 2, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "id" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GcpCloudStorageSchemaConfig { - return new GcpCloudStorageSchemaConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GcpCloudStorageSchemaConfig { - return new GcpCloudStorageSchemaConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GcpCloudStorageSchemaConfig { - return new GcpCloudStorageSchemaConfig().fromJsonString(jsonString, options); - } - - static equals(a: GcpCloudStorageSchemaConfig | PlainMessage | undefined, b: GcpCloudStorageSchemaConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(GcpCloudStorageSchemaConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GcpCloudStorageSchemaConfig. + * Use `create(GcpCloudStorageSchemaConfigSchema)` to create a new message. + */ +export const GcpCloudStorageSchemaConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 14); /** * @generated from message mgmt.v1alpha1.ConnectionSchemaConfig */ -export class ConnectionSchemaConfig extends Message { +export type ConnectionSchemaConfig = Message<"mgmt.v1alpha1.ConnectionSchemaConfig"> & { /** * @generated from oneof mgmt.v1alpha1.ConnectionSchemaConfig.config */ @@ -670,80 +383,54 @@ export class ConnectionSchemaConfig extends Message { */ value: MssqlSchemaConfig; case: "mssqlConfig"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ConnectionSchemaConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "pg_config", kind: "message", T: PostgresSchemaConfig, oneof: "config" }, - { no: 2, name: "aws_s3_config", kind: "message", T: AwsS3SchemaConfig, oneof: "config" }, - { no: 3, name: "mysql_config", kind: "message", T: MysqlSchemaConfig, oneof: "config" }, - { no: 4, name: "mongo_config", kind: "message", T: MongoSchemaConfig, oneof: "config" }, - { no: 5, name: "gcp_cloudstorage_config", kind: "message", T: GcpCloudStorageSchemaConfig, oneof: "config" }, - { no: 6, name: "dynamodb_config", kind: "message", T: DynamoDBSchemaConfig, oneof: "config" }, - { no: 7, name: "mssql_config", kind: "message", T: MssqlSchemaConfig, oneof: "config" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionSchemaConfig { - return new ConnectionSchemaConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionSchemaConfig { - return new ConnectionSchemaConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectionSchemaConfig { - return new ConnectionSchemaConfig().fromJsonString(jsonString, options); - } - - static equals(a: ConnectionSchemaConfig | PlainMessage | undefined, b: ConnectionSchemaConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(ConnectionSchemaConfig, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mgmt.v1alpha1.ConnectionSchemaConfig. + * Use `create(ConnectionSchemaConfigSchema)` to create a new message. + */ +export const ConnectionSchemaConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 15); /** * @generated from message mgmt.v1alpha1.DatabaseColumn */ -export class DatabaseColumn extends Message { +export type DatabaseColumn = Message<"mgmt.v1alpha1.DatabaseColumn"> & { /** * The database schema. Ex: public * * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * The name of the table in the schema * * @generated from field: string table = 2; */ - table = ""; + table: string; /** * The name of the column * * @generated from field: string column = 3; */ - column = ""; + column: string; /** * The datatype of the column * * @generated from field: string data_type = 4; */ - dataType = ""; + dataType: string; /** * The isNullable Flag of the column * * @generated from field: string is_nullable = 5; */ - isNullable = ""; + isNullable: string; /** * The default value of the column if available @@ -766,396 +453,166 @@ export class DatabaseColumn extends Message { * @generated from field: optional string identity_generation = 8; */ identityGeneration?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DatabaseColumn"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "column", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "data_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "is_nullable", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "column_default", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "generated_type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "identity_generation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DatabaseColumn { - return new DatabaseColumn().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DatabaseColumn { - return new DatabaseColumn().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DatabaseColumn { - return new DatabaseColumn().fromJsonString(jsonString, options); - } - - static equals(a: DatabaseColumn | PlainMessage | undefined, b: DatabaseColumn | PlainMessage | undefined): boolean { - return proto3.util.equals(DatabaseColumn, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DatabaseColumn. + * Use `create(DatabaseColumnSchema)` to create a new message. + */ +export const DatabaseColumnSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 16); /** * @generated from message mgmt.v1alpha1.GetConnectionSchemaRequest */ -export class GetConnectionSchemaRequest extends Message { +export type GetConnectionSchemaRequest = Message<"mgmt.v1alpha1.GetConnectionSchemaRequest"> & { /** * @generated from field: string connection_id = 1; */ - connectionId = ""; + connectionId: string; /** * @generated from field: mgmt.v1alpha1.ConnectionSchemaConfig schema_config = 2; */ schemaConfig?: ConnectionSchemaConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionSchemaRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "schema_config", kind: "message", T: ConnectionSchemaConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionSchemaRequest { - return new GetConnectionSchemaRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionSchemaRequest { - return new GetConnectionSchemaRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionSchemaRequest { - return new GetConnectionSchemaRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionSchemaRequest | PlainMessage | undefined, b: GetConnectionSchemaRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionSchemaRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionSchemaRequest. + * Use `create(GetConnectionSchemaRequestSchema)` to create a new message. + */ +export const GetConnectionSchemaRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 17); /** * @generated from message mgmt.v1alpha1.GetConnectionSchemaResponse */ -export class GetConnectionSchemaResponse extends Message { +export type GetConnectionSchemaResponse = Message<"mgmt.v1alpha1.GetConnectionSchemaResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.DatabaseColumn schemas = 1; */ - schemas: DatabaseColumn[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionSchemaResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schemas", kind: "message", T: DatabaseColumn, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionSchemaResponse { - return new GetConnectionSchemaResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionSchemaResponse { - return new GetConnectionSchemaResponse().fromJson(jsonValue, options); - } + schemas: DatabaseColumn[]; +}; - static fromJsonString(jsonString: string, options?: Partial): GetConnectionSchemaResponse { - return new GetConnectionSchemaResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionSchemaResponse | PlainMessage | undefined, b: GetConnectionSchemaResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionSchemaResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionSchemaResponse. + * Use `create(GetConnectionSchemaResponseSchema)` to create a new message. + */ +export const GetConnectionSchemaResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 18); /** * @generated from message mgmt.v1alpha1.GetConnectionSchemaMapRequest */ -export class GetConnectionSchemaMapRequest extends Message { +export type GetConnectionSchemaMapRequest = Message<"mgmt.v1alpha1.GetConnectionSchemaMapRequest"> & { /** * @generated from field: string connection_id = 1; */ - connectionId = ""; + connectionId: string; /** * @generated from field: mgmt.v1alpha1.ConnectionSchemaConfig schema_config = 2; */ schemaConfig?: ConnectionSchemaConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionSchemaMapRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "schema_config", kind: "message", T: ConnectionSchemaConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionSchemaMapRequest { - return new GetConnectionSchemaMapRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionSchemaMapRequest { - return new GetConnectionSchemaMapRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionSchemaMapRequest { - return new GetConnectionSchemaMapRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionSchemaMapRequest | PlainMessage | undefined, b: GetConnectionSchemaMapRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionSchemaMapRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionSchemaMapRequest. + * Use `create(GetConnectionSchemaMapRequestSchema)` to create a new message. + */ +export const GetConnectionSchemaMapRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 19); /** * @generated from message mgmt.v1alpha1.GetConnectionSchemaMapResponse */ -export class GetConnectionSchemaMapResponse extends Message { +export type GetConnectionSchemaMapResponse = Message<"mgmt.v1alpha1.GetConnectionSchemaMapResponse"> & { /** * Returns the database columns separated by the fully qualified .
* * @generated from field: map schema_map = 1; */ - schemaMap: { [key: string]: GetConnectionSchemaResponse } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionSchemaMapResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema_map", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: GetConnectionSchemaResponse} }, - ]); + schemaMap: { [key: string]: GetConnectionSchemaResponse }; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionSchemaMapResponse { - return new GetConnectionSchemaMapResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionSchemaMapResponse { - return new GetConnectionSchemaMapResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionSchemaMapResponse { - return new GetConnectionSchemaMapResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionSchemaMapResponse | PlainMessage | undefined, b: GetConnectionSchemaMapResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionSchemaMapResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionSchemaMapResponse. + * Use `create(GetConnectionSchemaMapResponseSchema)` to create a new message. + */ +export const GetConnectionSchemaMapResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 20); /** * @generated from message mgmt.v1alpha1.GetConnectionSchemaMapsRequest */ -export class GetConnectionSchemaMapsRequest extends Message { +export type GetConnectionSchemaMapsRequest = Message<"mgmt.v1alpha1.GetConnectionSchemaMapsRequest"> & { /** * List of connection schema maps to request * * @generated from field: repeated mgmt.v1alpha1.GetConnectionSchemaMapRequest requests = 1; */ - requests: GetConnectionSchemaMapRequest[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + requests: GetConnectionSchemaMapRequest[]; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionSchemaMapsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "requests", kind: "message", T: GetConnectionSchemaMapRequest, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionSchemaMapsRequest { - return new GetConnectionSchemaMapsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionSchemaMapsRequest { - return new GetConnectionSchemaMapsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionSchemaMapsRequest { - return new GetConnectionSchemaMapsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionSchemaMapsRequest | PlainMessage | undefined, b: GetConnectionSchemaMapsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionSchemaMapsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionSchemaMapsRequest. + * Use `create(GetConnectionSchemaMapsRequestSchema)` to create a new message. + */ +export const GetConnectionSchemaMapsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 21); /** * @generated from message mgmt.v1alpha1.GetConnectionSchemaMapsResponse */ -export class GetConnectionSchemaMapsResponse extends Message { +export type GetConnectionSchemaMapsResponse = Message<"mgmt.v1alpha1.GetConnectionSchemaMapsResponse"> & { /** * List of responses in the same order as the input * * @generated from field: repeated mgmt.v1alpha1.GetConnectionSchemaMapResponse responses = 1; */ - responses: GetConnectionSchemaMapResponse[] = []; + responses: GetConnectionSchemaMapResponse[]; /** * Parallel array of each connection id that matches with the response * * @generated from field: repeated string connection_ids = 2; */ - connectionIds: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionSchemaMapsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "responses", kind: "message", T: GetConnectionSchemaMapResponse, repeated: true }, - { no: 2, name: "connection_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionSchemaMapsResponse { - return new GetConnectionSchemaMapsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionSchemaMapsResponse { - return new GetConnectionSchemaMapsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionSchemaMapsResponse { - return new GetConnectionSchemaMapsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionSchemaMapsResponse | PlainMessage | undefined, b: GetConnectionSchemaMapsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionSchemaMapsResponse, a, b); - } -} + connectionIds: string[]; +}; /** - * @generated from message mgmt.v1alpha1.GetConnectionForeignConstraintsRequest + * Describes the message mgmt.v1alpha1.GetConnectionSchemaMapsResponse. + * Use `create(GetConnectionSchemaMapsResponseSchema)` to create a new message. */ -export class GetConnectionForeignConstraintsRequest extends Message { - /** - * @generated from field: string connection_id = 1; - */ - connectionId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionForeignConstraintsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionForeignConstraintsRequest { - return new GetConnectionForeignConstraintsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionForeignConstraintsRequest { - return new GetConnectionForeignConstraintsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionForeignConstraintsRequest { - return new GetConnectionForeignConstraintsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionForeignConstraintsRequest | PlainMessage | undefined, b: GetConnectionForeignConstraintsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionForeignConstraintsRequest, a, b); - } -} +export const GetConnectionSchemaMapsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 22); /** * @generated from message mgmt.v1alpha1.ForeignKey */ -export class ForeignKey extends Message { +export type ForeignKey = Message<"mgmt.v1alpha1.ForeignKey"> & { /** * @generated from field: string table = 1; */ - table = ""; - - /** - * @deprecated - use columns - * - * @generated from field: string column = 2; - */ - column = ""; + table: string; /** * @generated from field: repeated string columns = 3; */ - columns: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ForeignKey"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "column", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "columns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ForeignKey { - return new ForeignKey().fromBinary(bytes, options); - } + columns: string[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): ForeignKey { - return new ForeignKey().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ForeignKey { - return new ForeignKey().fromJsonString(jsonString, options); - } - - static equals(a: ForeignKey | PlainMessage | undefined, b: ForeignKey | PlainMessage | undefined): boolean { - return proto3.util.equals(ForeignKey, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ForeignKey. + * Use `create(ForeignKeySchema)` to create a new message. + */ +export const ForeignKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 23); /** * @generated from message mgmt.v1alpha1.ForeignConstraint */ -export class ForeignConstraint extends Message { - /** - * @deprecated - use columns - * - * @generated from field: string column = 1; - */ - column = ""; - - /** - * @deprecated - use not_nullable - * - * @generated from field: bool is_nullable = 2; - */ - isNullable = false; - +export type ForeignConstraint = Message<"mgmt.v1alpha1.ForeignConstraint"> & { /** * @generated from field: mgmt.v1alpha1.ForeignKey foreign_key = 3; */ @@ -1164,561 +621,194 @@ export class ForeignConstraint extends Message { /** * @generated from field: repeated string columns = 4; */ - columns: string[] = []; + columns: string[]; /** * @generated from field: repeated bool not_nullable = 5; */ - notNullable: boolean[] = []; + notNullable: boolean[]; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ForeignConstraint"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "column", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "is_nullable", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "foreign_key", kind: "message", T: ForeignKey }, - { no: 4, name: "columns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 5, name: "not_nullable", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ForeignConstraint { - return new ForeignConstraint().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ForeignConstraint { - return new ForeignConstraint().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ForeignConstraint { - return new ForeignConstraint().fromJsonString(jsonString, options); - } - - static equals(a: ForeignConstraint | PlainMessage | undefined, b: ForeignConstraint | PlainMessage | undefined): boolean { - return proto3.util.equals(ForeignConstraint, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ForeignConstraint. + * Use `create(ForeignConstraintSchema)` to create a new message. + */ +export const ForeignConstraintSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 24); /** * @generated from message mgmt.v1alpha1.ForeignConstraintTables */ -export class ForeignConstraintTables extends Message { +export type ForeignConstraintTables = Message<"mgmt.v1alpha1.ForeignConstraintTables"> & { /** * @generated from field: repeated mgmt.v1alpha1.ForeignConstraint constraints = 1; */ - constraints: ForeignConstraint[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ForeignConstraintTables"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "constraints", kind: "message", T: ForeignConstraint, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ForeignConstraintTables { - return new ForeignConstraintTables().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ForeignConstraintTables { - return new ForeignConstraintTables().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ForeignConstraintTables { - return new ForeignConstraintTables().fromJsonString(jsonString, options); - } - - static equals(a: ForeignConstraintTables | PlainMessage | undefined, b: ForeignConstraintTables | PlainMessage | undefined): boolean { - return proto3.util.equals(ForeignConstraintTables, a, b); - } -} + constraints: ForeignConstraint[]; +}; /** - * Dependency constraints for a specific table - * - * @generated from message mgmt.v1alpha1.GetConnectionForeignConstraintsResponse + * Describes the message mgmt.v1alpha1.ForeignConstraintTables. + * Use `create(ForeignConstraintTablesSchema)` to create a new message. */ -export class GetConnectionForeignConstraintsResponse extends Message { - /** - * the key here is .
and the list of tables that it depends on, also `.
` format. - * - * @generated from field: map table_constraints = 1; - */ - tableConstraints: { [key: string]: ForeignConstraintTables } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionForeignConstraintsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table_constraints", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: ForeignConstraintTables} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionForeignConstraintsResponse { - return new GetConnectionForeignConstraintsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionForeignConstraintsResponse { - return new GetConnectionForeignConstraintsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionForeignConstraintsResponse { - return new GetConnectionForeignConstraintsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionForeignConstraintsResponse | PlainMessage | undefined, b: GetConnectionForeignConstraintsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionForeignConstraintsResponse, a, b); - } -} +export const ForeignConstraintTablesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 25); /** * @generated from message mgmt.v1alpha1.InitStatementOptions */ -export class InitStatementOptions extends Message { +export type InitStatementOptions = Message<"mgmt.v1alpha1.InitStatementOptions"> & { /** * @generated from field: bool init_schema = 1; */ - initSchema = false; + initSchema: boolean; /** * @generated from field: bool truncate_before_insert = 2; */ - truncateBeforeInsert = false; + truncateBeforeInsert: boolean; /** * @generated from field: bool truncate_cascade = 3; */ - truncateCascade = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.InitStatementOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "init_schema", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "truncate_before_insert", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "truncate_cascade", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): InitStatementOptions { - return new InitStatementOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): InitStatementOptions { - return new InitStatementOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): InitStatementOptions { - return new InitStatementOptions().fromJsonString(jsonString, options); - } + truncateCascade: boolean; +}; - static equals(a: InitStatementOptions | PlainMessage | undefined, b: InitStatementOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(InitStatementOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.InitStatementOptions. + * Use `create(InitStatementOptionsSchema)` to create a new message. + */ +export const InitStatementOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 26); /** * @generated from message mgmt.v1alpha1.GetConnectionInitStatementsRequest */ -export class GetConnectionInitStatementsRequest extends Message { +export type GetConnectionInitStatementsRequest = Message<"mgmt.v1alpha1.GetConnectionInitStatementsRequest"> & { /** * @generated from field: string connection_id = 1; */ - connectionId = ""; + connectionId: string; /** * @generated from field: mgmt.v1alpha1.InitStatementOptions options = 2; */ options?: InitStatementOptions; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionInitStatementsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "options", kind: "message", T: InitStatementOptions }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionInitStatementsRequest { - return new GetConnectionInitStatementsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionInitStatementsRequest { - return new GetConnectionInitStatementsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionInitStatementsRequest { - return new GetConnectionInitStatementsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionInitStatementsRequest | PlainMessage | undefined, b: GetConnectionInitStatementsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionInitStatementsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionInitStatementsRequest. + * Use `create(GetConnectionInitStatementsRequestSchema)` to create a new message. + */ +export const GetConnectionInitStatementsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 27); /** * @generated from message mgmt.v1alpha1.SchemaInitStatements */ -export class SchemaInitStatements extends Message { +export type SchemaInitStatements = Message<"mgmt.v1alpha1.SchemaInitStatements"> & { /** * @generated from field: string label = 1; */ - label = ""; + label: string; /** * @generated from field: repeated string statements = 2; */ - statements: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SchemaInitStatements"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "statements", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); + statements: string[]; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): SchemaInitStatements { - return new SchemaInitStatements().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SchemaInitStatements { - return new SchemaInitStatements().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SchemaInitStatements { - return new SchemaInitStatements().fromJsonString(jsonString, options); - } - - static equals(a: SchemaInitStatements | PlainMessage | undefined, b: SchemaInitStatements | PlainMessage | undefined): boolean { - return proto3.util.equals(SchemaInitStatements, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SchemaInitStatements. + * Use `create(SchemaInitStatementsSchema)` to create a new message. + */ +export const SchemaInitStatementsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 28); /** * Init statement for a specific table * * @generated from message mgmt.v1alpha1.GetConnectionInitStatementsResponse */ -export class GetConnectionInitStatementsResponse extends Message { +export type GetConnectionInitStatementsResponse = Message<"mgmt.v1alpha1.GetConnectionInitStatementsResponse"> & { /** * the key here is .
and value is the table init statement. * * @generated from field: map table_init_statements = 1; */ - tableInitStatements: { [key: string]: string } = {}; + tableInitStatements: { [key: string]: string }; /** * the key here is .
and value is the table truncate statement. * * @generated from field: map table_truncate_statements = 2; */ - tableTruncateStatements: { [key: string]: string } = {}; + tableTruncateStatements: { [key: string]: string }; /** * @generated from field: repeated mgmt.v1alpha1.SchemaInitStatements schema_init_statements = 3; */ - schemaInitStatements: SchemaInitStatements[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionInitStatementsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table_init_statements", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 2, name: "table_truncate_statements", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 3, name: "schema_init_statements", kind: "message", T: SchemaInitStatements, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionInitStatementsResponse { - return new GetConnectionInitStatementsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionInitStatementsResponse { - return new GetConnectionInitStatementsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionInitStatementsResponse { - return new GetConnectionInitStatementsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionInitStatementsResponse | PlainMessage | undefined, b: GetConnectionInitStatementsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionInitStatementsResponse, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.PrimaryConstraint - */ -export class PrimaryConstraint extends Message { - /** - * @generated from field: repeated string columns = 1; - */ - columns: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PrimaryConstraint"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "columns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PrimaryConstraint { - return new PrimaryConstraint().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PrimaryConstraint { - return new PrimaryConstraint().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PrimaryConstraint { - return new PrimaryConstraint().fromJsonString(jsonString, options); - } - - static equals(a: PrimaryConstraint | PlainMessage | undefined, b: PrimaryConstraint | PlainMessage | undefined): boolean { - return proto3.util.equals(PrimaryConstraint, a, b); - } -} + schemaInitStatements: SchemaInitStatements[]; +}; /** - * Primary constraints for a specific table - * - * @generated from message mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest + * Describes the message mgmt.v1alpha1.GetConnectionInitStatementsResponse. + * Use `create(GetConnectionInitStatementsResponseSchema)` to create a new message. */ -export class GetConnectionPrimaryConstraintsRequest extends Message { - /** - * @generated from field: string connection_id = 1; - */ - connectionId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionPrimaryConstraintsRequest { - return new GetConnectionPrimaryConstraintsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionPrimaryConstraintsRequest { - return new GetConnectionPrimaryConstraintsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionPrimaryConstraintsRequest { - return new GetConnectionPrimaryConstraintsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionPrimaryConstraintsRequest | PlainMessage | undefined, b: GetConnectionPrimaryConstraintsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionPrimaryConstraintsRequest, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse - */ -export class GetConnectionPrimaryConstraintsResponse extends Message { - /** - * the key here is .
and value is the primary constraint - * - * @generated from field: map table_constraints = 1; - */ - tableConstraints: { [key: string]: PrimaryConstraint } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table_constraints", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: PrimaryConstraint} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionPrimaryConstraintsResponse { - return new GetConnectionPrimaryConstraintsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionPrimaryConstraintsResponse { - return new GetConnectionPrimaryConstraintsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionPrimaryConstraintsResponse { - return new GetConnectionPrimaryConstraintsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionPrimaryConstraintsResponse | PlainMessage | undefined, b: GetConnectionPrimaryConstraintsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionPrimaryConstraintsResponse, a, b); - } -} +export const GetConnectionInitStatementsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 29); /** - * Unique constraints for a specific table - * - * @generated from message mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest + * @generated from message mgmt.v1alpha1.PrimaryConstraint */ -export class GetConnectionUniqueConstraintsRequest extends Message { +export type PrimaryConstraint = Message<"mgmt.v1alpha1.PrimaryConstraint"> & { /** - * @generated from field: string connection_id = 1; + * @generated from field: repeated string columns = 1; */ - connectionId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionUniqueConstraintsRequest { - return new GetConnectionUniqueConstraintsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionUniqueConstraintsRequest { - return new GetConnectionUniqueConstraintsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionUniqueConstraintsRequest { - return new GetConnectionUniqueConstraintsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionUniqueConstraintsRequest | PlainMessage | undefined, b: GetConnectionUniqueConstraintsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionUniqueConstraintsRequest, a, b); - } -} + columns: string[]; +}; /** - * @generated from message mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse + * Describes the message mgmt.v1alpha1.PrimaryConstraint. + * Use `create(PrimaryConstraintSchema)` to create a new message. */ -export class GetConnectionUniqueConstraintsResponse extends Message { - /** - * the key here is .
and value is the unique constraint - * - * @generated from field: map table_constraints = 1; - */ - tableConstraints: { [key: string]: UniqueConstraint } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table_constraints", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: UniqueConstraint} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionUniqueConstraintsResponse { - return new GetConnectionUniqueConstraintsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionUniqueConstraintsResponse { - return new GetConnectionUniqueConstraintsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionUniqueConstraintsResponse { - return new GetConnectionUniqueConstraintsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionUniqueConstraintsResponse | PlainMessage | undefined, b: GetConnectionUniqueConstraintsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionUniqueConstraintsResponse, a, b); - } -} +export const PrimaryConstraintSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 30); /** * @generated from message mgmt.v1alpha1.UniqueConstraint */ -export class UniqueConstraint extends Message { +export type UniqueConstraint = Message<"mgmt.v1alpha1.UniqueConstraint"> & { /** * @generated from field: repeated string columns = 1; */ - columns: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UniqueConstraint"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "columns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); + columns: string[]; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): UniqueConstraint { - return new UniqueConstraint().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UniqueConstraint { - return new UniqueConstraint().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UniqueConstraint { - return new UniqueConstraint().fromJsonString(jsonString, options); - } - - static equals(a: UniqueConstraint | PlainMessage | undefined, b: UniqueConstraint | PlainMessage | undefined): boolean { - return proto3.util.equals(UniqueConstraint, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.UniqueConstraint. + * Use `create(UniqueConstraintSchema)` to create a new message. + */ +export const UniqueConstraintSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 31); /** * @generated from message mgmt.v1alpha1.GetAiGeneratedDataRequest */ -export class GetAiGeneratedDataRequest extends Message { +export type GetAiGeneratedDataRequest = Message<"mgmt.v1alpha1.GetAiGeneratedDataRequest"> & { /** * @generated from field: string ai_connection_id = 1; */ - aiConnectionId = ""; + aiConnectionId: string; /** * @generated from field: int64 count = 2; */ - count = protoInt64.zero; + count: bigint; /** * @generated from field: string model_name = 3; */ - modelName = ""; + modelName: string; /** * @generated from field: optional string user_prompt = 4; @@ -1728,346 +818,267 @@ export class GetAiGeneratedDataRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAiGeneratedDataRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ai_connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 3, name: "model_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "user_prompt", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "data_connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "table", kind: "message", T: DatabaseTable }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAiGeneratedDataRequest { - return new GetAiGeneratedDataRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAiGeneratedDataRequest { - return new GetAiGeneratedDataRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAiGeneratedDataRequest { - return new GetAiGeneratedDataRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetAiGeneratedDataRequest | PlainMessage | undefined, b: GetAiGeneratedDataRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAiGeneratedDataRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAiGeneratedDataRequest. + * Use `create(GetAiGeneratedDataRequestSchema)` to create a new message. + */ +export const GetAiGeneratedDataRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 32); /** * @generated from message mgmt.v1alpha1.DatabaseTable */ -export class DatabaseTable extends Message { +export type DatabaseTable = Message<"mgmt.v1alpha1.DatabaseTable"> & { /** * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * @generated from field: string table = 2; */ - table = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DatabaseTable"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DatabaseTable { - return new DatabaseTable().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DatabaseTable { - return new DatabaseTable().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DatabaseTable { - return new DatabaseTable().fromJsonString(jsonString, options); - } + table: string; +}; - static equals(a: DatabaseTable | PlainMessage | undefined, b: DatabaseTable | PlainMessage | undefined): boolean { - return proto3.util.equals(DatabaseTable, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DatabaseTable. + * Use `create(DatabaseTableSchema)` to create a new message. + */ +export const DatabaseTableSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 33); /** * @generated from message mgmt.v1alpha1.GetAiGeneratedDataResponse */ -export class GetAiGeneratedDataResponse extends Message { +export type GetAiGeneratedDataResponse = Message<"mgmt.v1alpha1.GetAiGeneratedDataResponse"> & { /** * A list of generated records * * @generated from field: repeated google.protobuf.Struct records = 1; */ - records: Struct[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAiGeneratedDataResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "records", kind: "message", T: Struct, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAiGeneratedDataResponse { - return new GetAiGeneratedDataResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAiGeneratedDataResponse { - return new GetAiGeneratedDataResponse().fromJson(jsonValue, options); - } + records: JsonObject[]; +}; - static fromJsonString(jsonString: string, options?: Partial): GetAiGeneratedDataResponse { - return new GetAiGeneratedDataResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetAiGeneratedDataResponse | PlainMessage | undefined, b: GetAiGeneratedDataResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAiGeneratedDataResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAiGeneratedDataResponse. + * Use `create(GetAiGeneratedDataResponseSchema)` to create a new message. + */ +export const GetAiGeneratedDataResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 34); /** * @generated from message mgmt.v1alpha1.GetConnectionTableConstraintsRequest */ -export class GetConnectionTableConstraintsRequest extends Message { +export type GetConnectionTableConstraintsRequest = Message<"mgmt.v1alpha1.GetConnectionTableConstraintsRequest"> & { /** * @generated from field: string connection_id = 1; */ - connectionId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionTableConstraintsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionTableConstraintsRequest { - return new GetConnectionTableConstraintsRequest().fromBinary(bytes, options); - } + connectionId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionTableConstraintsRequest { - return new GetConnectionTableConstraintsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionTableConstraintsRequest { - return new GetConnectionTableConstraintsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionTableConstraintsRequest | PlainMessage | undefined, b: GetConnectionTableConstraintsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionTableConstraintsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionTableConstraintsRequest. + * Use `create(GetConnectionTableConstraintsRequestSchema)` to create a new message. + */ +export const GetConnectionTableConstraintsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 35); /** * @generated from message mgmt.v1alpha1.UniqueConstraints */ -export class UniqueConstraints extends Message { +export type UniqueConstraints = Message<"mgmt.v1alpha1.UniqueConstraints"> & { /** * @generated from field: repeated mgmt.v1alpha1.UniqueConstraint constraints = 1; */ - constraints: UniqueConstraint[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UniqueConstraints"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "constraints", kind: "message", T: UniqueConstraint, repeated: true }, - ]); + constraints: UniqueConstraint[]; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): UniqueConstraints { - return new UniqueConstraints().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UniqueConstraints { - return new UniqueConstraints().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UniqueConstraints { - return new UniqueConstraints().fromJsonString(jsonString, options); - } - - static equals(a: UniqueConstraints | PlainMessage | undefined, b: UniqueConstraints | PlainMessage | undefined): boolean { - return proto3.util.equals(UniqueConstraints, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.UniqueConstraints. + * Use `create(UniqueConstraintsSchema)` to create a new message. + */ +export const UniqueConstraintsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 36); /** * @generated from message mgmt.v1alpha1.GetConnectionTableConstraintsResponse */ -export class GetConnectionTableConstraintsResponse extends Message { +export type GetConnectionTableConstraintsResponse = Message<"mgmt.v1alpha1.GetConnectionTableConstraintsResponse"> & { /** * the key here is .
and the list of tables that it depends on, also `.
` format. * * @generated from field: map foreign_key_constraints = 1; */ - foreignKeyConstraints: { [key: string]: ForeignConstraintTables } = {}; + foreignKeyConstraints: { [key: string]: ForeignConstraintTables }; /** * the key here is .
and value is the primary constraint * * @generated from field: map primary_key_constraints = 2; */ - primaryKeyConstraints: { [key: string]: PrimaryConstraint } = {}; + primaryKeyConstraints: { [key: string]: PrimaryConstraint }; /** * the key here is .
and value is the unique constraint * * @generated from field: map unique_constraints = 3; */ - uniqueConstraints: { [key: string]: UniqueConstraints } = {}; + uniqueConstraints: { [key: string]: UniqueConstraints }; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionTableConstraintsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "foreign_key_constraints", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: ForeignConstraintTables} }, - { no: 2, name: "primary_key_constraints", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: PrimaryConstraint} }, - { no: 3, name: "unique_constraints", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: UniqueConstraints} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionTableConstraintsResponse { - return new GetConnectionTableConstraintsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionTableConstraintsResponse { - return new GetConnectionTableConstraintsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionTableConstraintsResponse { - return new GetConnectionTableConstraintsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionTableConstraintsResponse | PlainMessage | undefined, b: GetConnectionTableConstraintsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionTableConstraintsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionTableConstraintsResponse. + * Use `create(GetConnectionTableConstraintsResponseSchema)` to create a new message. + */ +export const GetConnectionTableConstraintsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 37); /** * @generated from message mgmt.v1alpha1.GetTableRowCountRequest */ -export class GetTableRowCountRequest extends Message { +export type GetTableRowCountRequest = Message<"mgmt.v1alpha1.GetTableRowCountRequest"> & { /** * @generated from field: string connection_id = 1; */ - connectionId = ""; + connectionId: string; /** * @generated from field: string schema = 2; */ - schema = ""; + schema: string; /** * @generated from field: string table = 3; */ - table = ""; + table: string; /** * @generated from field: optional string where_clause = 4; */ whereClause?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetTableRowCountRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "where_clause", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetTableRowCountRequest { - return new GetTableRowCountRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetTableRowCountRequest { - return new GetTableRowCountRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetTableRowCountRequest { - return new GetTableRowCountRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetTableRowCountRequest | PlainMessage | undefined, b: GetTableRowCountRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetTableRowCountRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetTableRowCountRequest. + * Use `create(GetTableRowCountRequestSchema)` to create a new message. + */ +export const GetTableRowCountRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 38); /** * @generated from message mgmt.v1alpha1.GetTableRowCountResponse */ -export class GetTableRowCountResponse extends Message { +export type GetTableRowCountResponse = Message<"mgmt.v1alpha1.GetTableRowCountResponse"> & { /** * @generated from field: int64 count = 1; */ - count = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetTableRowCountResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetTableRowCountResponse { - return new GetTableRowCountResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetTableRowCountResponse { - return new GetTableRowCountResponse().fromJson(jsonValue, options); - } + count: bigint; +}; - static fromJsonString(jsonString: string, options?: Partial): GetTableRowCountResponse { - return new GetTableRowCountResponse().fromJsonString(jsonString, options); - } +/** + * Describes the message mgmt.v1alpha1.GetTableRowCountResponse. + * Use `create(GetTableRowCountResponseSchema)` to create a new message. + */ +export const GetTableRowCountResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection_data, 39); - static equals(a: GetTableRowCountResponse | PlainMessage | undefined, b: GetTableRowCountResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetTableRowCountResponse, a, b); - } -} +/** + * Service for managing connection data. + * This is used in handle data from a connection + * + * @generated from service mgmt.v1alpha1.ConnectionDataService + */ +export const ConnectionDataService: GenService<{ + /** + * Streaming endpoint that will stream the data available from the Connection to the client. + * Used primarily by the CLI sync command. + * + * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionDataStream + */ + getConnectionDataStream: { + methodKind: "server_streaming"; + input: typeof GetConnectionDataStreamRequestSchema; + output: typeof GetConnectionDataStreamResponseSchema; + }, + /** + * Returns the schema for a specific connection. Used mostly for SQL-based connections + * + * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionSchema + */ + getConnectionSchema: { + methodKind: "unary"; + input: typeof GetConnectionSchemaRequestSchema; + output: typeof GetConnectionSchemaResponseSchema; + }, + /** + * Returns the schema in map format. The keys are the fully qualified table in the format .
+ * + * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMap + */ + getConnectionSchemaMap: { + methodKind: "unary"; + input: typeof GetConnectionSchemaMapRequestSchema; + output: typeof GetConnectionSchemaMapResponseSchema; + }, + /** + * Returns the schema in map format for every request provided + * + * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionSchemaMaps + */ + getConnectionSchemaMaps: { + methodKind: "unary"; + input: typeof GetConnectionSchemaMapsRequestSchema; + output: typeof GetConnectionSchemaMapsResponseSchema; + }, + /** + * For a specific connection, returns the table constraints. Mostly useful for SQL-based Connections. + * + * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionTableConstraints + */ + getConnectionTableConstraints: { + methodKind: "unary"; + input: typeof GetConnectionTableConstraintsRequestSchema; + output: typeof GetConnectionTableConstraintsResponseSchema; + }, + /** + * For a specific connection, returns the init table statements. Mostly useful for SQL-based Connections. + * Used primarily by the CLI sync command to create table schema init statement. + * + * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetConnectionInitStatements + */ + getConnectionInitStatements: { + methodKind: "unary"; + input: typeof GetConnectionInitStatementsRequestSchema; + output: typeof GetConnectionInitStatementsResponseSchema; + }, + /** + * Query an AI connection by providing the necessary values. Typically used for generating preview data + * + * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetAiGeneratedData + */ + getAiGeneratedData: { + methodKind: "unary"; + input: typeof GetAiGeneratedDataRequestSchema; + output: typeof GetAiGeneratedDataResponseSchema; + }, + /** + * Query table with subset to get row count + * + * @generated from rpc mgmt.v1alpha1.ConnectionDataService.GetTableRowCount + */ + getTableRowCount: { + methodKind: "unary"; + input: typeof GetTableRowCountRequestSchema; + output: typeof GetTableRowCountResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_mgmt_v1alpha1_connection_data, 0); diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_pb.ts index 8a2b77b003..226d921e12 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/connection_pb.ts @@ -1,487 +1,254 @@ -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js" +// @generated by protoc-gen-es v2.2.3 with parameter "target=ts,import_extension=.js" // @generated from file mgmt/v1alpha1/connection.proto (package mgmt.v1alpha1, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, Timestamp } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file mgmt/v1alpha1/connection.proto. + */ +export const file_mgmt_v1alpha1_connection: GenFile = /*@__PURE__*/ + fileDesc("Ch5tZ210L3YxYWxwaGExL2Nvbm5lY3Rpb24ucHJvdG8SDW1nbXQudjFhbHBoYTEiNQoVR2V0Q29ubmVjdGlvbnNSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIkgKFkdldENvbm5lY3Rpb25zUmVzcG9uc2USLgoLY29ubmVjdGlvbnMYASADKAsyGS5tZ210LnYxYWxwaGExLkNvbm5lY3Rpb24iLAoUR2V0Q29ubmVjdGlvblJlcXVlc3QSFAoCaWQYASABKAlCCLpIBXIDsAEBIkYKFUdldENvbm5lY3Rpb25SZXNwb25zZRItCgpjb25uZWN0aW9uGAEgASgLMhkubWdtdC52MWFscGhhMS5Db25uZWN0aW9uIpwBChdDcmVhdGVDb25uZWN0aW9uUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABARInCgRuYW1lGAIgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kEjoKEWNvbm5lY3Rpb25fY29uZmlnGAMgASgLMh8ubWdtdC52MWFscGhhMS5Db25uZWN0aW9uQ29uZmlnIkkKGENyZWF0ZUNvbm5lY3Rpb25SZXNwb25zZRItCgpjb25uZWN0aW9uGAEgASgLMhkubWdtdC52MWFscGhhMS5Db25uZWN0aW9uIpQBChdVcGRhdGVDb25uZWN0aW9uUmVxdWVzdBIUCgJpZBgBIAEoCUIIukgFcgOwAQESJwoEbmFtZRgCIAEoCUIZukgWchQyEl5bYS16MC05LV17MywxMDB9JBI6ChFjb25uZWN0aW9uX2NvbmZpZxgDIAEoCzIfLm1nbXQudjFhbHBoYTEuQ29ubmVjdGlvbkNvbmZpZyJJChhVcGRhdGVDb25uZWN0aW9uUmVzcG9uc2USLQoKY29ubmVjdGlvbhgBIAEoCzIZLm1nbXQudjFhbHBoYTEuQ29ubmVjdGlvbiIvChdEZWxldGVDb25uZWN0aW9uUmVxdWVzdBIUCgJpZBgBIAEoCUIIukgFcgOwAQEiGgoYRGVsZXRlQ29ubmVjdGlvblJlc3BvbnNlIloKHENoZWNrQ29ubmVjdGlvbkNvbmZpZ1JlcXVlc3QSOgoRY29ubmVjdGlvbl9jb25maWcYASABKAsyHy5tZ210LnYxYWxwaGExLkNvbm5lY3Rpb25Db25maWciOAogQ2hlY2tDb25uZWN0aW9uQ29uZmlnQnlJZFJlcXVlc3QSFAoCaWQYASABKAlCCLpIBXIDsAEBIqkBCiFDaGVja0Nvbm5lY3Rpb25Db25maWdCeUlkUmVzcG9uc2USFAoMaXNfY29ubmVjdGVkGAEgASgIEh0KEGNvbm5lY3Rpb25fZXJyb3IYAiABKAlIAIgBARI6Cgpwcml2aWxlZ2VzGAMgAygLMiYubWdtdC52MWFscGhhMS5Db25uZWN0aW9uUm9sZVByaXZpbGVnZUITChFfY29ubmVjdGlvbl9lcnJvciKlAQodQ2hlY2tDb25uZWN0aW9uQ29uZmlnUmVzcG9uc2USFAoMaXNfY29ubmVjdGVkGAEgASgIEh0KEGNvbm5lY3Rpb25fZXJyb3IYAiABKAlIAIgBARI6Cgpwcml2aWxlZ2VzGAMgAygLMiYubWdtdC52MWFscGhhMS5Db25uZWN0aW9uUm9sZVByaXZpbGVnZUITChFfY29ubmVjdGlvbl9lcnJvciJhChdDb25uZWN0aW9uUm9sZVByaXZpbGVnZRIPCgdncmFudGVlGAEgASgJEg4KBnNjaGVtYRgCIAEoCRINCgV0YWJsZRgDIAEoCRIWCg5wcml2aWxlZ2VfdHlwZRgEIAMoCSKOAgoKQ29ubmVjdGlvbhIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEjoKEWNvbm5lY3Rpb25fY29uZmlnGAMgASgLMh8ubWdtdC52MWFscGhhMS5Db25uZWN0aW9uQ29uZmlnEhoKEmNyZWF0ZWRfYnlfdXNlcl9pZBgEIAEoCRIuCgpjcmVhdGVkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIaChJ1cGRhdGVkX2J5X3VzZXJfaWQYBiABKAkSLgoKdXBkYXRlZF9hdBgHIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASEgoKYWNjb3VudF9pZBgIIAEoCSL8BAoQQ29ubmVjdGlvbkNvbmZpZxI8CglwZ19jb25maWcYASABKAsyJy5tZ210LnYxYWxwaGExLlBvc3RncmVzQ29ubmVjdGlvbkNvbmZpZ0gAEj0KDWF3c19zM19jb25maWcYAiABKAsyJC5tZ210LnYxYWxwaGExLkF3c1MzQ29ubmVjdGlvbkNvbmZpZ0gAEjwKDG15c3FsX2NvbmZpZxgDIAEoCzIkLm1nbXQudjFhbHBoYTEuTXlzcWxDb25uZWN0aW9uQ29uZmlnSAASSQoQbG9jYWxfZGlyX2NvbmZpZxgEIAEoCzItLm1nbXQudjFhbHBoYTEuTG9jYWxEaXJlY3RvcnlDb25uZWN0aW9uQ29uZmlnSAASPgoNb3BlbmFpX2NvbmZpZxgFIAEoCzIlLm1nbXQudjFhbHBoYTEuT3BlbkFpQ29ubmVjdGlvbkNvbmZpZ0gAEjwKDG1vbmdvX2NvbmZpZxgGIAEoCzIkLm1nbXQudjFhbHBoYTEuTW9uZ29Db25uZWN0aW9uQ29uZmlnSAASUQoXZ2NwX2Nsb3Vkc3RvcmFnZV9jb25maWcYByABKAsyLi5tZ210LnYxYWxwaGExLkdjcENsb3VkU3RvcmFnZUNvbm5lY3Rpb25Db25maWdIABJCCg9keW5hbW9kYl9jb25maWcYCCABKAsyJy5tZ210LnYxYWxwaGExLkR5bmFtb0RCQ29ubmVjdGlvbkNvbmZpZ0gAEjwKDG1zc3FsX2NvbmZpZxgJIAEoCzIkLm1nbXQudjFhbHBoYTEuTXNzcWxDb25uZWN0aW9uQ29uZmlnSABCDwoGY29uZmlnEgW6SAIIASLhAQoVTXNzcWxDb25uZWN0aW9uQ29uZmlnEg0KA3VybBgBIAEoCUgAEj8KEmNvbm5lY3Rpb25fb3B0aW9ucxgCIAEoCzIjLm1nbXQudjFhbHBoYTEuU3FsQ29ubmVjdGlvbk9wdGlvbnMSKAoGdHVubmVsGAMgASgLMhgubWdtdC52MWFscGhhMS5TU0hUdW5uZWwSMgoKY2xpZW50X3RscxgEIAEoCzIeLm1nbXQudjFhbHBoYTEuQ2xpZW50VGxzQ29uZmlnQhoKEWNvbm5lY3Rpb25fY29uZmlnEgW6SAIIASKpAQoYRHluYW1vREJDb25uZWN0aW9uQ29uZmlnEjkKC2NyZWRlbnRpYWxzGAEgASgLMh8ubWdtdC52MWFscGhhMS5Bd3NTM0NyZWRlbnRpYWxzSACIAQESEwoGcmVnaW9uGAIgASgJSAGIAQESFQoIZW5kcG9pbnQYAyABKAlIAogBAUIOCgxfY3JlZGVudGlhbHNCCQoHX3JlZ2lvbkILCglfZW5kcG9pbnQioAEKFU1vbmdvQ29ubmVjdGlvbkNvbmZpZxINCgN1cmwYASABKAlIABIoCgZ0dW5uZWwYAiABKAsyGC5tZ210LnYxYWxwaGExLlNTSFR1bm5lbBIyCgpjbGllbnRfdGxzGAMgASgLMh4ubWdtdC52MWFscGhhMS5DbGllbnRUbHNDb25maWdCGgoRY29ubmVjdGlvbl9jb25maWcSBbpIAggBIjoKFk9wZW5BaUNvbm5lY3Rpb25Db25maWcSDwoHYXBpX2tleRgBIAEoCRIPCgdhcGlfdXJsGAIgASgJIjcKHkxvY2FsRGlyZWN0b3J5Q29ubmVjdGlvbkNvbmZpZxIVCgRwYXRoGAEgASgJQge6SARyAhABIp0CChhQb3N0Z3Jlc0Nvbm5lY3Rpb25Db25maWcSDQoDdXJsGAEgASgJSAASNwoKY29ubmVjdGlvbhgCIAEoCzIhLm1nbXQudjFhbHBoYTEuUG9zdGdyZXNDb25uZWN0aW9uSAASKAoGdHVubmVsGAMgASgLMhgubWdtdC52MWFscGhhMS5TU0hUdW5uZWwSPwoSY29ubmVjdGlvbl9vcHRpb25zGAQgASgLMiMubWdtdC52MWFscGhhMS5TcWxDb25uZWN0aW9uT3B0aW9ucxIyCgpjbGllbnRfdGxzGAUgASgLMh4ubWdtdC52MWFscGhhMS5DbGllbnRUbHNDb25maWdCGgoRY29ubmVjdGlvbl9jb25maWcSBbpIAggBIrMBCg9DbGllbnRUbHNDb25maWcSFgoJcm9vdF9jZXJ0GAEgASgJSACIAQESGAoLY2xpZW50X2NlcnQYAiABKAlIAYgBARIXCgpjbGllbnRfa2V5GAMgASgJSAKIAQESGAoLc2VydmVyX25hbWUYBCABKAlIA4gBAUIMCgpfcm9vdF9jZXJ0Qg4KDF9jbGllbnRfY2VydEINCgtfY2xpZW50X2tleUIOCgxfc2VydmVyX25hbWUi+gEKFFNxbENvbm5lY3Rpb25PcHRpb25zEiEKFG1heF9jb25uZWN0aW9uX2xpbWl0GAEgASgFSACIAQESIQoUbWF4X2lkbGVfY29ubmVjdGlvbnMYAiABKAVIAYgBARIeChFtYXhfaWRsZV9kdXJhdGlvbhgDIAEoCUgCiAEBEh4KEW1heF9vcGVuX2R1cmF0aW9uGAQgASgJSAOIAQFCFwoVX21heF9jb25uZWN0aW9uX2xpbWl0QhcKFV9tYXhfaWRsZV9jb25uZWN0aW9uc0IUChJfbWF4X2lkbGVfZHVyYXRpb25CFAoSX21heF9vcGVuX2R1cmF0aW9uItEBCglTU0hUdW5uZWwSFQoEaG9zdBgBIAEoCUIHukgEcgIQARIVCgRwb3J0GAIgASgFQge6SAQaAigAEhUKBHVzZXIYAyABKAlCB7pIBHICEAESKwoVa25vd25faG9zdF9wdWJsaWNfa2V5GAQgASgJQge6SARyAhABSACIAQESOAoOYXV0aGVudGljYXRpb24YBSABKAsyIC5tZ210LnYxYWxwaGExLlNTSEF1dGhlbnRpY2F0aW9uQhgKFl9rbm93bl9ob3N0X3B1YmxpY19rZXkikgEKEVNTSEF1dGhlbnRpY2F0aW9uEjIKCnBhc3NwaHJhc2UYASABKAsyHC5tZ210LnYxYWxwaGExLlNTSFBhc3NwaHJhc2VIABIzCgtwcml2YXRlX2tleRgCIAEoCzIcLm1nbXQudjFhbHBoYTEuU1NIUHJpdmF0ZUtleUgAQhQKC2F1dGhfY29uZmlnEgW6SAIIASInCg1TU0hQYXNzcGhyYXNlEhYKBXZhbHVlGAEgASgJQge6SARyAhABIk8KDVNTSFByaXZhdGVLZXkSFgoFdmFsdWUYASABKAlCB7pIBHICEAESFwoKcGFzc3BocmFzZRgCIAEoCUgAiAEBQg0KC19wYXNzcGhyYXNlIn4KElBvc3RncmVzQ29ubmVjdGlvbhIMCgRob3N0GAEgASgJEgwKBHBvcnQYAiABKAUSDAoEbmFtZRgDIAEoCRIMCgR1c2VyGAQgASgJEgwKBHBhc3MYBSABKAkSFQoIc3NsX21vZGUYBiABKAlIAIgBAUILCglfc3NsX21vZGUiaQoPTXlzcWxDb25uZWN0aW9uEgwKBHVzZXIYASABKAkSDAoEcGFzcxgCIAEoCRIQCghwcm90b2NvbBgDIAEoCRIMCgRob3N0GAQgASgJEgwKBHBvcnQYBSABKAUSDAoEbmFtZRgGIAEoCSKXAgoVTXlzcWxDb25uZWN0aW9uQ29uZmlnEg0KA3VybBgBIAEoCUgAEjQKCmNvbm5lY3Rpb24YAiABKAsyHi5tZ210LnYxYWxwaGExLk15c3FsQ29ubmVjdGlvbkgAEigKBnR1bm5lbBgDIAEoCzIYLm1nbXQudjFhbHBoYTEuU1NIVHVubmVsEj8KEmNvbm5lY3Rpb25fb3B0aW9ucxgEIAEoCzIjLm1nbXQudjFhbHBoYTEuU3FsQ29ubmVjdGlvbk9wdGlvbnMSMgoKY2xpZW50X3RscxgFIAEoCzIeLm1nbXQudjFhbHBoYTEuQ2xpZW50VGxzQ29uZmlnQhoKEWNvbm5lY3Rpb25fY29uZmlnEgW6SAIIASLvAQoVQXdzUzNDb25uZWN0aW9uQ29uZmlnEhgKC3BhdGhfcHJlZml4GAIgASgJSACIAQESOQoLY3JlZGVudGlhbHMYAyABKAsyHy5tZ210LnYxYWxwaGExLkF3c1MzQ3JlZGVudGlhbHNIAYgBARITCgZyZWdpb24YBCABKAlIAogBARIVCghlbmRwb2ludBgFIAEoCUgDiAEBEhcKBmJ1Y2tldBgGIAEoCUIHukgEcgIQAUIOCgxfcGF0aF9wcmVmaXhCDgoMX2NyZWRlbnRpYWxzQgkKB19yZWdpb25CCwoJX2VuZHBvaW50SgQIARACIswCChBBd3NTM0NyZWRlbnRpYWxzEhQKB3Byb2ZpbGUYASABKAlIAIgBARIaCg1hY2Nlc3Nfa2V5X2lkGAIgASgJSAGIAQESHgoRc2VjcmV0X2FjY2Vzc19rZXkYAyABKAlIAogBARIaCg1zZXNzaW9uX3Rva2VuGAQgASgJSAOIAQESGgoNZnJvbV9lYzJfcm9sZRgFIAEoCEgEiAEBEhUKCHJvbGVfYXJuGAYgASgJSAWIAQESHQoQcm9sZV9leHRlcm5hbF9pZBgHIAEoCUgGiAEBQgoKCF9wcm9maWxlQhAKDl9hY2Nlc3Nfa2V5X2lkQhQKEl9zZWNyZXRfYWNjZXNzX2tleUIQCg5fc2Vzc2lvbl90b2tlbkIQCg5fZnJvbV9lYzJfcm9sZUILCglfcm9sZV9hcm5CEwoRX3JvbGVfZXh0ZXJuYWxfaWQirgEKH0djcENsb3VkU3RvcmFnZUNvbm5lY3Rpb25Db25maWcSFwoGYnVja2V0GAEgASgJQge6SARyAhABEhgKC3BhdGhfcHJlZml4GAIgASgJSACIAQESKAobc2VydmljZV9hY2NvdW50X2NyZWRlbnRpYWxzGAMgASgJSAGIAQFCDgoMX3BhdGhfcHJlZml4Qh4KHF9zZXJ2aWNlX2FjY291bnRfY3JlZGVudGlhbHMidAogSXNDb25uZWN0aW9uTmFtZUF2YWlsYWJsZVJlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQESMgoPY29ubmVjdGlvbl9uYW1lGAIgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kIjkKIUlzQ29ubmVjdGlvbk5hbWVBdmFpbGFibGVSZXNwb25zZRIUCgxpc19hdmFpbGFibGUYASABKAgiRAoUQ2hlY2tTcWxRdWVyeVJlcXVlc3QSFAoCaWQYASABKAlCCLpIBXIDsAEBEhYKBXF1ZXJ5GAIgASgJQge6SARyAhABIlcKFUNoZWNrU3FsUXVlcnlSZXNwb25zZRIQCghpc192YWxpZBgBIAEoCBIaCg1lcm9ycl9tZXNzYWdlGAIgASgJSACIAQFCEAoOX2Vyb3JyX21lc3NhZ2Uy4QcKEUNvbm5lY3Rpb25TZXJ2aWNlEl8KDkdldENvbm5lY3Rpb25zEiQubWdtdC52MWFscGhhMS5HZXRDb25uZWN0aW9uc1JlcXVlc3QaJS5tZ210LnYxYWxwaGExLkdldENvbm5lY3Rpb25zUmVzcG9uc2UiABJcCg1HZXRDb25uZWN0aW9uEiMubWdtdC52MWFscGhhMS5HZXRDb25uZWN0aW9uUmVxdWVzdBokLm1nbXQudjFhbHBoYTEuR2V0Q29ubmVjdGlvblJlc3BvbnNlIgASZQoQQ3JlYXRlQ29ubmVjdGlvbhImLm1nbXQudjFhbHBoYTEuQ3JlYXRlQ29ubmVjdGlvblJlcXVlc3QaJy5tZ210LnYxYWxwaGExLkNyZWF0ZUNvbm5lY3Rpb25SZXNwb25zZSIAEmUKEFVwZGF0ZUNvbm5lY3Rpb24SJi5tZ210LnYxYWxwaGExLlVwZGF0ZUNvbm5lY3Rpb25SZXF1ZXN0GicubWdtdC52MWFscGhhMS5VcGRhdGVDb25uZWN0aW9uUmVzcG9uc2UiABJlChBEZWxldGVDb25uZWN0aW9uEiYubWdtdC52MWFscGhhMS5EZWxldGVDb25uZWN0aW9uUmVxdWVzdBonLm1nbXQudjFhbHBoYTEuRGVsZXRlQ29ubmVjdGlvblJlc3BvbnNlIgASgAEKGUlzQ29ubmVjdGlvbk5hbWVBdmFpbGFibGUSLy5tZ210LnYxYWxwaGExLklzQ29ubmVjdGlvbk5hbWVBdmFpbGFibGVSZXF1ZXN0GjAubWdtdC52MWFscGhhMS5Jc0Nvbm5lY3Rpb25OYW1lQXZhaWxhYmxlUmVzcG9uc2UiABJ0ChVDaGVja0Nvbm5lY3Rpb25Db25maWcSKy5tZ210LnYxYWxwaGExLkNoZWNrQ29ubmVjdGlvbkNvbmZpZ1JlcXVlc3QaLC5tZ210LnYxYWxwaGExLkNoZWNrQ29ubmVjdGlvbkNvbmZpZ1Jlc3BvbnNlIgASgAEKGUNoZWNrQ29ubmVjdGlvbkNvbmZpZ0J5SWQSLy5tZ210LnYxYWxwaGExLkNoZWNrQ29ubmVjdGlvbkNvbmZpZ0J5SWRSZXF1ZXN0GjAubWdtdC52MWFscGhhMS5DaGVja0Nvbm5lY3Rpb25Db25maWdCeUlkUmVzcG9uc2UiABJcCg1DaGVja1NxbFF1ZXJ5EiMubWdtdC52MWFscGhhMS5DaGVja1NxbFF1ZXJ5UmVxdWVzdBokLm1nbXQudjFhbHBoYTEuQ2hlY2tTcWxRdWVyeVJlc3BvbnNlIgBCywEKEWNvbS5tZ210LnYxYWxwaGExQg9Db25uZWN0aW9uUHJvdG9QAVpQZ2l0aHViLmNvbS9udWNsZXVzY2xvdWQvbmVvc3luYy9iYWNrZW5kL2dlbi9nby9wcm90b3MvbWdtdC92MWFscGhhMTttZ210djFhbHBoYTGiAgNNWFiqAg1NZ210LlYxYWxwaGExygINTWdtdFxWMWFscGhhMeICGU1nbXRcVjFhbHBoYTFcR1BCTWV0YWRhdGHqAg5NZ210OjpWMWFscGhhMWIGcHJvdG8z", [file_buf_validate_validate, file_google_protobuf_timestamp]); /** * @generated from message mgmt.v1alpha1.GetConnectionsRequest */ -export class GetConnectionsRequest extends Message { +export type GetConnectionsRequest = Message<"mgmt.v1alpha1.GetConnectionsRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + accountId: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionsRequest { - return new GetConnectionsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionsRequest { - return new GetConnectionsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionsRequest { - return new GetConnectionsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionsRequest | PlainMessage | undefined, b: GetConnectionsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionsRequest. + * Use `create(GetConnectionsRequestSchema)` to create a new message. + */ +export const GetConnectionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 0); /** * @generated from message mgmt.v1alpha1.GetConnectionsResponse */ -export class GetConnectionsResponse extends Message { +export type GetConnectionsResponse = Message<"mgmt.v1alpha1.GetConnectionsResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.Connection connections = 1; */ - connections: Connection[] = []; + connections: Connection[]; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connections", kind: "message", T: Connection, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionsResponse { - return new GetConnectionsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionsResponse { - return new GetConnectionsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionsResponse { - return new GetConnectionsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionsResponse | PlainMessage | undefined, b: GetConnectionsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionsResponse. + * Use `create(GetConnectionsResponseSchema)` to create a new message. + */ +export const GetConnectionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 1); /** * @generated from message mgmt.v1alpha1.GetConnectionRequest */ -export class GetConnectionRequest extends Message { +export type GetConnectionRequest = Message<"mgmt.v1alpha1.GetConnectionRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + id: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionRequest { - return new GetConnectionRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionRequest { - return new GetConnectionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionRequest { - return new GetConnectionRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionRequest | PlainMessage | undefined, b: GetConnectionRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionRequest. + * Use `create(GetConnectionRequestSchema)` to create a new message. + */ +export const GetConnectionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 2); /** * @generated from message mgmt.v1alpha1.GetConnectionResponse */ -export class GetConnectionResponse extends Message { +export type GetConnectionResponse = Message<"mgmt.v1alpha1.GetConnectionResponse"> & { /** * @generated from field: mgmt.v1alpha1.Connection connection = 1; */ connection?: Connection; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetConnectionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection", kind: "message", T: Connection }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetConnectionResponse { - return new GetConnectionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetConnectionResponse { - return new GetConnectionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetConnectionResponse { - return new GetConnectionResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetConnectionResponse | PlainMessage | undefined, b: GetConnectionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetConnectionResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetConnectionResponse. + * Use `create(GetConnectionResponseSchema)` to create a new message. + */ +export const GetConnectionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 3); /** * @generated from message mgmt.v1alpha1.CreateConnectionRequest */ -export class CreateConnectionRequest extends Message { +export type CreateConnectionRequest = Message<"mgmt.v1alpha1.CreateConnectionRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * The friendly name of the connection * * @generated from field: string name = 2; */ - name = ""; + name: string; /** * @generated from field: mgmt.v1alpha1.ConnectionConfig connection_config = 3; */ connectionConfig?: ConnectionConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateConnectionRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "connection_config", kind: "message", T: ConnectionConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateConnectionRequest { - return new CreateConnectionRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateConnectionRequest { - return new CreateConnectionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateConnectionRequest { - return new CreateConnectionRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateConnectionRequest | PlainMessage | undefined, b: CreateConnectionRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateConnectionRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateConnectionRequest. + * Use `create(CreateConnectionRequestSchema)` to create a new message. + */ +export const CreateConnectionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 4); /** * @generated from message mgmt.v1alpha1.CreateConnectionResponse */ -export class CreateConnectionResponse extends Message { +export type CreateConnectionResponse = Message<"mgmt.v1alpha1.CreateConnectionResponse"> & { /** * @generated from field: mgmt.v1alpha1.Connection connection = 1; */ connection?: Connection; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateConnectionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection", kind: "message", T: Connection }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateConnectionResponse { - return new CreateConnectionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateConnectionResponse { - return new CreateConnectionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateConnectionResponse { - return new CreateConnectionResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateConnectionResponse | PlainMessage | undefined, b: CreateConnectionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateConnectionResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateConnectionResponse. + * Use `create(CreateConnectionResponseSchema)` to create a new message. + */ +export const CreateConnectionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 5); /** * @generated from message mgmt.v1alpha1.UpdateConnectionRequest */ -export class UpdateConnectionRequest extends Message { +export type UpdateConnectionRequest = Message<"mgmt.v1alpha1.UpdateConnectionRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; /** * @generated from field: string name = 2; */ - name = ""; + name: string; /** * @generated from field: mgmt.v1alpha1.ConnectionConfig connection_config = 3; */ connectionConfig?: ConnectionConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateConnectionRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "connection_config", kind: "message", T: ConnectionConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateConnectionRequest { - return new UpdateConnectionRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateConnectionRequest { - return new UpdateConnectionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateConnectionRequest { - return new UpdateConnectionRequest().fromJsonString(jsonString, options); - } - - static equals(a: UpdateConnectionRequest | PlainMessage | undefined, b: UpdateConnectionRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateConnectionRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.UpdateConnectionRequest. + * Use `create(UpdateConnectionRequestSchema)` to create a new message. + */ +export const UpdateConnectionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 6); /** * @generated from message mgmt.v1alpha1.UpdateConnectionResponse */ -export class UpdateConnectionResponse extends Message { +export type UpdateConnectionResponse = Message<"mgmt.v1alpha1.UpdateConnectionResponse"> & { /** * @generated from field: mgmt.v1alpha1.Connection connection = 1; */ connection?: Connection; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateConnectionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection", kind: "message", T: Connection }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateConnectionResponse { - return new UpdateConnectionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateConnectionResponse { - return new UpdateConnectionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateConnectionResponse { - return new UpdateConnectionResponse().fromJsonString(jsonString, options); - } - - static equals(a: UpdateConnectionResponse | PlainMessage | undefined, b: UpdateConnectionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateConnectionResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.UpdateConnectionResponse. + * Use `create(UpdateConnectionResponseSchema)` to create a new message. + */ +export const UpdateConnectionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 7); /** * @generated from message mgmt.v1alpha1.DeleteConnectionRequest */ -export class DeleteConnectionRequest extends Message { +export type DeleteConnectionRequest = Message<"mgmt.v1alpha1.DeleteConnectionRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteConnectionRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + id: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteConnectionRequest { - return new DeleteConnectionRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteConnectionRequest { - return new DeleteConnectionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteConnectionRequest { - return new DeleteConnectionRequest().fromJsonString(jsonString, options); - } - - static equals(a: DeleteConnectionRequest | PlainMessage | undefined, b: DeleteConnectionRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteConnectionRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteConnectionRequest. + * Use `create(DeleteConnectionRequestSchema)` to create a new message. + */ +export const DeleteConnectionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 8); /** * @generated from message mgmt.v1alpha1.DeleteConnectionResponse */ -export class DeleteConnectionResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteConnectionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteConnectionResponse { - return new DeleteConnectionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteConnectionResponse { - return new DeleteConnectionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteConnectionResponse { - return new DeleteConnectionResponse().fromJsonString(jsonString, options); - } +export type DeleteConnectionResponse = Message<"mgmt.v1alpha1.DeleteConnectionResponse"> & { +}; - static equals(a: DeleteConnectionResponse | PlainMessage | undefined, b: DeleteConnectionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteConnectionResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteConnectionResponse. + * Use `create(DeleteConnectionResponseSchema)` to create a new message. + */ +export const DeleteConnectionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 9); /** * @generated from message mgmt.v1alpha1.CheckConnectionConfigRequest */ -export class CheckConnectionConfigRequest extends Message { +export type CheckConnectionConfigRequest = Message<"mgmt.v1alpha1.CheckConnectionConfigRequest"> & { /** * @generated from field: mgmt.v1alpha1.ConnectionConfig connection_config = 1; */ connectionConfig?: ConnectionConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CheckConnectionConfigRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_config", kind: "message", T: ConnectionConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CheckConnectionConfigRequest { - return new CheckConnectionConfigRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CheckConnectionConfigRequest { - return new CheckConnectionConfigRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CheckConnectionConfigRequest { - return new CheckConnectionConfigRequest().fromJsonString(jsonString, options); - } - - static equals(a: CheckConnectionConfigRequest | PlainMessage | undefined, b: CheckConnectionConfigRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CheckConnectionConfigRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CheckConnectionConfigRequest. + * Use `create(CheckConnectionConfigRequestSchema)` to create a new message. + */ +export const CheckConnectionConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 10); /** * @generated from message mgmt.v1alpha1.CheckConnectionConfigByIdRequest */ -export class CheckConnectionConfigByIdRequest extends Message { +export type CheckConnectionConfigByIdRequest = Message<"mgmt.v1alpha1.CheckConnectionConfigByIdRequest"> & { /** * The connection id to validate * * @generated from field: string id = 1; */ - id = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CheckConnectionConfigByIdRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CheckConnectionConfigByIdRequest { - return new CheckConnectionConfigByIdRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CheckConnectionConfigByIdRequest { - return new CheckConnectionConfigByIdRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CheckConnectionConfigByIdRequest { - return new CheckConnectionConfigByIdRequest().fromJsonString(jsonString, options); - } + id: string; +}; - static equals(a: CheckConnectionConfigByIdRequest | PlainMessage | undefined, b: CheckConnectionConfigByIdRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CheckConnectionConfigByIdRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CheckConnectionConfigByIdRequest. + * Use `create(CheckConnectionConfigByIdRequestSchema)` to create a new message. + */ +export const CheckConnectionConfigByIdRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 11); /** * @generated from message mgmt.v1alpha1.CheckConnectionConfigByIdResponse */ -export class CheckConnectionConfigByIdResponse extends Message { +export type CheckConnectionConfigByIdResponse = Message<"mgmt.v1alpha1.CheckConnectionConfigByIdResponse"> & { /** * Whether or not the API was able to ping the connection * * @generated from field: bool is_connected = 1; */ - isConnected = false; + isConnected: boolean; /** * This is the error that was received if the API was unable to connect @@ -495,48 +262,26 @@ export class CheckConnectionConfigByIdResponse extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CheckConnectionConfigByIdResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "is_connected", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "connection_error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "privileges", kind: "message", T: ConnectionRolePrivilege, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CheckConnectionConfigByIdResponse { - return new CheckConnectionConfigByIdResponse().fromBinary(bytes, options); - } + privileges: ConnectionRolePrivilege[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): CheckConnectionConfigByIdResponse { - return new CheckConnectionConfigByIdResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CheckConnectionConfigByIdResponse { - return new CheckConnectionConfigByIdResponse().fromJsonString(jsonString, options); - } - - static equals(a: CheckConnectionConfigByIdResponse | PlainMessage | undefined, b: CheckConnectionConfigByIdResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CheckConnectionConfigByIdResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CheckConnectionConfigByIdResponse. + * Use `create(CheckConnectionConfigByIdResponseSchema)` to create a new message. + */ +export const CheckConnectionConfigByIdResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 12); /** * @generated from message mgmt.v1alpha1.CheckConnectionConfigResponse */ -export class CheckConnectionConfigResponse extends Message { +export type CheckConnectionConfigResponse = Message<"mgmt.v1alpha1.CheckConnectionConfigResponse"> & { /** * Whether or not the API was able to ping the connection * * @generated from field: bool is_connected = 1; */ - isConnected = false; + isConnected: boolean; /** * This is the error that was received if the API was unable to connect @@ -548,118 +293,73 @@ export class CheckConnectionConfigResponse extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CheckConnectionConfigResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "is_connected", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "connection_error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "privileges", kind: "message", T: ConnectionRolePrivilege, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CheckConnectionConfigResponse { - return new CheckConnectionConfigResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CheckConnectionConfigResponse { - return new CheckConnectionConfigResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CheckConnectionConfigResponse { - return new CheckConnectionConfigResponse().fromJsonString(jsonString, options); - } - - static equals(a: CheckConnectionConfigResponse | PlainMessage | undefined, b: CheckConnectionConfigResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CheckConnectionConfigResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CheckConnectionConfigResponse. + * Use `create(CheckConnectionConfigResponseSchema)` to create a new message. + */ +export const CheckConnectionConfigResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 13); /** * @generated from message mgmt.v1alpha1.ConnectionRolePrivilege */ -export class ConnectionRolePrivilege extends Message { +export type ConnectionRolePrivilege = Message<"mgmt.v1alpha1.ConnectionRolePrivilege"> & { /** * The role that was given the permissions * * @generated from field: string grantee = 1; */ - grantee = ""; + grantee: string; /** * The database schema. Ex: public * * @generated from field: string schema = 2; */ - schema = ""; + schema: string; /** * The name of the table in the schema * * @generated from field: string table = 3; */ - table = ""; + table: string; /** * The privileges given to that role * * @generated from field: repeated string privilege_type = 4; */ - privilegeType: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ConnectionRolePrivilege"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "grantee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "privilege_type", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); + privilegeType: string[]; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionRolePrivilege { - return new ConnectionRolePrivilege().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionRolePrivilege { - return new ConnectionRolePrivilege().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectionRolePrivilege { - return new ConnectionRolePrivilege().fromJsonString(jsonString, options); - } - - static equals(a: ConnectionRolePrivilege | PlainMessage | undefined, b: ConnectionRolePrivilege | PlainMessage | undefined): boolean { - return proto3.util.equals(ConnectionRolePrivilege, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ConnectionRolePrivilege. + * Use `create(ConnectionRolePrivilegeSchema)` to create a new message. + */ +export const ConnectionRolePrivilegeSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 14); /** * @generated from message mgmt.v1alpha1.Connection */ -export class Connection extends Message { +export type Connection = Message<"mgmt.v1alpha1.Connection"> & { /** * The unique identifier of the connection * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * The unique, friendly name of the connection * * @generated from field: string name = 2; */ - name = ""; + name: string; /** * Contains the connection configuration and connection type @@ -673,7 +373,7 @@ export class Connection extends Message { * * @generated from field: string created_by_user_id = 4; */ - createdByUserId = ""; + createdByUserId: string; /** * When the connection was created @@ -687,7 +387,7 @@ export class Connection extends Message { * * @generated from field: string updated_by_user_id = 6; */ - updatedByUserId = ""; + updatedByUserId: string; /** * When the connection was last updated @@ -701,49 +401,22 @@ export class Connection extends Message { * * @generated from field: string account_id = 8; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.Connection"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "connection_config", kind: "message", T: ConnectionConfig }, - { no: 4, name: "created_by_user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "created_at", kind: "message", T: Timestamp }, - { no: 6, name: "updated_by_user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "updated_at", kind: "message", T: Timestamp }, - { no: 8, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Connection { - return new Connection().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Connection { - return new Connection().fromJson(jsonValue, options); - } + accountId: string; +}; - static fromJsonString(jsonString: string, options?: Partial): Connection { - return new Connection().fromJsonString(jsonString, options); - } - - static equals(a: Connection | PlainMessage | undefined, b: Connection | PlainMessage | undefined): boolean { - return proto3.util.equals(Connection, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.Connection. + * Use `create(ConnectionSchema)` to create a new message. + */ +export const ConnectionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 15); /** * Configuration for all of the supported Neosync connection types * * @generated from message mgmt.v1alpha1.ConnectionConfig */ -export class ConnectionConfig extends Message { +export type ConnectionConfig = Message<"mgmt.v1alpha1.ConnectionConfig"> & { /** * @generated from oneof mgmt.v1alpha1.ConnectionConfig.config */ @@ -819,50 +492,22 @@ export class ConnectionConfig extends Message { */ value: MssqlConnectionConfig; case: "mssqlConfig"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ConnectionConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "pg_config", kind: "message", T: PostgresConnectionConfig, oneof: "config" }, - { no: 2, name: "aws_s3_config", kind: "message", T: AwsS3ConnectionConfig, oneof: "config" }, - { no: 3, name: "mysql_config", kind: "message", T: MysqlConnectionConfig, oneof: "config" }, - { no: 4, name: "local_dir_config", kind: "message", T: LocalDirectoryConnectionConfig, oneof: "config" }, - { no: 5, name: "openai_config", kind: "message", T: OpenAiConnectionConfig, oneof: "config" }, - { no: 6, name: "mongo_config", kind: "message", T: MongoConnectionConfig, oneof: "config" }, - { no: 7, name: "gcp_cloudstorage_config", kind: "message", T: GcpCloudStorageConnectionConfig, oneof: "config" }, - { no: 8, name: "dynamodb_config", kind: "message", T: DynamoDBConnectionConfig, oneof: "config" }, - { no: 9, name: "mssql_config", kind: "message", T: MssqlConnectionConfig, oneof: "config" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionConfig { - return new ConnectionConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionConfig { - return new ConnectionConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConnectionConfig { - return new ConnectionConfig().fromJsonString(jsonString, options); - } - - static equals(a: ConnectionConfig | PlainMessage | undefined, b: ConnectionConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(ConnectionConfig, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mgmt.v1alpha1.ConnectionConfig. + * Use `create(ConnectionConfigSchema)` to create a new message. + */ +export const ConnectionConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 16); /** * Configuration for a Mssql Connection * * @generated from message mgmt.v1alpha1.MssqlConnectionConfig */ -export class MssqlConnectionConfig extends Message { +export type MssqlConnectionConfig = Message<"mgmt.v1alpha1.MssqlConnectionConfig"> & { /** * May provide a raw string url or in the future other methods of connection * @@ -876,7 +521,7 @@ export class MssqlConnectionConfig extends Message { */ value: string; case: "url"; - } | { case: undefined; value?: undefined } = { case: undefined }; + } | { case: undefined; value?: undefined }; /** * @generated from field: mgmt.v1alpha1.SqlConnectionOptions connection_options = 2; @@ -896,44 +541,21 @@ export class MssqlConnectionConfig extends Message { * @generated from field: mgmt.v1alpha1.ClientTlsConfig client_tls = 4; */ clientTls?: ClientTlsConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MssqlConnectionConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "connection_config" }, - { no: 2, name: "connection_options", kind: "message", T: SqlConnectionOptions }, - { no: 3, name: "tunnel", kind: "message", T: SSHTunnel }, - { no: 4, name: "client_tls", kind: "message", T: ClientTlsConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MssqlConnectionConfig { - return new MssqlConnectionConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MssqlConnectionConfig { - return new MssqlConnectionConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MssqlConnectionConfig { - return new MssqlConnectionConfig().fromJsonString(jsonString, options); - } - - static equals(a: MssqlConnectionConfig | PlainMessage | undefined, b: MssqlConnectionConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MssqlConnectionConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MssqlConnectionConfig. + * Use `create(MssqlConnectionConfigSchema)` to create a new message. + */ +export const MssqlConnectionConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 17); /** * Configuration for a DynaomDB Connection * * @generated from message mgmt.v1alpha1.DynamoDBConnectionConfig */ -export class DynamoDBConnectionConfig extends Message { +export type DynamoDBConnectionConfig = Message<"mgmt.v1alpha1.DynamoDBConnectionConfig"> & { /** * Optional credentials that may be provided and will be used to connect to the DynamoDB Instance. * If self-hosting, this may be provided by the environment in lieu of specifying these here @@ -955,41 +577,19 @@ export class DynamoDBConnectionConfig extends Message * @generated from field: optional string endpoint = 3; */ endpoint?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DynamoDBConnectionConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "credentials", kind: "message", T: AwsS3Credentials, opt: true }, - { no: 2, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DynamoDBConnectionConfig { - return new DynamoDBConnectionConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DynamoDBConnectionConfig { - return new DynamoDBConnectionConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DynamoDBConnectionConfig { - return new DynamoDBConnectionConfig().fromJsonString(jsonString, options); - } - - static equals(a: DynamoDBConnectionConfig | PlainMessage | undefined, b: DynamoDBConnectionConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(DynamoDBConnectionConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DynamoDBConnectionConfig. + * Use `create(DynamoDBConnectionConfigSchema)` to create a new message. + */ +export const DynamoDBConnectionConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 18); /** * @generated from message mgmt.v1alpha1.MongoConnectionConfig */ -export class MongoConnectionConfig extends Message { +export type MongoConnectionConfig = Message<"mgmt.v1alpha1.MongoConnectionConfig"> & { /** * May provide either a raw string url, or a structured version * @@ -1003,7 +603,7 @@ export class MongoConnectionConfig extends Message { */ value: string; case: "url"; - } | { case: undefined; value?: undefined } = { case: undefined }; + } | { case: undefined; value?: undefined }; /** * Provide tunnel configuration that can be used to access a connection that is not publicly accessible to the internet @@ -1018,131 +618,68 @@ export class MongoConnectionConfig extends Message { * @generated from field: mgmt.v1alpha1.ClientTlsConfig client_tls = 3; */ clientTls?: ClientTlsConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MongoConnectionConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "connection_config" }, - { no: 2, name: "tunnel", kind: "message", T: SSHTunnel }, - { no: 3, name: "client_tls", kind: "message", T: ClientTlsConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MongoConnectionConfig { - return new MongoConnectionConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MongoConnectionConfig { - return new MongoConnectionConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MongoConnectionConfig { - return new MongoConnectionConfig().fromJsonString(jsonString, options); - } - - static equals(a: MongoConnectionConfig | PlainMessage | undefined, b: MongoConnectionConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MongoConnectionConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MongoConnectionConfig. + * Use `create(MongoConnectionConfigSchema)` to create a new message. + */ +export const MongoConnectionConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 19); /** * Configures a connection to OpenAI or OpenAI compatible API. * * @generated from message mgmt.v1alpha1.OpenAiConnectionConfig */ -export class OpenAiConnectionConfig extends Message { +export type OpenAiConnectionConfig = Message<"mgmt.v1alpha1.OpenAiConnectionConfig"> & { /** * OpenAI Api Key * * @generated from field: string api_key = 1; */ - apiKey = ""; + apiKey: string; /** * OpenAI URL * * @generated from field: string api_url = 2; */ - apiUrl = ""; + apiUrl: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.OpenAiConnectionConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "api_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OpenAiConnectionConfig { - return new OpenAiConnectionConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OpenAiConnectionConfig { - return new OpenAiConnectionConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OpenAiConnectionConfig { - return new OpenAiConnectionConfig().fromJsonString(jsonString, options); - } - - static equals(a: OpenAiConnectionConfig | PlainMessage | undefined, b: OpenAiConnectionConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(OpenAiConnectionConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.OpenAiConnectionConfig. + * Use `create(OpenAiConnectionConfigSchema)` to create a new message. + */ +export const OpenAiConnectionConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 20); /** * Configures a connection to a directory available on the local file system * * @generated from message mgmt.v1alpha1.LocalDirectoryConnectionConfig */ -export class LocalDirectoryConnectionConfig extends Message { +export type LocalDirectoryConnectionConfig = Message<"mgmt.v1alpha1.LocalDirectoryConnectionConfig"> & { /** * The absolute path to a directory that is available on the local file system to the API and Worker nodes * * @generated from field: string path = 1; */ - path = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.LocalDirectoryConnectionConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + path: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): LocalDirectoryConnectionConfig { - return new LocalDirectoryConnectionConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): LocalDirectoryConnectionConfig { - return new LocalDirectoryConnectionConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LocalDirectoryConnectionConfig { - return new LocalDirectoryConnectionConfig().fromJsonString(jsonString, options); - } - - static equals(a: LocalDirectoryConnectionConfig | PlainMessage | undefined, b: LocalDirectoryConnectionConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(LocalDirectoryConnectionConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.LocalDirectoryConnectionConfig. + * Use `create(LocalDirectoryConnectionConfigSchema)` to create a new message. + */ +export const LocalDirectoryConnectionConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 21); /** * @generated from message mgmt.v1alpha1.PostgresConnectionConfig */ -export class PostgresConnectionConfig extends Message { +export type PostgresConnectionConfig = Message<"mgmt.v1alpha1.PostgresConnectionConfig"> & { /** * May provide either a raw string url, or a structured version * @@ -1160,7 +697,7 @@ export class PostgresConnectionConfig extends Message */ value: PostgresConnection; case: "connection"; - } | { case: undefined; value?: undefined } = { case: undefined }; + } | { case: undefined; value?: undefined }; /** * Provide tunnel configuration that can be used to access a postgres connection that is not publicly accessible to the internet @@ -1180,45 +717,21 @@ export class PostgresConnectionConfig extends Message * @generated from field: mgmt.v1alpha1.ClientTlsConfig client_tls = 5; */ clientTls?: ClientTlsConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresConnectionConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "connection_config" }, - { no: 2, name: "connection", kind: "message", T: PostgresConnection, oneof: "connection_config" }, - { no: 3, name: "tunnel", kind: "message", T: SSHTunnel }, - { no: 4, name: "connection_options", kind: "message", T: SqlConnectionOptions }, - { no: 5, name: "client_tls", kind: "message", T: ClientTlsConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresConnectionConfig { - return new PostgresConnectionConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresConnectionConfig { - return new PostgresConnectionConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresConnectionConfig { - return new PostgresConnectionConfig().fromJsonString(jsonString, options); - } - - static equals(a: PostgresConnectionConfig | PlainMessage | undefined, b: PostgresConnectionConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresConnectionConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresConnectionConfig. + * Use `create(PostgresConnectionConfigSchema)` to create a new message. + */ +export const PostgresConnectionConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 22); /** * Config for providing client-side TLS certificates * * @generated from message mgmt.v1alpha1.ClientTlsConfig */ -export class ClientTlsConfig extends Message { +export type ClientTlsConfig = Message<"mgmt.v1alpha1.ClientTlsConfig"> & { /** * Root Certificate in PEM Format * @@ -1247,42 +760,19 @@ export class ClientTlsConfig extends Message { * @generated from field: optional string server_name = 4; */ serverName?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ClientTlsConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "root_cert", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "client_cert", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "client_key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "server_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ClientTlsConfig { - return new ClientTlsConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ClientTlsConfig { - return new ClientTlsConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ClientTlsConfig { - return new ClientTlsConfig().fromJsonString(jsonString, options); - } - - static equals(a: ClientTlsConfig | PlainMessage | undefined, b: ClientTlsConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(ClientTlsConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ClientTlsConfig. + * Use `create(ClientTlsConfigSchema)` to create a new message. + */ +export const ClientTlsConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 23); /** * @generated from message mgmt.v1alpha1.SqlConnectionOptions */ -export class SqlConnectionOptions extends Message { +export type SqlConnectionOptions = Message<"mgmt.v1alpha1.SqlConnectionOptions"> & { /** * Sets the maximum number of open connections * If this value is greater than 0, but less than the max_idle_connections, then max_idle_connections will be reduced to match the max_connection_limit @@ -1320,62 +810,39 @@ export class SqlConnectionOptions extends Message { * @generated from field: optional string max_open_duration = 4; */ maxOpenDuration?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SqlConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "max_connection_limit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 2, name: "max_idle_connections", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 3, name: "max_idle_duration", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "max_open_duration", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SqlConnectionOptions { - return new SqlConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SqlConnectionOptions { - return new SqlConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SqlConnectionOptions { - return new SqlConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: SqlConnectionOptions | PlainMessage | undefined, b: SqlConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(SqlConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SqlConnectionOptions. + * Use `create(SqlConnectionOptionsSchema)` to create a new message. + */ +export const SqlConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 24); /** * @generated from message mgmt.v1alpha1.SSHTunnel */ -export class SSHTunnel extends Message { +export type SSHTunnel = Message<"mgmt.v1alpha1.SSHTunnel"> & { /** * The host of the SSH server * * @generated from field: string host = 1; */ - host = ""; + host: string; /** * The port of the SSH server, typically 22 * * @generated from field: int32 port = 2; */ - port = 0; + port: number; /** * The user that will be used to authenticate * * @generated from field: string user = 3; */ - user = ""; + user: string; /** * Optionally provide the public key of the known host of the SSH tunnel that we are connecting to. @@ -1392,45 +859,21 @@ export class SSHTunnel extends Message { * @generated from field: mgmt.v1alpha1.SSHAuthentication authentication = 5; */ authentication?: SSHAuthentication; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SSHTunnel"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "host", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 3, name: "user", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "known_host_public_key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "authentication", kind: "message", T: SSHAuthentication }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SSHTunnel { - return new SSHTunnel().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SSHTunnel { - return new SSHTunnel().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SSHTunnel { - return new SSHTunnel().fromJsonString(jsonString, options); - } - - static equals(a: SSHTunnel | PlainMessage | undefined, b: SSHTunnel | PlainMessage | undefined): boolean { - return proto3.util.equals(SSHTunnel, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SSHTunnel. + * Use `create(SSHTunnelSchema)` to create a new message. + */ +export const SSHTunnelSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 25); /** * SSH Authentication * * @generated from message mgmt.v1alpha1.SSHAuthentication */ -export class SSHAuthentication extends Message { +export type SSHAuthentication = Message<"mgmt.v1alpha1.SSHAuthentication"> & { /** * @generated from oneof mgmt.v1alpha1.SSHAuthentication.auth_config */ @@ -1446,43 +889,22 @@ export class SSHAuthentication extends Message { */ value: SSHPrivateKey; case: "privateKey"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SSHAuthentication"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "passphrase", kind: "message", T: SSHPassphrase, oneof: "auth_config" }, - { no: 2, name: "private_key", kind: "message", T: SSHPrivateKey, oneof: "auth_config" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SSHAuthentication { - return new SSHAuthentication().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SSHAuthentication { - return new SSHAuthentication().fromJson(jsonValue, options); - } + } | { case: undefined; value?: undefined }; +}; - static fromJsonString(jsonString: string, options?: Partial): SSHAuthentication { - return new SSHAuthentication().fromJsonString(jsonString, options); - } - - static equals(a: SSHAuthentication | PlainMessage | undefined, b: SSHAuthentication | PlainMessage | undefined): boolean { - return proto3.util.equals(SSHAuthentication, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SSHAuthentication. + * Use `create(SSHAuthenticationSchema)` to create a new message. + */ +export const SSHAuthenticationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 26); /** * Contains the configuration needed to retrieve the SSH passphrase for the tunnel * * @generated from message mgmt.v1alpha1.SSHPassphrase */ -export class SSHPassphrase extends Message { +export type SSHPassphrase = Message<"mgmt.v1alpha1.SSHPassphrase"> & { /** * The password to be used to connect to the SSH server * @@ -1490,48 +912,28 @@ export class SSHPassphrase extends Message { * * @generated from field: string value = 1; */ - value = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SSHPassphrase"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + value: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): SSHPassphrase { - return new SSHPassphrase().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SSHPassphrase { - return new SSHPassphrase().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SSHPassphrase { - return new SSHPassphrase().fromJsonString(jsonString, options); - } - - static equals(a: SSHPassphrase | PlainMessage | undefined, b: SSHPassphrase | PlainMessage | undefined): boolean { - return proto3.util.equals(SSHPassphrase, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SSHPassphrase. + * Use `create(SSHPassphraseSchema)` to create a new message. + */ +export const SSHPassphraseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 27); /** * Contains the configuration needed to retrieve the SSH private key for the tunnel * * @generated from message mgmt.v1alpha1.SSHPrivateKey */ -export class SSHPrivateKey extends Message { +export type SSHPrivateKey = Message<"mgmt.v1alpha1.SSHPrivateKey"> & { /** * The private key in PEM format. * * @generated from field: string value = 1; */ - value = ""; + value: string; /** * If the private key is encrypted, this value should decrypt it. @@ -1539,174 +941,103 @@ export class SSHPrivateKey extends Message { * @generated from field: optional string passphrase = 2; */ passphrase?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SSHPrivateKey"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "passphrase", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SSHPrivateKey { - return new SSHPrivateKey().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SSHPrivateKey { - return new SSHPrivateKey().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SSHPrivateKey { - return new SSHPrivateKey().fromJsonString(jsonString, options); - } - - static equals(a: SSHPrivateKey | PlainMessage | undefined, b: SSHPrivateKey | PlainMessage | undefined): boolean { - return proto3.util.equals(SSHPrivateKey, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SSHPrivateKey. + * Use `create(SSHPrivateKeySchema)` to create a new message. + */ +export const SSHPrivateKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 28); /** * @generated from message mgmt.v1alpha1.PostgresConnection */ -export class PostgresConnection extends Message { +export type PostgresConnection = Message<"mgmt.v1alpha1.PostgresConnection"> & { /** * @generated from field: string host = 1; */ - host = ""; + host: string; /** * @generated from field: int32 port = 2; */ - port = 0; + port: number; /** * @generated from field: string name = 3; */ - name = ""; + name: string; /** * @generated from field: string user = 4; */ - user = ""; + user: string; /** * @generated from field: string pass = 5; */ - pass = ""; + pass: string; /** * @generated from field: optional string ssl_mode = 6; */ sslMode?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresConnection"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "host", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "user", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "pass", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "ssl_mode", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresConnection { - return new PostgresConnection().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresConnection { - return new PostgresConnection().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresConnection { - return new PostgresConnection().fromJsonString(jsonString, options); - } - - static equals(a: PostgresConnection | PlainMessage | undefined, b: PostgresConnection | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresConnection, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresConnection. + * Use `create(PostgresConnectionSchema)` to create a new message. + */ +export const PostgresConnectionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 29); /** * @generated from message mgmt.v1alpha1.MysqlConnection */ -export class MysqlConnection extends Message { +export type MysqlConnection = Message<"mgmt.v1alpha1.MysqlConnection"> & { /** * @generated from field: string user = 1; */ - user = ""; + user: string; /** * @generated from field: string pass = 2; */ - pass = ""; + pass: string; /** * @generated from field: string protocol = 3; */ - protocol = ""; + protocol: string; /** * @generated from field: string host = 4; */ - host = ""; + host: string; /** * @generated from field: int32 port = 5; */ - port = 0; + port: number; /** * @generated from field: string name = 6; */ - name = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlConnection"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "user", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "pass", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "host", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 6, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlConnection { - return new MysqlConnection().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlConnection { - return new MysqlConnection().fromJson(jsonValue, options); - } + name: string; +}; - static fromJsonString(jsonString: string, options?: Partial): MysqlConnection { - return new MysqlConnection().fromJsonString(jsonString, options); - } - - static equals(a: MysqlConnection | PlainMessage | undefined, b: MysqlConnection | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlConnection, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MysqlConnection. + * Use `create(MysqlConnectionSchema)` to create a new message. + */ +export const MysqlConnectionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 30); /** * @generated from message mgmt.v1alpha1.MysqlConnectionConfig */ -export class MysqlConnectionConfig extends Message { +export type MysqlConnectionConfig = Message<"mgmt.v1alpha1.MysqlConnectionConfig"> & { /** * May provide either a raw string url, or a structured version * @@ -1724,7 +1055,7 @@ export class MysqlConnectionConfig extends Message { */ value: MysqlConnection; case: "connection"; - } | { case: undefined; value?: undefined } = { case: undefined }; + } | { case: undefined; value?: undefined }; /** * Provide tunnel configuration that can be used to access a postgres connection that is not publicly accessible to the internet @@ -1744,49 +1075,19 @@ export class MysqlConnectionConfig extends Message { * @generated from field: mgmt.v1alpha1.ClientTlsConfig client_tls = 5; */ clientTls?: ClientTlsConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlConnectionConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "connection_config" }, - { no: 2, name: "connection", kind: "message", T: MysqlConnection, oneof: "connection_config" }, - { no: 3, name: "tunnel", kind: "message", T: SSHTunnel }, - { no: 4, name: "connection_options", kind: "message", T: SqlConnectionOptions }, - { no: 5, name: "client_tls", kind: "message", T: ClientTlsConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlConnectionConfig { - return new MysqlConnectionConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlConnectionConfig { - return new MysqlConnectionConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MysqlConnectionConfig { - return new MysqlConnectionConfig().fromJsonString(jsonString, options); - } - - static equals(a: MysqlConnectionConfig | PlainMessage | undefined, b: MysqlConnectionConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlConnectionConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MysqlConnectionConfig. + * Use `create(MysqlConnectionConfigSchema)` to create a new message. + */ +export const MysqlConnectionConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 31); /** * @generated from message mgmt.v1alpha1.AwsS3ConnectionConfig */ -export class AwsS3ConnectionConfig extends Message { - /** - * @generated from field: string bucket_arn = 1 [deprecated = true]; - * @deprecated - */ - bucketArn = ""; - +export type AwsS3ConnectionConfig = Message<"mgmt.v1alpha1.AwsS3ConnectionConfig"> & { /** * @generated from field: optional string path_prefix = 2; */ @@ -1810,40 +1111,15 @@ export class AwsS3ConnectionConfig extends Message { /** * @generated from field: string bucket = 6; */ - bucket = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + bucket: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AwsS3ConnectionConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "bucket_arn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "path_prefix", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "credentials", kind: "message", T: AwsS3Credentials, opt: true }, - { no: 4, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "bucket", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AwsS3ConnectionConfig { - return new AwsS3ConnectionConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AwsS3ConnectionConfig { - return new AwsS3ConnectionConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AwsS3ConnectionConfig { - return new AwsS3ConnectionConfig().fromJsonString(jsonString, options); - } - - static equals(a: AwsS3ConnectionConfig | PlainMessage | undefined, b: AwsS3ConnectionConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(AwsS3ConnectionConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AwsS3ConnectionConfig. + * Use `create(AwsS3ConnectionConfigSchema)` to create a new message. + */ +export const AwsS3ConnectionConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 32); /** * S3 Credentials that are used by the worker process. @@ -1851,7 +1127,7 @@ export class AwsS3ConnectionConfig extends Message { * * @generated from message mgmt.v1alpha1.AwsS3Credentials */ -export class AwsS3Credentials extends Message { +export type AwsS3Credentials = Message<"mgmt.v1alpha1.AwsS3Credentials"> & { /** * @generated from field: optional string profile = 1; */ @@ -1886,53 +1162,27 @@ export class AwsS3Credentials extends Message { * @generated from field: optional string role_external_id = 7; */ roleExternalId?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AwsS3Credentials"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "profile", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "access_key_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "secret_access_key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "session_token", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "from_ec2_role", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 6, name: "role_arn", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "role_external_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AwsS3Credentials { - return new AwsS3Credentials().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AwsS3Credentials { - return new AwsS3Credentials().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AwsS3Credentials { - return new AwsS3Credentials().fromJsonString(jsonString, options); - } - - static equals(a: AwsS3Credentials | PlainMessage | undefined, b: AwsS3Credentials | PlainMessage | undefined): boolean { - return proto3.util.equals(AwsS3Credentials, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AwsS3Credentials. + * Use `create(AwsS3CredentialsSchema)` to create a new message. + */ +export const AwsS3CredentialsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 33); /** * Configuration for GCP Cloud Storage Buckets * * @generated from message mgmt.v1alpha1.GcpCloudStorageConnectionConfig */ -export class GcpCloudStorageConnectionConfig extends Message { +export type GcpCloudStorageConnectionConfig = Message<"mgmt.v1alpha1.GcpCloudStorageConnectionConfig"> & { /** * The GCP Cloud Storage bucket that will be accessed. * * @generated from field: string bucket = 1; */ - bucket = ""; + bucket: string; /** * The path prefix that will be appended to each file @@ -1947,174 +1197,90 @@ export class GcpCloudStorageConnectionConfig extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GcpCloudStorageConnectionConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "bucket", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "path_prefix", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "service_account_credentials", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GcpCloudStorageConnectionConfig { - return new GcpCloudStorageConnectionConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GcpCloudStorageConnectionConfig { - return new GcpCloudStorageConnectionConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GcpCloudStorageConnectionConfig { - return new GcpCloudStorageConnectionConfig().fromJsonString(jsonString, options); - } - - static equals(a: GcpCloudStorageConnectionConfig | PlainMessage | undefined, b: GcpCloudStorageConnectionConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(GcpCloudStorageConnectionConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GcpCloudStorageConnectionConfig. + * Use `create(GcpCloudStorageConnectionConfigSchema)` to create a new message. + */ +export const GcpCloudStorageConnectionConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 34); /** * @generated from message mgmt.v1alpha1.IsConnectionNameAvailableRequest */ -export class IsConnectionNameAvailableRequest extends Message { +export type IsConnectionNameAvailableRequest = Message<"mgmt.v1alpha1.IsConnectionNameAvailableRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * @generated from field: string connection_name = 2; */ - connectionName = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsConnectionNameAvailableRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "connection_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsConnectionNameAvailableRequest { - return new IsConnectionNameAvailableRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IsConnectionNameAvailableRequest { - return new IsConnectionNameAvailableRequest().fromJson(jsonValue, options); - } + connectionName: string; +}; - static fromJsonString(jsonString: string, options?: Partial): IsConnectionNameAvailableRequest { - return new IsConnectionNameAvailableRequest().fromJsonString(jsonString, options); - } - - static equals(a: IsConnectionNameAvailableRequest | PlainMessage | undefined, b: IsConnectionNameAvailableRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(IsConnectionNameAvailableRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.IsConnectionNameAvailableRequest. + * Use `create(IsConnectionNameAvailableRequestSchema)` to create a new message. + */ +export const IsConnectionNameAvailableRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 35); /** * @generated from message mgmt.v1alpha1.IsConnectionNameAvailableResponse */ -export class IsConnectionNameAvailableResponse extends Message { +export type IsConnectionNameAvailableResponse = Message<"mgmt.v1alpha1.IsConnectionNameAvailableResponse"> & { /** * @generated from field: bool is_available = 1; */ - isAvailable = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + isAvailable: boolean; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsConnectionNameAvailableResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "is_available", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsConnectionNameAvailableResponse { - return new IsConnectionNameAvailableResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IsConnectionNameAvailableResponse { - return new IsConnectionNameAvailableResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsConnectionNameAvailableResponse { - return new IsConnectionNameAvailableResponse().fromJsonString(jsonString, options); - } - - static equals(a: IsConnectionNameAvailableResponse | PlainMessage | undefined, b: IsConnectionNameAvailableResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(IsConnectionNameAvailableResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.IsConnectionNameAvailableResponse. + * Use `create(IsConnectionNameAvailableResponseSchema)` to create a new message. + */ +export const IsConnectionNameAvailableResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 36); /** * @generated from message mgmt.v1alpha1.CheckSqlQueryRequest */ -export class CheckSqlQueryRequest extends Message { +export type CheckSqlQueryRequest = Message<"mgmt.v1alpha1.CheckSqlQueryRequest"> & { /** * The connection id that the query will be checked against * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * The full query that will be run through a PREPARE statement * * @generated from field: string query = 2; */ - query = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CheckSqlQueryRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CheckSqlQueryRequest { - return new CheckSqlQueryRequest().fromBinary(bytes, options); - } + query: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): CheckSqlQueryRequest { - return new CheckSqlQueryRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CheckSqlQueryRequest { - return new CheckSqlQueryRequest().fromJsonString(jsonString, options); - } - - static equals(a: CheckSqlQueryRequest | PlainMessage | undefined, b: CheckSqlQueryRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CheckSqlQueryRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CheckSqlQueryRequest. + * Use `create(CheckSqlQueryRequestSchema)` to create a new message. + */ +export const CheckSqlQueryRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 37); /** * @generated from message mgmt.v1alpha1.CheckSqlQueryResponse */ -export class CheckSqlQueryResponse extends Message { +export type CheckSqlQueryResponse = Message<"mgmt.v1alpha1.CheckSqlQueryResponse"> & { /** * The query is run through PREPARE. Returns valid if it correctly compiled * * @generated from field: bool is_valid = 1; */ - isValid = false; + isValid: boolean; /** * The error message returned by the sql client if the prepare did not return successfully @@ -2122,33 +1288,115 @@ export class CheckSqlQueryResponse extends Message { * @generated from field: optional string erorr_message = 2; */ erorrMessage?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CheckSqlQueryResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "is_valid", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "erorr_message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CheckSqlQueryResponse { - return new CheckSqlQueryResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CheckSqlQueryResponse { - return new CheckSqlQueryResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CheckSqlQueryResponse { - return new CheckSqlQueryResponse().fromJsonString(jsonString, options); - } - - static equals(a: CheckSqlQueryResponse | PlainMessage | undefined, b: CheckSqlQueryResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CheckSqlQueryResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CheckSqlQueryResponse. + * Use `create(CheckSqlQueryResponseSchema)` to create a new message. + */ +export const CheckSqlQueryResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_connection, 38); + +/** + * Service for managing datasource connections. + * This is a primary data model in Neosync and is used in reference when hooking up Jobs to synchronize and generate data. + * + * @generated from service mgmt.v1alpha1.ConnectionService + */ +export const ConnectionService: GenService<{ + /** + * Returns a list of connections associated with the account + * + * @generated from rpc mgmt.v1alpha1.ConnectionService.GetConnections + */ + getConnections: { + methodKind: "unary"; + input: typeof GetConnectionsRequestSchema; + output: typeof GetConnectionsResponseSchema; + }, + /** + * Returns a single connection + * + * @generated from rpc mgmt.v1alpha1.ConnectionService.GetConnection + */ + getConnection: { + methodKind: "unary"; + input: typeof GetConnectionRequestSchema; + output: typeof GetConnectionResponseSchema; + }, + /** + * Creates a new connection + * + * @generated from rpc mgmt.v1alpha1.ConnectionService.CreateConnection + */ + createConnection: { + methodKind: "unary"; + input: typeof CreateConnectionRequestSchema; + output: typeof CreateConnectionResponseSchema; + }, + /** + * Updates an existing connection + * + * @generated from rpc mgmt.v1alpha1.ConnectionService.UpdateConnection + */ + updateConnection: { + methodKind: "unary"; + input: typeof UpdateConnectionRequestSchema; + output: typeof UpdateConnectionResponseSchema; + }, + /** + * Removes a connection from the system. + * + * @generated from rpc mgmt.v1alpha1.ConnectionService.DeleteConnection + */ + deleteConnection: { + methodKind: "unary"; + input: typeof DeleteConnectionRequestSchema; + output: typeof DeleteConnectionResponseSchema; + }, + /** + * Connections have friendly names, this method checks if the requested name is available in the system based on the account + * + * @generated from rpc mgmt.v1alpha1.ConnectionService.IsConnectionNameAvailable + */ + isConnectionNameAvailable: { + methodKind: "unary"; + input: typeof IsConnectionNameAvailableRequestSchema; + output: typeof IsConnectionNameAvailableResponseSchema; + }, + /** + * Checks if the connection config is connectable by the backend. + * Used mostly to verify that a connection is valid prior to creating a Connection object. + * + * @generated from rpc mgmt.v1alpha1.ConnectionService.CheckConnectionConfig + */ + checkConnectionConfig: { + methodKind: "unary"; + input: typeof CheckConnectionConfigRequestSchema; + output: typeof CheckConnectionConfigResponseSchema; + }, + /** + * Checks if the connection id is connectable by the backend. + * Used to verify that a connection is still connectable. + * + * @generated from rpc mgmt.v1alpha1.ConnectionService.CheckConnectionConfigById + */ + checkConnectionConfigById: { + methodKind: "unary"; + input: typeof CheckConnectionConfigByIdRequestSchema; + output: typeof CheckConnectionConfigByIdResponseSchema; + }, + /** + * Checks a constructed SQL query against a sql-based connection to see if it's valid based on that connection's data schema + * This is useful when constructing subsets to see if the WHERE clause is correct + * + * @generated from rpc mgmt.v1alpha1.ConnectionService.CheckSqlQuery + */ + checkSqlQuery: { + methodKind: "unary"; + input: typeof CheckSqlQueryRequestSchema; + output: typeof CheckSqlQueryResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_mgmt_v1alpha1_connection, 0); diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/job-JobService_connectquery.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/job-JobService_connectquery.ts deleted file mode 100644 index 638122b97a..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/job-JobService_connectquery.ts +++ /dev/null @@ -1,545 +0,0 @@ -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/job.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { MethodKind } from "@bufbuild/protobuf"; -import { CancelJobRunRequest, CancelJobRunResponse, CreateJobDestinationConnectionsRequest, CreateJobDestinationConnectionsResponse, CreateJobHookRequest, CreateJobHookResponse, CreateJobRequest, CreateJobResponse, CreateJobRunRequest, CreateJobRunResponse, DeleteJobDestinationConnectionRequest, DeleteJobDestinationConnectionResponse, DeleteJobHookRequest, DeleteJobHookResponse, DeleteJobRequest, DeleteJobResponse, DeleteJobRunRequest, DeleteJobRunResponse, GetActiveJobHooksByTimingRequest, GetActiveJobHooksByTimingResponse, GetJobHookRequest, GetJobHookResponse, GetJobHooksRequest, GetJobHooksResponse, GetJobNextRunsRequest, GetJobNextRunsResponse, GetJobRecentRunsRequest, GetJobRecentRunsResponse, GetJobRequest, GetJobResponse, GetJobRunEventsRequest, GetJobRunEventsResponse, GetJobRunRequest, GetJobRunResponse, GetJobRunsRequest, GetJobRunsResponse, GetJobsRequest, GetJobsResponse, GetJobStatusesRequest, GetJobStatusesResponse, GetJobStatusRequest, GetJobStatusResponse, GetRunContextRequest, GetRunContextResponse, IsJobHookNameAvailableRequest, IsJobHookNameAvailableResponse, IsJobNameAvailableRequest, IsJobNameAvailableResponse, PauseJobRequest, PauseJobResponse, SetJobHookEnabledRequest, SetJobHookEnabledResponse, SetJobSourceSqlConnectionSubsetsRequest, SetJobSourceSqlConnectionSubsetsResponse, SetJobSyncOptionsRequest, SetJobSyncOptionsResponse, SetJobWorkflowOptionsRequest, SetJobWorkflowOptionsResponse, SetRunContextRequest, SetRunContextResponse, TerminateJobRunRequest, TerminateJobRunResponse, UpdateJobDestinationConnectionRequest, UpdateJobDestinationConnectionResponse, UpdateJobHookRequest, UpdateJobHookResponse, UpdateJobScheduleRequest, UpdateJobScheduleResponse, UpdateJobSourceConnectionRequest, UpdateJobSourceConnectionResponse, ValidateJobMappingsRequest, ValidateJobMappingsResponse } from "./job_pb.js"; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.GetJobs - */ -export const getJobs = { - localName: "getJobs", - name: "GetJobs", - kind: MethodKind.Unary, - I: GetJobsRequest, - O: GetJobsResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.GetJob - */ -export const getJob = { - localName: "getJob", - name: "GetJob", - kind: MethodKind.Unary, - I: GetJobRequest, - O: GetJobResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.CreateJob - */ -export const createJob = { - localName: "createJob", - name: "CreateJob", - kind: MethodKind.Unary, - I: CreateJobRequest, - O: CreateJobResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.DeleteJob - */ -export const deleteJob = { - localName: "deleteJob", - name: "DeleteJob", - kind: MethodKind.Unary, - I: DeleteJobRequest, - O: DeleteJobResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.IsJobNameAvailable - */ -export const isJobNameAvailable = { - localName: "isJobNameAvailable", - name: "IsJobNameAvailable", - kind: MethodKind.Unary, - I: IsJobNameAvailableRequest, - O: IsJobNameAvailableResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobSchedule - */ -export const updateJobSchedule = { - localName: "updateJobSchedule", - name: "UpdateJobSchedule", - kind: MethodKind.Unary, - I: UpdateJobScheduleRequest, - O: UpdateJobScheduleResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobSourceConnection - */ -export const updateJobSourceConnection = { - localName: "updateJobSourceConnection", - name: "UpdateJobSourceConnection", - kind: MethodKind.Unary, - I: UpdateJobSourceConnectionRequest, - O: UpdateJobSourceConnectionResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets - */ -export const setJobSourceSqlConnectionSubsets = { - localName: "setJobSourceSqlConnectionSubsets", - name: "SetJobSourceSqlConnectionSubsets", - kind: MethodKind.Unary, - I: SetJobSourceSqlConnectionSubsetsRequest, - O: SetJobSourceSqlConnectionSubsetsResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobDestinationConnection - */ -export const updateJobDestinationConnection = { - localName: "updateJobDestinationConnection", - name: "UpdateJobDestinationConnection", - kind: MethodKind.Unary, - I: UpdateJobDestinationConnectionRequest, - O: UpdateJobDestinationConnectionResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.DeleteJobDestinationConnection - */ -export const deleteJobDestinationConnection = { - localName: "deleteJobDestinationConnection", - name: "DeleteJobDestinationConnection", - kind: MethodKind.Unary, - I: DeleteJobDestinationConnectionRequest, - O: DeleteJobDestinationConnectionResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.CreateJobDestinationConnections - */ -export const createJobDestinationConnections = { - localName: "createJobDestinationConnections", - name: "CreateJobDestinationConnections", - kind: MethodKind.Unary, - I: CreateJobDestinationConnectionsRequest, - O: CreateJobDestinationConnectionsResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.PauseJob - */ -export const pauseJob = { - localName: "pauseJob", - name: "PauseJob", - kind: MethodKind.Unary, - I: PauseJobRequest, - O: PauseJobResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Returns a list of recently invoked job runs baseds on the Temporal cron scheduler. This will return a list of job runs that include archived runs - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobRecentRuns - */ -export const getJobRecentRuns = { - localName: "getJobRecentRuns", - name: "GetJobRecentRuns", - kind: MethodKind.Unary, - I: GetJobRecentRunsRequest, - O: GetJobRecentRunsResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Returns a list of runs that are scheduled for execution based on the Temporal cron scheduler. - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobNextRuns - */ -export const getJobNextRuns = { - localName: "getJobNextRuns", - name: "GetJobNextRuns", - kind: MethodKind.Unary, - I: GetJobNextRunsRequest, - O: GetJobNextRunsResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.GetJobStatus - */ -export const getJobStatus = { - localName: "getJobStatus", - name: "GetJobStatus", - kind: MethodKind.Unary, - I: GetJobStatusRequest, - O: GetJobStatusResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.GetJobStatuses - */ -export const getJobStatuses = { - localName: "getJobStatuses", - name: "GetJobStatuses", - kind: MethodKind.Unary, - I: GetJobStatusesRequest, - O: GetJobStatusesResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Returns a list of job runs by either account or job - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobRuns - */ -export const getJobRuns = { - localName: "getJobRuns", - name: "GetJobRuns", - kind: MethodKind.Unary, - I: GetJobRunsRequest, - O: GetJobRunsResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.GetJobRunEvents - */ -export const getJobRunEvents = { - localName: "getJobRunEvents", - name: "GetJobRunEvents", - kind: MethodKind.Unary, - I: GetJobRunEventsRequest, - O: GetJobRunEventsResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Returns a specific job run, along with any of its pending activities - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobRun - */ -export const getJobRun = { - localName: "getJobRun", - name: "GetJobRun", - kind: MethodKind.Unary, - I: GetJobRunRequest, - O: GetJobRunResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.DeleteJobRun - */ -export const deleteJobRun = { - localName: "deleteJobRun", - name: "DeleteJobRun", - kind: MethodKind.Unary, - I: DeleteJobRunRequest, - O: DeleteJobRunResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.CreateJobRun - */ -export const createJobRun = { - localName: "createJobRun", - name: "CreateJobRun", - kind: MethodKind.Unary, - I: CreateJobRunRequest, - O: CreateJobRunResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.CancelJobRun - */ -export const cancelJobRun = { - localName: "cancelJobRun", - name: "CancelJobRun", - kind: MethodKind.Unary, - I: CancelJobRunRequest, - O: CancelJobRunResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.JobService.TerminateJobRun - */ -export const terminateJobRun = { - localName: "terminateJobRun", - name: "TerminateJobRun", - kind: MethodKind.Unary, - I: TerminateJobRunRequest, - O: TerminateJobRunResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Set any job workflow options. Must provide entire object as is it will fully override the previous configuration - * - * @generated from rpc mgmt.v1alpha1.JobService.SetJobWorkflowOptions - */ -export const setJobWorkflowOptions = { - localName: "setJobWorkflowOptions", - name: "SetJobWorkflowOptions", - kind: MethodKind.Unary, - I: SetJobWorkflowOptionsRequest, - O: SetJobWorkflowOptionsResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Set the job sync options. Must provide entire object as it will fully override the previous configuration - * - * @generated from rpc mgmt.v1alpha1.JobService.SetJobSyncOptions - */ -export const setJobSyncOptions = { - localName: "setJobSyncOptions", - name: "SetJobSyncOptions", - kind: MethodKind.Unary, - I: SetJobSyncOptionsRequest, - O: SetJobSyncOptionsResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * validates that the jobmapping configured can run with table constraints - * - * @generated from rpc mgmt.v1alpha1.JobService.ValidateJobMappings - */ -export const validateJobMappings = { - localName: "validateJobMappings", - name: "ValidateJobMappings", - kind: MethodKind.Unary, - I: ValidateJobMappingsRequest, - O: ValidateJobMappingsResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Gets a run context to be used by a workflow run - * - * @generated from rpc mgmt.v1alpha1.JobService.GetRunContext - */ -export const getRunContext = { - localName: "getRunContext", - name: "GetRunContext", - kind: MethodKind.Unary, - I: GetRunContextRequest, - O: GetRunContextResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Sets a run context to be used by a workflow run - * - * @generated from rpc mgmt.v1alpha1.JobService.SetRunContext - */ -export const setRunContext = { - localName: "setRunContext", - name: "SetRunContext", - kind: MethodKind.Unary, - I: SetRunContextRequest, - O: SetRunContextResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Retrieves all job hooks - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobHooks - */ -export const getJobHooks = { - localName: "getJobHooks", - name: "GetJobHooks", - kind: MethodKind.Unary, - I: GetJobHooksRequest, - O: GetJobHooksResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Retrieves a specific job hook - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobHook - */ -export const getJobHook = { - localName: "getJobHook", - name: "GetJobHook", - kind: MethodKind.Unary, - I: GetJobHookRequest, - O: GetJobHookResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Creates a new job hook - * - * @generated from rpc mgmt.v1alpha1.JobService.CreateJobHook - */ -export const createJobHook = { - localName: "createJobHook", - name: "CreateJobHook", - kind: MethodKind.Unary, - I: CreateJobHookRequest, - O: CreateJobHookResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Removes a job hook - * - * @generated from rpc mgmt.v1alpha1.JobService.DeleteJobHook - */ -export const deleteJobHook = { - localName: "deleteJobHook", - name: "DeleteJobHook", - kind: MethodKind.Unary, - I: DeleteJobHookRequest, - O: DeleteJobHookResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Check if a specific job hook name is available - * - * @generated from rpc mgmt.v1alpha1.JobService.IsJobHookNameAvailable - */ -export const isJobHookNameAvailable = { - localName: "isJobHookNameAvailable", - name: "IsJobHookNameAvailable", - kind: MethodKind.Unary, - I: IsJobHookNameAvailableRequest, - O: IsJobHookNameAvailableResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Updates a job hook - * - * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobHook - */ -export const updateJobHook = { - localName: "updateJobHook", - name: "UpdateJobHook", - kind: MethodKind.Unary, - I: UpdateJobHookRequest, - O: UpdateJobHookResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Enables or disables a job hook - * - * @generated from rpc mgmt.v1alpha1.JobService.SetJobHookEnabled - */ -export const setJobHookEnabled = { - localName: "setJobHookEnabled", - name: "SetJobHookEnabled", - kind: MethodKind.Unary, - I: SetJobHookEnabledRequest, - O: SetJobHookEnabledResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; - -/** - * Returns job hooks that are enabled by a specific timing. They will be sorted by priority, created_at, and id ascending. - * - * @generated from rpc mgmt.v1alpha1.JobService.GetActiveJobHooksByTiming - */ -export const getActiveJobHooksByTiming = { - localName: "getActiveJobHooksByTiming", - name: "GetActiveJobHooksByTiming", - kind: MethodKind.Unary, - I: GetActiveJobHooksByTimingRequest, - O: GetActiveJobHooksByTimingResponse, - service: { - typeName: "mgmt.v1alpha1.JobService" - } -} as const; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_connect.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_connect.ts deleted file mode 100644 index 7ef21b45ca..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_connect.ts +++ /dev/null @@ -1,397 +0,0 @@ -// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/job.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CancelJobRunRequest, CancelJobRunResponse, CreateJobDestinationConnectionsRequest, CreateJobDestinationConnectionsResponse, CreateJobHookRequest, CreateJobHookResponse, CreateJobRequest, CreateJobResponse, CreateJobRunRequest, CreateJobRunResponse, DeleteJobDestinationConnectionRequest, DeleteJobDestinationConnectionResponse, DeleteJobHookRequest, DeleteJobHookResponse, DeleteJobRequest, DeleteJobResponse, DeleteJobRunRequest, DeleteJobRunResponse, GetActiveJobHooksByTimingRequest, GetActiveJobHooksByTimingResponse, GetJobHookRequest, GetJobHookResponse, GetJobHooksRequest, GetJobHooksResponse, GetJobNextRunsRequest, GetJobNextRunsResponse, GetJobRecentRunsRequest, GetJobRecentRunsResponse, GetJobRequest, GetJobResponse, GetJobRunEventsRequest, GetJobRunEventsResponse, GetJobRunLogsStreamRequest, GetJobRunLogsStreamResponse, GetJobRunRequest, GetJobRunResponse, GetJobRunsRequest, GetJobRunsResponse, GetJobsRequest, GetJobsResponse, GetJobStatusesRequest, GetJobStatusesResponse, GetJobStatusRequest, GetJobStatusResponse, GetRunContextRequest, GetRunContextResponse, IsJobHookNameAvailableRequest, IsJobHookNameAvailableResponse, IsJobNameAvailableRequest, IsJobNameAvailableResponse, PauseJobRequest, PauseJobResponse, SetJobHookEnabledRequest, SetJobHookEnabledResponse, SetJobSourceSqlConnectionSubsetsRequest, SetJobSourceSqlConnectionSubsetsResponse, SetJobSyncOptionsRequest, SetJobSyncOptionsResponse, SetJobWorkflowOptionsRequest, SetJobWorkflowOptionsResponse, SetRunContextRequest, SetRunContextResponse, SetRunContextsRequest, SetRunContextsResponse, TerminateJobRunRequest, TerminateJobRunResponse, UpdateJobDestinationConnectionRequest, UpdateJobDestinationConnectionResponse, UpdateJobHookRequest, UpdateJobHookResponse, UpdateJobScheduleRequest, UpdateJobScheduleResponse, UpdateJobSourceConnectionRequest, UpdateJobSourceConnectionResponse, ValidateJobMappingsRequest, ValidateJobMappingsResponse } from "./job_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service mgmt.v1alpha1.JobService - */ -export const JobService = { - typeName: "mgmt.v1alpha1.JobService", - methods: { - /** - * @generated from rpc mgmt.v1alpha1.JobService.GetJobs - */ - getJobs: { - name: "GetJobs", - I: GetJobsRequest, - O: GetJobsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.GetJob - */ - getJob: { - name: "GetJob", - I: GetJobRequest, - O: GetJobResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.CreateJob - */ - createJob: { - name: "CreateJob", - I: CreateJobRequest, - O: CreateJobResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.DeleteJob - */ - deleteJob: { - name: "DeleteJob", - I: DeleteJobRequest, - O: DeleteJobResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.IsJobNameAvailable - */ - isJobNameAvailable: { - name: "IsJobNameAvailable", - I: IsJobNameAvailableRequest, - O: IsJobNameAvailableResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobSchedule - */ - updateJobSchedule: { - name: "UpdateJobSchedule", - I: UpdateJobScheduleRequest, - O: UpdateJobScheduleResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobSourceConnection - */ - updateJobSourceConnection: { - name: "UpdateJobSourceConnection", - I: UpdateJobSourceConnectionRequest, - O: UpdateJobSourceConnectionResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets - */ - setJobSourceSqlConnectionSubsets: { - name: "SetJobSourceSqlConnectionSubsets", - I: SetJobSourceSqlConnectionSubsetsRequest, - O: SetJobSourceSqlConnectionSubsetsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobDestinationConnection - */ - updateJobDestinationConnection: { - name: "UpdateJobDestinationConnection", - I: UpdateJobDestinationConnectionRequest, - O: UpdateJobDestinationConnectionResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.DeleteJobDestinationConnection - */ - deleteJobDestinationConnection: { - name: "DeleteJobDestinationConnection", - I: DeleteJobDestinationConnectionRequest, - O: DeleteJobDestinationConnectionResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.CreateJobDestinationConnections - */ - createJobDestinationConnections: { - name: "CreateJobDestinationConnections", - I: CreateJobDestinationConnectionsRequest, - O: CreateJobDestinationConnectionsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.PauseJob - */ - pauseJob: { - name: "PauseJob", - I: PauseJobRequest, - O: PauseJobResponse, - kind: MethodKind.Unary, - }, - /** - * Returns a list of recently invoked job runs baseds on the Temporal cron scheduler. This will return a list of job runs that include archived runs - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobRecentRuns - */ - getJobRecentRuns: { - name: "GetJobRecentRuns", - I: GetJobRecentRunsRequest, - O: GetJobRecentRunsResponse, - kind: MethodKind.Unary, - }, - /** - * Returns a list of runs that are scheduled for execution based on the Temporal cron scheduler. - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobNextRuns - */ - getJobNextRuns: { - name: "GetJobNextRuns", - I: GetJobNextRunsRequest, - O: GetJobNextRunsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.GetJobStatus - */ - getJobStatus: { - name: "GetJobStatus", - I: GetJobStatusRequest, - O: GetJobStatusResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.GetJobStatuses - */ - getJobStatuses: { - name: "GetJobStatuses", - I: GetJobStatusesRequest, - O: GetJobStatusesResponse, - kind: MethodKind.Unary, - }, - /** - * Returns a list of job runs by either account or job - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobRuns - */ - getJobRuns: { - name: "GetJobRuns", - I: GetJobRunsRequest, - O: GetJobRunsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.GetJobRunEvents - */ - getJobRunEvents: { - name: "GetJobRunEvents", - I: GetJobRunEventsRequest, - O: GetJobRunEventsResponse, - kind: MethodKind.Unary, - }, - /** - * Returns a specific job run, along with any of its pending activities - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobRun - */ - getJobRun: { - name: "GetJobRun", - I: GetJobRunRequest, - O: GetJobRunResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.DeleteJobRun - */ - deleteJobRun: { - name: "DeleteJobRun", - I: DeleteJobRunRequest, - O: DeleteJobRunResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.CreateJobRun - */ - createJobRun: { - name: "CreateJobRun", - I: CreateJobRunRequest, - O: CreateJobRunResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.CancelJobRun - */ - cancelJobRun: { - name: "CancelJobRun", - I: CancelJobRunRequest, - O: CancelJobRunResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.JobService.TerminateJobRun - */ - terminateJobRun: { - name: "TerminateJobRun", - I: TerminateJobRunRequest, - O: TerminateJobRunResponse, - kind: MethodKind.Unary, - }, - /** - * Returns a stream of logs from the worker nodes that pertain to a specific job run - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobRunLogsStream - */ - getJobRunLogsStream: { - name: "GetJobRunLogsStream", - I: GetJobRunLogsStreamRequest, - O: GetJobRunLogsStreamResponse, - kind: MethodKind.ServerStreaming, - }, - /** - * Set any job workflow options. Must provide entire object as is it will fully override the previous configuration - * - * @generated from rpc mgmt.v1alpha1.JobService.SetJobWorkflowOptions - */ - setJobWorkflowOptions: { - name: "SetJobWorkflowOptions", - I: SetJobWorkflowOptionsRequest, - O: SetJobWorkflowOptionsResponse, - kind: MethodKind.Unary, - }, - /** - * Set the job sync options. Must provide entire object as it will fully override the previous configuration - * - * @generated from rpc mgmt.v1alpha1.JobService.SetJobSyncOptions - */ - setJobSyncOptions: { - name: "SetJobSyncOptions", - I: SetJobSyncOptionsRequest, - O: SetJobSyncOptionsResponse, - kind: MethodKind.Unary, - }, - /** - * validates that the jobmapping configured can run with table constraints - * - * @generated from rpc mgmt.v1alpha1.JobService.ValidateJobMappings - */ - validateJobMappings: { - name: "ValidateJobMappings", - I: ValidateJobMappingsRequest, - O: ValidateJobMappingsResponse, - kind: MethodKind.Unary, - }, - /** - * Gets a run context to be used by a workflow run - * - * @generated from rpc mgmt.v1alpha1.JobService.GetRunContext - */ - getRunContext: { - name: "GetRunContext", - I: GetRunContextRequest, - O: GetRunContextResponse, - kind: MethodKind.Unary, - }, - /** - * Sets a run context to be used by a workflow run - * - * @generated from rpc mgmt.v1alpha1.JobService.SetRunContext - */ - setRunContext: { - name: "SetRunContext", - I: SetRunContextRequest, - O: SetRunContextResponse, - kind: MethodKind.Unary, - }, - /** - * Sets a stream of run contexts to be used by a workflow run - * - * @generated from rpc mgmt.v1alpha1.JobService.SetRunContexts - */ - setRunContexts: { - name: "SetRunContexts", - I: SetRunContextsRequest, - O: SetRunContextsResponse, - kind: MethodKind.ClientStreaming, - }, - /** - * Retrieves all job hooks - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobHooks - */ - getJobHooks: { - name: "GetJobHooks", - I: GetJobHooksRequest, - O: GetJobHooksResponse, - kind: MethodKind.Unary, - }, - /** - * Retrieves a specific job hook - * - * @generated from rpc mgmt.v1alpha1.JobService.GetJobHook - */ - getJobHook: { - name: "GetJobHook", - I: GetJobHookRequest, - O: GetJobHookResponse, - kind: MethodKind.Unary, - }, - /** - * Creates a new job hook - * - * @generated from rpc mgmt.v1alpha1.JobService.CreateJobHook - */ - createJobHook: { - name: "CreateJobHook", - I: CreateJobHookRequest, - O: CreateJobHookResponse, - kind: MethodKind.Unary, - }, - /** - * Removes a job hook - * - * @generated from rpc mgmt.v1alpha1.JobService.DeleteJobHook - */ - deleteJobHook: { - name: "DeleteJobHook", - I: DeleteJobHookRequest, - O: DeleteJobHookResponse, - kind: MethodKind.Unary, - }, - /** - * Check if a specific job hook name is available - * - * @generated from rpc mgmt.v1alpha1.JobService.IsJobHookNameAvailable - */ - isJobHookNameAvailable: { - name: "IsJobHookNameAvailable", - I: IsJobHookNameAvailableRequest, - O: IsJobHookNameAvailableResponse, - kind: MethodKind.Unary, - }, - /** - * Updates a job hook - * - * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobHook - */ - updateJobHook: { - name: "UpdateJobHook", - I: UpdateJobHookRequest, - O: UpdateJobHookResponse, - kind: MethodKind.Unary, - }, - /** - * Enables or disables a job hook - * - * @generated from rpc mgmt.v1alpha1.JobService.SetJobHookEnabled - */ - setJobHookEnabled: { - name: "SetJobHookEnabled", - I: SetJobHookEnabledRequest, - O: SetJobHookEnabledResponse, - kind: MethodKind.Unary, - }, - /** - * Returns job hooks that are enabled by a specific timing. They will be sorted by priority, created_at, and id ascending. - * - * @generated from rpc mgmt.v1alpha1.JobService.GetActiveJobHooksByTiming - */ - getActiveJobHooksByTiming: { - name: "GetActiveJobHooksByTiming", - I: GetActiveJobHooksByTimingRequest, - O: GetActiveJobHooksByTimingResponse, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_pb.ts index abd89efc75..07a7909cf5 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/job_pb.ts @@ -1,349 +1,77 @@ -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js" +// @generated by protoc-gen-es v2.2.3 with parameter "target=ts,import_extension=.js" // @generated from file mgmt/v1alpha1/job.proto (package mgmt.v1alpha1, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; -import { TransformerConfig, TransformerSource } from "./transformer_pb.js"; +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { TransformerConfig } from "./transformer_pb.js"; +import { file_mgmt_v1alpha1_transformer } from "./transformer_pb.js"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum mgmt.v1alpha1.JobStatus - */ -export enum JobStatus { - /** - * @generated from enum value: JOB_STATUS_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: JOB_STATUS_ENABLED = 1; - */ - ENABLED = 1, - - /** - * @generated from enum value: JOB_STATUS_PAUSED = 3; - */ - PAUSED = 3, - - /** - * @generated from enum value: JOB_STATUS_DISABLED = 4; - */ - DISABLED = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(JobStatus) -proto3.util.setEnumType(JobStatus, "mgmt.v1alpha1.JobStatus", [ - { no: 0, name: "JOB_STATUS_UNSPECIFIED" }, - { no: 1, name: "JOB_STATUS_ENABLED" }, - { no: 3, name: "JOB_STATUS_PAUSED" }, - { no: 4, name: "JOB_STATUS_DISABLED" }, -]); - -/** - * @generated from enum mgmt.v1alpha1.ActivityStatus - */ -export enum ActivityStatus { - /** - * @generated from enum value: ACTIVITY_STATUS_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: ACTIVITY_STATUS_SCHEDULED = 1; - */ - SCHEDULED = 1, - - /** - * @generated from enum value: ACTIVITY_STATUS_STARTED = 2; - */ - STARTED = 2, - - /** - * @generated from enum value: ACTIVITY_STATUS_CANCELED = 3; - */ - CANCELED = 3, - - /** - * @generated from enum value: ACTIVITY_STATUS_FAILED = 4; - */ - FAILED = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(ActivityStatus) -proto3.util.setEnumType(ActivityStatus, "mgmt.v1alpha1.ActivityStatus", [ - { no: 0, name: "ACTIVITY_STATUS_UNSPECIFIED" }, - { no: 1, name: "ACTIVITY_STATUS_SCHEDULED" }, - { no: 2, name: "ACTIVITY_STATUS_STARTED" }, - { no: 3, name: "ACTIVITY_STATUS_CANCELED" }, - { no: 4, name: "ACTIVITY_STATUS_FAILED" }, -]); - -/** - * An enumeration of job run statuses. - * - * @generated from enum mgmt.v1alpha1.JobRunStatus - */ -export enum JobRunStatus { - /** - * if the job run status is unknown - * - * @generated from enum value: JOB_RUN_STATUS_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * the run is pending and has not started yet - * - * @generated from enum value: JOB_RUN_STATUS_PENDING = 1; - */ - PENDING = 1, - - /** - * the run is currently in progress - * - * @generated from enum value: JOB_RUN_STATUS_RUNNING = 2; - */ - RUNNING = 2, - - /** - * the run has successfully completed - * - * @generated from enum value: JOB_RUN_STATUS_COMPLETE = 3; - */ - COMPLETE = 3, - - /** - * the run ended with an error - * - * @generated from enum value: JOB_RUN_STATUS_ERROR = 4; - */ - ERROR = 4, - - /** - * the run was cancelled - * - * @generated from enum value: JOB_RUN_STATUS_CANCELED = 5; - */ - CANCELED = 5, - - /** - * the run was terminated - * - * @generated from enum value: JOB_RUN_STATUS_TERMINATED = 6; - */ - TERMINATED = 6, - - /** - * the run ended in failure - * - * @generated from enum value: JOB_RUN_STATUS_FAILED = 7; - */ - FAILED = 7, - - /** - * the run was ended pre-maturely due to timeout - * - * @generated from enum value: JOB_RUN_STATUS_TIMED_OUT = 8; - */ - TIMED_OUT = 8, -} -// Retrieve enum metadata with: proto3.getEnumType(JobRunStatus) -proto3.util.setEnumType(JobRunStatus, "mgmt.v1alpha1.JobRunStatus", [ - { no: 0, name: "JOB_RUN_STATUS_UNSPECIFIED" }, - { no: 1, name: "JOB_RUN_STATUS_PENDING" }, - { no: 2, name: "JOB_RUN_STATUS_RUNNING" }, - { no: 3, name: "JOB_RUN_STATUS_COMPLETE" }, - { no: 4, name: "JOB_RUN_STATUS_ERROR" }, - { no: 5, name: "JOB_RUN_STATUS_CANCELED" }, - { no: 6, name: "JOB_RUN_STATUS_TERMINATED" }, - { no: 7, name: "JOB_RUN_STATUS_FAILED" }, - { no: 8, name: "JOB_RUN_STATUS_TIMED_OUT" }, -]); - -/** - * @generated from enum mgmt.v1alpha1.LogWindow - */ -export enum LogWindow { - /** - * @generated from enum value: LOG_WINDOW_NO_TIME_UNSPECIFIED = 0; - */ - NO_TIME_UNSPECIFIED = 0, - - /** - * @generated from enum value: LOG_WINDOW_FIFTEEN_MIN = 1; - */ - FIFTEEN_MIN = 1, - - /** - * @generated from enum value: LOG_WINDOW_ONE_HOUR = 2; - */ - ONE_HOUR = 2, - - /** - * @generated from enum value: LOG_WINDOW_ONE_DAY = 3; - */ - ONE_DAY = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(LogWindow) -proto3.util.setEnumType(LogWindow, "mgmt.v1alpha1.LogWindow", [ - { no: 0, name: "LOG_WINDOW_NO_TIME_UNSPECIFIED" }, - { no: 1, name: "LOG_WINDOW_FIFTEEN_MIN" }, - { no: 2, name: "LOG_WINDOW_ONE_HOUR" }, - { no: 3, name: "LOG_WINDOW_ONE_DAY" }, -]); - -/** - * @generated from enum mgmt.v1alpha1.LogLevel + * Describes the file mgmt/v1alpha1/job.proto. */ -export enum LogLevel { - /** - * @generated from enum value: LOG_LEVEL_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: LOG_LEVEL_DEBUG = 1; - */ - DEBUG = 1, - - /** - * @generated from enum value: LOG_LEVEL_INFO = 2; - */ - INFO = 2, - - /** - * @generated from enum value: LOG_LEVEL_WARN = 3; - */ - WARN = 3, - - /** - * @generated from enum value: LOG_LEVEL_ERROR = 4; - */ - ERROR = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(LogLevel) -proto3.util.setEnumType(LogLevel, "mgmt.v1alpha1.LogLevel", [ - { no: 0, name: "LOG_LEVEL_UNSPECIFIED" }, - { no: 1, name: "LOG_LEVEL_DEBUG" }, - { no: 2, name: "LOG_LEVEL_INFO" }, - { no: 3, name: "LOG_LEVEL_WARN" }, - { no: 4, name: "LOG_LEVEL_ERROR" }, -]); +export const file_mgmt_v1alpha1_job: GenFile = /*@__PURE__*/ + fileDesc("ChdtZ210L3YxYWxwaGExL2pvYi5wcm90bxINbWdtdC52MWFscGhhMSIuCg5HZXRKb2JzUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASIzCg9HZXRKb2JzUmVzcG9uc2USIAoEam9icxgBIAMoCzISLm1nbXQudjFhbHBoYTEuSm9iIkUKCUpvYlNvdXJjZRI4CgdvcHRpb25zGAEgASgLMh8ubWdtdC52MWFscGhhMS5Kb2JTb3VyY2VPcHRpb25zQga6SAPIAQEioQQKEEpvYlNvdXJjZU9wdGlvbnMSQgoIcG9zdGdyZXMYASABKAsyLi5tZ210LnYxYWxwaGExLlBvc3RncmVzU291cmNlQ29ubmVjdGlvbk9wdGlvbnNIABI9CgZhd3NfczMYAiABKAsyKy5tZ210LnYxYWxwaGExLkF3c1MzU291cmNlQ29ubmVjdGlvbk9wdGlvbnNIABI8CgVteXNxbBgDIAEoCzIrLm1nbXQudjFhbHBoYTEuTXlzcWxTb3VyY2VDb25uZWN0aW9uT3B0aW9uc0gAEjgKCGdlbmVyYXRlGAQgASgLMiQubWdtdC52MWFscGhhMS5HZW5lcmF0ZVNvdXJjZU9wdGlvbnNIABI9CgthaV9nZW5lcmF0ZRgFIAEoCzImLm1nbXQudjFhbHBoYTEuQWlHZW5lcmF0ZVNvdXJjZU9wdGlvbnNIABJACgdtb25nb2RiGAYgASgLMi0ubWdtdC52MWFscGhhMS5Nb25nb0RCU291cmNlQ29ubmVjdGlvbk9wdGlvbnNIABJCCghkeW5hbW9kYhgHIAEoCzIuLm1nbXQudjFhbHBoYTEuRHluYW1vREJTb3VyY2VDb25uZWN0aW9uT3B0aW9uc0gAEjwKBW1zc3FsGAggASgLMisubWdtdC52MWFscGhhMS5Nc3NxbFNvdXJjZUNvbm5lY3Rpb25PcHRpb25zSABCDwoGY29uZmlnEgW6SAIIASJuChRDcmVhdGVKb2JEZXN0aW5hdGlvbhIfCg1jb25uZWN0aW9uX2lkGAEgASgJQgi6SAVyA7ABARI1CgdvcHRpb25zGAIgASgLMiQubWdtdC52MWFscGhhMS5Kb2JEZXN0aW5hdGlvbk9wdGlvbnMiagoOSm9iRGVzdGluYXRpb24SFQoNY29ubmVjdGlvbl9pZBgBIAEoCRI1CgdvcHRpb25zGAIgASgLMiQubWdtdC52MWFscGhhMS5Kb2JEZXN0aW5hdGlvbk9wdGlvbnMSCgoCaWQYAyABKAki3QIKF0FpR2VuZXJhdGVTb3VyY2VPcHRpb25zEiIKEGFpX2Nvbm5lY3Rpb25faWQYASABKAlCCLpIBXIDsAEBEkYKB3NjaGVtYXMYAiADKAsyKy5tZ210LnYxYWxwaGExLkFpR2VuZXJhdGVTb3VyY2VTY2hlbWFPcHRpb25CCLpIBZIBAggBEi4KF2ZrX3NvdXJjZV9jb25uZWN0aW9uX2lkGAMgASgJQgi6SAVyA7ABAUgAiAEBEhsKCm1vZGVsX25hbWUYBCABKAlCB7pIBHICEAESGAoLdXNlcl9wcm9tcHQYBSABKAlIAYgBARIrChNnZW5lcmF0ZV9iYXRjaF9zaXplGAYgASgDQgm6SAYiBBhkKAFIAogBAUIaChhfZmtfc291cmNlX2Nvbm5lY3Rpb25faWRCDgoMX3VzZXJfcHJvbXB0QhYKFF9nZW5lcmF0ZV9iYXRjaF9zaXplIn0KHEFpR2VuZXJhdGVTb3VyY2VTY2hlbWFPcHRpb24SFwoGc2NoZW1hGAEgASgJQge6SARyAhABEkQKBnRhYmxlcxgCIAMoCzIqLm1nbXQudjFhbHBoYTEuQWlHZW5lcmF0ZVNvdXJjZVRhYmxlT3B0aW9uQgi6SAWSAQIIASJUChtBaUdlbmVyYXRlU291cmNlVGFibGVPcHRpb24SFgoFdGFibGUYASABKAlCB7pIBHICEAESHQoJcm93X2NvdW50GAIgASgDQgq6SAciBRjoBygBIqkBChVHZW5lcmF0ZVNvdXJjZU9wdGlvbnMSRAoHc2NoZW1hcxgBIAMoCzIpLm1nbXQudjFhbHBoYTEuR2VuZXJhdGVTb3VyY2VTY2hlbWFPcHRpb25CCLpIBZIBAggBEi4KF2ZrX3NvdXJjZV9jb25uZWN0aW9uX2lkGAMgASgJQgi6SAVyA7ABAUgAiAEBQhoKGF9ma19zb3VyY2VfY29ubmVjdGlvbl9pZCJ5ChpHZW5lcmF0ZVNvdXJjZVNjaGVtYU9wdGlvbhIXCgZzY2hlbWEYASABKAlCB7pIBHICEAESQgoGdGFibGVzGAIgAygLMigubWdtdC52MWFscGhhMS5HZW5lcmF0ZVNvdXJjZVRhYmxlT3B0aW9uQgi6SAWSAQIIASJPChlHZW5lcmF0ZVNvdXJjZVRhYmxlT3B0aW9uEhYKBXRhYmxlGAEgASgJQge6SARyAhABEhoKCXJvd19jb3VudBgCIAEoA0IHukgEIgIoASJBCh5Nb25nb0RCU291cmNlQ29ubmVjdGlvbk9wdGlvbnMSHwoNY29ubmVjdGlvbl9pZBgBIAEoCUIIukgFcgOwAQEi7wEKH0R5bmFtb0RCU291cmNlQ29ubmVjdGlvbk9wdGlvbnMSHwoNY29ubmVjdGlvbl9pZBgBIAEoCUIIukgFcgOwAQESOAoGdGFibGVzGAIgAygLMigubWdtdC52MWFscGhhMS5EeW5hbW9EQlNvdXJjZVRhYmxlT3B0aW9uElEKE3VubWFwcGVkX3RyYW5zZm9ybXMYAyABKAsyNC5tZ210LnYxYWxwaGExLkR5bmFtb0RCU291cmNlVW5tYXBwZWRUcmFuc2Zvcm1Db25maWcSHgoWZW5hYmxlX2NvbnNpc3RlbnRfcmVhZBgEIAEoCCLxAQolRHluYW1vREJTb3VyY2VVbm1hcHBlZFRyYW5zZm9ybUNvbmZpZxIvCgFiGAEgASgLMiQubWdtdC52MWFscGhhMS5Kb2JNYXBwaW5nVHJhbnNmb3JtZXISNQoHYm9vbGVhbhgCIAEoCzIkLm1nbXQudjFhbHBoYTEuSm9iTWFwcGluZ1RyYW5zZm9ybWVyEi8KAW4YBCABKAsyJC5tZ210LnYxYWxwaGExLkpvYk1hcHBpbmdUcmFuc2Zvcm1lchIvCgFzGAYgASgLMiQubWdtdC52MWFscGhhMS5Kb2JNYXBwaW5nVHJhbnNmb3JtZXIiXwoZRHluYW1vREJTb3VyY2VUYWJsZU9wdGlvbhIWCgV0YWJsZRgBIAEoCUIHukgEcgIQARIZCgx3aGVyZV9jbGF1c2UYAiABKAlIAIgBAUIPCg1fd2hlcmVfY2xhdXNlIqsECh9Qb3N0Z3Jlc1NvdXJjZUNvbm5lY3Rpb25PcHRpb25zEjoKB3NjaGVtYXMYAiADKAsyKS5tZ210LnYxYWxwaGExLlBvc3RncmVzU291cmNlU2NoZW1hT3B0aW9uEh8KDWNvbm5lY3Rpb25faWQYAyABKAlCCLpIBXIDsAEBEikKIXN1YnNldF9ieV9mb3JlaWduX2tleV9jb25zdHJhaW50cxgEIAEoCBJuChxuZXdfY29sdW1uX2FkZGl0aW9uX3N0cmF0ZWd5GAUgASgLMkgubWdtdC52MWFscGhhMS5Qb3N0Z3Jlc1NvdXJjZUNvbm5lY3Rpb25PcHRpb25zLk5ld0NvbHVtbkFkZGl0aW9uU3RyYXRlZ3kaiQIKGU5ld0NvbHVtbkFkZGl0aW9uU3RyYXRlZ3kSZAoIaGFsdF9qb2IYASABKAsyUC5tZ210LnYxYWxwaGExLlBvc3RncmVzU291cmNlQ29ubmVjdGlvbk9wdGlvbnMuTmV3Q29sdW1uQWRkaXRpb25TdHJhdGVneS5IYWx0Sm9iSAASZAoIYXV0b19tYXAYAiABKAsyUC5tZ210LnYxYWxwaGExLlBvc3RncmVzU291cmNlQ29ubmVjdGlvbk9wdGlvbnMuTmV3Q29sdW1uQWRkaXRpb25TdHJhdGVneS5BdXRvTWFwSAAaCQoHSGFsdEpvYhoJCgdBdXRvTWFwQgoKCHN0cmF0ZWd5SgQIARACImYKGlBvc3RncmVzU291cmNlU2NoZW1hT3B0aW9uEg4KBnNjaGVtYRgBIAEoCRI4CgZ0YWJsZXMYAiADKAsyKC5tZ210LnYxYWxwaGExLlBvc3RncmVzU291cmNlVGFibGVPcHRpb24iVgoZUG9zdGdyZXNTb3VyY2VUYWJsZU9wdGlvbhINCgV0YWJsZRgBIAEoCRIZCgx3aGVyZV9jbGF1c2UYAiABKAlIAIgBAUIPCg1fd2hlcmVfY2xhdXNlIsgBChxNeXNxbFNvdXJjZUNvbm5lY3Rpb25PcHRpb25zEiMKG2hhbHRfb25fbmV3X2NvbHVtbl9hZGRpdGlvbhgBIAEoCBI3CgdzY2hlbWFzGAIgAygLMiYubWdtdC52MWFscGhhMS5NeXNxbFNvdXJjZVNjaGVtYU9wdGlvbhIfCg1jb25uZWN0aW9uX2lkGAMgASgJQgi6SAVyA7ABARIpCiFzdWJzZXRfYnlfZm9yZWlnbl9rZXlfY29uc3RyYWludHMYBCABKAgiYAoXTXlzcWxTb3VyY2VTY2hlbWFPcHRpb24SDgoGc2NoZW1hGAEgASgJEjUKBnRhYmxlcxgCIAMoCzIlLm1nbXQudjFhbHBoYTEuTXlzcWxTb3VyY2VUYWJsZU9wdGlvbiJTChZNeXNxbFNvdXJjZVRhYmxlT3B0aW9uEg0KBXRhYmxlGAEgASgJEhkKDHdoZXJlX2NsYXVzZRgCIAEoCUgAiAEBQg8KDV93aGVyZV9jbGF1c2UiyAEKHE1zc3FsU291cmNlQ29ubmVjdGlvbk9wdGlvbnMSIwobaGFsdF9vbl9uZXdfY29sdW1uX2FkZGl0aW9uGAEgASgIEjcKB3NjaGVtYXMYAiADKAsyJi5tZ210LnYxYWxwaGExLk1zc3FsU291cmNlU2NoZW1hT3B0aW9uEh8KDWNvbm5lY3Rpb25faWQYAyABKAlCCLpIBXIDsAEBEikKIXN1YnNldF9ieV9mb3JlaWduX2tleV9jb25zdHJhaW50cxgEIAEoCCJgChdNc3NxbFNvdXJjZVNjaGVtYU9wdGlvbhIOCgZzY2hlbWEYASABKAkSNQoGdGFibGVzGAIgAygLMiUubWdtdC52MWFscGhhMS5Nc3NxbFNvdXJjZVRhYmxlT3B0aW9uIlMKFk1zc3FsU291cmNlVGFibGVPcHRpb24SDQoFdGFibGUYASABKAkSGQoMd2hlcmVfY2xhdXNlGAIgASgJSACIAQFCDwoNX3doZXJlX2NsYXVzZSI/ChxBd3NTM1NvdXJjZUNvbm5lY3Rpb25PcHRpb25zEh8KDWNvbm5lY3Rpb25faWQYASABKAlCCLpIBXIDsAEBItsEChVKb2JEZXN0aW5hdGlvbk9wdGlvbnMSTwoQcG9zdGdyZXNfb3B0aW9ucxgBIAEoCzIzLm1nbXQudjFhbHBoYTEuUG9zdGdyZXNEZXN0aW5hdGlvbkNvbm5lY3Rpb25PcHRpb25zSAASSgoOYXdzX3MzX29wdGlvbnMYAiABKAsyMC5tZ210LnYxYWxwaGExLkF3c1MzRGVzdGluYXRpb25Db25uZWN0aW9uT3B0aW9uc0gAEkkKDW15c3FsX29wdGlvbnMYAyABKAsyMC5tZ210LnYxYWxwaGExLk15c3FsRGVzdGluYXRpb25Db25uZWN0aW9uT3B0aW9uc0gAEk0KD21vbmdvZGJfb3B0aW9ucxgEIAEoCzIyLm1nbXQudjFhbHBoYTEuTW9uZ29EQkRlc3RpbmF0aW9uQ29ubmVjdGlvbk9wdGlvbnNIABJeChhnY3BfY2xvdWRzdG9yYWdlX29wdGlvbnMYBSABKAsyOi5tZ210LnYxYWxwaGExLkdjcENsb3VkU3RvcmFnZURlc3RpbmF0aW9uQ29ubmVjdGlvbk9wdGlvbnNIABJPChBkeW5hbW9kYl9vcHRpb25zGAYgASgLMjMubWdtdC52MWFscGhhMS5EeW5hbW9EQkRlc3RpbmF0aW9uQ29ubmVjdGlvbk9wdGlvbnNIABJJCg1tc3NxbF9vcHRpb25zGAcgASgLMjAubWdtdC52MWFscGhhMS5Nc3NxbERlc3RpbmF0aW9uQ29ubmVjdGlvbk9wdGlvbnNIAEIPCgZjb25maWcSBbpIAggBIiUKI01vbmdvREJEZXN0aW5hdGlvbkNvbm5lY3Rpb25PcHRpb25zIi0KK0djcENsb3VkU3RvcmFnZURlc3RpbmF0aW9uQ29ubmVjdGlvbk9wdGlvbnMibgokRHluYW1vREJEZXN0aW5hdGlvbkNvbm5lY3Rpb25PcHRpb25zEkYKDnRhYmxlX21hcHBpbmdzGAEgAygLMi4ubWdtdC52MWFscGhhMS5EeW5hbW9EQkRlc3RpbmF0aW9uVGFibGVNYXBwaW5nIlIKH0R5bmFtb0RCRGVzdGluYXRpb25UYWJsZU1hcHBpbmcSFAoMc291cmNlX3RhYmxlGAEgASgJEhkKEWRlc3RpbmF0aW9uX3RhYmxlGAIgASgJIsoCCiRQb3N0Z3Jlc0Rlc3RpbmF0aW9uQ29ubmVjdGlvbk9wdGlvbnMSQgoOdHJ1bmNhdGVfdGFibGUYASABKAsyKi5tZ210LnYxYWxwaGExLlBvc3RncmVzVHJ1bmNhdGVUYWJsZUNvbmZpZxIZChFpbml0X3RhYmxlX3NjaGVtYRgCIAEoCBI8Cgtvbl9jb25mbGljdBgDIAEoCzInLm1nbXQudjFhbHBoYTEuUG9zdGdyZXNPbkNvbmZsaWN0Q29uZmlnEiMKG3NraXBfZm9yZWlnbl9rZXlfdmlvbGF0aW9ucxgEIAEoCBIpCgViYXRjaBgFIAEoCzIaLm1nbXQudjFhbHBoYTEuQmF0Y2hDb25maWcSIwoNbWF4X2luX2ZsaWdodBgGIAEoDUIHukgEKgIoAUgAiAEBQhAKDl9tYXhfaW5fZmxpZ2h0Ii4KGFBvc3RncmVzT25Db25mbGljdENvbmZpZxISCgpkb19ub3RoaW5nGAEgASgIIk4KG1Bvc3RncmVzVHJ1bmNhdGVUYWJsZUNvbmZpZxIeChZ0cnVuY2F0ZV9iZWZvcmVfaW5zZXJ0GAEgASgIEg8KB2Nhc2NhZGUYAiABKAgiwQIKIU15c3FsRGVzdGluYXRpb25Db25uZWN0aW9uT3B0aW9ucxI/Cg50cnVuY2F0ZV90YWJsZRgBIAEoCzInLm1nbXQudjFhbHBoYTEuTXlzcWxUcnVuY2F0ZVRhYmxlQ29uZmlnEhkKEWluaXRfdGFibGVfc2NoZW1hGAIgASgIEjkKC29uX2NvbmZsaWN0GAMgASgLMiQubWdtdC52MWFscGhhMS5NeXNxbE9uQ29uZmxpY3RDb25maWcSIwobc2tpcF9mb3JlaWduX2tleV92aW9sYXRpb25zGAQgASgIEikKBWJhdGNoGAUgASgLMhoubWdtdC52MWFscGhhMS5CYXRjaENvbmZpZxIjCg1tYXhfaW5fZmxpZ2h0GAYgASgNQge6SAQqAigBSACIAQFCEAoOX21heF9pbl9mbGlnaHQiOgoYTXlzcWxUcnVuY2F0ZVRhYmxlQ29uZmlnEh4KFnRydW5jYXRlX2JlZm9yZV9pbnNlcnQYASABKAgiKwoVTXlzcWxPbkNvbmZsaWN0Q29uZmlnEhIKCmRvX25vdGhpbmcYASABKAgiwQIKIU1zc3FsRGVzdGluYXRpb25Db25uZWN0aW9uT3B0aW9ucxI/Cg50cnVuY2F0ZV90YWJsZRgBIAEoCzInLm1nbXQudjFhbHBoYTEuTXNzcWxUcnVuY2F0ZVRhYmxlQ29uZmlnEhkKEWluaXRfdGFibGVfc2NoZW1hGAIgASgIEjkKC29uX2NvbmZsaWN0GAMgASgLMiQubWdtdC52MWFscGhhMS5Nc3NxbE9uQ29uZmxpY3RDb25maWcSIwobc2tpcF9mb3JlaWduX2tleV92aW9sYXRpb25zGAQgASgIEikKBWJhdGNoGAUgASgLMhoubWdtdC52MWFscGhhMS5CYXRjaENvbmZpZxIjCg1tYXhfaW5fZmxpZ2h0GAYgASgNQge6SAQqAigBSACIAQFCEAoOX21heF9pbl9mbGlnaHQiOgoYTXNzcWxUcnVuY2F0ZVRhYmxlQ29uZmlnEh4KFnRydW5jYXRlX2JlZm9yZV9pbnNlcnQYASABKAgiKwoVTXNzcWxPbkNvbmZsaWN0Q29uZmlnEhIKCmRvX25vdGhpbmcYASABKAgijgQKIUF3c1MzRGVzdGluYXRpb25Db25uZWN0aW9uT3B0aW9ucxJUCg1zdG9yYWdlX2NsYXNzGAEgASgOMj0ubWdtdC52MWFscGhhMS5Bd3NTM0Rlc3RpbmF0aW9uQ29ubmVjdGlvbk9wdGlvbnMuU3RvcmFnZUNsYXNzEiMKDW1heF9pbl9mbGlnaHQYAiABKA1CB7pIBCoCKAFIAIgBARIUCgd0aW1lb3V0GAMgASgJSAGIAQESKQoFYmF0Y2gYBCABKAsyGi5tZ210LnYxYWxwaGExLkJhdGNoQ29uZmlnIo4CCgxTdG9yYWdlQ2xhc3MSHQoZU1RPUkFHRV9DTEFTU19VTlNQRUNJRklFRBAAEhoKFlNUT1JBR0VfQ0xBU1NfU1RBTkRBUkQQARIkCiBTVE9SQUdFX0NMQVNTX1JFRFVDRURfUkVEVU5EQU5DWRACEhkKFVNUT1JBR0VfQ0xBU1NfR0xBQ0lFUhADEh0KGVNUT1JBR0VfQ0xBU1NfU1RBTkRBUkRfSUEQBBIcChhTVE9SQUdFX0NMQVNTX09ORVpPTkVfSUEQBRIlCiFTVE9SQUdFX0NMQVNTX0lOVEVMTElHRU5UX1RJRVJJTkcQBhIeChpTVE9SQUdFX0NMQVNTX0RFRVBfQVJDSElWRRAHQhAKDl9tYXhfaW5fZmxpZ2h0QgoKCF90aW1lb3V0IksKC0JhdGNoQ29uZmlnEhIKBWNvdW50GAEgASgNSACIAQESEwoGcGVyaW9kGAIgASgJSAGIAQFCCAoGX2NvdW50QgkKB19wZXJpb2Qi7gMKEENyZWF0ZUpvYlJlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQESKwoIam9iX25hbWUYAiABKAlCGbpIFnIUMhJeW2EtejAtOS1dezMsMTAwfSQSGgoNY3Jvbl9zY2hlZHVsZRgDIAEoCUgAiAEBEisKCG1hcHBpbmdzGAQgAygLMhkubWdtdC52MWFscGhhMS5Kb2JNYXBwaW5nEigKBnNvdXJjZRgFIAEoCzIYLm1nbXQudjFhbHBoYTEuSm9iU291cmNlEjkKDGRlc3RpbmF0aW9ucxgGIAMoCzIjLm1nbXQudjFhbHBoYTEuQ3JlYXRlSm9iRGVzdGluYXRpb24SGAoQaW5pdGlhdGVfam9iX3J1bhgHIAEoCBI4ChB3b3JrZmxvd19vcHRpb25zGAggASgLMh4ubWdtdC52MWFscGhhMS5Xb3JrZmxvd09wdGlvbnMSNAoMc3luY19vcHRpb25zGAkgASgLMh4ubWdtdC52MWFscGhhMS5BY3Rpdml0eU9wdGlvbnMSRQoUdmlydHVhbF9mb3JlaWduX2tleXMYCiADKAsyJy5tZ210LnYxYWxwaGExLlZpcnR1YWxGb3JlaWduQ29uc3RyYWludEIQCg5fY3Jvbl9zY2hlZHVsZSI7Cg9Xb3JrZmxvd09wdGlvbnMSGAoLcnVuX3RpbWVvdXQYCCABKANIAIgBAUIOCgxfcnVuX3RpbWVvdXQi2wEKD0FjdGl2aXR5T3B0aW9ucxIvChlzY2hlZHVsZV90b19jbG9zZV90aW1lb3V0GAEgASgDQge6SAQiAigBSACIAQESLAoWc3RhcnRfdG9fY2xvc2VfdGltZW91dBgCIAEoA0IHukgEIgIoAUgBiAEBEjAKDHJldHJ5X3BvbGljeRgDIAEoCzIaLm1nbXQudjFhbHBoYTEuUmV0cnlQb2xpY3lCHAoaX3NjaGVkdWxlX3RvX2Nsb3NlX3RpbWVvdXRCGQoXX3N0YXJ0X3RvX2Nsb3NlX3RpbWVvdXQiSgoLUmV0cnlQb2xpY3kSJgoQbWF4aW11bV9hdHRlbXB0cxgBIAEoBUIHukgEGgIoAEgAiAEBQhMKEV9tYXhpbXVtX2F0dGVtcHRzIjQKEUNyZWF0ZUpvYlJlc3BvbnNlEh8KA2pvYhgBIAEoCzISLm1nbXQudjFhbHBoYTEuSm9iIk8KFUpvYk1hcHBpbmdUcmFuc2Zvcm1lchIwCgZjb25maWcYAyABKAsyIC5tZ210LnYxYWxwaGExLlRyYW5zZm9ybWVyQ29uZmlnSgQIARACInYKCkpvYk1hcHBpbmcSDgoGc2NoZW1hGAEgASgJEg0KBXRhYmxlGAIgASgJEg4KBmNvbHVtbhgDIAEoCRI5Cgt0cmFuc2Zvcm1lchgFIAEoCzIkLm1nbXQudjFhbHBoYTEuSm9iTWFwcGluZ1RyYW5zZm9ybWVyIiUKDUdldEpvYlJlcXVlc3QSFAoCaWQYASABKAlCCLpIBXIDsAEBIjEKDkdldEpvYlJlc3BvbnNlEh8KA2pvYhgBIAEoCzISLm1nbXQudjFhbHBoYTEuSm9iIl4KGFVwZGF0ZUpvYlNjaGVkdWxlUmVxdWVzdBIUCgJpZBgBIAEoCUIIukgFcgOwAQESGgoNY3Jvbl9zY2hlZHVsZRgCIAEoCUgAiAEBQhAKDl9jcm9uX3NjaGVkdWxlIjwKGVVwZGF0ZUpvYlNjaGVkdWxlUmVzcG9uc2USHwoDam9iGAEgASgLMhIubWdtdC52MWFscGhhMS5Kb2IiUgoPUGF1c2VKb2JSZXF1ZXN0EhQKAmlkGAEgASgJQgi6SAVyA7ABARINCgVwYXVzZRgCIAEoCBIRCgRub3RlGAMgASgJSACIAQFCBwoFX25vdGUiMwoQUGF1c2VKb2JSZXNwb25zZRIfCgNqb2IYASABKAsyEi5tZ210LnYxYWxwaGExLkpvYiLWAQogVXBkYXRlSm9iU291cmNlQ29ubmVjdGlvblJlcXVlc3QSFAoCaWQYASABKAlCCLpIBXIDsAEBEigKBnNvdXJjZRgCIAEoCzIYLm1nbXQudjFhbHBoYTEuSm9iU291cmNlEisKCG1hcHBpbmdzGAMgAygLMhkubWdtdC52MWFscGhhMS5Kb2JNYXBwaW5nEkUKFHZpcnR1YWxfZm9yZWlnbl9rZXlzGAQgAygLMicubWdtdC52MWFscGhhMS5WaXJ0dWFsRm9yZWlnbkNvbnN0cmFpbnQiRAohVXBkYXRlSm9iU291cmNlQ29ubmVjdGlvblJlc3BvbnNlEh8KA2pvYhgBIAEoCzISLm1nbXQudjFhbHBoYTEuSm9iImEKGlBvc3RncmVzU291cmNlU2NoZW1hU3Vic2V0EkMKEHBvc3RncmVzX3NjaGVtYXMYASADKAsyKS5tZ210LnYxYWxwaGExLlBvc3RncmVzU291cmNlU2NoZW1hT3B0aW9uIlgKF015c3FsU291cmNlU2NoZW1hU3Vic2V0Ej0KDW15c3FsX3NjaGVtYXMYASADKAsyJi5tZ210LnYxYWxwaGExLk15c3FsU291cmNlU2NoZW1hT3B0aW9uIlYKGkR5bmFtb0RCU291cmNlU2NoZW1hU3Vic2V0EjgKBnRhYmxlcxgBIAMoCzIoLm1nbXQudjFhbHBoYTEuRHluYW1vREJTb3VyY2VUYWJsZU9wdGlvbiJYChdNc3NxbFNvdXJjZVNjaGVtYVN1YnNldBI9Cg1tc3NxbF9zY2hlbWFzGAEgAygLMiYubWdtdC52MWFscGhhMS5Nc3NxbFNvdXJjZVNjaGVtYU9wdGlvbiK4AgoYSm9iU291cmNlU3FsU3ViZXRTY2hlbWFzEkQKD3Bvc3RncmVzX3N1YnNldBgCIAEoCzIpLm1nbXQudjFhbHBoYTEuUG9zdGdyZXNTb3VyY2VTY2hlbWFTdWJzZXRIABI+CgxteXNxbF9zdWJzZXQYAyABKAsyJi5tZ210LnYxYWxwaGExLk15c3FsU291cmNlU2NoZW1hU3Vic2V0SAASRAoPZHluYW1vZGJfc3Vic2V0GAQgASgLMikubWdtdC52MWFscGhhMS5EeW5hbW9EQlNvdXJjZVNjaGVtYVN1YnNldEgAEj4KDG1zc3FsX3N1YnNldBgFIAEoCzImLm1nbXQudjFhbHBoYTEuTXNzcWxTb3VyY2VTY2hlbWFTdWJzZXRIAEIQCgdzY2hlbWFzEgW6SAIIASKkAQonU2V0Sm9iU291cmNlU3FsQ29ubmVjdGlvblN1YnNldHNSZXF1ZXN0EhQKAmlkGAEgASgJQgi6SAVyA7ABARI4CgdzY2hlbWFzGAIgASgLMicubWdtdC52MWFscGhhMS5Kb2JTb3VyY2VTcWxTdWJldFNjaGVtYXMSKQohc3Vic2V0X2J5X2ZvcmVpZ25fa2V5X2NvbnN0cmFpbnRzGAMgASgIIksKKFNldEpvYlNvdXJjZVNxbENvbm5lY3Rpb25TdWJzZXRzUmVzcG9uc2USHwoDam9iGAEgASgLMhIubWdtdC52MWFscGhhMS5Kb2IisQEKJVVwZGF0ZUpvYkRlc3RpbmF0aW9uQ29ubmVjdGlvblJlcXVlc3QSGAoGam9iX2lkGAEgASgJQgi6SAVyA7ABARIfCg1jb25uZWN0aW9uX2lkGAIgASgJQgi6SAVyA7ABARI1CgdvcHRpb25zGAMgASgLMiQubWdtdC52MWFscGhhMS5Kb2JEZXN0aW5hdGlvbk9wdGlvbnMSFgoOZGVzdGluYXRpb25faWQYBCABKAkiSQomVXBkYXRlSm9iRGVzdGluYXRpb25Db25uZWN0aW9uUmVzcG9uc2USHwoDam9iGAEgASgLMhIubWdtdC52MWFscGhhMS5Kb2IiSQolRGVsZXRlSm9iRGVzdGluYXRpb25Db25uZWN0aW9uUmVxdWVzdBIgCg5kZXN0aW5hdGlvbl9pZBgBIAEoCUIIukgFcgOwAQEiKAomRGVsZXRlSm9iRGVzdGluYXRpb25Db25uZWN0aW9uUmVzcG9uc2UifQomQ3JlYXRlSm9iRGVzdGluYXRpb25Db25uZWN0aW9uc1JlcXVlc3QSGAoGam9iX2lkGAEgASgJQgi6SAVyA7ABARI5CgxkZXN0aW5hdGlvbnMYAiADKAsyIy5tZ210LnYxYWxwaGExLkNyZWF0ZUpvYkRlc3RpbmF0aW9uIkoKJ0NyZWF0ZUpvYkRlc3RpbmF0aW9uQ29ubmVjdGlvbnNSZXNwb25zZRIfCgNqb2IYASABKAsyEi5tZ210LnYxYWxwaGExLkpvYiIoChBEZWxldGVKb2JSZXF1ZXN0EhQKAmlkGAEgASgJQgi6SAVyA7ABASITChFEZWxldGVKb2JSZXNwb25zZSJiChlJc0pvYk5hbWVBdmFpbGFibGVSZXF1ZXN0EicKBG5hbWUYASABKAlCGbpIFnIUMhJeW2EtejAtOS1dezMsMTAwfSQSHAoKYWNjb3VudF9pZBgCIAEoCUIIukgFcgOwAQEiMgoaSXNKb2JOYW1lQXZhaWxhYmxlUmVzcG9uc2USFAoMaXNfYXZhaWxhYmxlGAEgASgIIlUKEUdldEpvYlJ1bnNSZXF1ZXN0EhoKBmpvYl9pZBgBIAEoCUIIukgFcgOwAQFIABIeCgphY2NvdW50X2lkGAIgASgJQgi6SAVyA7ABAUgAQgQKAmlkIj0KEkdldEpvYlJ1bnNSZXNwb25zZRInCghqb2JfcnVucxgBIAMoCzIVLm1nbXQudjFhbHBoYTEuSm9iUnVuIkQKEEdldEpvYlJ1blJlcXVlc3QSEgoKam9iX3J1bl9pZBgBIAEoCRIcCgphY2NvdW50X2lkGAIgASgJQgi6SAVyA7ABASI7ChFHZXRKb2JSdW5SZXNwb25zZRImCgdqb2JfcnVuGAEgASgLMhUubWdtdC52MWFscGhhMS5Kb2JSdW4iLwoTQ3JlYXRlSm9iUnVuUmVxdWVzdBIYCgZqb2JfaWQYASABKAlCCLpIBXIDsAEBIhYKFENyZWF0ZUpvYlJ1blJlc3BvbnNlIkcKE0NhbmNlbEpvYlJ1blJlcXVlc3QSEgoKam9iX3J1bl9pZBgBIAEoCRIcCgphY2NvdW50X2lkGAIgASgJQgi6SAVyA7ABASIWChRDYW5jZWxKb2JSdW5SZXNwb25zZSK8BAoDSm9iEgoKAmlkGAEgASgJEhoKEmNyZWF0ZWRfYnlfdXNlcl9pZBgCIAEoCRIuCgpjcmVhdGVkX2F0GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIaChJ1cGRhdGVkX2J5X3VzZXJfaWQYBCABKAkSLgoKdXBkYXRlZF9hdBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASDAoEbmFtZRgGIAEoCRIoCgZzb3VyY2UYByABKAsyGC5tZ210LnYxYWxwaGExLkpvYlNvdXJjZRIzCgxkZXN0aW5hdGlvbnMYCCADKAsyHS5tZ210LnYxYWxwaGExLkpvYkRlc3RpbmF0aW9uEisKCG1hcHBpbmdzGAkgAygLMhkubWdtdC52MWFscGhhMS5Kb2JNYXBwaW5nEhoKDWNyb25fc2NoZWR1bGUYCiABKAlIAIgBARISCgphY2NvdW50X2lkGAsgASgJEjQKDHN5bmNfb3B0aW9ucxgMIAEoCzIeLm1nbXQudjFhbHBoYTEuQWN0aXZpdHlPcHRpb25zEjgKEHdvcmtmbG93X29wdGlvbnMYDSABKAsyHi5tZ210LnYxYWxwaGExLldvcmtmbG93T3B0aW9ucxJFChR2aXJ0dWFsX2ZvcmVpZ25fa2V5cxgOIAMoCzInLm1nbXQudjFhbHBoYTEuVmlydHVhbEZvcmVpZ25Db25zdHJhaW50QhAKDl9jcm9uX3NjaGVkdWxlIlIKDEpvYlJlY2VudFJ1bhIuCgpzdGFydF90aW1lGAEgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBISCgpqb2JfcnVuX2lkGAIgASgJIjMKF0dldEpvYlJlY2VudFJ1bnNSZXF1ZXN0EhgKBmpvYl9pZBgBIAEoCUIIukgFcgOwAQEiTAoYR2V0Sm9iUmVjZW50UnVuc1Jlc3BvbnNlEjAKC3JlY2VudF9ydW5zGAEgAygLMhsubWdtdC52MWFscGhhMS5Kb2JSZWNlbnRSdW4iQQoLSm9iTmV4dFJ1bnMSMgoObmV4dF9ydW5fdGltZXMYASADKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIicKFUdldEpvYk5leHRSdW5zUmVxdWVzdBIOCgZqb2JfaWQYASABKAkiRwoWR2V0Sm9iTmV4dFJ1bnNSZXNwb25zZRItCgluZXh0X3J1bnMYASABKAsyGi5tZ210LnYxYWxwaGExLkpvYk5leHRSdW5zIiUKE0dldEpvYlN0YXR1c1JlcXVlc3QSDgoGam9iX2lkGAEgASgJIkAKFEdldEpvYlN0YXR1c1Jlc3BvbnNlEigKBnN0YXR1cxgBIAEoDjIYLm1nbXQudjFhbHBoYTEuSm9iU3RhdHVzIksKD0pvYlN0YXR1c1JlY29yZBIOCgZqb2JfaWQYASABKAkSKAoGc3RhdHVzGAIgASgOMhgubWdtdC52MWFscGhhMS5Kb2JTdGF0dXMiNQoVR2V0Sm9iU3RhdHVzZXNSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIkoKFkdldEpvYlN0YXR1c2VzUmVzcG9uc2USMAoIc3RhdHVzZXMYASADKAsyHi5tZ210LnYxYWxwaGExLkpvYlN0YXR1c1JlY29yZCIiCg9BY3Rpdml0eUZhaWx1cmUSDwoHbWVzc2FnZRgBIAEoCSKjAQoPUGVuZGluZ0FjdGl2aXR5Ei0KBnN0YXR1cxgBIAEoDjIdLm1nbXQudjFhbHBoYTEuQWN0aXZpdHlTdGF0dXMSFQoNYWN0aXZpdHlfbmFtZRgCIAEoCRI5CgxsYXN0X2ZhaWx1cmUYAyABKAsyHi5tZ210LnYxYWxwaGExLkFjdGl2aXR5RmFpbHVyZUgAiAEBQg8KDV9sYXN0X2ZhaWx1cmUikwIKBkpvYlJ1bhIKCgJpZBgBIAEoCRIOCgZqb2JfaWQYAiABKAkSDAoEbmFtZRgDIAEoCRIrCgZzdGF0dXMYBCABKA4yGy5tZ210LnYxYWxwaGExLkpvYlJ1blN0YXR1cxIuCgpzdGFydGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBI1Cgxjb21wbGV0ZWRfYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wSACIAQESOgoScGVuZGluZ19hY3Rpdml0aWVzGAggAygLMh4ubWdtdC52MWFscGhhMS5QZW5kaW5nQWN0aXZpdHlCDwoNX2NvbXBsZXRlZF9hdCI8ChRKb2JSdW5FdmVudFRhc2tFcnJvchIPCgdtZXNzYWdlGAEgASgJEhMKC3JldHJ5X3N0YXRlGAIgASgJIo8BCg9Kb2JSdW5FdmVudFRhc2sSCgoCaWQYASABKAMSDAoEdHlwZRgCIAEoCRIuCgpldmVudF90aW1lGAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIyCgVlcnJvchgEIAEoCzIjLm1nbXQudjFhbHBoYTEuSm9iUnVuRXZlbnRUYXNrRXJyb3IiMwoSSm9iUnVuU3luY01ldGFkYXRhEg4KBnNjaGVtYRgBIAEoCRINCgV0YWJsZRgCIAEoCSJkChNKb2JSdW5FdmVudE1ldGFkYXRhEjoKDXN5bmNfbWV0YWRhdGEYASABKAsyIS5tZ210LnYxYWxwaGExLkpvYlJ1blN5bmNNZXRhZGF0YUgAQhEKCG1ldGFkYXRhEgW6SAIIASLsAQoLSm9iUnVuRXZlbnQSCgoCaWQYASABKAMSDAoEdHlwZRgCIAEoCRIuCgpzdGFydF90aW1lGAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgpjbG9zZV90aW1lGAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBI0CghtZXRhZGF0YRgFIAEoCzIiLm1nbXQudjFhbHBoYTEuSm9iUnVuRXZlbnRNZXRhZGF0YRItCgV0YXNrcxgGIAMoCzIeLm1nbXQudjFhbHBoYTEuSm9iUnVuRXZlbnRUYXNrIkoKFkdldEpvYlJ1bkV2ZW50c1JlcXVlc3QSEgoKam9iX3J1bl9pZBgBIAEoCRIcCgphY2NvdW50X2lkGAIgASgJQgi6SAVyA7ABASJeChdHZXRKb2JSdW5FdmVudHNSZXNwb25zZRIqCgZldmVudHMYASADKAsyGi5tZ210LnYxYWxwaGExLkpvYlJ1bkV2ZW50EhcKD2lzX3J1bl9jb21wbGV0ZRgCIAEoCCJHChNEZWxldGVKb2JSdW5SZXF1ZXN0EhIKCmpvYl9ydW5faWQYASABKAkSHAoKYWNjb3VudF9pZBgCIAEoCUIIukgFcgOwAQEiFgoURGVsZXRlSm9iUnVuUmVzcG9uc2UiSgoWVGVybWluYXRlSm9iUnVuUmVxdWVzdBISCgpqb2JfcnVuX2lkGAEgASgJEhwKCmFjY291bnRfaWQYAiABKAlCCLpIBXIDsAEBIhkKF1Rlcm1pbmF0ZUpvYlJ1blJlc3BvbnNlIvEBChpHZXRKb2JSdW5Mb2dzU3RyZWFtUmVxdWVzdBISCgpqb2JfcnVuX2lkGAEgASgJEhwKCmFjY291bnRfaWQYAiABKAlCCLpIBXIDsAEBEigKBndpbmRvdxgDIAEoDjIYLm1nbXQudjFhbHBoYTEuTG9nV2luZG93EhMKC3Nob3VsZF90YWlsGAQgASgIEiMKDW1heF9sb2dfbGluZXMYBSABKANCB7pIBCICKAFIAIgBARIrCgpsb2dfbGV2ZWxzGAYgAygOMhcubWdtdC52MWFscGhhMS5Mb2dMZXZlbEIQCg5fbWF4X2xvZ19saW5lcyJxChtHZXRKb2JSdW5Mb2dzU3RyZWFtUmVzcG9uc2USEAoIbG9nX2xpbmUYASABKAkSMgoJdGltZXN0YW1wGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEgAiAEBQgwKCl90aW1lc3RhbXAibgocU2V0Sm9iV29ya2Zsb3dPcHRpb25zUmVxdWVzdBIUCgJpZBgBIAEoCUIIukgFcgOwAQESOAoQd29yZmtsb3dfb3B0aW9ucxgCIAEoCzIeLm1nbXQudjFhbHBoYTEuV29ya2Zsb3dPcHRpb25zIkAKHVNldEpvYldvcmtmbG93T3B0aW9uc1Jlc3BvbnNlEh8KA2pvYhgBIAEoCzISLm1nbXQudjFhbHBoYTEuSm9iImYKGFNldEpvYlN5bmNPcHRpb25zUmVxdWVzdBIUCgJpZBgBIAEoCUIIukgFcgOwAQESNAoMc3luY19vcHRpb25zGAIgASgLMh4ubWdtdC52MWFscGhhMS5BY3Rpdml0eU9wdGlvbnMiPAoZU2V0Sm9iU3luY09wdGlvbnNSZXNwb25zZRIfCgNqb2IYASABKAsyEi5tZ210LnYxYWxwaGExLkpvYiLFAQoaVmFsaWRhdGVKb2JNYXBwaW5nc1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQESKwoIbWFwcGluZ3MYAiADKAsyGS5tZ210LnYxYWxwaGExLkpvYk1hcHBpbmcSFQoNY29ubmVjdGlvbl9pZBgDIAEoCRJFChR2aXJ0dWFsX2ZvcmVpZ25fa2V5cxgEIAMoCzInLm1nbXQudjFhbHBoYTEuVmlydHVhbEZvcmVpZ25Db25zdHJhaW50IkwKC0NvbHVtbkVycm9yEg4KBnNjaGVtYRgBIAEoCRINCgV0YWJsZRgCIAEoCRIOCgZjb2x1bW4YAyABKAkSDgoGZXJyb3JzGAQgAygJIh8KDURhdGFiYXNlRXJyb3ISDgoGZXJyb3JzGAEgAygJIocBChtWYWxpZGF0ZUpvYk1hcHBpbmdzUmVzcG9uc2USMQoNY29sdW1uX2Vycm9ycxgBIAMoCzIaLm1nbXQudjFhbHBoYTEuQ29sdW1uRXJyb3ISNQoPZGF0YWJhc2VfZXJyb3JzGAIgASgLMhwubWdtdC52MWFscGhhMS5EYXRhYmFzZUVycm9yIkMKEVZpcnR1YWxGb3JlaWduS2V5Eg4KBnNjaGVtYRgBIAEoCRINCgV0YWJsZRgCIAEoCRIPCgdjb2x1bW5zGAMgAygJIoEBChhWaXJ0dWFsRm9yZWlnbkNvbnN0cmFpbnQSDgoGc2NoZW1hGAEgASgJEg0KBXRhYmxlGAIgASgJEg8KB2NvbHVtbnMYAyADKAkSNQoLZm9yZWlnbl9rZXkYBCABKAsyIC5tZ210LnYxYWxwaGExLlZpcnR1YWxGb3JlaWduS2V5ImcKDVJ1bkNvbnRleHRLZXkSGwoKam9iX3J1bl9pZBgBIAEoCUIHukgEcgIQARIcCgtleHRlcm5hbF9pZBgCIAEoCUIHukgEcgIQARIbCgphY2NvdW50X2lkGAMgASgJQge6SARyAhABIkAKFEdldFJ1bkNvbnRleHRSZXF1ZXN0EigKAmlkGAEgASgLMhwubWdtdC52MWFscGhhMS5SdW5Db250ZXh0S2V5IiYKFUdldFJ1bkNvbnRleHRSZXNwb25zZRINCgV2YWx1ZRgBIAEoDCJPChRTZXRSdW5Db250ZXh0UmVxdWVzdBIoCgJpZBgBIAEoCzIcLm1nbXQudjFhbHBoYTEuUnVuQ29udGV4dEtleRINCgV2YWx1ZRgCIAEoDCIXChVTZXRSdW5Db250ZXh0UmVzcG9uc2UiUAoVU2V0UnVuQ29udGV4dHNSZXF1ZXN0EigKAmlkGAEgASgLMhwubWdtdC52MWFscGhhMS5SdW5Db250ZXh0S2V5Eg0KBXZhbHVlGAIgASgMIhgKFlNldFJ1bkNvbnRleHRzUmVzcG9uc2UivAIKB0pvYkhvb2sSCgoCaWQYASABKAkSDAoEbmFtZRgCIAEoCRITCgtkZXNjcmlwdGlvbhgDIAEoCRIOCgZqb2JfaWQYBCABKAkSLAoGY29uZmlnGAUgASgLMhwubWdtdC52MWFscGhhMS5Kb2JIb29rQ29uZmlnEhoKEmNyZWF0ZWRfYnlfdXNlcl9pZBgGIAEoCRIuCgpjcmVhdGVkX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIaChJ1cGRhdGVkX2J5X3VzZXJfaWQYCCABKAkSLgoKdXBkYXRlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASDwoHZW5hYmxlZBgKIAEoCBIbCghwcmlvcml0eRgLIAEoDUIJukgGKgQYZCgAIq8BCgpOZXdKb2JIb29rEicKBG5hbWUYASABKAlCGbpIFnIUMhJeW2EtejAtOS1dezMsMTAwfSQSHAoLZGVzY3JpcHRpb24YAiABKAlCB7pIBHICEAESLAoGY29uZmlnGAMgASgLMhwubWdtdC52MWFscGhhMS5Kb2JIb29rQ29uZmlnEg8KB2VuYWJsZWQYBCABKAgSGwoIcHJpb3JpdHkYBSABKA1CCbpIBioEGGQoACLwAgoNSm9iSG9va0NvbmZpZxI2CgNzcWwYBSABKAsyJy5tZ210LnYxYWxwaGExLkpvYkhvb2tDb25maWcuSm9iU3FsSG9va0gAGpUCCgpKb2JTcWxIb29rEhYKBXF1ZXJ5GAEgASgJQge6SARyAhABEh8KDWNvbm5lY3Rpb25faWQYAiABKAlCCLpIBXIDsAEBEj4KBnRpbWluZxgDIAEoCzIuLm1nbXQudjFhbHBoYTEuSm9iSG9va0NvbmZpZy5Kb2JTcWxIb29rLlRpbWluZxqNAQoGVGltaW5nEjcKCHByZV9zeW5jGAMgASgLMiMubWdtdC52MWFscGhhMS5Kb2JIb29rVGltaW5nUHJlU3luY0gAEjkKCXBvc3Rfc3luYxgEIAEoCzIkLm1nbXQudjFhbHBoYTEuSm9iSG9va1RpbWluZ1Bvc3RTeW5jSABCDwoGdGltaW5nEgW6SAIIAUIPCgZjb25maWcSBbpIAggBIhYKFEpvYkhvb2tUaW1pbmdQcmVTeW5jIhcKFUpvYkhvb2tUaW1pbmdQb3N0U3luYyIuChJHZXRKb2JIb29rc1JlcXVlc3QSGAoGam9iX2lkGAEgASgJQgi6SAVyA7ABASI8ChNHZXRKb2JIb29rc1Jlc3BvbnNlEiUKBWhvb2tzGAEgAygLMhYubWdtdC52MWFscGhhMS5Kb2JIb29rIikKEUdldEpvYkhvb2tSZXF1ZXN0EhQKAmlkGAEgASgJQgi6SAVyA7ABASI6ChJHZXRKb2JIb29rUmVzcG9uc2USJAoEaG9vaxgBIAEoCzIWLm1nbXQudjFhbHBoYTEuSm9iSG9vayJPChRDcmVhdGVKb2JIb29rUmVxdWVzdBIOCgZqb2JfaWQYASABKAkSJwoEaG9vaxgCIAEoCzIZLm1nbXQudjFhbHBoYTEuTmV3Sm9iSG9vayI9ChVDcmVhdGVKb2JIb29rUmVzcG9uc2USJAoEaG9vaxgBIAEoCzIWLm1nbXQudjFhbHBoYTEuSm9iSG9vayIsChREZWxldGVKb2JIb29rUmVxdWVzdBIUCgJpZBgBIAEoCUIIukgFcgOwAQEiFwoVRGVsZXRlSm9iSG9va1Jlc3BvbnNlIj0KHUlzSm9iSG9va05hbWVBdmFpbGFibGVSZXF1ZXN0Eg4KBmpvYl9pZBgBIAEoCRIMCgRuYW1lGAIgASgJIjYKHklzSm9iSG9va05hbWVBdmFpbGFibGVSZXNwb25zZRIUCgxpc19hdmFpbGFibGUYASABKAgizwEKFFVwZGF0ZUpvYkhvb2tSZXF1ZXN0EhQKAmlkGAEgASgJQgi6SAVyA7ABARInCgRuYW1lGAIgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kEhwKC2Rlc2NyaXB0aW9uGAMgASgJQge6SARyAhABEiwKBmNvbmZpZxgEIAEoCzIcLm1nbXQudjFhbHBoYTEuSm9iSG9va0NvbmZpZxIPCgdlbmFibGVkGAUgASgIEhsKCHByaW9yaXR5GAYgASgNQgm6SAYqBBhkKAAiPQoVVXBkYXRlSm9iSG9va1Jlc3BvbnNlEiQKBGhvb2sYASABKAsyFi5tZ210LnYxYWxwaGExLkpvYkhvb2siQQoYU2V0Sm9iSG9va0VuYWJsZWRSZXF1ZXN0EhQKAmlkGAEgASgJQgi6SAVyA7ABARIPCgdlbmFibGVkGAIgASgIIkEKGVNldEpvYkhvb2tFbmFibGVkUmVzcG9uc2USJAoEaG9vaxgBIAEoCzIWLm1nbXQudjFhbHBoYTEuSm9iSG9vayLPAQogR2V0QWN0aXZlSm9iSG9va3NCeVRpbWluZ1JlcXVlc3QSGAoGam9iX2lkGAEgASgJQgi6SAVyA7ABARJGCgZ0aW1pbmcYAiABKA4yNi5tZ210LnYxYWxwaGExLkdldEFjdGl2ZUpvYkhvb2tzQnlUaW1pbmdSZXF1ZXN0LlRpbWluZyJJCgZUaW1pbmcSFgoSVElNSU5HX1VOU1BFQ0lGSUVEEAASEgoOVElNSU5HX1BSRVNZTkMQARITCg9USU1JTkdfUE9TVFNZTkMQAiJKCiFHZXRBY3RpdmVKb2JIb29rc0J5VGltaW5nUmVzcG9uc2USJQoFaG9va3MYASADKAsyFi5tZ210LnYxYWxwaGExLkpvYkhvb2sqbwoJSm9iU3RhdHVzEhoKFkpPQl9TVEFUVVNfVU5TUEVDSUZJRUQQABIWChJKT0JfU1RBVFVTX0VOQUJMRUQQARIVChFKT0JfU1RBVFVTX1BBVVNFRBADEhcKE0pPQl9TVEFUVVNfRElTQUJMRUQQBCqnAQoOQWN0aXZpdHlTdGF0dXMSHwobQUNUSVZJVFlfU1RBVFVTX1VOU1BFQ0lGSUVEEAASHQoZQUNUSVZJVFlfU1RBVFVTX1NDSEVEVUxFRBABEhsKF0FDVElWSVRZX1NUQVRVU19TVEFSVEVEEAISHAoYQUNUSVZJVFlfU1RBVFVTX0NBTkNFTEVEEAMSGgoWQUNUSVZJVFlfU1RBVFVTX0ZBSUxFRBAEKpICCgxKb2JSdW5TdGF0dXMSHgoaSk9CX1JVTl9TVEFUVVNfVU5TUEVDSUZJRUQQABIaChZKT0JfUlVOX1NUQVRVU19QRU5ESU5HEAESGgoWSk9CX1JVTl9TVEFUVVNfUlVOTklORxACEhsKF0pPQl9SVU5fU1RBVFVTX0NPTVBMRVRFEAMSGAoUSk9CX1JVTl9TVEFUVVNfRVJST1IQBBIbChdKT0JfUlVOX1NUQVRVU19DQU5DRUxFRBAFEh0KGUpPQl9SVU5fU1RBVFVTX1RFUk1JTkFURUQQBhIZChVKT0JfUlVOX1NUQVRVU19GQUlMRUQQBxIcChhKT0JfUlVOX1NUQVRVU19USU1FRF9PVVQQCCp8CglMb2dXaW5kb3cSIgoeTE9HX1dJTkRPV19OT19USU1FX1VOU1BFQ0lGSUVEEAASGgoWTE9HX1dJTkRPV19GSUZURUVOX01JThABEhcKE0xPR19XSU5ET1dfT05FX0hPVVIQAhIWChJMT0dfV0lORE9XX09ORV9EQVkQAyp3CghMb2dMZXZlbBIZChVMT0dfTEVWRUxfVU5TUEVDSUZJRUQQABITCg9MT0dfTEVWRUxfREVCVUcQARISCg5MT0dfTEVWRUxfSU5GTxACEhIKDkxPR19MRVZFTF9XQVJOEAMSEwoPTE9HX0xFVkVMX0VSUk9SEAQy0R4KCkpvYlNlcnZpY2USSgoHR2V0Sm9icxIdLm1nbXQudjFhbHBoYTEuR2V0Sm9ic1JlcXVlc3QaHi5tZ210LnYxYWxwaGExLkdldEpvYnNSZXNwb25zZSIAEkcKBkdldEpvYhIcLm1nbXQudjFhbHBoYTEuR2V0Sm9iUmVxdWVzdBodLm1nbXQudjFhbHBoYTEuR2V0Sm9iUmVzcG9uc2UiABJQCglDcmVhdGVKb2ISHy5tZ210LnYxYWxwaGExLkNyZWF0ZUpvYlJlcXVlc3QaIC5tZ210LnYxYWxwaGExLkNyZWF0ZUpvYlJlc3BvbnNlIgASUAoJRGVsZXRlSm9iEh8ubWdtdC52MWFscGhhMS5EZWxldGVKb2JSZXF1ZXN0GiAubWdtdC52MWFscGhhMS5EZWxldGVKb2JSZXNwb25zZSIAEmsKEklzSm9iTmFtZUF2YWlsYWJsZRIoLm1nbXQudjFhbHBoYTEuSXNKb2JOYW1lQXZhaWxhYmxlUmVxdWVzdBopLm1nbXQudjFhbHBoYTEuSXNKb2JOYW1lQXZhaWxhYmxlUmVzcG9uc2UiABJoChFVcGRhdGVKb2JTY2hlZHVsZRInLm1nbXQudjFhbHBoYTEuVXBkYXRlSm9iU2NoZWR1bGVSZXF1ZXN0GigubWdtdC52MWFscGhhMS5VcGRhdGVKb2JTY2hlZHVsZVJlc3BvbnNlIgASgAEKGVVwZGF0ZUpvYlNvdXJjZUNvbm5lY3Rpb24SLy5tZ210LnYxYWxwaGExLlVwZGF0ZUpvYlNvdXJjZUNvbm5lY3Rpb25SZXF1ZXN0GjAubWdtdC52MWFscGhhMS5VcGRhdGVKb2JTb3VyY2VDb25uZWN0aW9uUmVzcG9uc2UiABKVAQogU2V0Sm9iU291cmNlU3FsQ29ubmVjdGlvblN1YnNldHMSNi5tZ210LnYxYWxwaGExLlNldEpvYlNvdXJjZVNxbENvbm5lY3Rpb25TdWJzZXRzUmVxdWVzdBo3Lm1nbXQudjFhbHBoYTEuU2V0Sm9iU291cmNlU3FsQ29ubmVjdGlvblN1YnNldHNSZXNwb25zZSIAEo8BCh5VcGRhdGVKb2JEZXN0aW5hdGlvbkNvbm5lY3Rpb24SNC5tZ210LnYxYWxwaGExLlVwZGF0ZUpvYkRlc3RpbmF0aW9uQ29ubmVjdGlvblJlcXVlc3QaNS5tZ210LnYxYWxwaGExLlVwZGF0ZUpvYkRlc3RpbmF0aW9uQ29ubmVjdGlvblJlc3BvbnNlIgASjwEKHkRlbGV0ZUpvYkRlc3RpbmF0aW9uQ29ubmVjdGlvbhI0Lm1nbXQudjFhbHBoYTEuRGVsZXRlSm9iRGVzdGluYXRpb25Db25uZWN0aW9uUmVxdWVzdBo1Lm1nbXQudjFhbHBoYTEuRGVsZXRlSm9iRGVzdGluYXRpb25Db25uZWN0aW9uUmVzcG9uc2UiABKSAQofQ3JlYXRlSm9iRGVzdGluYXRpb25Db25uZWN0aW9ucxI1Lm1nbXQudjFhbHBoYTEuQ3JlYXRlSm9iRGVzdGluYXRpb25Db25uZWN0aW9uc1JlcXVlc3QaNi5tZ210LnYxYWxwaGExLkNyZWF0ZUpvYkRlc3RpbmF0aW9uQ29ubmVjdGlvbnNSZXNwb25zZSIAEk0KCFBhdXNlSm9iEh4ubWdtdC52MWFscGhhMS5QYXVzZUpvYlJlcXVlc3QaHy5tZ210LnYxYWxwaGExLlBhdXNlSm9iUmVzcG9uc2UiABJlChBHZXRKb2JSZWNlbnRSdW5zEiYubWdtdC52MWFscGhhMS5HZXRKb2JSZWNlbnRSdW5zUmVxdWVzdBonLm1nbXQudjFhbHBoYTEuR2V0Sm9iUmVjZW50UnVuc1Jlc3BvbnNlIgASXwoOR2V0Sm9iTmV4dFJ1bnMSJC5tZ210LnYxYWxwaGExLkdldEpvYk5leHRSdW5zUmVxdWVzdBolLm1nbXQudjFhbHBoYTEuR2V0Sm9iTmV4dFJ1bnNSZXNwb25zZSIAElkKDEdldEpvYlN0YXR1cxIiLm1nbXQudjFhbHBoYTEuR2V0Sm9iU3RhdHVzUmVxdWVzdBojLm1nbXQudjFhbHBoYTEuR2V0Sm9iU3RhdHVzUmVzcG9uc2UiABJfCg5HZXRKb2JTdGF0dXNlcxIkLm1nbXQudjFhbHBoYTEuR2V0Sm9iU3RhdHVzZXNSZXF1ZXN0GiUubWdtdC52MWFscGhhMS5HZXRKb2JTdGF0dXNlc1Jlc3BvbnNlIgASUwoKR2V0Sm9iUnVucxIgLm1nbXQudjFhbHBoYTEuR2V0Sm9iUnVuc1JlcXVlc3QaIS5tZ210LnYxYWxwaGExLkdldEpvYlJ1bnNSZXNwb25zZSIAEmIKD0dldEpvYlJ1bkV2ZW50cxIlLm1nbXQudjFhbHBoYTEuR2V0Sm9iUnVuRXZlbnRzUmVxdWVzdBomLm1nbXQudjFhbHBoYTEuR2V0Sm9iUnVuRXZlbnRzUmVzcG9uc2UiABJQCglHZXRKb2JSdW4SHy5tZ210LnYxYWxwaGExLkdldEpvYlJ1blJlcXVlc3QaIC5tZ210LnYxYWxwaGExLkdldEpvYlJ1blJlc3BvbnNlIgASWQoMRGVsZXRlSm9iUnVuEiIubWdtdC52MWFscGhhMS5EZWxldGVKb2JSdW5SZXF1ZXN0GiMubWdtdC52MWFscGhhMS5EZWxldGVKb2JSdW5SZXNwb25zZSIAElkKDENyZWF0ZUpvYlJ1bhIiLm1nbXQudjFhbHBoYTEuQ3JlYXRlSm9iUnVuUmVxdWVzdBojLm1nbXQudjFhbHBoYTEuQ3JlYXRlSm9iUnVuUmVzcG9uc2UiABJZCgxDYW5jZWxKb2JSdW4SIi5tZ210LnYxYWxwaGExLkNhbmNlbEpvYlJ1blJlcXVlc3QaIy5tZ210LnYxYWxwaGExLkNhbmNlbEpvYlJ1blJlc3BvbnNlIgASYgoPVGVybWluYXRlSm9iUnVuEiUubWdtdC52MWFscGhhMS5UZXJtaW5hdGVKb2JSdW5SZXF1ZXN0GiYubWdtdC52MWFscGhhMS5UZXJtaW5hdGVKb2JSdW5SZXNwb25zZSIAEnAKE0dldEpvYlJ1bkxvZ3NTdHJlYW0SKS5tZ210LnYxYWxwaGExLkdldEpvYlJ1bkxvZ3NTdHJlYW1SZXF1ZXN0GioubWdtdC52MWFscGhhMS5HZXRKb2JSdW5Mb2dzU3RyZWFtUmVzcG9uc2UiADABEnQKFVNldEpvYldvcmtmbG93T3B0aW9ucxIrLm1nbXQudjFhbHBoYTEuU2V0Sm9iV29ya2Zsb3dPcHRpb25zUmVxdWVzdBosLm1nbXQudjFhbHBoYTEuU2V0Sm9iV29ya2Zsb3dPcHRpb25zUmVzcG9uc2UiABJoChFTZXRKb2JTeW5jT3B0aW9ucxInLm1nbXQudjFhbHBoYTEuU2V0Sm9iU3luY09wdGlvbnNSZXF1ZXN0GigubWdtdC52MWFscGhhMS5TZXRKb2JTeW5jT3B0aW9uc1Jlc3BvbnNlIgASbgoTVmFsaWRhdGVKb2JNYXBwaW5ncxIpLm1nbXQudjFhbHBoYTEuVmFsaWRhdGVKb2JNYXBwaW5nc1JlcXVlc3QaKi5tZ210LnYxYWxwaGExLlZhbGlkYXRlSm9iTWFwcGluZ3NSZXNwb25zZSIAElwKDUdldFJ1bkNvbnRleHQSIy5tZ210LnYxYWxwaGExLkdldFJ1bkNvbnRleHRSZXF1ZXN0GiQubWdtdC52MWFscGhhMS5HZXRSdW5Db250ZXh0UmVzcG9uc2UiABJcCg1TZXRSdW5Db250ZXh0EiMubWdtdC52MWFscGhhMS5TZXRSdW5Db250ZXh0UmVxdWVzdBokLm1nbXQudjFhbHBoYTEuU2V0UnVuQ29udGV4dFJlc3BvbnNlIgASYQoOU2V0UnVuQ29udGV4dHMSJC5tZ210LnYxYWxwaGExLlNldFJ1bkNvbnRleHRzUmVxdWVzdBolLm1nbXQudjFhbHBoYTEuU2V0UnVuQ29udGV4dHNSZXNwb25zZSIAKAESVgoLR2V0Sm9iSG9va3MSIS5tZ210LnYxYWxwaGExLkdldEpvYkhvb2tzUmVxdWVzdBoiLm1nbXQudjFhbHBoYTEuR2V0Sm9iSG9va3NSZXNwb25zZSIAElMKCkdldEpvYkhvb2sSIC5tZ210LnYxYWxwaGExLkdldEpvYkhvb2tSZXF1ZXN0GiEubWdtdC52MWFscGhhMS5HZXRKb2JIb29rUmVzcG9uc2UiABJcCg1DcmVhdGVKb2JIb29rEiMubWdtdC52MWFscGhhMS5DcmVhdGVKb2JIb29rUmVxdWVzdBokLm1nbXQudjFhbHBoYTEuQ3JlYXRlSm9iSG9va1Jlc3BvbnNlIgASXAoNRGVsZXRlSm9iSG9vaxIjLm1nbXQudjFhbHBoYTEuRGVsZXRlSm9iSG9va1JlcXVlc3QaJC5tZ210LnYxYWxwaGExLkRlbGV0ZUpvYkhvb2tSZXNwb25zZSIAEncKFklzSm9iSG9va05hbWVBdmFpbGFibGUSLC5tZ210LnYxYWxwaGExLklzSm9iSG9va05hbWVBdmFpbGFibGVSZXF1ZXN0Gi0ubWdtdC52MWFscGhhMS5Jc0pvYkhvb2tOYW1lQXZhaWxhYmxlUmVzcG9uc2UiABJcCg1VcGRhdGVKb2JIb29rEiMubWdtdC52MWFscGhhMS5VcGRhdGVKb2JIb29rUmVxdWVzdBokLm1nbXQudjFhbHBoYTEuVXBkYXRlSm9iSG9va1Jlc3BvbnNlIgASaAoRU2V0Sm9iSG9va0VuYWJsZWQSJy5tZ210LnYxYWxwaGExLlNldEpvYkhvb2tFbmFibGVkUmVxdWVzdBooLm1nbXQudjFhbHBoYTEuU2V0Sm9iSG9va0VuYWJsZWRSZXNwb25zZSIAEoABChlHZXRBY3RpdmVKb2JIb29rc0J5VGltaW5nEi8ubWdtdC52MWFscGhhMS5HZXRBY3RpdmVKb2JIb29rc0J5VGltaW5nUmVxdWVzdBowLm1nbXQudjFhbHBoYTEuR2V0QWN0aXZlSm9iSG9va3NCeVRpbWluZ1Jlc3BvbnNlIgBCxAEKEWNvbS5tZ210LnYxYWxwaGExQghKb2JQcm90b1ABWlBnaXRodWIuY29tL251Y2xldXNjbG91ZC9uZW9zeW5jL2JhY2tlbmQvZ2VuL2dvL3Byb3Rvcy9tZ210L3YxYWxwaGExO21nbXR2MWFscGhhMaICA01YWKoCDU1nbXQuVjFhbHBoYTHKAg1NZ210XFYxYWxwaGEx4gIZTWdtdFxWMWFscGhhMVxHUEJNZXRhZGF0YeoCDk1nbXQ6OlYxYWxwaGExYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_timestamp, file_mgmt_v1alpha1_transformer]); /** * @generated from message mgmt.v1alpha1.GetJobsRequest */ -export class GetJobsRequest extends Message { +export type GetJobsRequest = Message<"mgmt.v1alpha1.GetJobsRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobsRequest { - return new GetJobsRequest().fromBinary(bytes, options); - } + accountId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobsRequest { - return new GetJobsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobsRequest { - return new GetJobsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobsRequest | PlainMessage | undefined, b: GetJobsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobsRequest. + * Use `create(GetJobsRequestSchema)` to create a new message. + */ +export const GetJobsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 0); /** * @generated from message mgmt.v1alpha1.GetJobsResponse */ -export class GetJobsResponse extends Message { +export type GetJobsResponse = Message<"mgmt.v1alpha1.GetJobsResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.Job jobs = 1; */ - jobs: Job[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "jobs", kind: "message", T: Job, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobsResponse { - return new GetJobsResponse().fromBinary(bytes, options); - } + jobs: Job[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobsResponse { - return new GetJobsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobsResponse { - return new GetJobsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobsResponse | PlainMessage | undefined, b: GetJobsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobsResponse. + * Use `create(GetJobsResponseSchema)` to create a new message. + */ +export const GetJobsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 1); /** * @generated from message mgmt.v1alpha1.JobSource */ -export class JobSource extends Message { +export type JobSource = Message<"mgmt.v1alpha1.JobSource"> & { /** * @generated from field: mgmt.v1alpha1.JobSourceOptions options = 1; */ options?: JobSourceOptions; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobSource"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "options", kind: "message", T: JobSourceOptions }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobSource { - return new JobSource().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobSource { - return new JobSource().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobSource { - return new JobSource().fromJsonString(jsonString, options); - } - - static equals(a: JobSource | PlainMessage | undefined, b: JobSource | PlainMessage | undefined): boolean { - return proto3.util.equals(JobSource, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobSource. + * Use `create(JobSourceSchema)` to create a new message. + */ +export const JobSourceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 2); /** * @generated from message mgmt.v1alpha1.JobSourceOptions */ -export class JobSourceOptions extends Message { +export type JobSourceOptions = Message<"mgmt.v1alpha1.JobSourceOptions"> & { /** * @generated from oneof mgmt.v1alpha1.JobSourceOptions.config */ @@ -395,94 +123,46 @@ export class JobSourceOptions extends Message { */ value: MssqlSourceConnectionOptions; case: "mssql"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobSourceOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "postgres", kind: "message", T: PostgresSourceConnectionOptions, oneof: "config" }, - { no: 2, name: "aws_s3", kind: "message", T: AwsS3SourceConnectionOptions, oneof: "config" }, - { no: 3, name: "mysql", kind: "message", T: MysqlSourceConnectionOptions, oneof: "config" }, - { no: 4, name: "generate", kind: "message", T: GenerateSourceOptions, oneof: "config" }, - { no: 5, name: "ai_generate", kind: "message", T: AiGenerateSourceOptions, oneof: "config" }, - { no: 6, name: "mongodb", kind: "message", T: MongoDBSourceConnectionOptions, oneof: "config" }, - { no: 7, name: "dynamodb", kind: "message", T: DynamoDBSourceConnectionOptions, oneof: "config" }, - { no: 8, name: "mssql", kind: "message", T: MssqlSourceConnectionOptions, oneof: "config" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobSourceOptions { - return new JobSourceOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobSourceOptions { - return new JobSourceOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobSourceOptions { - return new JobSourceOptions().fromJsonString(jsonString, options); - } - - static equals(a: JobSourceOptions | PlainMessage | undefined, b: JobSourceOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(JobSourceOptions, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mgmt.v1alpha1.JobSourceOptions. + * Use `create(JobSourceOptionsSchema)` to create a new message. + */ +export const JobSourceOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 3); /** * @generated from message mgmt.v1alpha1.CreateJobDestination */ -export class CreateJobDestination extends Message { +export type CreateJobDestination = Message<"mgmt.v1alpha1.CreateJobDestination"> & { /** * @generated from field: string connection_id = 1; */ - connectionId = ""; + connectionId: string; /** * @generated from field: mgmt.v1alpha1.JobDestinationOptions options = 2; */ options?: JobDestinationOptions; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateJobDestination"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "options", kind: "message", T: JobDestinationOptions }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateJobDestination { - return new CreateJobDestination().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateJobDestination { - return new CreateJobDestination().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateJobDestination { - return new CreateJobDestination().fromJsonString(jsonString, options); - } - - static equals(a: CreateJobDestination | PlainMessage | undefined, b: CreateJobDestination | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateJobDestination, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateJobDestination. + * Use `create(CreateJobDestinationSchema)` to create a new message. + */ +export const CreateJobDestinationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 4); /** * @generated from message mgmt.v1alpha1.JobDestination */ -export class JobDestination extends Message { +export type JobDestination = Message<"mgmt.v1alpha1.JobDestination"> & { /** * @generated from field: string connection_id = 1; */ - connectionId = ""; + connectionId: string; /** * @generated from field: mgmt.v1alpha1.JobDestinationOptions options = 2; @@ -492,55 +172,33 @@ export class JobDestination extends Message { /** * @generated from field: string id = 3; */ - id = ""; + id: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobDestination"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "options", kind: "message", T: JobDestinationOptions }, - { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobDestination { - return new JobDestination().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobDestination { - return new JobDestination().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobDestination { - return new JobDestination().fromJsonString(jsonString, options); - } - - static equals(a: JobDestination | PlainMessage | undefined, b: JobDestination | PlainMessage | undefined): boolean { - return proto3.util.equals(JobDestination, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobDestination. + * Use `create(JobDestinationSchema)` to create a new message. + */ +export const JobDestinationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 5); /** * @generated from message mgmt.v1alpha1.AiGenerateSourceOptions */ -export class AiGenerateSourceOptions extends Message { +export type AiGenerateSourceOptions = Message<"mgmt.v1alpha1.AiGenerateSourceOptions"> & { /** * The connection id that corresponds with an AI-based Neosync connection * * @generated from field: string ai_connection_id = 1; */ - aiConnectionId = ""; + aiConnectionId: string; /** * The list of schemas (and their tables) along with any configuration options that will be used to generate data for. * * @generated from field: repeated mgmt.v1alpha1.AiGenerateSourceSchemaOption schemas = 2; */ - schemas: AiGenerateSourceSchemaOption[] = []; + schemas: AiGenerateSourceSchemaOption[]; /** * An optional connection id that will be used as the basis for the shape of data to be generated. @@ -554,7 +212,7 @@ export class AiGenerateSourceOptions extends Message { * * @generated from field: string model_name = 4; */ - modelName = ""; + modelName: string; /** * Optionally provide a user prompt to give more context to the schema @@ -569,316 +227,166 @@ export class AiGenerateSourceOptions extends Message { * @generated from field: optional int64 generate_batch_size = 6; */ generateBatchSize?: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AiGenerateSourceOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ai_connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "schemas", kind: "message", T: AiGenerateSourceSchemaOption, repeated: true }, - { no: 3, name: "fk_source_connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "model_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "user_prompt", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "generate_batch_size", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AiGenerateSourceOptions { - return new AiGenerateSourceOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AiGenerateSourceOptions { - return new AiGenerateSourceOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AiGenerateSourceOptions { - return new AiGenerateSourceOptions().fromJsonString(jsonString, options); - } - - static equals(a: AiGenerateSourceOptions | PlainMessage | undefined, b: AiGenerateSourceOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(AiGenerateSourceOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AiGenerateSourceOptions. + * Use `create(AiGenerateSourceOptionsSchema)` to create a new message. + */ +export const AiGenerateSourceOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 6); /** * @generated from message mgmt.v1alpha1.AiGenerateSourceSchemaOption */ -export class AiGenerateSourceSchemaOption extends Message { +export type AiGenerateSourceSchemaOption = Message<"mgmt.v1alpha1.AiGenerateSourceSchemaOption"> & { /** * The dataabase schema * * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * The list of tables (and their configuration) that reside within the schema to receive generated data * * @generated from field: repeated mgmt.v1alpha1.AiGenerateSourceTableOption tables = 2; */ - tables: AiGenerateSourceTableOption[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AiGenerateSourceSchemaOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "tables", kind: "message", T: AiGenerateSourceTableOption, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AiGenerateSourceSchemaOption { - return new AiGenerateSourceSchemaOption().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AiGenerateSourceSchemaOption { - return new AiGenerateSourceSchemaOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AiGenerateSourceSchemaOption { - return new AiGenerateSourceSchemaOption().fromJsonString(jsonString, options); - } + tables: AiGenerateSourceTableOption[]; +}; - static equals(a: AiGenerateSourceSchemaOption | PlainMessage | undefined, b: AiGenerateSourceSchemaOption | PlainMessage | undefined): boolean { - return proto3.util.equals(AiGenerateSourceSchemaOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AiGenerateSourceSchemaOption. + * Use `create(AiGenerateSourceSchemaOptionSchema)` to create a new message. + */ +export const AiGenerateSourceSchemaOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 7); /** * @generated from message mgmt.v1alpha1.AiGenerateSourceTableOption */ -export class AiGenerateSourceTableOption extends Message { +export type AiGenerateSourceTableOption = Message<"mgmt.v1alpha1.AiGenerateSourceTableOption"> & { /** * The table that will be used to. 1. The schema of the table will be injected into the prompt, of which the resulting data will then be inserted. * * @generated from field: string table = 1; */ - table = ""; + table: string; /** * The total number of records to be generated. * * @generated from field: int64 row_count = 2; */ - rowCount = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AiGenerateSourceTableOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "row_count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AiGenerateSourceTableOption { - return new AiGenerateSourceTableOption().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AiGenerateSourceTableOption { - return new AiGenerateSourceTableOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AiGenerateSourceTableOption { - return new AiGenerateSourceTableOption().fromJsonString(jsonString, options); - } + rowCount: bigint; +}; - static equals(a: AiGenerateSourceTableOption | PlainMessage | undefined, b: AiGenerateSourceTableOption | PlainMessage | undefined): boolean { - return proto3.util.equals(AiGenerateSourceTableOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AiGenerateSourceTableOption. + * Use `create(AiGenerateSourceTableOptionSchema)` to create a new message. + */ +export const AiGenerateSourceTableOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 8); /** * @generated from message mgmt.v1alpha1.GenerateSourceOptions */ -export class GenerateSourceOptions extends Message { +export type GenerateSourceOptions = Message<"mgmt.v1alpha1.GenerateSourceOptions"> & { /** * @generated from field: repeated mgmt.v1alpha1.GenerateSourceSchemaOption schemas = 1; */ - schemas: GenerateSourceSchemaOption[] = []; + schemas: GenerateSourceSchemaOption[]; /** * @generated from field: optional string fk_source_connection_id = 3; */ fkSourceConnectionId?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateSourceOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schemas", kind: "message", T: GenerateSourceSchemaOption, repeated: true }, - { no: 3, name: "fk_source_connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateSourceOptions { - return new GenerateSourceOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateSourceOptions { - return new GenerateSourceOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateSourceOptions { - return new GenerateSourceOptions().fromJsonString(jsonString, options); - } - - static equals(a: GenerateSourceOptions | PlainMessage | undefined, b: GenerateSourceOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateSourceOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateSourceOptions. + * Use `create(GenerateSourceOptionsSchema)` to create a new message. + */ +export const GenerateSourceOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 9); /** * @generated from message mgmt.v1alpha1.GenerateSourceSchemaOption */ -export class GenerateSourceSchemaOption extends Message { +export type GenerateSourceSchemaOption = Message<"mgmt.v1alpha1.GenerateSourceSchemaOption"> & { /** * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * @generated from field: repeated mgmt.v1alpha1.GenerateSourceTableOption tables = 2; */ - tables: GenerateSourceTableOption[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateSourceSchemaOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "tables", kind: "message", T: GenerateSourceTableOption, repeated: true }, - ]); + tables: GenerateSourceTableOption[]; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateSourceSchemaOption { - return new GenerateSourceSchemaOption().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateSourceSchemaOption { - return new GenerateSourceSchemaOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateSourceSchemaOption { - return new GenerateSourceSchemaOption().fromJsonString(jsonString, options); - } - - static equals(a: GenerateSourceSchemaOption | PlainMessage | undefined, b: GenerateSourceSchemaOption | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateSourceSchemaOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateSourceSchemaOption. + * Use `create(GenerateSourceSchemaOptionSchema)` to create a new message. + */ +export const GenerateSourceSchemaOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 10); /** * @generated from message mgmt.v1alpha1.GenerateSourceTableOption */ -export class GenerateSourceTableOption extends Message { +export type GenerateSourceTableOption = Message<"mgmt.v1alpha1.GenerateSourceTableOption"> & { /** * @generated from field: string table = 1; */ - table = ""; + table: string; /** * @generated from field: int64 row_count = 2; */ - rowCount = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateSourceTableOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "row_count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); + rowCount: bigint; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateSourceTableOption { - return new GenerateSourceTableOption().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateSourceTableOption { - return new GenerateSourceTableOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateSourceTableOption { - return new GenerateSourceTableOption().fromJsonString(jsonString, options); - } - - static equals(a: GenerateSourceTableOption | PlainMessage | undefined, b: GenerateSourceTableOption | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateSourceTableOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateSourceTableOption. + * Use `create(GenerateSourceTableOptionSchema)` to create a new message. + */ +export const GenerateSourceTableOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 11); /** * MongoDB connection options for a job source * * @generated from message mgmt.v1alpha1.MongoDBSourceConnectionOptions */ -export class MongoDBSourceConnectionOptions extends Message { +export type MongoDBSourceConnectionOptions = Message<"mgmt.v1alpha1.MongoDBSourceConnectionOptions"> & { /** * The unique connection id to a mongo connection configuration * * @generated from field: string connection_id = 1; */ - connectionId = ""; + connectionId: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MongoDBSourceConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MongoDBSourceConnectionOptions { - return new MongoDBSourceConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MongoDBSourceConnectionOptions { - return new MongoDBSourceConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MongoDBSourceConnectionOptions { - return new MongoDBSourceConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: MongoDBSourceConnectionOptions | PlainMessage | undefined, b: MongoDBSourceConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(MongoDBSourceConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MongoDBSourceConnectionOptions. + * Use `create(MongoDBSourceConnectionOptionsSchema)` to create a new message. + */ +export const MongoDBSourceConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 12); /** * DynamoDB connection options for a job source * * @generated from message mgmt.v1alpha1.DynamoDBSourceConnectionOptions */ -export class DynamoDBSourceConnectionOptions extends Message { +export type DynamoDBSourceConnectionOptions = Message<"mgmt.v1alpha1.DynamoDBSourceConnectionOptions"> & { /** * The unique connection id to a dynamodb connection configuration * * @generated from field: string connection_id = 1; */ - connectionId = ""; + connectionId: string; /** * List of table option configurations for any mapped source table. @@ -886,7 +394,7 @@ export class DynamoDBSourceConnectionOptions extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DynamoDBSourceConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "tables", kind: "message", T: DynamoDBSourceTableOption, repeated: true }, - { no: 3, name: "unmapped_transforms", kind: "message", T: DynamoDBSourceUnmappedTransformConfig }, - { no: 4, name: "enable_consistent_read", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DynamoDBSourceConnectionOptions { - return new DynamoDBSourceConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DynamoDBSourceConnectionOptions { - return new DynamoDBSourceConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DynamoDBSourceConnectionOptions { - return new DynamoDBSourceConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: DynamoDBSourceConnectionOptions | PlainMessage | undefined, b: DynamoDBSourceConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(DynamoDBSourceConnectionOptions, a, b); - } -} + enableConsistentRead: boolean; +}; + +/** + * Describes the message mgmt.v1alpha1.DynamoDBSourceConnectionOptions. + * Use `create(DynamoDBSourceConnectionOptionsSchema)` to create a new message. + */ +export const DynamoDBSourceConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 13); /** * @generated from message mgmt.v1alpha1.DynamoDBSourceUnmappedTransformConfig */ -export class DynamoDBSourceUnmappedTransformConfig extends Message { +export type DynamoDBSourceUnmappedTransformConfig = Message<"mgmt.v1alpha1.DynamoDBSourceUnmappedTransformConfig"> & { /** * Byte * @@ -966,48 +451,25 @@ export class DynamoDBSourceUnmappedTransformConfig extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DynamoDBSourceUnmappedTransformConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "b", kind: "message", T: JobMappingTransformer }, - { no: 2, name: "boolean", kind: "message", T: JobMappingTransformer }, - { no: 4, name: "n", kind: "message", T: JobMappingTransformer }, - { no: 6, name: "s", kind: "message", T: JobMappingTransformer }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DynamoDBSourceUnmappedTransformConfig { - return new DynamoDBSourceUnmappedTransformConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DynamoDBSourceUnmappedTransformConfig { - return new DynamoDBSourceUnmappedTransformConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DynamoDBSourceUnmappedTransformConfig { - return new DynamoDBSourceUnmappedTransformConfig().fromJsonString(jsonString, options); - } - - static equals(a: DynamoDBSourceUnmappedTransformConfig | PlainMessage | undefined, b: DynamoDBSourceUnmappedTransformConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(DynamoDBSourceUnmappedTransformConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DynamoDBSourceUnmappedTransformConfig. + * Use `create(DynamoDBSourceUnmappedTransformConfigSchema)` to create a new message. + */ +export const DynamoDBSourceUnmappedTransformConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 14); /** * @generated from message mgmt.v1alpha1.DynamoDBSourceTableOption */ -export class DynamoDBSourceTableOption extends Message { +export type DynamoDBSourceTableOption = Message<"mgmt.v1alpha1.DynamoDBSourceTableOption"> & { /** * The table that this configuration will be applied to * * @generated from field: string table = 1; */ - table = ""; + table: string; /** * An optional PartiQL query that may be used for subsetting the DynamoDB table. @@ -1016,61 +478,33 @@ export class DynamoDBSourceTableOption extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DynamoDBSourceTableOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "where_clause", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DynamoDBSourceTableOption { - return new DynamoDBSourceTableOption().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DynamoDBSourceTableOption { - return new DynamoDBSourceTableOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DynamoDBSourceTableOption { - return new DynamoDBSourceTableOption().fromJsonString(jsonString, options); - } - - static equals(a: DynamoDBSourceTableOption | PlainMessage | undefined, b: DynamoDBSourceTableOption | PlainMessage | undefined): boolean { - return proto3.util.equals(DynamoDBSourceTableOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DynamoDBSourceTableOption. + * Use `create(DynamoDBSourceTableOptionSchema)` to create a new message. + */ +export const DynamoDBSourceTableOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 15); /** * @generated from message mgmt.v1alpha1.PostgresSourceConnectionOptions */ -export class PostgresSourceConnectionOptions extends Message { - /** - * @deprecated - Use new_column_addition_strategy instead - * - * @generated from field: optional bool halt_on_new_column_addition = 1; - */ - haltOnNewColumnAddition?: boolean; - +export type PostgresSourceConnectionOptions = Message<"mgmt.v1alpha1.PostgresSourceConnectionOptions"> & { /** * @generated from field: repeated mgmt.v1alpha1.PostgresSourceSchemaOption schemas = 2; */ - schemas: PostgresSourceSchemaOption[] = []; + schemas: PostgresSourceSchemaOption[]; /** * @generated from field: string connection_id = 3; */ - connectionId = ""; + connectionId: string; /** * @generated from field: bool subset_by_foreign_key_constraints = 4; */ - subsetByForeignKeyConstraints = false; + subsetByForeignKeyConstraints: boolean; /** * Provide a strategy of what to do in the event Neosync encounters an unmapped column for the job's mapped tables. @@ -1078,49 +512,25 @@ export class PostgresSourceConnectionOptions extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresSourceConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "halt_on_new_column_addition", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 2, name: "schemas", kind: "message", T: PostgresSourceSchemaOption, repeated: true }, - { no: 3, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "subset_by_foreign_key_constraints", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "new_column_addition_strategy", kind: "message", T: PostgresSourceConnectionOptions_NewColumnAdditionStrategy }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresSourceConnectionOptions { - return new PostgresSourceConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresSourceConnectionOptions { - return new PostgresSourceConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresSourceConnectionOptions { - return new PostgresSourceConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: PostgresSourceConnectionOptions | PlainMessage | undefined, b: PostgresSourceConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresSourceConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresSourceConnectionOptions. + * Use `create(PostgresSourceConnectionOptionsSchema)` to create a new message. + */ +export const PostgresSourceConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 16); /** * @generated from message mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy */ -export class PostgresSourceConnectionOptions_NewColumnAdditionStrategy extends Message { +export type PostgresSourceConnectionOptions_NewColumnAdditionStrategy = Message<"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy"> & { /** * @generated from oneof mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.strategy */ strategy: { /** - * halt job if a new column is detected. This is equiavlent to the deprecated halt_on_new_column_addition + * halt job if a new column is detected. * * @generated from field: mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob halt_job = 1; */ @@ -1136,512 +546,263 @@ export class PostgresSourceConnectionOptions_NewColumnAdditionStrategy extends M */ value: PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap; case: "autoMap"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "halt_job", kind: "message", T: PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob, oneof: "strategy" }, - { no: 2, name: "auto_map", kind: "message", T: PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap, oneof: "strategy" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresSourceConnectionOptions_NewColumnAdditionStrategy { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresSourceConnectionOptions_NewColumnAdditionStrategy { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresSourceConnectionOptions_NewColumnAdditionStrategy { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy().fromJsonString(jsonString, options); - } - - static equals(a: PostgresSourceConnectionOptions_NewColumnAdditionStrategy | PlainMessage | undefined, b: PostgresSourceConnectionOptions_NewColumnAdditionStrategy | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresSourceConnectionOptions_NewColumnAdditionStrategy, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy. + * Use `create(PostgresSourceConnectionOptions_NewColumnAdditionStrategySchema)` to create a new message. + */ +export const PostgresSourceConnectionOptions_NewColumnAdditionStrategySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 16, 0); /** * Configuration for the HaltJob strategy * * @generated from message mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob */ -export class PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +export type PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob = Message<"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob().fromJsonString(jsonString, options); - } - - static equals(a: PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob | PlainMessage | undefined, b: PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJob, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob. + * Use `create(PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJobSchema)` to create a new message. + */ +export const PostgresSourceConnectionOptions_NewColumnAdditionStrategy_HaltJobSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 16, 0, 0); /** * Configuration for the AutoMap strategy * * @generated from message mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap */ -export class PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap().fromBinary(bytes, options); - } +export type PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap = Message<"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap { - return new PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap().fromJsonString(jsonString, options); - } - - static equals(a: PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap | PlainMessage | undefined, b: PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap. + * Use `create(PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMapSchema)` to create a new message. + */ +export const PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMapSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 16, 0, 1); /** * @generated from message mgmt.v1alpha1.PostgresSourceSchemaOption */ -export class PostgresSourceSchemaOption extends Message { +export type PostgresSourceSchemaOption = Message<"mgmt.v1alpha1.PostgresSourceSchemaOption"> & { /** * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * @generated from field: repeated mgmt.v1alpha1.PostgresSourceTableOption tables = 2; */ - tables: PostgresSourceTableOption[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresSourceSchemaOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "tables", kind: "message", T: PostgresSourceTableOption, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresSourceSchemaOption { - return new PostgresSourceSchemaOption().fromBinary(bytes, options); - } + tables: PostgresSourceTableOption[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresSourceSchemaOption { - return new PostgresSourceSchemaOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresSourceSchemaOption { - return new PostgresSourceSchemaOption().fromJsonString(jsonString, options); - } - - static equals(a: PostgresSourceSchemaOption | PlainMessage | undefined, b: PostgresSourceSchemaOption | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresSourceSchemaOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresSourceSchemaOption. + * Use `create(PostgresSourceSchemaOptionSchema)` to create a new message. + */ +export const PostgresSourceSchemaOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 17); /** * @generated from message mgmt.v1alpha1.PostgresSourceTableOption */ -export class PostgresSourceTableOption extends Message { +export type PostgresSourceTableOption = Message<"mgmt.v1alpha1.PostgresSourceTableOption"> & { /** * @generated from field: string table = 1; */ - table = ""; + table: string; /** * @generated from field: optional string where_clause = 2; */ whereClause?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresSourceTableOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "where_clause", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresSourceTableOption { - return new PostgresSourceTableOption().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresSourceTableOption { - return new PostgresSourceTableOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresSourceTableOption { - return new PostgresSourceTableOption().fromJsonString(jsonString, options); - } - - static equals(a: PostgresSourceTableOption | PlainMessage | undefined, b: PostgresSourceTableOption | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresSourceTableOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresSourceTableOption. + * Use `create(PostgresSourceTableOptionSchema)` to create a new message. + */ +export const PostgresSourceTableOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 18); /** * @generated from message mgmt.v1alpha1.MysqlSourceConnectionOptions */ -export class MysqlSourceConnectionOptions extends Message { +export type MysqlSourceConnectionOptions = Message<"mgmt.v1alpha1.MysqlSourceConnectionOptions"> & { /** * @generated from field: bool halt_on_new_column_addition = 1; */ - haltOnNewColumnAddition = false; + haltOnNewColumnAddition: boolean; /** * @generated from field: repeated mgmt.v1alpha1.MysqlSourceSchemaOption schemas = 2; */ - schemas: MysqlSourceSchemaOption[] = []; + schemas: MysqlSourceSchemaOption[]; /** * @generated from field: string connection_id = 3; */ - connectionId = ""; + connectionId: string; /** * @generated from field: bool subset_by_foreign_key_constraints = 4; */ - subsetByForeignKeyConstraints = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlSourceConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "halt_on_new_column_addition", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "schemas", kind: "message", T: MysqlSourceSchemaOption, repeated: true }, - { no: 3, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "subset_by_foreign_key_constraints", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlSourceConnectionOptions { - return new MysqlSourceConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlSourceConnectionOptions { - return new MysqlSourceConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MysqlSourceConnectionOptions { - return new MysqlSourceConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: MysqlSourceConnectionOptions | PlainMessage | undefined, b: MysqlSourceConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlSourceConnectionOptions, a, b); - } -} + subsetByForeignKeyConstraints: boolean; +}; + +/** + * Describes the message mgmt.v1alpha1.MysqlSourceConnectionOptions. + * Use `create(MysqlSourceConnectionOptionsSchema)` to create a new message. + */ +export const MysqlSourceConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 19); /** * @generated from message mgmt.v1alpha1.MysqlSourceSchemaOption */ -export class MysqlSourceSchemaOption extends Message { +export type MysqlSourceSchemaOption = Message<"mgmt.v1alpha1.MysqlSourceSchemaOption"> & { /** * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * @generated from field: repeated mgmt.v1alpha1.MysqlSourceTableOption tables = 2; */ - tables: MysqlSourceTableOption[] = []; + tables: MysqlSourceTableOption[]; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlSourceSchemaOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "tables", kind: "message", T: MysqlSourceTableOption, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlSourceSchemaOption { - return new MysqlSourceSchemaOption().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlSourceSchemaOption { - return new MysqlSourceSchemaOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MysqlSourceSchemaOption { - return new MysqlSourceSchemaOption().fromJsonString(jsonString, options); - } - - static equals(a: MysqlSourceSchemaOption | PlainMessage | undefined, b: MysqlSourceSchemaOption | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlSourceSchemaOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MysqlSourceSchemaOption. + * Use `create(MysqlSourceSchemaOptionSchema)` to create a new message. + */ +export const MysqlSourceSchemaOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 20); /** * @generated from message mgmt.v1alpha1.MysqlSourceTableOption */ -export class MysqlSourceTableOption extends Message { +export type MysqlSourceTableOption = Message<"mgmt.v1alpha1.MysqlSourceTableOption"> & { /** * @generated from field: string table = 1; */ - table = ""; + table: string; /** * @generated from field: optional string where_clause = 2; */ whereClause?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlSourceTableOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "where_clause", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlSourceTableOption { - return new MysqlSourceTableOption().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlSourceTableOption { - return new MysqlSourceTableOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MysqlSourceTableOption { - return new MysqlSourceTableOption().fromJsonString(jsonString, options); - } - - static equals(a: MysqlSourceTableOption | PlainMessage | undefined, b: MysqlSourceTableOption | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlSourceTableOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MysqlSourceTableOption. + * Use `create(MysqlSourceTableOptionSchema)` to create a new message. + */ +export const MysqlSourceTableOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 21); /** * @generated from message mgmt.v1alpha1.MssqlSourceConnectionOptions */ -export class MssqlSourceConnectionOptions extends Message { +export type MssqlSourceConnectionOptions = Message<"mgmt.v1alpha1.MssqlSourceConnectionOptions"> & { /** * @generated from field: bool halt_on_new_column_addition = 1; */ - haltOnNewColumnAddition = false; + haltOnNewColumnAddition: boolean; /** * @generated from field: repeated mgmt.v1alpha1.MssqlSourceSchemaOption schemas = 2; */ - schemas: MssqlSourceSchemaOption[] = []; + schemas: MssqlSourceSchemaOption[]; /** * @generated from field: string connection_id = 3; */ - connectionId = ""; + connectionId: string; /** * @generated from field: bool subset_by_foreign_key_constraints = 4; */ - subsetByForeignKeyConstraints = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MssqlSourceConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "halt_on_new_column_addition", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "schemas", kind: "message", T: MssqlSourceSchemaOption, repeated: true }, - { no: 3, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "subset_by_foreign_key_constraints", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MssqlSourceConnectionOptions { - return new MssqlSourceConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MssqlSourceConnectionOptions { - return new MssqlSourceConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MssqlSourceConnectionOptions { - return new MssqlSourceConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: MssqlSourceConnectionOptions | PlainMessage | undefined, b: MssqlSourceConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(MssqlSourceConnectionOptions, a, b); - } -} + subsetByForeignKeyConstraints: boolean; +}; + +/** + * Describes the message mgmt.v1alpha1.MssqlSourceConnectionOptions. + * Use `create(MssqlSourceConnectionOptionsSchema)` to create a new message. + */ +export const MssqlSourceConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 22); /** * @generated from message mgmt.v1alpha1.MssqlSourceSchemaOption */ -export class MssqlSourceSchemaOption extends Message { +export type MssqlSourceSchemaOption = Message<"mgmt.v1alpha1.MssqlSourceSchemaOption"> & { /** * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * @generated from field: repeated mgmt.v1alpha1.MssqlSourceTableOption tables = 2; */ - tables: MssqlSourceTableOption[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + tables: MssqlSourceTableOption[]; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MssqlSourceSchemaOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "tables", kind: "message", T: MssqlSourceTableOption, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MssqlSourceSchemaOption { - return new MssqlSourceSchemaOption().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MssqlSourceSchemaOption { - return new MssqlSourceSchemaOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MssqlSourceSchemaOption { - return new MssqlSourceSchemaOption().fromJsonString(jsonString, options); - } - - static equals(a: MssqlSourceSchemaOption | PlainMessage | undefined, b: MssqlSourceSchemaOption | PlainMessage | undefined): boolean { - return proto3.util.equals(MssqlSourceSchemaOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MssqlSourceSchemaOption. + * Use `create(MssqlSourceSchemaOptionSchema)` to create a new message. + */ +export const MssqlSourceSchemaOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 23); /** * @generated from message mgmt.v1alpha1.MssqlSourceTableOption */ -export class MssqlSourceTableOption extends Message { +export type MssqlSourceTableOption = Message<"mgmt.v1alpha1.MssqlSourceTableOption"> & { /** * @generated from field: string table = 1; */ - table = ""; + table: string; /** * @generated from field: optional string where_clause = 2; */ whereClause?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MssqlSourceTableOption"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "where_clause", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MssqlSourceTableOption { - return new MssqlSourceTableOption().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MssqlSourceTableOption { - return new MssqlSourceTableOption().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MssqlSourceTableOption { - return new MssqlSourceTableOption().fromJsonString(jsonString, options); - } - - static equals(a: MssqlSourceTableOption | PlainMessage | undefined, b: MssqlSourceTableOption | PlainMessage | undefined): boolean { - return proto3.util.equals(MssqlSourceTableOption, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MssqlSourceTableOption. + * Use `create(MssqlSourceTableOptionSchema)` to create a new message. + */ +export const MssqlSourceTableOptionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 24); /** * @generated from message mgmt.v1alpha1.AwsS3SourceConnectionOptions */ -export class AwsS3SourceConnectionOptions extends Message { +export type AwsS3SourceConnectionOptions = Message<"mgmt.v1alpha1.AwsS3SourceConnectionOptions"> & { /** * @generated from field: string connection_id = 1; */ - connectionId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AwsS3SourceConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + connectionId: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): AwsS3SourceConnectionOptions { - return new AwsS3SourceConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AwsS3SourceConnectionOptions { - return new AwsS3SourceConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AwsS3SourceConnectionOptions { - return new AwsS3SourceConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: AwsS3SourceConnectionOptions | PlainMessage | undefined, b: AwsS3SourceConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(AwsS3SourceConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AwsS3SourceConnectionOptions. + * Use `create(AwsS3SourceConnectionOptionsSchema)` to create a new message. + */ +export const AwsS3SourceConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 25); /** * @generated from message mgmt.v1alpha1.JobDestinationOptions */ -export class JobDestinationOptions extends Message { +export type JobDestinationOptions = Message<"mgmt.v1alpha1.JobDestinationOptions"> & { /** * @generated from oneof mgmt.v1alpha1.JobDestinationOptions.config */ @@ -1693,200 +854,97 @@ export class JobDestinationOptions extends Message { */ value: MssqlDestinationConnectionOptions; case: "mssqlOptions"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobDestinationOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "postgres_options", kind: "message", T: PostgresDestinationConnectionOptions, oneof: "config" }, - { no: 2, name: "aws_s3_options", kind: "message", T: AwsS3DestinationConnectionOptions, oneof: "config" }, - { no: 3, name: "mysql_options", kind: "message", T: MysqlDestinationConnectionOptions, oneof: "config" }, - { no: 4, name: "mongodb_options", kind: "message", T: MongoDBDestinationConnectionOptions, oneof: "config" }, - { no: 5, name: "gcp_cloudstorage_options", kind: "message", T: GcpCloudStorageDestinationConnectionOptions, oneof: "config" }, - { no: 6, name: "dynamodb_options", kind: "message", T: DynamoDBDestinationConnectionOptions, oneof: "config" }, - { no: 7, name: "mssql_options", kind: "message", T: MssqlDestinationConnectionOptions, oneof: "config" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobDestinationOptions { - return new JobDestinationOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobDestinationOptions { - return new JobDestinationOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobDestinationOptions { - return new JobDestinationOptions().fromJsonString(jsonString, options); - } - - static equals(a: JobDestinationOptions | PlainMessage | undefined, b: JobDestinationOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(JobDestinationOptions, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; /** - * @generated from message mgmt.v1alpha1.MongoDBDestinationConnectionOptions + * Describes the message mgmt.v1alpha1.JobDestinationOptions. + * Use `create(JobDestinationOptionsSchema)` to create a new message. */ -export class MongoDBDestinationConnectionOptions extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export const JobDestinationOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 26); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MongoDBDestinationConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MongoDBDestinationConnectionOptions { - return new MongoDBDestinationConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MongoDBDestinationConnectionOptions { - return new MongoDBDestinationConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MongoDBDestinationConnectionOptions { - return new MongoDBDestinationConnectionOptions().fromJsonString(jsonString, options); - } +/** + * @generated from message mgmt.v1alpha1.MongoDBDestinationConnectionOptions + */ +export type MongoDBDestinationConnectionOptions = Message<"mgmt.v1alpha1.MongoDBDestinationConnectionOptions"> & { +}; - static equals(a: MongoDBDestinationConnectionOptions | PlainMessage | undefined, b: MongoDBDestinationConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(MongoDBDestinationConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MongoDBDestinationConnectionOptions. + * Use `create(MongoDBDestinationConnectionOptionsSchema)` to create a new message. + */ +export const MongoDBDestinationConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 27); /** * Configuration for Google Cloud Storage Destination Connection Job Options * * @generated from message mgmt.v1alpha1.GcpCloudStorageDestinationConnectionOptions */ -export class GcpCloudStorageDestinationConnectionOptions extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GcpCloudStorageDestinationConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GcpCloudStorageDestinationConnectionOptions { - return new GcpCloudStorageDestinationConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GcpCloudStorageDestinationConnectionOptions { - return new GcpCloudStorageDestinationConnectionOptions().fromJson(jsonValue, options); - } +export type GcpCloudStorageDestinationConnectionOptions = Message<"mgmt.v1alpha1.GcpCloudStorageDestinationConnectionOptions"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): GcpCloudStorageDestinationConnectionOptions { - return new GcpCloudStorageDestinationConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: GcpCloudStorageDestinationConnectionOptions | PlainMessage | undefined, b: GcpCloudStorageDestinationConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(GcpCloudStorageDestinationConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GcpCloudStorageDestinationConnectionOptions. + * Use `create(GcpCloudStorageDestinationConnectionOptionsSchema)` to create a new message. + */ +export const GcpCloudStorageDestinationConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 28); /** * Configuration for DynamoDB Destination Connection Job Options * * @generated from message mgmt.v1alpha1.DynamoDBDestinationConnectionOptions */ -export class DynamoDBDestinationConnectionOptions extends Message { +export type DynamoDBDestinationConnectionOptions = Message<"mgmt.v1alpha1.DynamoDBDestinationConnectionOptions"> & { /** * List of table mappings when piping data from a dynamoDB table to another dynamoDB table * * @generated from field: repeated mgmt.v1alpha1.DynamoDBDestinationTableMapping table_mappings = 1; */ - tableMappings: DynamoDBDestinationTableMapping[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DynamoDBDestinationConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "table_mappings", kind: "message", T: DynamoDBDestinationTableMapping, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DynamoDBDestinationConnectionOptions { - return new DynamoDBDestinationConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DynamoDBDestinationConnectionOptions { - return new DynamoDBDestinationConnectionOptions().fromJson(jsonValue, options); - } + tableMappings: DynamoDBDestinationTableMapping[]; +}; - static fromJsonString(jsonString: string, options?: Partial): DynamoDBDestinationConnectionOptions { - return new DynamoDBDestinationConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: DynamoDBDestinationConnectionOptions | PlainMessage | undefined, b: DynamoDBDestinationConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(DynamoDBDestinationConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DynamoDBDestinationConnectionOptions. + * Use `create(DynamoDBDestinationConnectionOptionsSchema)` to create a new message. + */ +export const DynamoDBDestinationConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 29); /** * Configuration for mapping a source table to a destination table for DynamoDB * * @generated from message mgmt.v1alpha1.DynamoDBDestinationTableMapping */ -export class DynamoDBDestinationTableMapping extends Message { +export type DynamoDBDestinationTableMapping = Message<"mgmt.v1alpha1.DynamoDBDestinationTableMapping"> & { /** * The name of the incoming source table * * @generated from field: string source_table = 1; */ - sourceTable = ""; + sourceTable: string; /** * The name of the outgoing destination table * * @generated from field: string destination_table = 2; */ - destinationTable = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DynamoDBDestinationTableMapping"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "source_table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "destination_table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DynamoDBDestinationTableMapping { - return new DynamoDBDestinationTableMapping().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DynamoDBDestinationTableMapping { - return new DynamoDBDestinationTableMapping().fromJson(jsonValue, options); - } + destinationTable: string; +}; - static fromJsonString(jsonString: string, options?: Partial): DynamoDBDestinationTableMapping { - return new DynamoDBDestinationTableMapping().fromJsonString(jsonString, options); - } - - static equals(a: DynamoDBDestinationTableMapping | PlainMessage | undefined, b: DynamoDBDestinationTableMapping | PlainMessage | undefined): boolean { - return proto3.util.equals(DynamoDBDestinationTableMapping, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DynamoDBDestinationTableMapping. + * Use `create(DynamoDBDestinationTableMappingSchema)` to create a new message. + */ +export const DynamoDBDestinationTableMappingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 30); /** * @generated from message mgmt.v1alpha1.PostgresDestinationConnectionOptions */ -export class PostgresDestinationConnectionOptions extends Message { +export type PostgresDestinationConnectionOptions = Message<"mgmt.v1alpha1.PostgresDestinationConnectionOptions"> & { /** * @generated from field: mgmt.v1alpha1.PostgresTruncateTableConfig truncate_table = 1; */ @@ -1895,7 +953,7 @@ export class PostgresDestinationConnectionOptions extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresDestinationConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "truncate_table", kind: "message", T: PostgresTruncateTableConfig }, - { no: 2, name: "init_table_schema", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "on_conflict", kind: "message", T: PostgresOnConflictConfig }, - { no: 4, name: "skip_foreign_key_violations", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "batch", kind: "message", T: BatchConfig }, - { no: 6, name: "max_in_flight", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresDestinationConnectionOptions { - return new PostgresDestinationConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresDestinationConnectionOptions { - return new PostgresDestinationConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresDestinationConnectionOptions { - return new PostgresDestinationConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: PostgresDestinationConnectionOptions | PlainMessage | undefined, b: PostgresDestinationConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresDestinationConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresDestinationConnectionOptions. + * Use `create(PostgresDestinationConnectionOptionsSchema)` to create a new message. + */ +export const PostgresDestinationConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 31); /** * @generated from message mgmt.v1alpha1.PostgresOnConflictConfig */ -export class PostgresOnConflictConfig extends Message { +export type PostgresOnConflictConfig = Message<"mgmt.v1alpha1.PostgresOnConflictConfig"> & { /** * @generated from field: bool do_nothing = 1; */ - doNothing = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + doNothing: boolean; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresOnConflictConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "do_nothing", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresOnConflictConfig { - return new PostgresOnConflictConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresOnConflictConfig { - return new PostgresOnConflictConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresOnConflictConfig { - return new PostgresOnConflictConfig().fromJsonString(jsonString, options); - } - - static equals(a: PostgresOnConflictConfig | PlainMessage | undefined, b: PostgresOnConflictConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresOnConflictConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresOnConflictConfig. + * Use `create(PostgresOnConflictConfigSchema)` to create a new message. + */ +export const PostgresOnConflictConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 32); /** * @generated from message mgmt.v1alpha1.PostgresTruncateTableConfig */ -export class PostgresTruncateTableConfig extends Message { +export type PostgresTruncateTableConfig = Message<"mgmt.v1alpha1.PostgresTruncateTableConfig"> & { /** * @generated from field: bool truncate_before_insert = 1; */ - truncateBeforeInsert = false; + truncateBeforeInsert: boolean; /** * @generated from field: bool cascade = 2; */ - cascade = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + cascade: boolean; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresTruncateTableConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "truncate_before_insert", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "cascade", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresTruncateTableConfig { - return new PostgresTruncateTableConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresTruncateTableConfig { - return new PostgresTruncateTableConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresTruncateTableConfig { - return new PostgresTruncateTableConfig().fromJsonString(jsonString, options); - } - - static equals(a: PostgresTruncateTableConfig | PlainMessage | undefined, b: PostgresTruncateTableConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresTruncateTableConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresTruncateTableConfig. + * Use `create(PostgresTruncateTableConfigSchema)` to create a new message. + */ +export const PostgresTruncateTableConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 33); /** * @generated from message mgmt.v1alpha1.MysqlDestinationConnectionOptions */ -export class MysqlDestinationConnectionOptions extends Message { +export type MysqlDestinationConnectionOptions = Message<"mgmt.v1alpha1.MysqlDestinationConnectionOptions"> & { /** * @generated from field: mgmt.v1alpha1.MysqlTruncateTableConfig truncate_table = 1; */ @@ -2048,7 +1040,7 @@ export class MysqlDestinationConnectionOptions extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlDestinationConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "truncate_table", kind: "message", T: MysqlTruncateTableConfig }, - { no: 2, name: "init_table_schema", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "on_conflict", kind: "message", T: MysqlOnConflictConfig }, - { no: 4, name: "skip_foreign_key_violations", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "batch", kind: "message", T: BatchConfig }, - { no: 6, name: "max_in_flight", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlDestinationConnectionOptions { - return new MysqlDestinationConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlDestinationConnectionOptions { - return new MysqlDestinationConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MysqlDestinationConnectionOptions { - return new MysqlDestinationConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: MysqlDestinationConnectionOptions | PlainMessage | undefined, b: MysqlDestinationConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlDestinationConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MysqlDestinationConnectionOptions. + * Use `create(MysqlDestinationConnectionOptionsSchema)` to create a new message. + */ +export const MysqlDestinationConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 34); /** * @generated from message mgmt.v1alpha1.MysqlTruncateTableConfig */ -export class MysqlTruncateTableConfig extends Message { +export type MysqlTruncateTableConfig = Message<"mgmt.v1alpha1.MysqlTruncateTableConfig"> & { /** * @generated from field: bool truncate_before_insert = 1; */ - truncateBeforeInsert = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlTruncateTableConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "truncate_before_insert", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); + truncateBeforeInsert: boolean; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlTruncateTableConfig { - return new MysqlTruncateTableConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlTruncateTableConfig { - return new MysqlTruncateTableConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MysqlTruncateTableConfig { - return new MysqlTruncateTableConfig().fromJsonString(jsonString, options); - } - - static equals(a: MysqlTruncateTableConfig | PlainMessage | undefined, b: MysqlTruncateTableConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlTruncateTableConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MysqlTruncateTableConfig. + * Use `create(MysqlTruncateTableConfigSchema)` to create a new message. + */ +export const MysqlTruncateTableConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 35); /** * @generated from message mgmt.v1alpha1.MysqlOnConflictConfig */ -export class MysqlOnConflictConfig extends Message { +export type MysqlOnConflictConfig = Message<"mgmt.v1alpha1.MysqlOnConflictConfig"> & { /** * @generated from field: bool do_nothing = 1; */ - doNothing = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlOnConflictConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "do_nothing", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); + doNothing: boolean; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlOnConflictConfig { - return new MysqlOnConflictConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlOnConflictConfig { - return new MysqlOnConflictConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MysqlOnConflictConfig { - return new MysqlOnConflictConfig().fromJsonString(jsonString, options); - } - - static equals(a: MysqlOnConflictConfig | PlainMessage | undefined, b: MysqlOnConflictConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlOnConflictConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MysqlOnConflictConfig. + * Use `create(MysqlOnConflictConfigSchema)` to create a new message. + */ +export const MysqlOnConflictConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 36); /** * @generated from message mgmt.v1alpha1.MssqlDestinationConnectionOptions */ -export class MssqlDestinationConnectionOptions extends Message { +export type MssqlDestinationConnectionOptions = Message<"mgmt.v1alpha1.MssqlDestinationConnectionOptions"> & { /** * @generated from field: mgmt.v1alpha1.MssqlTruncateTableConfig truncate_table = 1; */ @@ -2197,7 +1124,7 @@ export class MssqlDestinationConnectionOptions extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MssqlDestinationConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "truncate_table", kind: "message", T: MssqlTruncateTableConfig }, - { no: 2, name: "init_table_schema", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "on_conflict", kind: "message", T: MssqlOnConflictConfig }, - { no: 4, name: "skip_foreign_key_violations", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "batch", kind: "message", T: BatchConfig }, - { no: 6, name: "max_in_flight", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MssqlDestinationConnectionOptions { - return new MssqlDestinationConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MssqlDestinationConnectionOptions { - return new MssqlDestinationConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MssqlDestinationConnectionOptions { - return new MssqlDestinationConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: MssqlDestinationConnectionOptions | PlainMessage | undefined, b: MssqlDestinationConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(MssqlDestinationConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MssqlDestinationConnectionOptions. + * Use `create(MssqlDestinationConnectionOptionsSchema)` to create a new message. + */ +export const MssqlDestinationConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 37); /** * @generated from message mgmt.v1alpha1.MssqlTruncateTableConfig */ -export class MssqlTruncateTableConfig extends Message { +export type MssqlTruncateTableConfig = Message<"mgmt.v1alpha1.MssqlTruncateTableConfig"> & { /** * @generated from field: bool truncate_before_insert = 1; */ - truncateBeforeInsert = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MssqlTruncateTableConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "truncate_before_insert", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MssqlTruncateTableConfig { - return new MssqlTruncateTableConfig().fromBinary(bytes, options); - } + truncateBeforeInsert: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): MssqlTruncateTableConfig { - return new MssqlTruncateTableConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MssqlTruncateTableConfig { - return new MssqlTruncateTableConfig().fromJsonString(jsonString, options); - } - - static equals(a: MssqlTruncateTableConfig | PlainMessage | undefined, b: MssqlTruncateTableConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MssqlTruncateTableConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MssqlTruncateTableConfig. + * Use `create(MssqlTruncateTableConfigSchema)` to create a new message. + */ +export const MssqlTruncateTableConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 38); /** * @generated from message mgmt.v1alpha1.MssqlOnConflictConfig */ -export class MssqlOnConflictConfig extends Message { +export type MssqlOnConflictConfig = Message<"mgmt.v1alpha1.MssqlOnConflictConfig"> & { /** * @generated from field: bool do_nothing = 1; */ - doNothing = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MssqlOnConflictConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "do_nothing", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MssqlOnConflictConfig { - return new MssqlOnConflictConfig().fromBinary(bytes, options); - } + doNothing: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): MssqlOnConflictConfig { - return new MssqlOnConflictConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MssqlOnConflictConfig { - return new MssqlOnConflictConfig().fromJsonString(jsonString, options); - } - - static equals(a: MssqlOnConflictConfig | PlainMessage | undefined, b: MssqlOnConflictConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(MssqlOnConflictConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MssqlOnConflictConfig. + * Use `create(MssqlOnConflictConfigSchema)` to create a new message. + */ +export const MssqlOnConflictConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 39); /** * @generated from message mgmt.v1alpha1.AwsS3DestinationConnectionOptions */ -export class AwsS3DestinationConnectionOptions extends Message { +export type AwsS3DestinationConnectionOptions = Message<"mgmt.v1alpha1.AwsS3DestinationConnectionOptions"> & { /** * The storage class that will be used when objects are written to S3 * * @generated from field: mgmt.v1alpha1.AwsS3DestinationConnectionOptions.StorageClass storage_class = 1; */ - storageClass = AwsS3DestinationConnectionOptions_StorageClass.UNSPECIFIED; + storageClass: AwsS3DestinationConnectionOptions_StorageClass; /** * The maximum number of batched messages to have in flight at a given time. Increase this to improve throughput. @@ -2365,37 +1227,14 @@ export class AwsS3DestinationConnectionOptions extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AwsS3DestinationConnectionOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "storage_class", kind: "enum", T: proto3.getEnumType(AwsS3DestinationConnectionOptions_StorageClass) }, - { no: 2, name: "max_in_flight", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - { no: 3, name: "timeout", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "batch", kind: "message", T: BatchConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AwsS3DestinationConnectionOptions { - return new AwsS3DestinationConnectionOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AwsS3DestinationConnectionOptions { - return new AwsS3DestinationConnectionOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AwsS3DestinationConnectionOptions { - return new AwsS3DestinationConnectionOptions().fromJsonString(jsonString, options); - } - - static equals(a: AwsS3DestinationConnectionOptions | PlainMessage | undefined, b: AwsS3DestinationConnectionOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(AwsS3DestinationConnectionOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AwsS3DestinationConnectionOptions. + * Use `create(AwsS3DestinationConnectionOptionsSchema)` to create a new message. + */ +export const AwsS3DestinationConnectionOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 40); /** * @generated from enum mgmt.v1alpha1.AwsS3DestinationConnectionOptions.StorageClass @@ -2441,22 +1280,17 @@ export enum AwsS3DestinationConnectionOptions_StorageClass { */ DEEP_ARCHIVE = 7, } -// Retrieve enum metadata with: proto3.getEnumType(AwsS3DestinationConnectionOptions_StorageClass) -proto3.util.setEnumType(AwsS3DestinationConnectionOptions_StorageClass, "mgmt.v1alpha1.AwsS3DestinationConnectionOptions.StorageClass", [ - { no: 0, name: "STORAGE_CLASS_UNSPECIFIED" }, - { no: 1, name: "STORAGE_CLASS_STANDARD" }, - { no: 2, name: "STORAGE_CLASS_REDUCED_REDUNDANCY" }, - { no: 3, name: "STORAGE_CLASS_GLACIER" }, - { no: 4, name: "STORAGE_CLASS_STANDARD_IA" }, - { no: 5, name: "STORAGE_CLASS_ONEZONE_IA" }, - { no: 6, name: "STORAGE_CLASS_INTELLIGENT_TIERING" }, - { no: 7, name: "STORAGE_CLASS_DEEP_ARCHIVE" }, -]); + +/** + * Describes the enum mgmt.v1alpha1.AwsS3DestinationConnectionOptions.StorageClass. + */ +export const AwsS3DestinationConnectionOptions_StorageClassSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_job, 40, 0); /** * @generated from message mgmt.v1alpha1.BatchConfig */ -export class BatchConfig extends Message { +export type BatchConfig = Message<"mgmt.v1alpha1.BatchConfig"> & { /** * The max allowed in a batch before it is flushed. 0 to disable. * @@ -2471,53 +1305,32 @@ export class BatchConfig extends Message { * @generated from field: optional string period = 2; */ period?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.BatchConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "count", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, - { no: 2, name: "period", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): BatchConfig { - return new BatchConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): BatchConfig { - return new BatchConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): BatchConfig { - return new BatchConfig().fromJsonString(jsonString, options); - } - - static equals(a: BatchConfig | PlainMessage | undefined, b: BatchConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(BatchConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.BatchConfig. + * Use `create(BatchConfigSchema)` to create a new message. + */ +export const BatchConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 41); /** * @generated from message mgmt.v1alpha1.CreateJobRequest */ -export class CreateJobRequest extends Message { +export type CreateJobRequest = Message<"mgmt.v1alpha1.CreateJobRequest"> & { /** * The unique account identifier that this job will be associated with * * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * The unique, friendly name of the job. This is unique per account * * @generated from field: string job_name = 2; */ - jobName = ""; + jobName: string; /** * Optionally provide a cron schedule. Goes into effect if the job status is set to enabled @@ -2529,7 +1342,7 @@ export class CreateJobRequest extends Message { /** * @generated from field: repeated mgmt.v1alpha1.JobMapping mappings = 4; */ - mappings: JobMapping[] = []; + mappings: JobMapping[]; /** * @generated from field: mgmt.v1alpha1.JobSource source = 5; @@ -2539,14 +1352,14 @@ export class CreateJobRequest extends Message { /** * @generated from field: repeated mgmt.v1alpha1.CreateJobDestination destinations = 6; */ - destinations: CreateJobDestination[] = []; + destinations: CreateJobDestination[]; /** * Initially trigger a run of this job regardless of its status or cron schedule * * @generated from field: bool initiate_job_run = 7; */ - initiateJobRun = false; + initiateJobRun: boolean; /** * Specify timeouts and other workflow options for the underlying temporal workflow @@ -2567,44 +1380,15 @@ export class CreateJobRequest extends Message { /** * @generated from field: repeated mgmt.v1alpha1.VirtualForeignConstraint virtual_foreign_keys = 10; */ - virtualForeignKeys: VirtualForeignConstraint[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateJobRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "job_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "cron_schedule", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "mappings", kind: "message", T: JobMapping, repeated: true }, - { no: 5, name: "source", kind: "message", T: JobSource }, - { no: 6, name: "destinations", kind: "message", T: CreateJobDestination, repeated: true }, - { no: 7, name: "initiate_job_run", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 8, name: "workflow_options", kind: "message", T: WorkflowOptions }, - { no: 9, name: "sync_options", kind: "message", T: ActivityOptions }, - { no: 10, name: "virtual_foreign_keys", kind: "message", T: VirtualForeignConstraint, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateJobRequest { - return new CreateJobRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateJobRequest { - return new CreateJobRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateJobRequest { - return new CreateJobRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateJobRequest | PlainMessage | undefined, b: CreateJobRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateJobRequest, a, b); - } -} + virtualForeignKeys: VirtualForeignConstraint[]; +}; + +/** + * Describes the message mgmt.v1alpha1.CreateJobRequest. + * Use `create(CreateJobRequestSchema)` to create a new message. + */ +export const CreateJobRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 42); /** * Config that contains various timeouts that are configured in the underlying temporal workflow @@ -2612,7 +1396,7 @@ export class CreateJobRequest extends Message { * * @generated from message mgmt.v1alpha1.WorkflowOptions */ -export class WorkflowOptions extends Message { +export type WorkflowOptions = Message<"mgmt.v1alpha1.WorkflowOptions"> & { /** * The timeout for a single workflow run. * Measured in seconds @@ -2620,41 +1404,21 @@ export class WorkflowOptions extends Message { * @generated from field: optional int64 run_timeout = 8; */ runTimeout?: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.WorkflowOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 8, name: "run_timeout", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WorkflowOptions { - return new WorkflowOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WorkflowOptions { - return new WorkflowOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WorkflowOptions { - return new WorkflowOptions().fromJsonString(jsonString, options); - } - - static equals(a: WorkflowOptions | PlainMessage | undefined, b: WorkflowOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(WorkflowOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.WorkflowOptions. + * Use `create(WorkflowOptionsSchema)` to create a new message. + */ +export const WorkflowOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 43); /** * Config that contains various timeouts that are configured in the underlying temporal workflow(s) and activities * * @generated from message mgmt.v1alpha1.ActivityOptions */ -export class ActivityOptions extends Message { +export type ActivityOptions = Message<"mgmt.v1alpha1.ActivityOptions"> & { /** * Total time that a workflow is willing to wait for an activity to complete, including retries. * Measured in seconds @@ -2680,43 +1444,21 @@ export class ActivityOptions extends Message { * @generated from field: mgmt.v1alpha1.RetryPolicy retry_policy = 3; */ retryPolicy?: RetryPolicy; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ActivityOptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schedule_to_close_timeout", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "start_to_close_timeout", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 3, name: "retry_policy", kind: "message", T: RetryPolicy }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ActivityOptions { - return new ActivityOptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ActivityOptions { - return new ActivityOptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ActivityOptions { - return new ActivityOptions().fromJsonString(jsonString, options); - } - - static equals(a: ActivityOptions | PlainMessage | undefined, b: ActivityOptions | PlainMessage | undefined): boolean { - return proto3.util.equals(ActivityOptions, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ActivityOptions. + * Use `create(ActivityOptionsSchema)` to create a new message. + */ +export const ActivityOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 44); /** * Defines the retry policy for an activity * * @generated from message mgmt.v1alpha1.RetryPolicy */ -export class RetryPolicy extends Message { +export type RetryPolicy = Message<"mgmt.v1alpha1.RetryPolicy"> & { /** * Maximum number of attempts. When exceeded the retries stop even if not expired yet. * If not set or set to 0, it means unlimited, and rely on activity ScheduleToCloseTimeout to stop. @@ -2724,420 +1466,206 @@ export class RetryPolicy extends Message { * @generated from field: optional int32 maximum_attempts = 1; */ maximumAttempts?: number; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.RetryPolicy"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "maximum_attempts", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RetryPolicy { - return new RetryPolicy().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RetryPolicy { - return new RetryPolicy().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RetryPolicy { - return new RetryPolicy().fromJsonString(jsonString, options); - } - - static equals(a: RetryPolicy | PlainMessage | undefined, b: RetryPolicy | PlainMessage | undefined): boolean { - return proto3.util.equals(RetryPolicy, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.RetryPolicy. + * Use `create(RetryPolicySchema)` to create a new message. + */ +export const RetryPolicySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 45); /** * @generated from message mgmt.v1alpha1.CreateJobResponse */ -export class CreateJobResponse extends Message { +export type CreateJobResponse = Message<"mgmt.v1alpha1.CreateJobResponse"> & { /** * @generated from field: mgmt.v1alpha1.Job job = 1; */ job?: Job; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateJobResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job", kind: "message", T: Job }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateJobResponse { - return new CreateJobResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateJobResponse { - return new CreateJobResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateJobResponse { - return new CreateJobResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateJobResponse | PlainMessage | undefined, b: CreateJobResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateJobResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateJobResponse. + * Use `create(CreateJobResponseSchema)` to create a new message. + */ +export const CreateJobResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 46); /** * @generated from message mgmt.v1alpha1.JobMappingTransformer */ -export class JobMappingTransformer extends Message { - /** - * @deprecated - This is no longer used in favor just providing the TransformerConfig - * - * @generated from field: mgmt.v1alpha1.TransformerSource source = 1; - */ - source = TransformerSource.UNSPECIFIED; - +export type JobMappingTransformer = Message<"mgmt.v1alpha1.JobMappingTransformer"> & { /** * @generated from field: mgmt.v1alpha1.TransformerConfig config = 3; */ config?: TransformerConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobMappingTransformer"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "source", kind: "enum", T: proto3.getEnumType(TransformerSource) }, - { no: 3, name: "config", kind: "message", T: TransformerConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobMappingTransformer { - return new JobMappingTransformer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobMappingTransformer { - return new JobMappingTransformer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobMappingTransformer { - return new JobMappingTransformer().fromJsonString(jsonString, options); - } - - static equals(a: JobMappingTransformer | PlainMessage | undefined, b: JobMappingTransformer | PlainMessage | undefined): boolean { - return proto3.util.equals(JobMappingTransformer, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobMappingTransformer. + * Use `create(JobMappingTransformerSchema)` to create a new message. + */ +export const JobMappingTransformerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 47); /** * @generated from message mgmt.v1alpha1.JobMapping */ -export class JobMapping extends Message { +export type JobMapping = Message<"mgmt.v1alpha1.JobMapping"> & { /** * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * @generated from field: string table = 2; */ - table = ""; + table: string; /** * @generated from field: string column = 3; */ - column = ""; + column: string; /** * @generated from field: mgmt.v1alpha1.JobMappingTransformer transformer = 5; */ transformer?: JobMappingTransformer; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobMapping"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "column", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "transformer", kind: "message", T: JobMappingTransformer }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobMapping { - return new JobMapping().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobMapping { - return new JobMapping().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobMapping { - return new JobMapping().fromJsonString(jsonString, options); - } - - static equals(a: JobMapping | PlainMessage | undefined, b: JobMapping | PlainMessage | undefined): boolean { - return proto3.util.equals(JobMapping, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobMapping. + * Use `create(JobMappingSchema)` to create a new message. + */ +export const JobMappingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 48); /** * @generated from message mgmt.v1alpha1.GetJobRequest */ -export class GetJobRequest extends Message { +export type GetJobRequest = Message<"mgmt.v1alpha1.GetJobRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + id: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRequest { - return new GetJobRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRequest { - return new GetJobRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRequest { - return new GetJobRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobRequest | PlainMessage | undefined, b: GetJobRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobRequest. + * Use `create(GetJobRequestSchema)` to create a new message. + */ +export const GetJobRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 49); /** * @generated from message mgmt.v1alpha1.GetJobResponse */ -export class GetJobResponse extends Message { +export type GetJobResponse = Message<"mgmt.v1alpha1.GetJobResponse"> & { /** * @generated from field: mgmt.v1alpha1.Job job = 1; */ job?: Job; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job", kind: "message", T: Job }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobResponse { - return new GetJobResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobResponse { - return new GetJobResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobResponse { - return new GetJobResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobResponse | PlainMessage | undefined, b: GetJobResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobResponse. + * Use `create(GetJobResponseSchema)` to create a new message. + */ +export const GetJobResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 50); /** * @generated from message mgmt.v1alpha1.UpdateJobScheduleRequest */ -export class UpdateJobScheduleRequest extends Message { +export type UpdateJobScheduleRequest = Message<"mgmt.v1alpha1.UpdateJobScheduleRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; /** * @generated from field: optional string cron_schedule = 2; */ cronSchedule?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateJobScheduleRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "cron_schedule", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateJobScheduleRequest { - return new UpdateJobScheduleRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateJobScheduleRequest { - return new UpdateJobScheduleRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateJobScheduleRequest { - return new UpdateJobScheduleRequest().fromJsonString(jsonString, options); - } - - static equals(a: UpdateJobScheduleRequest | PlainMessage | undefined, b: UpdateJobScheduleRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateJobScheduleRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.UpdateJobScheduleRequest. + * Use `create(UpdateJobScheduleRequestSchema)` to create a new message. + */ +export const UpdateJobScheduleRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 51); /** * @generated from message mgmt.v1alpha1.UpdateJobScheduleResponse */ -export class UpdateJobScheduleResponse extends Message { +export type UpdateJobScheduleResponse = Message<"mgmt.v1alpha1.UpdateJobScheduleResponse"> & { /** * @generated from field: mgmt.v1alpha1.Job job = 1; */ job?: Job; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateJobScheduleResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job", kind: "message", T: Job }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateJobScheduleResponse { - return new UpdateJobScheduleResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateJobScheduleResponse { - return new UpdateJobScheduleResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateJobScheduleResponse { - return new UpdateJobScheduleResponse().fromJsonString(jsonString, options); - } - - static equals(a: UpdateJobScheduleResponse | PlainMessage | undefined, b: UpdateJobScheduleResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateJobScheduleResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.UpdateJobScheduleResponse. + * Use `create(UpdateJobScheduleResponseSchema)` to create a new message. + */ +export const UpdateJobScheduleResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 52); /** * @generated from message mgmt.v1alpha1.PauseJobRequest */ -export class PauseJobRequest extends Message { +export type PauseJobRequest = Message<"mgmt.v1alpha1.PauseJobRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; /** * @generated from field: bool pause = 2; */ - pause = false; + pause: boolean; /** * @generated from field: optional string note = 3; */ note?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PauseJobRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "pause", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "note", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PauseJobRequest { - return new PauseJobRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PauseJobRequest { - return new PauseJobRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PauseJobRequest { - return new PauseJobRequest().fromJsonString(jsonString, options); - } - - static equals(a: PauseJobRequest | PlainMessage | undefined, b: PauseJobRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(PauseJobRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PauseJobRequest. + * Use `create(PauseJobRequestSchema)` to create a new message. + */ +export const PauseJobRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 53); /** * @generated from message mgmt.v1alpha1.PauseJobResponse */ -export class PauseJobResponse extends Message { +export type PauseJobResponse = Message<"mgmt.v1alpha1.PauseJobResponse"> & { /** * @generated from field: mgmt.v1alpha1.Job job = 1; */ job?: Job; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PauseJobResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job", kind: "message", T: Job }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PauseJobResponse { - return new PauseJobResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PauseJobResponse { - return new PauseJobResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PauseJobResponse { - return new PauseJobResponse().fromJsonString(jsonString, options); - } - - static equals(a: PauseJobResponse | PlainMessage | undefined, b: PauseJobResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PauseJobResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PauseJobResponse. + * Use `create(PauseJobResponseSchema)` to create a new message. + */ +export const PauseJobResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 54); /** * @generated from message mgmt.v1alpha1.UpdateJobSourceConnectionRequest */ -export class UpdateJobSourceConnectionRequest extends Message { +export type UpdateJobSourceConnectionRequest = Message<"mgmt.v1alpha1.UpdateJobSourceConnectionRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; /** * @generated from field: mgmt.v1alpha1.JobSource source = 2; @@ -3147,233 +1675,110 @@ export class UpdateJobSourceConnectionRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateJobSourceConnectionRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "source", kind: "message", T: JobSource }, - { no: 3, name: "mappings", kind: "message", T: JobMapping, repeated: true }, - { no: 4, name: "virtual_foreign_keys", kind: "message", T: VirtualForeignConstraint, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateJobSourceConnectionRequest { - return new UpdateJobSourceConnectionRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateJobSourceConnectionRequest { - return new UpdateJobSourceConnectionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateJobSourceConnectionRequest { - return new UpdateJobSourceConnectionRequest().fromJsonString(jsonString, options); - } - - static equals(a: UpdateJobSourceConnectionRequest | PlainMessage | undefined, b: UpdateJobSourceConnectionRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateJobSourceConnectionRequest, a, b); - } -} + virtualForeignKeys: VirtualForeignConstraint[]; +}; + +/** + * Describes the message mgmt.v1alpha1.UpdateJobSourceConnectionRequest. + * Use `create(UpdateJobSourceConnectionRequestSchema)` to create a new message. + */ +export const UpdateJobSourceConnectionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 55); /** * @generated from message mgmt.v1alpha1.UpdateJobSourceConnectionResponse */ -export class UpdateJobSourceConnectionResponse extends Message { +export type UpdateJobSourceConnectionResponse = Message<"mgmt.v1alpha1.UpdateJobSourceConnectionResponse"> & { /** * @generated from field: mgmt.v1alpha1.Job job = 1; */ job?: Job; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateJobSourceConnectionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job", kind: "message", T: Job }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateJobSourceConnectionResponse { - return new UpdateJobSourceConnectionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateJobSourceConnectionResponse { - return new UpdateJobSourceConnectionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateJobSourceConnectionResponse { - return new UpdateJobSourceConnectionResponse().fromJsonString(jsonString, options); - } - - static equals(a: UpdateJobSourceConnectionResponse | PlainMessage | undefined, b: UpdateJobSourceConnectionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateJobSourceConnectionResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.UpdateJobSourceConnectionResponse. + * Use `create(UpdateJobSourceConnectionResponseSchema)` to create a new message. + */ +export const UpdateJobSourceConnectionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 56); /** * @generated from message mgmt.v1alpha1.PostgresSourceSchemaSubset */ -export class PostgresSourceSchemaSubset extends Message { +export type PostgresSourceSchemaSubset = Message<"mgmt.v1alpha1.PostgresSourceSchemaSubset"> & { /** * @generated from field: repeated mgmt.v1alpha1.PostgresSourceSchemaOption postgres_schemas = 1; */ - postgresSchemas: PostgresSourceSchemaOption[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PostgresSourceSchemaSubset"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "postgres_schemas", kind: "message", T: PostgresSourceSchemaOption, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PostgresSourceSchemaSubset { - return new PostgresSourceSchemaSubset().fromBinary(bytes, options); - } + postgresSchemas: PostgresSourceSchemaOption[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): PostgresSourceSchemaSubset { - return new PostgresSourceSchemaSubset().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PostgresSourceSchemaSubset { - return new PostgresSourceSchemaSubset().fromJsonString(jsonString, options); - } - - static equals(a: PostgresSourceSchemaSubset | PlainMessage | undefined, b: PostgresSourceSchemaSubset | PlainMessage | undefined): boolean { - return proto3.util.equals(PostgresSourceSchemaSubset, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PostgresSourceSchemaSubset. + * Use `create(PostgresSourceSchemaSubsetSchema)` to create a new message. + */ +export const PostgresSourceSchemaSubsetSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 57); /** * @generated from message mgmt.v1alpha1.MysqlSourceSchemaSubset */ -export class MysqlSourceSchemaSubset extends Message { +export type MysqlSourceSchemaSubset = Message<"mgmt.v1alpha1.MysqlSourceSchemaSubset"> & { /** * @generated from field: repeated mgmt.v1alpha1.MysqlSourceSchemaOption mysql_schemas = 1; */ - mysqlSchemas: MysqlSourceSchemaOption[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MysqlSourceSchemaSubset"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "mysql_schemas", kind: "message", T: MysqlSourceSchemaOption, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MysqlSourceSchemaSubset { - return new MysqlSourceSchemaSubset().fromBinary(bytes, options); - } + mysqlSchemas: MysqlSourceSchemaOption[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): MysqlSourceSchemaSubset { - return new MysqlSourceSchemaSubset().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MysqlSourceSchemaSubset { - return new MysqlSourceSchemaSubset().fromJsonString(jsonString, options); - } - - static equals(a: MysqlSourceSchemaSubset | PlainMessage | undefined, b: MysqlSourceSchemaSubset | PlainMessage | undefined): boolean { - return proto3.util.equals(MysqlSourceSchemaSubset, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MysqlSourceSchemaSubset. + * Use `create(MysqlSourceSchemaSubsetSchema)` to create a new message. + */ +export const MysqlSourceSchemaSubsetSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 58); /** * @generated from message mgmt.v1alpha1.DynamoDBSourceSchemaSubset */ -export class DynamoDBSourceSchemaSubset extends Message { +export type DynamoDBSourceSchemaSubset = Message<"mgmt.v1alpha1.DynamoDBSourceSchemaSubset"> & { /** * @generated from field: repeated mgmt.v1alpha1.DynamoDBSourceTableOption tables = 1; */ - tables: DynamoDBSourceTableOption[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DynamoDBSourceSchemaSubset"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "tables", kind: "message", T: DynamoDBSourceTableOption, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DynamoDBSourceSchemaSubset { - return new DynamoDBSourceSchemaSubset().fromBinary(bytes, options); - } + tables: DynamoDBSourceTableOption[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): DynamoDBSourceSchemaSubset { - return new DynamoDBSourceSchemaSubset().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DynamoDBSourceSchemaSubset { - return new DynamoDBSourceSchemaSubset().fromJsonString(jsonString, options); - } - - static equals(a: DynamoDBSourceSchemaSubset | PlainMessage | undefined, b: DynamoDBSourceSchemaSubset | PlainMessage | undefined): boolean { - return proto3.util.equals(DynamoDBSourceSchemaSubset, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DynamoDBSourceSchemaSubset. + * Use `create(DynamoDBSourceSchemaSubsetSchema)` to create a new message. + */ +export const DynamoDBSourceSchemaSubsetSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 59); /** * @generated from message mgmt.v1alpha1.MssqlSourceSchemaSubset */ -export class MssqlSourceSchemaSubset extends Message { +export type MssqlSourceSchemaSubset = Message<"mgmt.v1alpha1.MssqlSourceSchemaSubset"> & { /** * @generated from field: repeated mgmt.v1alpha1.MssqlSourceSchemaOption mssql_schemas = 1; */ - mssqlSchemas: MssqlSourceSchemaOption[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.MssqlSourceSchemaSubset"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "mssql_schemas", kind: "message", T: MssqlSourceSchemaOption, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MssqlSourceSchemaSubset { - return new MssqlSourceSchemaSubset().fromBinary(bytes, options); - } + mssqlSchemas: MssqlSourceSchemaOption[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): MssqlSourceSchemaSubset { - return new MssqlSourceSchemaSubset().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MssqlSourceSchemaSubset { - return new MssqlSourceSchemaSubset().fromJsonString(jsonString, options); - } - - static equals(a: MssqlSourceSchemaSubset | PlainMessage | undefined, b: MssqlSourceSchemaSubset | PlainMessage | undefined): boolean { - return proto3.util.equals(MssqlSourceSchemaSubset, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.MssqlSourceSchemaSubset. + * Use `create(MssqlSourceSchemaSubsetSchema)` to create a new message. + */ +export const MssqlSourceSchemaSubsetSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 60); /** * @generated from message mgmt.v1alpha1.JobSourceSqlSubetSchemas */ -export class JobSourceSqlSubetSchemas extends Message { +export type JobSourceSqlSubetSchemas = Message<"mgmt.v1alpha1.JobSourceSqlSubetSchemas"> & { /** * @generated from oneof mgmt.v1alpha1.JobSourceSqlSubetSchemas.schemas */ @@ -3401,49 +1806,26 @@ export class JobSourceSqlSubetSchemas extends Message */ value: MssqlSourceSchemaSubset; case: "mssqlSubset"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobSourceSqlSubetSchemas"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "postgres_subset", kind: "message", T: PostgresSourceSchemaSubset, oneof: "schemas" }, - { no: 3, name: "mysql_subset", kind: "message", T: MysqlSourceSchemaSubset, oneof: "schemas" }, - { no: 4, name: "dynamodb_subset", kind: "message", T: DynamoDBSourceSchemaSubset, oneof: "schemas" }, - { no: 5, name: "mssql_subset", kind: "message", T: MssqlSourceSchemaSubset, oneof: "schemas" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobSourceSqlSubetSchemas { - return new JobSourceSqlSubetSchemas().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobSourceSqlSubetSchemas { - return new JobSourceSqlSubetSchemas().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobSourceSqlSubetSchemas { - return new JobSourceSqlSubetSchemas().fromJsonString(jsonString, options); - } - - static equals(a: JobSourceSqlSubetSchemas | PlainMessage | undefined, b: JobSourceSqlSubetSchemas | PlainMessage | undefined): boolean { - return proto3.util.equals(JobSourceSqlSubetSchemas, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mgmt.v1alpha1.JobSourceSqlSubetSchemas. + * Use `create(JobSourceSqlSubetSchemasSchema)` to create a new message. + */ +export const JobSourceSqlSubetSchemasSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 61); /** * @generated from message mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest */ -export class SetJobSourceSqlConnectionSubsetsRequest extends Message { +export type SetJobSourceSqlConnectionSubsetsRequest = Message<"mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest"> & { /** * The unique identifier of the job to update subsets for * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * The subset configuration @@ -3457,88 +1839,46 @@ export class SetJobSourceSqlConnectionSubsetsRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "schemas", kind: "message", T: JobSourceSqlSubetSchemas }, - { no: 3, name: "subset_by_foreign_key_constraints", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetJobSourceSqlConnectionSubsetsRequest { - return new SetJobSourceSqlConnectionSubsetsRequest().fromBinary(bytes, options); - } + subsetByForeignKeyConstraints: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): SetJobSourceSqlConnectionSubsetsRequest { - return new SetJobSourceSqlConnectionSubsetsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetJobSourceSqlConnectionSubsetsRequest { - return new SetJobSourceSqlConnectionSubsetsRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetJobSourceSqlConnectionSubsetsRequest | PlainMessage | undefined, b: SetJobSourceSqlConnectionSubsetsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetJobSourceSqlConnectionSubsetsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest. + * Use `create(SetJobSourceSqlConnectionSubsetsRequestSchema)` to create a new message. + */ +export const SetJobSourceSqlConnectionSubsetsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 62); /** * @generated from message mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse */ -export class SetJobSourceSqlConnectionSubsetsResponse extends Message { +export type SetJobSourceSqlConnectionSubsetsResponse = Message<"mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse"> & { /** * @generated from field: mgmt.v1alpha1.Job job = 1; */ job?: Job; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job", kind: "message", T: Job }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetJobSourceSqlConnectionSubsetsResponse { - return new SetJobSourceSqlConnectionSubsetsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetJobSourceSqlConnectionSubsetsResponse { - return new SetJobSourceSqlConnectionSubsetsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetJobSourceSqlConnectionSubsetsResponse { - return new SetJobSourceSqlConnectionSubsetsResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetJobSourceSqlConnectionSubsetsResponse | PlainMessage | undefined, b: SetJobSourceSqlConnectionSubsetsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetJobSourceSqlConnectionSubsetsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse. + * Use `create(SetJobSourceSqlConnectionSubsetsResponseSchema)` to create a new message. + */ +export const SetJobSourceSqlConnectionSubsetsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 63); /** * @generated from message mgmt.v1alpha1.UpdateJobDestinationConnectionRequest */ -export class UpdateJobDestinationConnectionRequest extends Message { +export type UpdateJobDestinationConnectionRequest = Message<"mgmt.v1alpha1.UpdateJobDestinationConnectionRequest"> & { /** * @generated from field: string job_id = 1; */ - jobId = ""; + jobId: string; /** * @generated from field: string connection_id = 2; */ - connectionId = ""; + connectionId: string; /** * @generated from field: mgmt.v1alpha1.JobDestinationOptions options = 3; @@ -3548,376 +1888,175 @@ export class UpdateJobDestinationConnectionRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateJobDestinationConnectionRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "options", kind: "message", T: JobDestinationOptions }, - { no: 4, name: "destination_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateJobDestinationConnectionRequest { - return new UpdateJobDestinationConnectionRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateJobDestinationConnectionRequest { - return new UpdateJobDestinationConnectionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateJobDestinationConnectionRequest { - return new UpdateJobDestinationConnectionRequest().fromJsonString(jsonString, options); - } - - static equals(a: UpdateJobDestinationConnectionRequest | PlainMessage | undefined, b: UpdateJobDestinationConnectionRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateJobDestinationConnectionRequest, a, b); - } -} + destinationId: string; +}; + +/** + * Describes the message mgmt.v1alpha1.UpdateJobDestinationConnectionRequest. + * Use `create(UpdateJobDestinationConnectionRequestSchema)` to create a new message. + */ +export const UpdateJobDestinationConnectionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 64); /** * @generated from message mgmt.v1alpha1.UpdateJobDestinationConnectionResponse */ -export class UpdateJobDestinationConnectionResponse extends Message { +export type UpdateJobDestinationConnectionResponse = Message<"mgmt.v1alpha1.UpdateJobDestinationConnectionResponse"> & { /** * @generated from field: mgmt.v1alpha1.Job job = 1; */ job?: Job; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateJobDestinationConnectionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job", kind: "message", T: Job }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateJobDestinationConnectionResponse { - return new UpdateJobDestinationConnectionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateJobDestinationConnectionResponse { - return new UpdateJobDestinationConnectionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateJobDestinationConnectionResponse { - return new UpdateJobDestinationConnectionResponse().fromJsonString(jsonString, options); - } - - static equals(a: UpdateJobDestinationConnectionResponse | PlainMessage | undefined, b: UpdateJobDestinationConnectionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateJobDestinationConnectionResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.UpdateJobDestinationConnectionResponse. + * Use `create(UpdateJobDestinationConnectionResponseSchema)` to create a new message. + */ +export const UpdateJobDestinationConnectionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 65); /** * @generated from message mgmt.v1alpha1.DeleteJobDestinationConnectionRequest */ -export class DeleteJobDestinationConnectionRequest extends Message { +export type DeleteJobDestinationConnectionRequest = Message<"mgmt.v1alpha1.DeleteJobDestinationConnectionRequest"> & { /** * @generated from field: string destination_id = 1; */ - destinationId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteJobDestinationConnectionRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "destination_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteJobDestinationConnectionRequest { - return new DeleteJobDestinationConnectionRequest().fromBinary(bytes, options); - } + destinationId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteJobDestinationConnectionRequest { - return new DeleteJobDestinationConnectionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteJobDestinationConnectionRequest { - return new DeleteJobDestinationConnectionRequest().fromJsonString(jsonString, options); - } - - static equals(a: DeleteJobDestinationConnectionRequest | PlainMessage | undefined, b: DeleteJobDestinationConnectionRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteJobDestinationConnectionRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteJobDestinationConnectionRequest. + * Use `create(DeleteJobDestinationConnectionRequestSchema)` to create a new message. + */ +export const DeleteJobDestinationConnectionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 66); /** * @generated from message mgmt.v1alpha1.DeleteJobDestinationConnectionResponse */ -export class DeleteJobDestinationConnectionResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteJobDestinationConnectionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteJobDestinationConnectionResponse { - return new DeleteJobDestinationConnectionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteJobDestinationConnectionResponse { - return new DeleteJobDestinationConnectionResponse().fromJson(jsonValue, options); - } +export type DeleteJobDestinationConnectionResponse = Message<"mgmt.v1alpha1.DeleteJobDestinationConnectionResponse"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): DeleteJobDestinationConnectionResponse { - return new DeleteJobDestinationConnectionResponse().fromJsonString(jsonString, options); - } - - static equals(a: DeleteJobDestinationConnectionResponse | PlainMessage | undefined, b: DeleteJobDestinationConnectionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteJobDestinationConnectionResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteJobDestinationConnectionResponse. + * Use `create(DeleteJobDestinationConnectionResponseSchema)` to create a new message. + */ +export const DeleteJobDestinationConnectionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 67); /** * @generated from message mgmt.v1alpha1.CreateJobDestinationConnectionsRequest */ -export class CreateJobDestinationConnectionsRequest extends Message { +export type CreateJobDestinationConnectionsRequest = Message<"mgmt.v1alpha1.CreateJobDestinationConnectionsRequest"> & { /** * @generated from field: string job_id = 1; */ - jobId = ""; + jobId: string; /** * @generated from field: repeated mgmt.v1alpha1.CreateJobDestination destinations = 2; */ - destinations: CreateJobDestination[] = []; + destinations: CreateJobDestination[]; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateJobDestinationConnectionsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "destinations", kind: "message", T: CreateJobDestination, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateJobDestinationConnectionsRequest { - return new CreateJobDestinationConnectionsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateJobDestinationConnectionsRequest { - return new CreateJobDestinationConnectionsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateJobDestinationConnectionsRequest { - return new CreateJobDestinationConnectionsRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateJobDestinationConnectionsRequest | PlainMessage | undefined, b: CreateJobDestinationConnectionsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateJobDestinationConnectionsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateJobDestinationConnectionsRequest. + * Use `create(CreateJobDestinationConnectionsRequestSchema)` to create a new message. + */ +export const CreateJobDestinationConnectionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 68); /** * @generated from message mgmt.v1alpha1.CreateJobDestinationConnectionsResponse */ -export class CreateJobDestinationConnectionsResponse extends Message { +export type CreateJobDestinationConnectionsResponse = Message<"mgmt.v1alpha1.CreateJobDestinationConnectionsResponse"> & { /** * @generated from field: mgmt.v1alpha1.Job job = 1; */ job?: Job; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateJobDestinationConnectionsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job", kind: "message", T: Job }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateJobDestinationConnectionsResponse { - return new CreateJobDestinationConnectionsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateJobDestinationConnectionsResponse { - return new CreateJobDestinationConnectionsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateJobDestinationConnectionsResponse { - return new CreateJobDestinationConnectionsResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateJobDestinationConnectionsResponse | PlainMessage | undefined, b: CreateJobDestinationConnectionsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateJobDestinationConnectionsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateJobDestinationConnectionsResponse. + * Use `create(CreateJobDestinationConnectionsResponseSchema)` to create a new message. + */ +export const CreateJobDestinationConnectionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 69); /** * @generated from message mgmt.v1alpha1.DeleteJobRequest */ -export class DeleteJobRequest extends Message { +export type DeleteJobRequest = Message<"mgmt.v1alpha1.DeleteJobRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteJobRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteJobRequest { - return new DeleteJobRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteJobRequest { - return new DeleteJobRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteJobRequest { - return new DeleteJobRequest().fromJsonString(jsonString, options); - } - - static equals(a: DeleteJobRequest | PlainMessage | undefined, b: DeleteJobRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteJobRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteJobRequest. + * Use `create(DeleteJobRequestSchema)` to create a new message. + */ +export const DeleteJobRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 70); /** * @generated from message mgmt.v1alpha1.DeleteJobResponse */ -export class DeleteJobResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type DeleteJobResponse = Message<"mgmt.v1alpha1.DeleteJobResponse"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteJobResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteJobResponse { - return new DeleteJobResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteJobResponse { - return new DeleteJobResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteJobResponse { - return new DeleteJobResponse().fromJsonString(jsonString, options); - } - - static equals(a: DeleteJobResponse | PlainMessage | undefined, b: DeleteJobResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteJobResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteJobResponse. + * Use `create(DeleteJobResponseSchema)` to create a new message. + */ +export const DeleteJobResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 71); /** * @generated from message mgmt.v1alpha1.IsJobNameAvailableRequest */ -export class IsJobNameAvailableRequest extends Message { +export type IsJobNameAvailableRequest = Message<"mgmt.v1alpha1.IsJobNameAvailableRequest"> & { /** * @generated from field: string name = 1; */ - name = ""; + name: string; /** * @generated from field: string account_id = 2; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + accountId: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsJobNameAvailableRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsJobNameAvailableRequest { - return new IsJobNameAvailableRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IsJobNameAvailableRequest { - return new IsJobNameAvailableRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsJobNameAvailableRequest { - return new IsJobNameAvailableRequest().fromJsonString(jsonString, options); - } - - static equals(a: IsJobNameAvailableRequest | PlainMessage | undefined, b: IsJobNameAvailableRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(IsJobNameAvailableRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.IsJobNameAvailableRequest. + * Use `create(IsJobNameAvailableRequestSchema)` to create a new message. + */ +export const IsJobNameAvailableRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 72); /** * @generated from message mgmt.v1alpha1.IsJobNameAvailableResponse */ -export class IsJobNameAvailableResponse extends Message { +export type IsJobNameAvailableResponse = Message<"mgmt.v1alpha1.IsJobNameAvailableResponse"> & { /** * @generated from field: bool is_available = 1; */ - isAvailable = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + isAvailable: boolean; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsJobNameAvailableResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "is_available", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsJobNameAvailableResponse { - return new IsJobNameAvailableResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IsJobNameAvailableResponse { - return new IsJobNameAvailableResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsJobNameAvailableResponse { - return new IsJobNameAvailableResponse().fromJsonString(jsonString, options); - } - - static equals(a: IsJobNameAvailableResponse | PlainMessage | undefined, b: IsJobNameAvailableResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(IsJobNameAvailableResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.IsJobNameAvailableResponse. + * Use `create(IsJobNameAvailableResponseSchema)` to create a new message. + */ +export const IsJobNameAvailableResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 73); /** * @generated from message mgmt.v1alpha1.GetJobRunsRequest */ -export class GetJobRunsRequest extends Message { +export type GetJobRunsRequest = Message<"mgmt.v1alpha1.GetJobRunsRequest"> & { /** * @generated from oneof mgmt.v1alpha1.GetJobRunsRequest.id */ @@ -3933,311 +2072,152 @@ export class GetJobRunsRequest extends Message { */ value: string; case: "accountId"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRunsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "id" }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "id" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRunsRequest { - return new GetJobRunsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRunsRequest { - return new GetJobRunsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRunsRequest { - return new GetJobRunsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobRunsRequest | PlainMessage | undefined, b: GetJobRunsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRunsRequest, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mgmt.v1alpha1.GetJobRunsRequest. + * Use `create(GetJobRunsRequestSchema)` to create a new message. + */ +export const GetJobRunsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 74); /** * @generated from message mgmt.v1alpha1.GetJobRunsResponse */ -export class GetJobRunsResponse extends Message { +export type GetJobRunsResponse = Message<"mgmt.v1alpha1.GetJobRunsResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.JobRun job_runs = 1; */ - jobRuns: JobRun[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRunsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_runs", kind: "message", T: JobRun, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRunsResponse { - return new GetJobRunsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRunsResponse { - return new GetJobRunsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRunsResponse { - return new GetJobRunsResponse().fromJsonString(jsonString, options); - } + jobRuns: JobRun[]; +}; - static equals(a: GetJobRunsResponse | PlainMessage | undefined, b: GetJobRunsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRunsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobRunsResponse. + * Use `create(GetJobRunsResponseSchema)` to create a new message. + */ +export const GetJobRunsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 75); /** * @generated from message mgmt.v1alpha1.GetJobRunRequest */ -export class GetJobRunRequest extends Message { +export type GetJobRunRequest = Message<"mgmt.v1alpha1.GetJobRunRequest"> & { /** * @generated from field: string job_run_id = 1; */ - jobRunId = ""; + jobRunId: string; /** * @generated from field: string account_id = 2; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRunRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRunRequest { - return new GetJobRunRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRunRequest { - return new GetJobRunRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRunRequest { - return new GetJobRunRequest().fromJsonString(jsonString, options); - } + accountId: string; +}; - static equals(a: GetJobRunRequest | PlainMessage | undefined, b: GetJobRunRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRunRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobRunRequest. + * Use `create(GetJobRunRequestSchema)` to create a new message. + */ +export const GetJobRunRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 76); /** * @generated from message mgmt.v1alpha1.GetJobRunResponse */ -export class GetJobRunResponse extends Message { +export type GetJobRunResponse = Message<"mgmt.v1alpha1.GetJobRunResponse"> & { /** * @generated from field: mgmt.v1alpha1.JobRun job_run = 1; */ jobRun?: JobRun; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRunResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_run", kind: "message", T: JobRun }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRunResponse { - return new GetJobRunResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRunResponse { - return new GetJobRunResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRunResponse { - return new GetJobRunResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobRunResponse | PlainMessage | undefined, b: GetJobRunResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRunResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobRunResponse. + * Use `create(GetJobRunResponseSchema)` to create a new message. + */ +export const GetJobRunResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 77); /** * @generated from message mgmt.v1alpha1.CreateJobRunRequest */ -export class CreateJobRunRequest extends Message { +export type CreateJobRunRequest = Message<"mgmt.v1alpha1.CreateJobRunRequest"> & { /** * @generated from field: string job_id = 1; */ - jobId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateJobRunRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateJobRunRequest { - return new CreateJobRunRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateJobRunRequest { - return new CreateJobRunRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateJobRunRequest { - return new CreateJobRunRequest().fromJsonString(jsonString, options); - } + jobId: string; +}; - static equals(a: CreateJobRunRequest | PlainMessage | undefined, b: CreateJobRunRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateJobRunRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateJobRunRequest. + * Use `create(CreateJobRunRequestSchema)` to create a new message. + */ +export const CreateJobRunRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 78); /** * @generated from message mgmt.v1alpha1.CreateJobRunResponse */ -export class CreateJobRunResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateJobRunResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +export type CreateJobRunResponse = Message<"mgmt.v1alpha1.CreateJobRunResponse"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): CreateJobRunResponse { - return new CreateJobRunResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateJobRunResponse { - return new CreateJobRunResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateJobRunResponse { - return new CreateJobRunResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateJobRunResponse | PlainMessage | undefined, b: CreateJobRunResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateJobRunResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateJobRunResponse. + * Use `create(CreateJobRunResponseSchema)` to create a new message. + */ +export const CreateJobRunResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 79); /** * @generated from message mgmt.v1alpha1.CancelJobRunRequest */ -export class CancelJobRunRequest extends Message { +export type CancelJobRunRequest = Message<"mgmt.v1alpha1.CancelJobRunRequest"> & { /** * @generated from field: string job_run_id = 1; */ - jobRunId = ""; + jobRunId: string; /** * @generated from field: string account_id = 2; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CancelJobRunRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + accountId: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): CancelJobRunRequest { - return new CancelJobRunRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CancelJobRunRequest { - return new CancelJobRunRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CancelJobRunRequest { - return new CancelJobRunRequest().fromJsonString(jsonString, options); - } - - static equals(a: CancelJobRunRequest | PlainMessage | undefined, b: CancelJobRunRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CancelJobRunRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CancelJobRunRequest. + * Use `create(CancelJobRunRequestSchema)` to create a new message. + */ +export const CancelJobRunRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 80); /** * @generated from message mgmt.v1alpha1.CancelJobRunResponse */ -export class CancelJobRunResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CancelJobRunResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CancelJobRunResponse { - return new CancelJobRunResponse().fromBinary(bytes, options); - } +export type CancelJobRunResponse = Message<"mgmt.v1alpha1.CancelJobRunResponse"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): CancelJobRunResponse { - return new CancelJobRunResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CancelJobRunResponse { - return new CancelJobRunResponse().fromJsonString(jsonString, options); - } - - static equals(a: CancelJobRunResponse | PlainMessage | undefined, b: CancelJobRunResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CancelJobRunResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CancelJobRunResponse. + * Use `create(CancelJobRunResponseSchema)` to create a new message. + */ +export const CancelJobRunResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 81); /** * @generated from message mgmt.v1alpha1.Job */ -export class Job extends Message { +export type Job = Message<"mgmt.v1alpha1.Job"> & { /** * The unique identifier of the job * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * @generated from field: string created_by_user_id = 2; */ - createdByUserId = ""; + createdByUserId: string; /** * @generated from field: google.protobuf.Timestamp created_at = 3; @@ -4247,7 +2227,7 @@ export class Job extends Message { /** * @generated from field: string updated_by_user_id = 4; */ - updatedByUserId = ""; + updatedByUserId: string; /** * @generated from field: google.protobuf.Timestamp updated_at = 5; @@ -4259,7 +2239,7 @@ export class Job extends Message { * * @generated from field: string name = 6; */ - name = ""; + name: string; /** * @generated from field: mgmt.v1alpha1.JobSource source = 7; @@ -4269,12 +2249,12 @@ export class Job extends Message { /** * @generated from field: repeated mgmt.v1alpha1.JobDestination destinations = 8; */ - destinations: JobDestination[] = []; + destinations: JobDestination[]; /** * @generated from field: repeated mgmt.v1alpha1.JobMapping mappings = 9; */ - mappings: JobMapping[] = []; + mappings: JobMapping[]; /** * @generated from field: optional string cron_schedule = 10; @@ -4286,7 +2266,7 @@ export class Job extends Message { * * @generated from field: string account_id = 11; */ - accountId = ""; + accountId: string; /** * Specify timeout and retry options for data synchronization activities @@ -4309,53 +2289,20 @@ export class Job extends Message { * * @generated from field: repeated mgmt.v1alpha1.VirtualForeignConstraint virtual_foreign_keys = 14; */ - virtualForeignKeys: VirtualForeignConstraint[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.Job"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "created_by_user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "created_at", kind: "message", T: Timestamp }, - { no: 4, name: "updated_by_user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "updated_at", kind: "message", T: Timestamp }, - { no: 6, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "source", kind: "message", T: JobSource }, - { no: 8, name: "destinations", kind: "message", T: JobDestination, repeated: true }, - { no: 9, name: "mappings", kind: "message", T: JobMapping, repeated: true }, - { no: 10, name: "cron_schedule", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 11, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 12, name: "sync_options", kind: "message", T: ActivityOptions }, - { no: 13, name: "workflow_options", kind: "message", T: WorkflowOptions }, - { no: 14, name: "virtual_foreign_keys", kind: "message", T: VirtualForeignConstraint, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Job { - return new Job().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Job { - return new Job().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Job { - return new Job().fromJsonString(jsonString, options); - } - - static equals(a: Job | PlainMessage | undefined, b: Job | PlainMessage | undefined): boolean { - return proto3.util.equals(Job, a, b); - } -} + virtualForeignKeys: VirtualForeignConstraint[]; +}; + +/** + * Describes the message mgmt.v1alpha1.Job. + * Use `create(JobSchema)` to create a new message. + */ +export const JobSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 82); /** * @generated from message mgmt.v1alpha1.JobRecentRun */ -export class JobRecentRun extends Message { +export type JobRecentRun = Message<"mgmt.v1alpha1.JobRecentRun"> & { /** * @generated from field: google.protobuf.Timestamp start_time = 1; */ @@ -4364,530 +2311,266 @@ export class JobRecentRun extends Message { /** * @generated from field: string job_run_id = 2; */ - jobRunId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobRecentRun"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "start_time", kind: "message", T: Timestamp }, - { no: 2, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobRecentRun { - return new JobRecentRun().fromBinary(bytes, options); - } + jobRunId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): JobRecentRun { - return new JobRecentRun().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobRecentRun { - return new JobRecentRun().fromJsonString(jsonString, options); - } - - static equals(a: JobRecentRun | PlainMessage | undefined, b: JobRecentRun | PlainMessage | undefined): boolean { - return proto3.util.equals(JobRecentRun, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobRecentRun. + * Use `create(JobRecentRunSchema)` to create a new message. + */ +export const JobRecentRunSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 83); /** * @generated from message mgmt.v1alpha1.GetJobRecentRunsRequest */ -export class GetJobRecentRunsRequest extends Message { +export type GetJobRecentRunsRequest = Message<"mgmt.v1alpha1.GetJobRecentRunsRequest"> & { /** * @generated from field: string job_id = 1; */ - jobId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRecentRunsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRecentRunsRequest { - return new GetJobRecentRunsRequest().fromBinary(bytes, options); - } + jobId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRecentRunsRequest { - return new GetJobRecentRunsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRecentRunsRequest { - return new GetJobRecentRunsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobRecentRunsRequest | PlainMessage | undefined, b: GetJobRecentRunsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRecentRunsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobRecentRunsRequest. + * Use `create(GetJobRecentRunsRequestSchema)` to create a new message. + */ +export const GetJobRecentRunsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 84); /** * @generated from message mgmt.v1alpha1.GetJobRecentRunsResponse */ -export class GetJobRecentRunsResponse extends Message { +export type GetJobRecentRunsResponse = Message<"mgmt.v1alpha1.GetJobRecentRunsResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.JobRecentRun recent_runs = 1; */ - recentRuns: JobRecentRun[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRecentRunsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "recent_runs", kind: "message", T: JobRecentRun, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRecentRunsResponse { - return new GetJobRecentRunsResponse().fromBinary(bytes, options); - } + recentRuns: JobRecentRun[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRecentRunsResponse { - return new GetJobRecentRunsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRecentRunsResponse { - return new GetJobRecentRunsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobRecentRunsResponse | PlainMessage | undefined, b: GetJobRecentRunsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRecentRunsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobRecentRunsResponse. + * Use `create(GetJobRecentRunsResponseSchema)` to create a new message. + */ +export const GetJobRecentRunsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 85); /** * @generated from message mgmt.v1alpha1.JobNextRuns */ -export class JobNextRuns extends Message { +export type JobNextRuns = Message<"mgmt.v1alpha1.JobNextRuns"> & { /** * @generated from field: repeated google.protobuf.Timestamp next_run_times = 1; */ - nextRunTimes: Timestamp[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobNextRuns"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "next_run_times", kind: "message", T: Timestamp, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobNextRuns { - return new JobNextRuns().fromBinary(bytes, options); - } + nextRunTimes: Timestamp[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): JobNextRuns { - return new JobNextRuns().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobNextRuns { - return new JobNextRuns().fromJsonString(jsonString, options); - } - - static equals(a: JobNextRuns | PlainMessage | undefined, b: JobNextRuns | PlainMessage | undefined): boolean { - return proto3.util.equals(JobNextRuns, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobNextRuns. + * Use `create(JobNextRunsSchema)` to create a new message. + */ +export const JobNextRunsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 86); /** * @generated from message mgmt.v1alpha1.GetJobNextRunsRequest */ -export class GetJobNextRunsRequest extends Message { +export type GetJobNextRunsRequest = Message<"mgmt.v1alpha1.GetJobNextRunsRequest"> & { /** * @generated from field: string job_id = 1; */ - jobId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobNextRunsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobNextRunsRequest { - return new GetJobNextRunsRequest().fromBinary(bytes, options); - } + jobId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobNextRunsRequest { - return new GetJobNextRunsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobNextRunsRequest { - return new GetJobNextRunsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobNextRunsRequest | PlainMessage | undefined, b: GetJobNextRunsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobNextRunsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobNextRunsRequest. + * Use `create(GetJobNextRunsRequestSchema)` to create a new message. + */ +export const GetJobNextRunsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 87); /** * @generated from message mgmt.v1alpha1.GetJobNextRunsResponse */ -export class GetJobNextRunsResponse extends Message { +export type GetJobNextRunsResponse = Message<"mgmt.v1alpha1.GetJobNextRunsResponse"> & { /** * @generated from field: mgmt.v1alpha1.JobNextRuns next_runs = 1; */ nextRuns?: JobNextRuns; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobNextRunsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "next_runs", kind: "message", T: JobNextRuns }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobNextRunsResponse { - return new GetJobNextRunsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobNextRunsResponse { - return new GetJobNextRunsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobNextRunsResponse { - return new GetJobNextRunsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobNextRunsResponse | PlainMessage | undefined, b: GetJobNextRunsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobNextRunsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobNextRunsResponse. + * Use `create(GetJobNextRunsResponseSchema)` to create a new message. + */ +export const GetJobNextRunsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 88); /** * @generated from message mgmt.v1alpha1.GetJobStatusRequest */ -export class GetJobStatusRequest extends Message { +export type GetJobStatusRequest = Message<"mgmt.v1alpha1.GetJobStatusRequest"> & { /** * @generated from field: string job_id = 1; */ - jobId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobStatusRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobStatusRequest { - return new GetJobStatusRequest().fromBinary(bytes, options); - } + jobId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobStatusRequest { - return new GetJobStatusRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobStatusRequest { - return new GetJobStatusRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobStatusRequest | PlainMessage | undefined, b: GetJobStatusRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobStatusRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobStatusRequest. + * Use `create(GetJobStatusRequestSchema)` to create a new message. + */ +export const GetJobStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 89); /** * @generated from message mgmt.v1alpha1.GetJobStatusResponse */ -export class GetJobStatusResponse extends Message { +export type GetJobStatusResponse = Message<"mgmt.v1alpha1.GetJobStatusResponse"> & { /** * @generated from field: mgmt.v1alpha1.JobStatus status = 1; */ - status = JobStatus.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobStatusResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "status", kind: "enum", T: proto3.getEnumType(JobStatus) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobStatusResponse { - return new GetJobStatusResponse().fromBinary(bytes, options); - } + status: JobStatus; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobStatusResponse { - return new GetJobStatusResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobStatusResponse { - return new GetJobStatusResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobStatusResponse | PlainMessage | undefined, b: GetJobStatusResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobStatusResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobStatusResponse. + * Use `create(GetJobStatusResponseSchema)` to create a new message. + */ +export const GetJobStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 90); /** * @generated from message mgmt.v1alpha1.JobStatusRecord */ -export class JobStatusRecord extends Message { +export type JobStatusRecord = Message<"mgmt.v1alpha1.JobStatusRecord"> & { /** * @generated from field: string job_id = 1; */ - jobId = ""; + jobId: string; /** * @generated from field: mgmt.v1alpha1.JobStatus status = 2; */ - status = JobStatus.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobStatusRecord"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "status", kind: "enum", T: proto3.getEnumType(JobStatus) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobStatusRecord { - return new JobStatusRecord().fromBinary(bytes, options); - } + status: JobStatus; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): JobStatusRecord { - return new JobStatusRecord().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobStatusRecord { - return new JobStatusRecord().fromJsonString(jsonString, options); - } - - static equals(a: JobStatusRecord | PlainMessage | undefined, b: JobStatusRecord | PlainMessage | undefined): boolean { - return proto3.util.equals(JobStatusRecord, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobStatusRecord. + * Use `create(JobStatusRecordSchema)` to create a new message. + */ +export const JobStatusRecordSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 91); /** * @generated from message mgmt.v1alpha1.GetJobStatusesRequest */ -export class GetJobStatusesRequest extends Message { +export type GetJobStatusesRequest = Message<"mgmt.v1alpha1.GetJobStatusesRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobStatusesRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobStatusesRequest { - return new GetJobStatusesRequest().fromBinary(bytes, options); - } + accountId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobStatusesRequest { - return new GetJobStatusesRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobStatusesRequest { - return new GetJobStatusesRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobStatusesRequest | PlainMessage | undefined, b: GetJobStatusesRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobStatusesRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobStatusesRequest. + * Use `create(GetJobStatusesRequestSchema)` to create a new message. + */ +export const GetJobStatusesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 92); /** * @generated from message mgmt.v1alpha1.GetJobStatusesResponse */ -export class GetJobStatusesResponse extends Message { +export type GetJobStatusesResponse = Message<"mgmt.v1alpha1.GetJobStatusesResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.JobStatusRecord statuses = 1; */ - statuses: JobStatusRecord[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobStatusesResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "statuses", kind: "message", T: JobStatusRecord, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobStatusesResponse { - return new GetJobStatusesResponse().fromBinary(bytes, options); - } + statuses: JobStatusRecord[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobStatusesResponse { - return new GetJobStatusesResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobStatusesResponse { - return new GetJobStatusesResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobStatusesResponse | PlainMessage | undefined, b: GetJobStatusesResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobStatusesResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobStatusesResponse. + * Use `create(GetJobStatusesResponseSchema)` to create a new message. + */ +export const GetJobStatusesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 93); /** * @generated from message mgmt.v1alpha1.ActivityFailure */ -export class ActivityFailure extends Message { +export type ActivityFailure = Message<"mgmt.v1alpha1.ActivityFailure"> & { /** * @generated from field: string message = 1; */ - message = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ActivityFailure"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ActivityFailure { - return new ActivityFailure().fromBinary(bytes, options); - } + message: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): ActivityFailure { - return new ActivityFailure().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ActivityFailure { - return new ActivityFailure().fromJsonString(jsonString, options); - } - - static equals(a: ActivityFailure | PlainMessage | undefined, b: ActivityFailure | PlainMessage | undefined): boolean { - return proto3.util.equals(ActivityFailure, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ActivityFailure. + * Use `create(ActivityFailureSchema)` to create a new message. + */ +export const ActivityFailureSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 94); /** * @generated from message mgmt.v1alpha1.PendingActivity */ -export class PendingActivity extends Message { +export type PendingActivity = Message<"mgmt.v1alpha1.PendingActivity"> & { /** * @generated from field: mgmt.v1alpha1.ActivityStatus status = 1; */ - status = ActivityStatus.UNSPECIFIED; + status: ActivityStatus; /** * @generated from field: string activity_name = 2; */ - activityName = ""; + activityName: string; /** * @generated from field: optional mgmt.v1alpha1.ActivityFailure last_failure = 3; */ lastFailure?: ActivityFailure; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PendingActivity"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "status", kind: "enum", T: proto3.getEnumType(ActivityStatus) }, - { no: 2, name: "activity_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "last_failure", kind: "message", T: ActivityFailure, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PendingActivity { - return new PendingActivity().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PendingActivity { - return new PendingActivity().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PendingActivity { - return new PendingActivity().fromJsonString(jsonString, options); - } - - static equals(a: PendingActivity | PlainMessage | undefined, b: PendingActivity | PlainMessage | undefined): boolean { - return proto3.util.equals(PendingActivity, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PendingActivity. + * Use `create(PendingActivitySchema)` to create a new message. + */ +export const PendingActivitySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 95); /** * @generated from message mgmt.v1alpha1.JobRun */ -export class JobRun extends Message { +export type JobRun = Message<"mgmt.v1alpha1.JobRun"> & { /** * The id of the job run. This will currently be equivalent to the temporal workflow id * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * The unique identifier of the job id this run is associated with * * @generated from field: string job_id = 2; */ - jobId = ""; + jobId: string; /** * The name of the job run. * * @generated from field: string name = 3; */ - name = ""; + name: string; /** * the status of the job run * * @generated from field: mgmt.v1alpha1.JobRunStatus status = 4; */ - status = JobRunStatus.UNSPECIFIED; + status: JobRunStatus; /** * A timestamp of when the run started @@ -4908,98 +2591,51 @@ export class JobRun extends Message { * * @generated from field: repeated mgmt.v1alpha1.PendingActivity pending_activities = 8; */ - pendingActivities: PendingActivity[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobRun"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "status", kind: "enum", T: proto3.getEnumType(JobRunStatus) }, - { no: 6, name: "started_at", kind: "message", T: Timestamp }, - { no: 7, name: "completed_at", kind: "message", T: Timestamp, opt: true }, - { no: 8, name: "pending_activities", kind: "message", T: PendingActivity, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobRun { - return new JobRun().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobRun { - return new JobRun().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobRun { - return new JobRun().fromJsonString(jsonString, options); - } - - static equals(a: JobRun | PlainMessage | undefined, b: JobRun | PlainMessage | undefined): boolean { - return proto3.util.equals(JobRun, a, b); - } -} + pendingActivities: PendingActivity[]; +}; + +/** + * Describes the message mgmt.v1alpha1.JobRun. + * Use `create(JobRunSchema)` to create a new message. + */ +export const JobRunSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 96); /** * @generated from message mgmt.v1alpha1.JobRunEventTaskError */ -export class JobRunEventTaskError extends Message { +export type JobRunEventTaskError = Message<"mgmt.v1alpha1.JobRunEventTaskError"> & { /** * @generated from field: string message = 1; */ - message = ""; + message: string; /** * @generated from field: string retry_state = 2; */ - retryState = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobRunEventTaskError"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "retry_state", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobRunEventTaskError { - return new JobRunEventTaskError().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobRunEventTaskError { - return new JobRunEventTaskError().fromJson(jsonValue, options); - } + retryState: string; +}; - static fromJsonString(jsonString: string, options?: Partial): JobRunEventTaskError { - return new JobRunEventTaskError().fromJsonString(jsonString, options); - } - - static equals(a: JobRunEventTaskError | PlainMessage | undefined, b: JobRunEventTaskError | PlainMessage | undefined): boolean { - return proto3.util.equals(JobRunEventTaskError, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobRunEventTaskError. + * Use `create(JobRunEventTaskErrorSchema)` to create a new message. + */ +export const JobRunEventTaskErrorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 97); /** * @generated from message mgmt.v1alpha1.JobRunEventTask */ -export class JobRunEventTask extends Message { +export type JobRunEventTask = Message<"mgmt.v1alpha1.JobRunEventTask"> & { /** * @generated from field: int64 id = 1; */ - id = protoInt64.zero; + id: bigint; /** * @generated from field: string type = 2; */ - type = ""; + type: string; /** * @generated from field: google.protobuf.Timestamp event_time = 3; @@ -5010,85 +2646,41 @@ export class JobRunEventTask extends Message { * @generated from field: mgmt.v1alpha1.JobRunEventTaskError error = 4; */ error?: JobRunEventTaskError; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobRunEventTask"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "event_time", kind: "message", T: Timestamp }, - { no: 4, name: "error", kind: "message", T: JobRunEventTaskError }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobRunEventTask { - return new JobRunEventTask().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobRunEventTask { - return new JobRunEventTask().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobRunEventTask { - return new JobRunEventTask().fromJsonString(jsonString, options); - } - - static equals(a: JobRunEventTask | PlainMessage | undefined, b: JobRunEventTask | PlainMessage | undefined): boolean { - return proto3.util.equals(JobRunEventTask, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobRunEventTask. + * Use `create(JobRunEventTaskSchema)` to create a new message. + */ +export const JobRunEventTaskSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 98); /** * @generated from message mgmt.v1alpha1.JobRunSyncMetadata */ -export class JobRunSyncMetadata extends Message { +export type JobRunSyncMetadata = Message<"mgmt.v1alpha1.JobRunSyncMetadata"> & { /** * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * @generated from field: string table = 2; */ - table = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + table: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobRunSyncMetadata"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobRunSyncMetadata { - return new JobRunSyncMetadata().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobRunSyncMetadata { - return new JobRunSyncMetadata().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobRunSyncMetadata { - return new JobRunSyncMetadata().fromJsonString(jsonString, options); - } - - static equals(a: JobRunSyncMetadata | PlainMessage | undefined, b: JobRunSyncMetadata | PlainMessage | undefined): boolean { - return proto3.util.equals(JobRunSyncMetadata, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobRunSyncMetadata. + * Use `create(JobRunSyncMetadataSchema)` to create a new message. + */ +export const JobRunSyncMetadataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 99); /** * @generated from message mgmt.v1alpha1.JobRunEventMetadata */ -export class JobRunEventMetadata extends Message { +export type JobRunEventMetadata = Message<"mgmt.v1alpha1.JobRunEventMetadata"> & { /** * @generated from oneof mgmt.v1alpha1.JobRunEventMetadata.metadata */ @@ -5098,49 +2690,29 @@ export class JobRunEventMetadata extends Message { */ value: JobRunSyncMetadata; case: "syncMetadata"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobRunEventMetadata"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sync_metadata", kind: "message", T: JobRunSyncMetadata, oneof: "metadata" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobRunEventMetadata { - return new JobRunEventMetadata().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobRunEventMetadata { - return new JobRunEventMetadata().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobRunEventMetadata { - return new JobRunEventMetadata().fromJsonString(jsonString, options); - } - - static equals(a: JobRunEventMetadata | PlainMessage | undefined, b: JobRunEventMetadata | PlainMessage | undefined): boolean { - return proto3.util.equals(JobRunEventMetadata, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mgmt.v1alpha1.JobRunEventMetadata. + * Use `create(JobRunEventMetadataSchema)` to create a new message. + */ +export const JobRunEventMetadataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 100); /** * @generated from message mgmt.v1alpha1.JobRunEvent */ -export class JobRunEvent extends Message { +export type JobRunEvent = Message<"mgmt.v1alpha1.JobRunEvent"> & { /** * @generated from field: int64 id = 1; */ - id = protoInt64.zero; + id: bigint; /** * @generated from field: string type = 2; */ - type = ""; + type: string; /** * @generated from field: google.protobuf.Timestamp start_time = 3; @@ -5160,302 +2732,157 @@ export class JobRunEvent extends Message { /** * @generated from field: repeated mgmt.v1alpha1.JobRunEventTask tasks = 6; */ - tasks: JobRunEventTask[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobRunEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "start_time", kind: "message", T: Timestamp }, - { no: 4, name: "close_time", kind: "message", T: Timestamp }, - { no: 5, name: "metadata", kind: "message", T: JobRunEventMetadata }, - { no: 6, name: "tasks", kind: "message", T: JobRunEventTask, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobRunEvent { - return new JobRunEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobRunEvent { - return new JobRunEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobRunEvent { - return new JobRunEvent().fromJsonString(jsonString, options); - } - - static equals(a: JobRunEvent | PlainMessage | undefined, b: JobRunEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(JobRunEvent, a, b); - } -} + tasks: JobRunEventTask[]; +}; + +/** + * Describes the message mgmt.v1alpha1.JobRunEvent. + * Use `create(JobRunEventSchema)` to create a new message. + */ +export const JobRunEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 101); /** * @generated from message mgmt.v1alpha1.GetJobRunEventsRequest */ -export class GetJobRunEventsRequest extends Message { +export type GetJobRunEventsRequest = Message<"mgmt.v1alpha1.GetJobRunEventsRequest"> & { /** * @generated from field: string job_run_id = 1; */ - jobRunId = ""; + jobRunId: string; /** * @generated from field: string account_id = 2; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + accountId: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRunEventsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRunEventsRequest { - return new GetJobRunEventsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRunEventsRequest { - return new GetJobRunEventsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRunEventsRequest { - return new GetJobRunEventsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobRunEventsRequest | PlainMessage | undefined, b: GetJobRunEventsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRunEventsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobRunEventsRequest. + * Use `create(GetJobRunEventsRequestSchema)` to create a new message. + */ +export const GetJobRunEventsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 102); /** * @generated from message mgmt.v1alpha1.GetJobRunEventsResponse */ -export class GetJobRunEventsResponse extends Message { +export type GetJobRunEventsResponse = Message<"mgmt.v1alpha1.GetJobRunEventsResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.JobRunEvent events = 1; */ - events: JobRunEvent[] = []; + events: JobRunEvent[]; /** * @generated from field: bool is_run_complete = 2; */ - isRunComplete = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + isRunComplete: boolean; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRunEventsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "events", kind: "message", T: JobRunEvent, repeated: true }, - { no: 2, name: "is_run_complete", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRunEventsResponse { - return new GetJobRunEventsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRunEventsResponse { - return new GetJobRunEventsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRunEventsResponse { - return new GetJobRunEventsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobRunEventsResponse | PlainMessage | undefined, b: GetJobRunEventsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRunEventsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobRunEventsResponse. + * Use `create(GetJobRunEventsResponseSchema)` to create a new message. + */ +export const GetJobRunEventsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 103); /** * @generated from message mgmt.v1alpha1.DeleteJobRunRequest */ -export class DeleteJobRunRequest extends Message { +export type DeleteJobRunRequest = Message<"mgmt.v1alpha1.DeleteJobRunRequest"> & { /** * @generated from field: string job_run_id = 1; */ - jobRunId = ""; + jobRunId: string; /** * @generated from field: string account_id = 2; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + accountId: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteJobRunRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteJobRunRequest { - return new DeleteJobRunRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteJobRunRequest { - return new DeleteJobRunRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteJobRunRequest { - return new DeleteJobRunRequest().fromJsonString(jsonString, options); - } - - static equals(a: DeleteJobRunRequest | PlainMessage | undefined, b: DeleteJobRunRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteJobRunRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteJobRunRequest. + * Use `create(DeleteJobRunRequestSchema)` to create a new message. + */ +export const DeleteJobRunRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 104); /** * @generated from message mgmt.v1alpha1.DeleteJobRunResponse */ -export class DeleteJobRunResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteJobRunResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +export type DeleteJobRunResponse = Message<"mgmt.v1alpha1.DeleteJobRunResponse"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteJobRunResponse { - return new DeleteJobRunResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteJobRunResponse { - return new DeleteJobRunResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteJobRunResponse { - return new DeleteJobRunResponse().fromJsonString(jsonString, options); - } - - static equals(a: DeleteJobRunResponse | PlainMessage | undefined, b: DeleteJobRunResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteJobRunResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteJobRunResponse. + * Use `create(DeleteJobRunResponseSchema)` to create a new message. + */ +export const DeleteJobRunResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 105); /** * @generated from message mgmt.v1alpha1.TerminateJobRunRequest */ -export class TerminateJobRunRequest extends Message { +export type TerminateJobRunRequest = Message<"mgmt.v1alpha1.TerminateJobRunRequest"> & { /** * @generated from field: string job_run_id = 1; */ - jobRunId = ""; + jobRunId: string; /** * @generated from field: string account_id = 2; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TerminateJobRunRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + accountId: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): TerminateJobRunRequest { - return new TerminateJobRunRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TerminateJobRunRequest { - return new TerminateJobRunRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TerminateJobRunRequest { - return new TerminateJobRunRequest().fromJsonString(jsonString, options); - } - - static equals(a: TerminateJobRunRequest | PlainMessage | undefined, b: TerminateJobRunRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(TerminateJobRunRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.TerminateJobRunRequest. + * Use `create(TerminateJobRunRequestSchema)` to create a new message. + */ +export const TerminateJobRunRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 106); /** * @generated from message mgmt.v1alpha1.TerminateJobRunResponse */ -export class TerminateJobRunResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TerminateJobRunResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TerminateJobRunResponse { - return new TerminateJobRunResponse().fromBinary(bytes, options); - } +export type TerminateJobRunResponse = Message<"mgmt.v1alpha1.TerminateJobRunResponse"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): TerminateJobRunResponse { - return new TerminateJobRunResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TerminateJobRunResponse { - return new TerminateJobRunResponse().fromJsonString(jsonString, options); - } - - static equals(a: TerminateJobRunResponse | PlainMessage | undefined, b: TerminateJobRunResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(TerminateJobRunResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.TerminateJobRunResponse. + * Use `create(TerminateJobRunResponseSchema)` to create a new message. + */ +export const TerminateJobRunResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 107); /** * @generated from message mgmt.v1alpha1.GetJobRunLogsStreamRequest */ -export class GetJobRunLogsStreamRequest extends Message { +export type GetJobRunLogsStreamRequest = Message<"mgmt.v1alpha1.GetJobRunLogsStreamRequest"> & { /** * @generated from field: string job_run_id = 1; */ - jobRunId = ""; + jobRunId: string; /** * @generated from field: string account_id = 2; */ - accountId = ""; + accountId: string; /** * The time window in which to retrieve the logs * * @generated from field: mgmt.v1alpha1.LogWindow window = 3; */ - window = LogWindow.NO_TIME_UNSPECIFIED; + window: LogWindow; /** * Whether or not to tail the stream. Note: only works with k8s-pods and is not currently supported with Loki logs * * @generated from field: bool should_tail = 4; */ - shouldTail = false; + shouldTail: boolean; /** * Optionally provide a max log limit @@ -5469,94 +2896,48 @@ export class GetJobRunLogsStreamRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRunLogsStreamRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "window", kind: "enum", T: proto3.getEnumType(LogWindow) }, - { no: 4, name: "should_tail", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "max_log_lines", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "log_levels", kind: "enum", T: proto3.getEnumType(LogLevel), repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRunLogsStreamRequest { - return new GetJobRunLogsStreamRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRunLogsStreamRequest { - return new GetJobRunLogsStreamRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRunLogsStreamRequest { - return new GetJobRunLogsStreamRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobRunLogsStreamRequest | PlainMessage | undefined, b: GetJobRunLogsStreamRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRunLogsStreamRequest, a, b); - } -} + logLevels: LogLevel[]; +}; + +/** + * Describes the message mgmt.v1alpha1.GetJobRunLogsStreamRequest. + * Use `create(GetJobRunLogsStreamRequestSchema)` to create a new message. + */ +export const GetJobRunLogsStreamRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 108); /** * @generated from message mgmt.v1alpha1.GetJobRunLogsStreamResponse */ -export class GetJobRunLogsStreamResponse extends Message { +export type GetJobRunLogsStreamResponse = Message<"mgmt.v1alpha1.GetJobRunLogsStreamResponse"> & { /** * @generated from field: string log_line = 1; */ - logLine = ""; + logLine: string; /** * @generated from field: optional google.protobuf.Timestamp timestamp = 2; */ timestamp?: Timestamp; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobRunLogsStreamResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "log_line", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "timestamp", kind: "message", T: Timestamp, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobRunLogsStreamResponse { - return new GetJobRunLogsStreamResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobRunLogsStreamResponse { - return new GetJobRunLogsStreamResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobRunLogsStreamResponse { - return new GetJobRunLogsStreamResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobRunLogsStreamResponse | PlainMessage | undefined, b: GetJobRunLogsStreamResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobRunLogsStreamResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobRunLogsStreamResponse. + * Use `create(GetJobRunLogsStreamResponseSchema)` to create a new message. + */ +export const GetJobRunLogsStreamResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 109); /** * @generated from message mgmt.v1alpha1.SetJobWorkflowOptionsRequest */ -export class SetJobWorkflowOptionsRequest extends Message { +export type SetJobWorkflowOptionsRequest = Message<"mgmt.v1alpha1.SetJobWorkflowOptionsRequest"> & { /** * The unique identifier of the job * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * The workflow options object. The entire object must be provided and will fully overwrite the previous result @@ -5564,83 +2945,42 @@ export class SetJobWorkflowOptionsRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetJobWorkflowOptionsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "worfklow_options", kind: "message", T: WorkflowOptions }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetJobWorkflowOptionsRequest { - return new SetJobWorkflowOptionsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetJobWorkflowOptionsRequest { - return new SetJobWorkflowOptionsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetJobWorkflowOptionsRequest { - return new SetJobWorkflowOptionsRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetJobWorkflowOptionsRequest | PlainMessage | undefined, b: SetJobWorkflowOptionsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetJobWorkflowOptionsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetJobWorkflowOptionsRequest. + * Use `create(SetJobWorkflowOptionsRequestSchema)` to create a new message. + */ +export const SetJobWorkflowOptionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 110); /** * @generated from message mgmt.v1alpha1.SetJobWorkflowOptionsResponse */ -export class SetJobWorkflowOptionsResponse extends Message { +export type SetJobWorkflowOptionsResponse = Message<"mgmt.v1alpha1.SetJobWorkflowOptionsResponse"> & { /** * @generated from field: mgmt.v1alpha1.Job job = 1; */ job?: Job; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetJobWorkflowOptionsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job", kind: "message", T: Job }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetJobWorkflowOptionsResponse { - return new SetJobWorkflowOptionsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetJobWorkflowOptionsResponse { - return new SetJobWorkflowOptionsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetJobWorkflowOptionsResponse { - return new SetJobWorkflowOptionsResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetJobWorkflowOptionsResponse | PlainMessage | undefined, b: SetJobWorkflowOptionsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetJobWorkflowOptionsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetJobWorkflowOptionsResponse. + * Use `create(SetJobWorkflowOptionsResponseSchema)` to create a new message. + */ +export const SetJobWorkflowOptionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 111); /** * @generated from message mgmt.v1alpha1.SetJobSyncOptionsRequest */ -export class SetJobSyncOptionsRequest extends Message { +export type SetJobSyncOptionsRequest = Message<"mgmt.v1alpha1.SetJobSyncOptionsRequest"> & { /** * The unique identifier of the job * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * The sync options object. The entire object must be provided and will fully overwrite the previous result @@ -5648,502 +2988,267 @@ export class SetJobSyncOptionsRequest extends Message * @generated from field: mgmt.v1alpha1.ActivityOptions sync_options = 2; */ syncOptions?: ActivityOptions; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetJobSyncOptionsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "sync_options", kind: "message", T: ActivityOptions }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetJobSyncOptionsRequest { - return new SetJobSyncOptionsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetJobSyncOptionsRequest { - return new SetJobSyncOptionsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetJobSyncOptionsRequest { - return new SetJobSyncOptionsRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetJobSyncOptionsRequest | PlainMessage | undefined, b: SetJobSyncOptionsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetJobSyncOptionsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetJobSyncOptionsRequest. + * Use `create(SetJobSyncOptionsRequestSchema)` to create a new message. + */ +export const SetJobSyncOptionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 112); /** * @generated from message mgmt.v1alpha1.SetJobSyncOptionsResponse */ -export class SetJobSyncOptionsResponse extends Message { +export type SetJobSyncOptionsResponse = Message<"mgmt.v1alpha1.SetJobSyncOptionsResponse"> & { /** * @generated from field: mgmt.v1alpha1.Job job = 1; */ job?: Job; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetJobSyncOptionsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job", kind: "message", T: Job }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetJobSyncOptionsResponse { - return new SetJobSyncOptionsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetJobSyncOptionsResponse { - return new SetJobSyncOptionsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetJobSyncOptionsResponse { - return new SetJobSyncOptionsResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetJobSyncOptionsResponse | PlainMessage | undefined, b: SetJobSyncOptionsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetJobSyncOptionsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetJobSyncOptionsResponse. + * Use `create(SetJobSyncOptionsResponseSchema)` to create a new message. + */ +export const SetJobSyncOptionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 113); /** * @generated from message mgmt.v1alpha1.ValidateJobMappingsRequest */ -export class ValidateJobMappingsRequest extends Message { +export type ValidateJobMappingsRequest = Message<"mgmt.v1alpha1.ValidateJobMappingsRequest"> & { /** * The unique account identifier that this job will be associated with * * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * @generated from field: repeated mgmt.v1alpha1.JobMapping mappings = 2; */ - mappings: JobMapping[] = []; + mappings: JobMapping[]; /** * @generated from field: string connection_id = 3; */ - connectionId = ""; + connectionId: string; /** * @generated from field: repeated mgmt.v1alpha1.VirtualForeignConstraint virtual_foreign_keys = 4; */ - virtualForeignKeys: VirtualForeignConstraint[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ValidateJobMappingsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "mappings", kind: "message", T: JobMapping, repeated: true }, - { no: 3, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "virtual_foreign_keys", kind: "message", T: VirtualForeignConstraint, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ValidateJobMappingsRequest { - return new ValidateJobMappingsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ValidateJobMappingsRequest { - return new ValidateJobMappingsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ValidateJobMappingsRequest { - return new ValidateJobMappingsRequest().fromJsonString(jsonString, options); - } - - static equals(a: ValidateJobMappingsRequest | PlainMessage | undefined, b: ValidateJobMappingsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ValidateJobMappingsRequest, a, b); - } -} + virtualForeignKeys: VirtualForeignConstraint[]; +}; + +/** + * Describes the message mgmt.v1alpha1.ValidateJobMappingsRequest. + * Use `create(ValidateJobMappingsRequestSchema)` to create a new message. + */ +export const ValidateJobMappingsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 114); /** * @generated from message mgmt.v1alpha1.ColumnError */ -export class ColumnError extends Message { +export type ColumnError = Message<"mgmt.v1alpha1.ColumnError"> & { /** * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * @generated from field: string table = 2; */ - table = ""; + table: string; /** * @generated from field: string column = 3; */ - column = ""; + column: string; /** * @generated from field: repeated string errors = 4; */ - errors: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ColumnError"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "column", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "errors", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ColumnError { - return new ColumnError().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ColumnError { - return new ColumnError().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ColumnError { - return new ColumnError().fromJsonString(jsonString, options); - } - - static equals(a: ColumnError | PlainMessage | undefined, b: ColumnError | PlainMessage | undefined): boolean { - return proto3.util.equals(ColumnError, a, b); - } -} + errors: string[]; +}; + +/** + * Describes the message mgmt.v1alpha1.ColumnError. + * Use `create(ColumnErrorSchema)` to create a new message. + */ +export const ColumnErrorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 115); /** * @generated from message mgmt.v1alpha1.DatabaseError */ -export class DatabaseError extends Message { +export type DatabaseError = Message<"mgmt.v1alpha1.DatabaseError"> & { /** * @generated from field: repeated string errors = 1; */ - errors: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DatabaseError"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "errors", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); + errors: string[]; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): DatabaseError { - return new DatabaseError().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DatabaseError { - return new DatabaseError().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DatabaseError { - return new DatabaseError().fromJsonString(jsonString, options); - } - - static equals(a: DatabaseError | PlainMessage | undefined, b: DatabaseError | PlainMessage | undefined): boolean { - return proto3.util.equals(DatabaseError, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DatabaseError. + * Use `create(DatabaseErrorSchema)` to create a new message. + */ +export const DatabaseErrorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 116); /** * @generated from message mgmt.v1alpha1.ValidateJobMappingsResponse */ -export class ValidateJobMappingsResponse extends Message { +export type ValidateJobMappingsResponse = Message<"mgmt.v1alpha1.ValidateJobMappingsResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.ColumnError column_errors = 1; */ - columnErrors: ColumnError[] = []; + columnErrors: ColumnError[]; /** * @generated from field: mgmt.v1alpha1.DatabaseError database_errors = 2; */ databaseErrors?: DatabaseError; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ValidateJobMappingsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "column_errors", kind: "message", T: ColumnError, repeated: true }, - { no: 2, name: "database_errors", kind: "message", T: DatabaseError }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ValidateJobMappingsResponse { - return new ValidateJobMappingsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ValidateJobMappingsResponse { - return new ValidateJobMappingsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ValidateJobMappingsResponse { - return new ValidateJobMappingsResponse().fromJsonString(jsonString, options); - } - - static equals(a: ValidateJobMappingsResponse | PlainMessage | undefined, b: ValidateJobMappingsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ValidateJobMappingsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ValidateJobMappingsResponse. + * Use `create(ValidateJobMappingsResponseSchema)` to create a new message. + */ +export const ValidateJobMappingsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 117); /** * @generated from message mgmt.v1alpha1.VirtualForeignKey */ -export class VirtualForeignKey extends Message { +export type VirtualForeignKey = Message<"mgmt.v1alpha1.VirtualForeignKey"> & { /** * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * @generated from field: string table = 2; */ - table = ""; + table: string; /** * @generated from field: repeated string columns = 3; */ - columns: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.VirtualForeignKey"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "columns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VirtualForeignKey { - return new VirtualForeignKey().fromBinary(bytes, options); - } + columns: string[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): VirtualForeignKey { - return new VirtualForeignKey().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VirtualForeignKey { - return new VirtualForeignKey().fromJsonString(jsonString, options); - } - - static equals(a: VirtualForeignKey | PlainMessage | undefined, b: VirtualForeignKey | PlainMessage | undefined): boolean { - return proto3.util.equals(VirtualForeignKey, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.VirtualForeignKey. + * Use `create(VirtualForeignKeySchema)` to create a new message. + */ +export const VirtualForeignKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 118); /** * @generated from message mgmt.v1alpha1.VirtualForeignConstraint */ -export class VirtualForeignConstraint extends Message { +export type VirtualForeignConstraint = Message<"mgmt.v1alpha1.VirtualForeignConstraint"> & { /** * @generated from field: string schema = 1; */ - schema = ""; + schema: string; /** * @generated from field: string table = 2; */ - table = ""; + table: string; /** * @generated from field: repeated string columns = 3; */ - columns: string[] = []; + columns: string[]; /** * @generated from field: mgmt.v1alpha1.VirtualForeignKey foreign_key = 4; */ foreignKey?: VirtualForeignKey; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.VirtualForeignConstraint"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "table", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "columns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "foreign_key", kind: "message", T: VirtualForeignKey }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VirtualForeignConstraint { - return new VirtualForeignConstraint().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VirtualForeignConstraint { - return new VirtualForeignConstraint().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VirtualForeignConstraint { - return new VirtualForeignConstraint().fromJsonString(jsonString, options); - } - - static equals(a: VirtualForeignConstraint | PlainMessage | undefined, b: VirtualForeignConstraint | PlainMessage | undefined): boolean { - return proto3.util.equals(VirtualForeignConstraint, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.VirtualForeignConstraint. + * Use `create(VirtualForeignConstraintSchema)` to create a new message. + */ +export const VirtualForeignConstraintSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 119); /** * @generated from message mgmt.v1alpha1.RunContextKey */ -export class RunContextKey extends Message { +export type RunContextKey = Message<"mgmt.v1alpha1.RunContextKey"> & { /** * The Neosync Run ID * * @generated from field: string job_run_id = 1; */ - jobRunId = ""; + jobRunId: string; /** * An opaque identifier that will be used to store specific items * * @generated from field: string external_id = 2; */ - externalId = ""; + externalId: string; /** * The Neosync Account ID * * @generated from field: string account_id = 3; */ - accountId = ""; + accountId: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.RunContextKey"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "external_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RunContextKey { - return new RunContextKey().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RunContextKey { - return new RunContextKey().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RunContextKey { - return new RunContextKey().fromJsonString(jsonString, options); - } - - static equals(a: RunContextKey | PlainMessage | undefined, b: RunContextKey | PlainMessage | undefined): boolean { - return proto3.util.equals(RunContextKey, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.RunContextKey. + * Use `create(RunContextKeySchema)` to create a new message. + */ +export const RunContextKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 120); /** * @generated from message mgmt.v1alpha1.GetRunContextRequest */ -export class GetRunContextRequest extends Message { +export type GetRunContextRequest = Message<"mgmt.v1alpha1.GetRunContextRequest"> & { /** * @generated from field: mgmt.v1alpha1.RunContextKey id = 1; */ id?: RunContextKey; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetRunContextRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "message", T: RunContextKey }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetRunContextRequest { - return new GetRunContextRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetRunContextRequest { - return new GetRunContextRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetRunContextRequest { - return new GetRunContextRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetRunContextRequest | PlainMessage | undefined, b: GetRunContextRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetRunContextRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetRunContextRequest. + * Use `create(GetRunContextRequestSchema)` to create a new message. + */ +export const GetRunContextRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 121); /** * @generated from message mgmt.v1alpha1.GetRunContextResponse */ -export class GetRunContextResponse extends Message { +export type GetRunContextResponse = Message<"mgmt.v1alpha1.GetRunContextResponse"> & { /** * @generated from field: bytes value = 1; */ - value = new Uint8Array(0); + value: Uint8Array; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetRunContextResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetRunContextResponse { - return new GetRunContextResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetRunContextResponse { - return new GetRunContextResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetRunContextResponse { - return new GetRunContextResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetRunContextResponse | PlainMessage | undefined, b: GetRunContextResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetRunContextResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetRunContextResponse. + * Use `create(GetRunContextResponseSchema)` to create a new message. + */ +export const GetRunContextResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 122); /** * @generated from message mgmt.v1alpha1.SetRunContextRequest */ -export class SetRunContextRequest extends Message { +export type SetRunContextRequest = Message<"mgmt.v1alpha1.SetRunContextRequest"> & { /** * @generated from field: mgmt.v1alpha1.RunContextKey id = 1; */ @@ -6154,72 +3259,33 @@ export class SetRunContextRequest extends Message { * * @generated from field: bytes value = 2; */ - value = new Uint8Array(0); + value: Uint8Array; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetRunContextRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "message", T: RunContextKey }, - { no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetRunContextRequest { - return new SetRunContextRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetRunContextRequest { - return new SetRunContextRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetRunContextRequest { - return new SetRunContextRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetRunContextRequest | PlainMessage | undefined, b: SetRunContextRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetRunContextRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetRunContextRequest. + * Use `create(SetRunContextRequestSchema)` to create a new message. + */ +export const SetRunContextRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 123); /** * @generated from message mgmt.v1alpha1.SetRunContextResponse */ -export class SetRunContextResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type SetRunContextResponse = Message<"mgmt.v1alpha1.SetRunContextResponse"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetRunContextResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetRunContextResponse { - return new SetRunContextResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetRunContextResponse { - return new SetRunContextResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetRunContextResponse { - return new SetRunContextResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetRunContextResponse | PlainMessage | undefined, b: SetRunContextResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetRunContextResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetRunContextResponse. + * Use `create(SetRunContextResponseSchema)` to create a new message. + */ +export const SetRunContextResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 124); /** * @generated from message mgmt.v1alpha1.SetRunContextsRequest */ -export class SetRunContextsRequest extends Message { +export type SetRunContextsRequest = Message<"mgmt.v1alpha1.SetRunContextsRequest"> & { /** * @generated from field: mgmt.v1alpha1.RunContextKey id = 1; */ @@ -6230,99 +3296,60 @@ export class SetRunContextsRequest extends Message { * * @generated from field: bytes value = 2; */ - value = new Uint8Array(0); - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + value: Uint8Array; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetRunContextsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "message", T: RunContextKey }, - { no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetRunContextsRequest { - return new SetRunContextsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetRunContextsRequest { - return new SetRunContextsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetRunContextsRequest { - return new SetRunContextsRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetRunContextsRequest | PlainMessage | undefined, b: SetRunContextsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetRunContextsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetRunContextsRequest. + * Use `create(SetRunContextsRequestSchema)` to create a new message. + */ +export const SetRunContextsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 125); /** * @generated from message mgmt.v1alpha1.SetRunContextsResponse */ -export class SetRunContextsResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetRunContextsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +export type SetRunContextsResponse = Message<"mgmt.v1alpha1.SetRunContextsResponse"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): SetRunContextsResponse { - return new SetRunContextsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetRunContextsResponse { - return new SetRunContextsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetRunContextsResponse { - return new SetRunContextsResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetRunContextsResponse | PlainMessage | undefined, b: SetRunContextsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetRunContextsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetRunContextsResponse. + * Use `create(SetRunContextsResponseSchema)` to create a new message. + */ +export const SetRunContextsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 126); /** * @generated from message mgmt.v1alpha1.JobHook */ -export class JobHook extends Message { +export type JobHook = Message<"mgmt.v1alpha1.JobHook"> & { /** * The unique identifier of this hook. * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * Name of the hook for display/reference. * * @generated from field: string name = 2; */ - name = ""; + name: string; /** * Description of what this hook does. * * @generated from field: string description = 3; */ - description = ""; + description: string; /** * The unique identifier of the job this hook belongs to. * * @generated from field: string job_id = 4; */ - jobId = ""; + jobId: string; /** * Hook-type specific configuration. @@ -6336,7 +3363,7 @@ export class JobHook extends Message { * * @generated from field: string created_by_user_id = 6; */ - createdByUserId = ""; + createdByUserId: string; /** * The time this hook was created. @@ -6350,7 +3377,7 @@ export class JobHook extends Message { * * @generated from field: string updated_by_user_id = 8; */ - updatedByUserId = ""; + updatedByUserId: string; /** * The last time this hook was updated. @@ -6364,7 +3391,7 @@ export class JobHook extends Message { * * @generated from field: bool enabled = 10; */ - enabled = false; + enabled: boolean; /** * The priority of the hook (0-100). This determines the execution order. Lower values are higher priority (priority=0 is the highest). @@ -6372,63 +3399,33 @@ export class JobHook extends Message { * * @generated from field: uint32 priority = 11; */ - priority = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobHook"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "config", kind: "message", T: JobHookConfig }, - { no: 6, name: "created_by_user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "created_at", kind: "message", T: Timestamp }, - { no: 8, name: "updated_by_user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "updated_at", kind: "message", T: Timestamp }, - { no: 10, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 11, name: "priority", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobHook { - return new JobHook().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobHook { - return new JobHook().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobHook { - return new JobHook().fromJsonString(jsonString, options); - } - - static equals(a: JobHook | PlainMessage | undefined, b: JobHook | PlainMessage | undefined): boolean { - return proto3.util.equals(JobHook, a, b); - } -} + priority: number; +}; + +/** + * Describes the message mgmt.v1alpha1.JobHook. + * Use `create(JobHookSchema)` to create a new message. + */ +export const JobHookSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 127); /** * @generated from message mgmt.v1alpha1.NewJobHook */ -export class NewJobHook extends Message { +export type NewJobHook = Message<"mgmt.v1alpha1.NewJobHook"> & { /** * Name of the hook for display/reference. * * @generated from field: string name = 1; */ - name = ""; + name: string; /** * Description of what this hook does. * * @generated from field: string description = 2; */ - description = ""; + description: string; /** * Hook-type specific configuration. @@ -6442,7 +3439,7 @@ export class NewJobHook extends Message { * * @generated from field: bool enabled = 4; */ - enabled = false; + enabled: boolean; /** * The priority of the hook (0-100). This determines the execution order. Lower values are higher priority (priority=0 is the highest). @@ -6450,46 +3447,22 @@ export class NewJobHook extends Message { * * @generated from field: uint32 priority = 5; */ - priority = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.NewJobHook"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "config", kind: "message", T: JobHookConfig }, - { no: 4, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "priority", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewJobHook { - return new NewJobHook().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewJobHook { - return new NewJobHook().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewJobHook { - return new NewJobHook().fromJsonString(jsonString, options); - } - - static equals(a: NewJobHook | PlainMessage | undefined, b: NewJobHook | PlainMessage | undefined): boolean { - return proto3.util.equals(NewJobHook, a, b); - } -} + priority: number; +}; + +/** + * Describes the message mgmt.v1alpha1.NewJobHook. + * Use `create(NewJobHookSchema)` to create a new message. + */ +export const NewJobHookSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 128); /** * Contains the specific hook type configurations. * * @generated from message mgmt.v1alpha1.JobHookConfig */ -export class JobHookConfig extends Message { +export type JobHookConfig = Message<"mgmt.v1alpha1.JobHookConfig"> & { /** * @generated from oneof mgmt.v1alpha1.JobHookConfig.config */ @@ -6501,55 +3474,35 @@ export class JobHookConfig extends Message { */ value: JobHookConfig_JobSqlHook; case: "sql"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobHookConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 5, name: "sql", kind: "message", T: JobHookConfig_JobSqlHook, oneof: "config" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobHookConfig { - return new JobHookConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobHookConfig { - return new JobHookConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobHookConfig { - return new JobHookConfig().fromJsonString(jsonString, options); - } - - static equals(a: JobHookConfig | PlainMessage | undefined, b: JobHookConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(JobHookConfig, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; /** - * Configuration for SQL-based hooks + * Describes the message mgmt.v1alpha1.JobHookConfig. + * Use `create(JobHookConfigSchema)` to create a new message. + */ +export const JobHookConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 129); + +/** + * Configuration for SQL-based hooks * * @generated from message mgmt.v1alpha1.JobHookConfig.JobSqlHook */ -export class JobHookConfig_JobSqlHook extends Message { +export type JobHookConfig_JobSqlHook = Message<"mgmt.v1alpha1.JobHookConfig.JobSqlHook"> & { /** * The SQL query to execute * * @generated from field: string query = 1; */ - query = ""; + query: string; /** * Unique identifier of the Neosync connection to run this hook for. Must be a connection id that is present in the job. * * @generated from field: string connection_id = 2; */ - connectionId = ""; + connectionId: string; /** * The timing of when the hook will run @@ -6557,41 +3510,19 @@ export class JobHookConfig_JobSqlHook extends Message * @generated from field: mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing timing = 3; */ timing?: JobHookConfig_JobSqlHook_Timing; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobHookConfig.JobSqlHook"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "timing", kind: "message", T: JobHookConfig_JobSqlHook_Timing }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobHookConfig_JobSqlHook { - return new JobHookConfig_JobSqlHook().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobHookConfig_JobSqlHook { - return new JobHookConfig_JobSqlHook().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobHookConfig_JobSqlHook { - return new JobHookConfig_JobSqlHook().fromJsonString(jsonString, options); - } - - static equals(a: JobHookConfig_JobSqlHook | PlainMessage | undefined, b: JobHookConfig_JobSqlHook | PlainMessage | undefined): boolean { - return proto3.util.equals(JobHookConfig_JobSqlHook, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobHookConfig.JobSqlHook. + * Use `create(JobHookConfig_JobSqlHookSchema)` to create a new message. + */ +export const JobHookConfig_JobSqlHookSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 129, 0); /** * @generated from message mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing */ -export class JobHookConfig_JobSqlHook_Timing extends Message { +export type JobHookConfig_JobSqlHook_Timing = Message<"mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing"> & { /** * @generated from oneof mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing.timing */ @@ -6614,36 +3545,15 @@ export class JobHookConfig_JobSqlHook_Timing extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 3, name: "pre_sync", kind: "message", T: JobHookTimingPreSync, oneof: "timing" }, - { no: 4, name: "post_sync", kind: "message", T: JobHookTimingPostSync, oneof: "timing" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobHookConfig_JobSqlHook_Timing { - return new JobHookConfig_JobSqlHook_Timing().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobHookConfig_JobSqlHook_Timing { - return new JobHookConfig_JobSqlHook_Timing().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobHookConfig_JobSqlHook_Timing { - return new JobHookConfig_JobSqlHook_Timing().fromJsonString(jsonString, options); - } - - static equals(a: JobHookConfig_JobSqlHook_Timing | PlainMessage | undefined, b: JobHookConfig_JobSqlHook_Timing | PlainMessage | undefined): boolean { - return proto3.util.equals(JobHookConfig_JobSqlHook_Timing, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mgmt.v1alpha1.JobHookConfig.JobSqlHook.Timing. + * Use `create(JobHookConfig_JobSqlHook_TimingSchema)` to create a new message. + */ +export const JobHookConfig_JobSqlHook_TimingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 129, 0, 0); /** * Configures the job hook to run before the first table sync. @@ -6652,233 +3562,117 @@ export class JobHookConfig_JobSqlHook_Timing extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobHookTimingPreSync"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobHookTimingPreSync { - return new JobHookTimingPreSync().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobHookTimingPreSync { - return new JobHookTimingPreSync().fromJson(jsonValue, options); - } +export type JobHookTimingPreSync = Message<"mgmt.v1alpha1.JobHookTimingPreSync"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): JobHookTimingPreSync { - return new JobHookTimingPreSync().fromJsonString(jsonString, options); - } - - static equals(a: JobHookTimingPreSync | PlainMessage | undefined, b: JobHookTimingPreSync | PlainMessage | undefined): boolean { - return proto3.util.equals(JobHookTimingPreSync, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobHookTimingPreSync. + * Use `create(JobHookTimingPreSyncSchema)` to create a new message. + */ +export const JobHookTimingPreSyncSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 130); /** * Configures the job hook to run after the last table sync. * * @generated from message mgmt.v1alpha1.JobHookTimingPostSync */ -export class JobHookTimingPostSync extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.JobHookTimingPostSync"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobHookTimingPostSync { - return new JobHookTimingPostSync().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobHookTimingPostSync { - return new JobHookTimingPostSync().fromJson(jsonValue, options); - } +export type JobHookTimingPostSync = Message<"mgmt.v1alpha1.JobHookTimingPostSync"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): JobHookTimingPostSync { - return new JobHookTimingPostSync().fromJsonString(jsonString, options); - } - - static equals(a: JobHookTimingPostSync | PlainMessage | undefined, b: JobHookTimingPostSync | PlainMessage | undefined): boolean { - return proto3.util.equals(JobHookTimingPostSync, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.JobHookTimingPostSync. + * Use `create(JobHookTimingPostSyncSchema)` to create a new message. + */ +export const JobHookTimingPostSyncSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 131); /** * @generated from message mgmt.v1alpha1.GetJobHooksRequest */ -export class GetJobHooksRequest extends Message { +export type GetJobHooksRequest = Message<"mgmt.v1alpha1.GetJobHooksRequest"> & { /** * The unique identifier of the job * * @generated from field: string job_id = 1; */ - jobId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobHooksRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + jobId: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobHooksRequest { - return new GetJobHooksRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobHooksRequest { - return new GetJobHooksRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobHooksRequest { - return new GetJobHooksRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobHooksRequest | PlainMessage | undefined, b: GetJobHooksRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobHooksRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobHooksRequest. + * Use `create(GetJobHooksRequestSchema)` to create a new message. + */ +export const GetJobHooksRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 132); /** * @generated from message mgmt.v1alpha1.GetJobHooksResponse */ -export class GetJobHooksResponse extends Message { +export type GetJobHooksResponse = Message<"mgmt.v1alpha1.GetJobHooksResponse"> & { /** * The list of hooks found attached to the job * * @generated from field: repeated mgmt.v1alpha1.JobHook hooks = 1; */ - hooks: JobHook[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + hooks: JobHook[]; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobHooksResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "hooks", kind: "message", T: JobHook, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobHooksResponse { - return new GetJobHooksResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobHooksResponse { - return new GetJobHooksResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobHooksResponse { - return new GetJobHooksResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobHooksResponse | PlainMessage | undefined, b: GetJobHooksResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobHooksResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobHooksResponse. + * Use `create(GetJobHooksResponseSchema)` to create a new message. + */ +export const GetJobHooksResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 133); /** * @generated from message mgmt.v1alpha1.GetJobHookRequest */ -export class GetJobHookRequest extends Message { +export type GetJobHookRequest = Message<"mgmt.v1alpha1.GetJobHookRequest"> & { /** * The unique identifier of the hook * * @generated from field: string id = 1; */ - id = ""; + id: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobHookRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobHookRequest { - return new GetJobHookRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobHookRequest { - return new GetJobHookRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobHookRequest { - return new GetJobHookRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetJobHookRequest | PlainMessage | undefined, b: GetJobHookRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobHookRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobHookRequest. + * Use `create(GetJobHookRequestSchema)` to create a new message. + */ +export const GetJobHookRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 134); /** * @generated from message mgmt.v1alpha1.GetJobHookResponse */ -export class GetJobHookResponse extends Message { +export type GetJobHookResponse = Message<"mgmt.v1alpha1.GetJobHookResponse"> & { /** * The found hook * * @generated from field: mgmt.v1alpha1.JobHook hook = 1; */ hook?: JobHook; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetJobHookResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "hook", kind: "message", T: JobHook }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetJobHookResponse { - return new GetJobHookResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetJobHookResponse { - return new GetJobHookResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetJobHookResponse { - return new GetJobHookResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetJobHookResponse | PlainMessage | undefined, b: GetJobHookResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetJobHookResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetJobHookResponse. + * Use `create(GetJobHookResponseSchema)` to create a new message. + */ +export const GetJobHookResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 135); /** * @generated from message mgmt.v1alpha1.CreateJobHookRequest */ -export class CreateJobHookRequest extends Message { +export type CreateJobHookRequest = Message<"mgmt.v1alpha1.CreateJobHookRequest"> & { /** * The unique identifier of the job * * @generated from field: string job_id = 1; */ - jobId = ""; + jobId: string; /** * The new hook configuration @@ -6886,255 +3680,135 @@ export class CreateJobHookRequest extends Message { * @generated from field: mgmt.v1alpha1.NewJobHook hook = 2; */ hook?: NewJobHook; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateJobHookRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "hook", kind: "message", T: NewJobHook }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateJobHookRequest { - return new CreateJobHookRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateJobHookRequest { - return new CreateJobHookRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateJobHookRequest { - return new CreateJobHookRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateJobHookRequest | PlainMessage | undefined, b: CreateJobHookRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateJobHookRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateJobHookRequest. + * Use `create(CreateJobHookRequestSchema)` to create a new message. + */ +export const CreateJobHookRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 136); /** * @generated from message mgmt.v1alpha1.CreateJobHookResponse */ -export class CreateJobHookResponse extends Message { +export type CreateJobHookResponse = Message<"mgmt.v1alpha1.CreateJobHookResponse"> & { /** * The newly created hook * * @generated from field: mgmt.v1alpha1.JobHook hook = 1; */ hook?: JobHook; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateJobHookResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "hook", kind: "message", T: JobHook }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateJobHookResponse { - return new CreateJobHookResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateJobHookResponse { - return new CreateJobHookResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateJobHookResponse { - return new CreateJobHookResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateJobHookResponse | PlainMessage | undefined, b: CreateJobHookResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateJobHookResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateJobHookResponse. + * Use `create(CreateJobHookResponseSchema)` to create a new message. + */ +export const CreateJobHookResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 137); /** * @generated from message mgmt.v1alpha1.DeleteJobHookRequest */ -export class DeleteJobHookRequest extends Message { +export type DeleteJobHookRequest = Message<"mgmt.v1alpha1.DeleteJobHookRequest"> & { /** * The unique identifier of the hook * * @generated from field: string id = 1; */ - id = ""; + id: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteJobHookRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteJobHookRequest { - return new DeleteJobHookRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteJobHookRequest { - return new DeleteJobHookRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteJobHookRequest { - return new DeleteJobHookRequest().fromJsonString(jsonString, options); - } - - static equals(a: DeleteJobHookRequest | PlainMessage | undefined, b: DeleteJobHookRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteJobHookRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteJobHookRequest. + * Use `create(DeleteJobHookRequestSchema)` to create a new message. + */ +export const DeleteJobHookRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 138); /** * @generated from message mgmt.v1alpha1.DeleteJobHookResponse */ -export class DeleteJobHookResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteJobHookResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteJobHookResponse { - return new DeleteJobHookResponse().fromBinary(bytes, options); - } +export type DeleteJobHookResponse = Message<"mgmt.v1alpha1.DeleteJobHookResponse"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteJobHookResponse { - return new DeleteJobHookResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteJobHookResponse { - return new DeleteJobHookResponse().fromJsonString(jsonString, options); - } - - static equals(a: DeleteJobHookResponse | PlainMessage | undefined, b: DeleteJobHookResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteJobHookResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DeleteJobHookResponse. + * Use `create(DeleteJobHookResponseSchema)` to create a new message. + */ +export const DeleteJobHookResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 139); /** * @generated from message mgmt.v1alpha1.IsJobHookNameAvailableRequest */ -export class IsJobHookNameAvailableRequest extends Message { +export type IsJobHookNameAvailableRequest = Message<"mgmt.v1alpha1.IsJobHookNameAvailableRequest"> & { /** * The unique identifier of the job * * @generated from field: string job_id = 1; */ - jobId = ""; + jobId: string; /** * The hook name to check. * * @generated from field: string name = 2; */ - name = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsJobHookNameAvailableRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsJobHookNameAvailableRequest { - return new IsJobHookNameAvailableRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IsJobHookNameAvailableRequest { - return new IsJobHookNameAvailableRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsJobHookNameAvailableRequest { - return new IsJobHookNameAvailableRequest().fromJsonString(jsonString, options); - } + name: string; +}; - static equals(a: IsJobHookNameAvailableRequest | PlainMessage | undefined, b: IsJobHookNameAvailableRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(IsJobHookNameAvailableRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.IsJobHookNameAvailableRequest. + * Use `create(IsJobHookNameAvailableRequestSchema)` to create a new message. + */ +export const IsJobHookNameAvailableRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 140); /** * @generated from message mgmt.v1alpha1.IsJobHookNameAvailableResponse */ -export class IsJobHookNameAvailableResponse extends Message { +export type IsJobHookNameAvailableResponse = Message<"mgmt.v1alpha1.IsJobHookNameAvailableResponse"> & { /** * Whether or not the hook name is available * * @generated from field: bool is_available = 1; */ - isAvailable = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsJobHookNameAvailableResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "is_available", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsJobHookNameAvailableResponse { - return new IsJobHookNameAvailableResponse().fromBinary(bytes, options); - } + isAvailable: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): IsJobHookNameAvailableResponse { - return new IsJobHookNameAvailableResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsJobHookNameAvailableResponse { - return new IsJobHookNameAvailableResponse().fromJsonString(jsonString, options); - } - - static equals(a: IsJobHookNameAvailableResponse | PlainMessage | undefined, b: IsJobHookNameAvailableResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(IsJobHookNameAvailableResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.IsJobHookNameAvailableResponse. + * Use `create(IsJobHookNameAvailableResponseSchema)` to create a new message. + */ +export const IsJobHookNameAvailableResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 141); /** * @generated from message mgmt.v1alpha1.UpdateJobHookRequest */ -export class UpdateJobHookRequest extends Message { +export type UpdateJobHookRequest = Message<"mgmt.v1alpha1.UpdateJobHookRequest"> & { /** * The unique identifier of the hook * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * Name of the hook for display/reference. * * @generated from field: string name = 2; */ - name = ""; + name: string; /** * Description of what this hook does. * * @generated from field: string description = 3; */ - description = ""; + description: string; /** * Hook-type specific configuration. @@ -7148,7 +3822,7 @@ export class UpdateJobHookRequest extends Message { * * @generated from field: bool enabled = 5; */ - enabled = false; + enabled: boolean; /** * The priority of the hook (0-100). This determines the execution order. Lower values are higher priority (priority=0 is the highest). @@ -7156,212 +3830,105 @@ export class UpdateJobHookRequest extends Message { * * @generated from field: uint32 priority = 6; */ - priority = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateJobHookRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "config", kind: "message", T: JobHookConfig }, - { no: 5, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 6, name: "priority", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateJobHookRequest { - return new UpdateJobHookRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateJobHookRequest { - return new UpdateJobHookRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateJobHookRequest { - return new UpdateJobHookRequest().fromJsonString(jsonString, options); - } - - static equals(a: UpdateJobHookRequest | PlainMessage | undefined, b: UpdateJobHookRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateJobHookRequest, a, b); - } -} + priority: number; +}; + +/** + * Describes the message mgmt.v1alpha1.UpdateJobHookRequest. + * Use `create(UpdateJobHookRequestSchema)` to create a new message. + */ +export const UpdateJobHookRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 142); /** * @generated from message mgmt.v1alpha1.UpdateJobHookResponse */ -export class UpdateJobHookResponse extends Message { +export type UpdateJobHookResponse = Message<"mgmt.v1alpha1.UpdateJobHookResponse"> & { /** * The updated job hook * * @generated from field: mgmt.v1alpha1.JobHook hook = 1; */ hook?: JobHook; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateJobHookResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "hook", kind: "message", T: JobHook }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateJobHookResponse { - return new UpdateJobHookResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateJobHookResponse { - return new UpdateJobHookResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateJobHookResponse { - return new UpdateJobHookResponse().fromJsonString(jsonString, options); - } - - static equals(a: UpdateJobHookResponse | PlainMessage | undefined, b: UpdateJobHookResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateJobHookResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.UpdateJobHookResponse. + * Use `create(UpdateJobHookResponseSchema)` to create a new message. + */ +export const UpdateJobHookResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 143); /** * @generated from message mgmt.v1alpha1.SetJobHookEnabledRequest */ -export class SetJobHookEnabledRequest extends Message { +export type SetJobHookEnabledRequest = Message<"mgmt.v1alpha1.SetJobHookEnabledRequest"> & { /** * The unique identifier of the hook * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * Whether or not the hook is enabled. * * @generated from field: bool enabled = 2; */ - enabled = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetJobHookEnabledRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetJobHookEnabledRequest { - return new SetJobHookEnabledRequest().fromBinary(bytes, options); - } + enabled: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): SetJobHookEnabledRequest { - return new SetJobHookEnabledRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetJobHookEnabledRequest { - return new SetJobHookEnabledRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetJobHookEnabledRequest | PlainMessage | undefined, b: SetJobHookEnabledRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetJobHookEnabledRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetJobHookEnabledRequest. + * Use `create(SetJobHookEnabledRequestSchema)` to create a new message. + */ +export const SetJobHookEnabledRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 144); /** * @generated from message mgmt.v1alpha1.SetJobHookEnabledResponse */ -export class SetJobHookEnabledResponse extends Message { +export type SetJobHookEnabledResponse = Message<"mgmt.v1alpha1.SetJobHookEnabledResponse"> & { /** * The updated job hook * * @generated from field: mgmt.v1alpha1.JobHook hook = 1; */ hook?: JobHook; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetJobHookEnabledResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "hook", kind: "message", T: JobHook }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetJobHookEnabledResponse { - return new SetJobHookEnabledResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetJobHookEnabledResponse { - return new SetJobHookEnabledResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetJobHookEnabledResponse { - return new SetJobHookEnabledResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetJobHookEnabledResponse | PlainMessage | undefined, b: SetJobHookEnabledResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetJobHookEnabledResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetJobHookEnabledResponse. + * Use `create(SetJobHookEnabledResponseSchema)` to create a new message. + */ +export const SetJobHookEnabledResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 145); /** * @generated from message mgmt.v1alpha1.GetActiveJobHooksByTimingRequest */ -export class GetActiveJobHooksByTimingRequest extends Message { +export type GetActiveJobHooksByTimingRequest = Message<"mgmt.v1alpha1.GetActiveJobHooksByTimingRequest"> & { /** * The unique identifier of the job * * @generated from field: string job_id = 1; */ - jobId = ""; + jobId: string; /** * The timing desired. * * @generated from field: mgmt.v1alpha1.GetActiveJobHooksByTimingRequest.Timing timing = 2; */ - timing = GetActiveJobHooksByTimingRequest_Timing.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + timing: GetActiveJobHooksByTimingRequest_Timing; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetActiveJobHooksByTimingRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "timing", kind: "enum", T: proto3.getEnumType(GetActiveJobHooksByTimingRequest_Timing) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetActiveJobHooksByTimingRequest { - return new GetActiveJobHooksByTimingRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetActiveJobHooksByTimingRequest { - return new GetActiveJobHooksByTimingRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetActiveJobHooksByTimingRequest { - return new GetActiveJobHooksByTimingRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetActiveJobHooksByTimingRequest | PlainMessage | undefined, b: GetActiveJobHooksByTimingRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetActiveJobHooksByTimingRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetActiveJobHooksByTimingRequest. + * Use `create(GetActiveJobHooksByTimingRequestSchema)` to create a new message. + */ +export const GetActiveJobHooksByTimingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 146); /** * @generated from enum mgmt.v1alpha1.GetActiveJobHooksByTimingRequest.Timing @@ -7388,49 +3955,588 @@ export enum GetActiveJobHooksByTimingRequest_Timing { */ POSTSYNC = 2, } -// Retrieve enum metadata with: proto3.getEnumType(GetActiveJobHooksByTimingRequest_Timing) -proto3.util.setEnumType(GetActiveJobHooksByTimingRequest_Timing, "mgmt.v1alpha1.GetActiveJobHooksByTimingRequest.Timing", [ - { no: 0, name: "TIMING_UNSPECIFIED" }, - { no: 1, name: "TIMING_PRESYNC" }, - { no: 2, name: "TIMING_POSTSYNC" }, -]); + +/** + * Describes the enum mgmt.v1alpha1.GetActiveJobHooksByTimingRequest.Timing. + */ +export const GetActiveJobHooksByTimingRequest_TimingSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_job, 146, 0); /** * @generated from message mgmt.v1alpha1.GetActiveJobHooksByTimingResponse */ -export class GetActiveJobHooksByTimingResponse extends Message { +export type GetActiveJobHooksByTimingResponse = Message<"mgmt.v1alpha1.GetActiveJobHooksByTimingResponse"> & { /** * The active job hooks * * @generated from field: repeated mgmt.v1alpha1.JobHook hooks = 1; */ - hooks: JobHook[] = []; + hooks: JobHook[]; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message mgmt.v1alpha1.GetActiveJobHooksByTimingResponse. + * Use `create(GetActiveJobHooksByTimingResponseSchema)` to create a new message. + */ +export const GetActiveJobHooksByTimingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_job, 147); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetActiveJobHooksByTimingResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "hooks", kind: "message", T: JobHook, repeated: true }, - ]); +/** + * @generated from enum mgmt.v1alpha1.JobStatus + */ +export enum JobStatus { + /** + * @generated from enum value: JOB_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, - static fromBinary(bytes: Uint8Array, options?: Partial): GetActiveJobHooksByTimingResponse { - return new GetActiveJobHooksByTimingResponse().fromBinary(bytes, options); - } + /** + * @generated from enum value: JOB_STATUS_ENABLED = 1; + */ + ENABLED = 1, - static fromJson(jsonValue: JsonValue, options?: Partial): GetActiveJobHooksByTimingResponse { - return new GetActiveJobHooksByTimingResponse().fromJson(jsonValue, options); - } + /** + * @generated from enum value: JOB_STATUS_PAUSED = 3; + */ + PAUSED = 3, - static fromJsonString(jsonString: string, options?: Partial): GetActiveJobHooksByTimingResponse { - return new GetActiveJobHooksByTimingResponse().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: JOB_STATUS_DISABLED = 4; + */ + DISABLED = 4, +} - static equals(a: GetActiveJobHooksByTimingResponse | PlainMessage | undefined, b: GetActiveJobHooksByTimingResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetActiveJobHooksByTimingResponse, a, b); - } +/** + * Describes the enum mgmt.v1alpha1.JobStatus. + */ +export const JobStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_job, 0); + +/** + * @generated from enum mgmt.v1alpha1.ActivityStatus + */ +export enum ActivityStatus { + /** + * @generated from enum value: ACTIVITY_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ACTIVITY_STATUS_SCHEDULED = 1; + */ + SCHEDULED = 1, + + /** + * @generated from enum value: ACTIVITY_STATUS_STARTED = 2; + */ + STARTED = 2, + + /** + * @generated from enum value: ACTIVITY_STATUS_CANCELED = 3; + */ + CANCELED = 3, + + /** + * @generated from enum value: ACTIVITY_STATUS_FAILED = 4; + */ + FAILED = 4, } +/** + * Describes the enum mgmt.v1alpha1.ActivityStatus. + */ +export const ActivityStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_job, 1); + +/** + * An enumeration of job run statuses. + * + * @generated from enum mgmt.v1alpha1.JobRunStatus + */ +export enum JobRunStatus { + /** + * if the job run status is unknown + * + * @generated from enum value: JOB_RUN_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * the run is pending and has not started yet + * + * @generated from enum value: JOB_RUN_STATUS_PENDING = 1; + */ + PENDING = 1, + + /** + * the run is currently in progress + * + * @generated from enum value: JOB_RUN_STATUS_RUNNING = 2; + */ + RUNNING = 2, + + /** + * the run has successfully completed + * + * @generated from enum value: JOB_RUN_STATUS_COMPLETE = 3; + */ + COMPLETE = 3, + + /** + * the run ended with an error + * + * @generated from enum value: JOB_RUN_STATUS_ERROR = 4; + */ + ERROR = 4, + + /** + * the run was cancelled + * + * @generated from enum value: JOB_RUN_STATUS_CANCELED = 5; + */ + CANCELED = 5, + + /** + * the run was terminated + * + * @generated from enum value: JOB_RUN_STATUS_TERMINATED = 6; + */ + TERMINATED = 6, + + /** + * the run ended in failure + * + * @generated from enum value: JOB_RUN_STATUS_FAILED = 7; + */ + FAILED = 7, + + /** + * the run was ended pre-maturely due to timeout + * + * @generated from enum value: JOB_RUN_STATUS_TIMED_OUT = 8; + */ + TIMED_OUT = 8, +} + +/** + * Describes the enum mgmt.v1alpha1.JobRunStatus. + */ +export const JobRunStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_job, 2); + +/** + * @generated from enum mgmt.v1alpha1.LogWindow + */ +export enum LogWindow { + /** + * @generated from enum value: LOG_WINDOW_NO_TIME_UNSPECIFIED = 0; + */ + NO_TIME_UNSPECIFIED = 0, + + /** + * @generated from enum value: LOG_WINDOW_FIFTEEN_MIN = 1; + */ + FIFTEEN_MIN = 1, + + /** + * @generated from enum value: LOG_WINDOW_ONE_HOUR = 2; + */ + ONE_HOUR = 2, + + /** + * @generated from enum value: LOG_WINDOW_ONE_DAY = 3; + */ + ONE_DAY = 3, +} + +/** + * Describes the enum mgmt.v1alpha1.LogWindow. + */ +export const LogWindowSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_job, 3); + +/** + * @generated from enum mgmt.v1alpha1.LogLevel + */ +export enum LogLevel { + /** + * @generated from enum value: LOG_LEVEL_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: LOG_LEVEL_DEBUG = 1; + */ + DEBUG = 1, + + /** + * @generated from enum value: LOG_LEVEL_INFO = 2; + */ + INFO = 2, + + /** + * @generated from enum value: LOG_LEVEL_WARN = 3; + */ + WARN = 3, + + /** + * @generated from enum value: LOG_LEVEL_ERROR = 4; + */ + ERROR = 4, +} + +/** + * Describes the enum mgmt.v1alpha1.LogLevel. + */ +export const LogLevelSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_job, 4); + +/** + * @generated from service mgmt.v1alpha1.JobService + */ +export const JobService: GenService<{ + /** + * @generated from rpc mgmt.v1alpha1.JobService.GetJobs + */ + getJobs: { + methodKind: "unary"; + input: typeof GetJobsRequestSchema; + output: typeof GetJobsResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.GetJob + */ + getJob: { + methodKind: "unary"; + input: typeof GetJobRequestSchema; + output: typeof GetJobResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.CreateJob + */ + createJob: { + methodKind: "unary"; + input: typeof CreateJobRequestSchema; + output: typeof CreateJobResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.DeleteJob + */ + deleteJob: { + methodKind: "unary"; + input: typeof DeleteJobRequestSchema; + output: typeof DeleteJobResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.IsJobNameAvailable + */ + isJobNameAvailable: { + methodKind: "unary"; + input: typeof IsJobNameAvailableRequestSchema; + output: typeof IsJobNameAvailableResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobSchedule + */ + updateJobSchedule: { + methodKind: "unary"; + input: typeof UpdateJobScheduleRequestSchema; + output: typeof UpdateJobScheduleResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobSourceConnection + */ + updateJobSourceConnection: { + methodKind: "unary"; + input: typeof UpdateJobSourceConnectionRequestSchema; + output: typeof UpdateJobSourceConnectionResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.SetJobSourceSqlConnectionSubsets + */ + setJobSourceSqlConnectionSubsets: { + methodKind: "unary"; + input: typeof SetJobSourceSqlConnectionSubsetsRequestSchema; + output: typeof SetJobSourceSqlConnectionSubsetsResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobDestinationConnection + */ + updateJobDestinationConnection: { + methodKind: "unary"; + input: typeof UpdateJobDestinationConnectionRequestSchema; + output: typeof UpdateJobDestinationConnectionResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.DeleteJobDestinationConnection + */ + deleteJobDestinationConnection: { + methodKind: "unary"; + input: typeof DeleteJobDestinationConnectionRequestSchema; + output: typeof DeleteJobDestinationConnectionResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.CreateJobDestinationConnections + */ + createJobDestinationConnections: { + methodKind: "unary"; + input: typeof CreateJobDestinationConnectionsRequestSchema; + output: typeof CreateJobDestinationConnectionsResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.PauseJob + */ + pauseJob: { + methodKind: "unary"; + input: typeof PauseJobRequestSchema; + output: typeof PauseJobResponseSchema; + }, + /** + * Returns a list of recently invoked job runs baseds on the Temporal cron scheduler. This will return a list of job runs that include archived runs + * + * @generated from rpc mgmt.v1alpha1.JobService.GetJobRecentRuns + */ + getJobRecentRuns: { + methodKind: "unary"; + input: typeof GetJobRecentRunsRequestSchema; + output: typeof GetJobRecentRunsResponseSchema; + }, + /** + * Returns a list of runs that are scheduled for execution based on the Temporal cron scheduler. + * + * @generated from rpc mgmt.v1alpha1.JobService.GetJobNextRuns + */ + getJobNextRuns: { + methodKind: "unary"; + input: typeof GetJobNextRunsRequestSchema; + output: typeof GetJobNextRunsResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.GetJobStatus + */ + getJobStatus: { + methodKind: "unary"; + input: typeof GetJobStatusRequestSchema; + output: typeof GetJobStatusResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.GetJobStatuses + */ + getJobStatuses: { + methodKind: "unary"; + input: typeof GetJobStatusesRequestSchema; + output: typeof GetJobStatusesResponseSchema; + }, + /** + * Returns a list of job runs by either account or job + * + * @generated from rpc mgmt.v1alpha1.JobService.GetJobRuns + */ + getJobRuns: { + methodKind: "unary"; + input: typeof GetJobRunsRequestSchema; + output: typeof GetJobRunsResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.GetJobRunEvents + */ + getJobRunEvents: { + methodKind: "unary"; + input: typeof GetJobRunEventsRequestSchema; + output: typeof GetJobRunEventsResponseSchema; + }, + /** + * Returns a specific job run, along with any of its pending activities + * + * @generated from rpc mgmt.v1alpha1.JobService.GetJobRun + */ + getJobRun: { + methodKind: "unary"; + input: typeof GetJobRunRequestSchema; + output: typeof GetJobRunResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.DeleteJobRun + */ + deleteJobRun: { + methodKind: "unary"; + input: typeof DeleteJobRunRequestSchema; + output: typeof DeleteJobRunResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.CreateJobRun + */ + createJobRun: { + methodKind: "unary"; + input: typeof CreateJobRunRequestSchema; + output: typeof CreateJobRunResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.CancelJobRun + */ + cancelJobRun: { + methodKind: "unary"; + input: typeof CancelJobRunRequestSchema; + output: typeof CancelJobRunResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.JobService.TerminateJobRun + */ + terminateJobRun: { + methodKind: "unary"; + input: typeof TerminateJobRunRequestSchema; + output: typeof TerminateJobRunResponseSchema; + }, + /** + * Returns a stream of logs from the worker nodes that pertain to a specific job run + * + * @generated from rpc mgmt.v1alpha1.JobService.GetJobRunLogsStream + */ + getJobRunLogsStream: { + methodKind: "server_streaming"; + input: typeof GetJobRunLogsStreamRequestSchema; + output: typeof GetJobRunLogsStreamResponseSchema; + }, + /** + * Set any job workflow options. Must provide entire object as is it will fully override the previous configuration + * + * @generated from rpc mgmt.v1alpha1.JobService.SetJobWorkflowOptions + */ + setJobWorkflowOptions: { + methodKind: "unary"; + input: typeof SetJobWorkflowOptionsRequestSchema; + output: typeof SetJobWorkflowOptionsResponseSchema; + }, + /** + * Set the job sync options. Must provide entire object as it will fully override the previous configuration + * + * @generated from rpc mgmt.v1alpha1.JobService.SetJobSyncOptions + */ + setJobSyncOptions: { + methodKind: "unary"; + input: typeof SetJobSyncOptionsRequestSchema; + output: typeof SetJobSyncOptionsResponseSchema; + }, + /** + * validates that the jobmapping configured can run with table constraints + * + * @generated from rpc mgmt.v1alpha1.JobService.ValidateJobMappings + */ + validateJobMappings: { + methodKind: "unary"; + input: typeof ValidateJobMappingsRequestSchema; + output: typeof ValidateJobMappingsResponseSchema; + }, + /** + * Gets a run context to be used by a workflow run + * + * @generated from rpc mgmt.v1alpha1.JobService.GetRunContext + */ + getRunContext: { + methodKind: "unary"; + input: typeof GetRunContextRequestSchema; + output: typeof GetRunContextResponseSchema; + }, + /** + * Sets a run context to be used by a workflow run + * + * @generated from rpc mgmt.v1alpha1.JobService.SetRunContext + */ + setRunContext: { + methodKind: "unary"; + input: typeof SetRunContextRequestSchema; + output: typeof SetRunContextResponseSchema; + }, + /** + * Sets a stream of run contexts to be used by a workflow run + * + * @generated from rpc mgmt.v1alpha1.JobService.SetRunContexts + */ + setRunContexts: { + methodKind: "client_streaming"; + input: typeof SetRunContextsRequestSchema; + output: typeof SetRunContextsResponseSchema; + }, + /** + * Retrieves all job hooks + * + * @generated from rpc mgmt.v1alpha1.JobService.GetJobHooks + */ + getJobHooks: { + methodKind: "unary"; + input: typeof GetJobHooksRequestSchema; + output: typeof GetJobHooksResponseSchema; + }, + /** + * Retrieves a specific job hook + * + * @generated from rpc mgmt.v1alpha1.JobService.GetJobHook + */ + getJobHook: { + methodKind: "unary"; + input: typeof GetJobHookRequestSchema; + output: typeof GetJobHookResponseSchema; + }, + /** + * Creates a new job hook + * + * @generated from rpc mgmt.v1alpha1.JobService.CreateJobHook + */ + createJobHook: { + methodKind: "unary"; + input: typeof CreateJobHookRequestSchema; + output: typeof CreateJobHookResponseSchema; + }, + /** + * Removes a job hook + * + * @generated from rpc mgmt.v1alpha1.JobService.DeleteJobHook + */ + deleteJobHook: { + methodKind: "unary"; + input: typeof DeleteJobHookRequestSchema; + output: typeof DeleteJobHookResponseSchema; + }, + /** + * Check if a specific job hook name is available + * + * @generated from rpc mgmt.v1alpha1.JobService.IsJobHookNameAvailable + */ + isJobHookNameAvailable: { + methodKind: "unary"; + input: typeof IsJobHookNameAvailableRequestSchema; + output: typeof IsJobHookNameAvailableResponseSchema; + }, + /** + * Updates a job hook + * + * @generated from rpc mgmt.v1alpha1.JobService.UpdateJobHook + */ + updateJobHook: { + methodKind: "unary"; + input: typeof UpdateJobHookRequestSchema; + output: typeof UpdateJobHookResponseSchema; + }, + /** + * Enables or disables a job hook + * + * @generated from rpc mgmt.v1alpha1.JobService.SetJobHookEnabled + */ + setJobHookEnabled: { + methodKind: "unary"; + input: typeof SetJobHookEnabledRequestSchema; + output: typeof SetJobHookEnabledResponseSchema; + }, + /** + * Returns job hooks that are enabled by a specific timing. They will be sorted by priority, created_at, and id ascending. + * + * @generated from rpc mgmt.v1alpha1.JobService.GetActiveJobHooksByTiming + */ + getActiveJobHooksByTiming: { + methodKind: "unary"; + input: typeof GetActiveJobHooksByTimingRequestSchema; + output: typeof GetActiveJobHooksByTimingResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_mgmt_v1alpha1_job, 0); + diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/metrics-MetricsService_connectquery.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/metrics-MetricsService_connectquery.ts deleted file mode 100644 index d64c3d72e5..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/metrics-MetricsService_connectquery.ts +++ /dev/null @@ -1,39 +0,0 @@ -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/metrics.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { MethodKind } from "@bufbuild/protobuf"; -import { GetDailyMetricCountRequest, GetDailyMetricCountResponse, GetMetricCountRequest, GetMetricCountResponse } from "./metrics_pb.js"; - -/** - * Retrieve a timed range of records - * - * @generated from rpc mgmt.v1alpha1.MetricsService.GetDailyMetricCount - */ -export const getDailyMetricCount = { - localName: "getDailyMetricCount", - name: "GetDailyMetricCount", - kind: MethodKind.Unary, - I: GetDailyMetricCountRequest, - O: GetDailyMetricCountResponse, - service: { - typeName: "mgmt.v1alpha1.MetricsService" - } -} as const; - -/** - * For the given metric and time range, returns the total count found - * - * @generated from rpc mgmt.v1alpha1.MetricsService.GetMetricCount - */ -export const getMetricCount = { - localName: "getMetricCount", - name: "GetMetricCount", - kind: MethodKind.Unary, - I: GetMetricCountRequest, - O: GetMetricCountResponse, - service: { - typeName: "mgmt.v1alpha1.MetricsService" - } -} as const; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/metrics_connect.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/metrics_connect.ts deleted file mode 100644 index e8a24f5c64..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/metrics_connect.ts +++ /dev/null @@ -1,39 +0,0 @@ -// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/metrics.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { GetDailyMetricCountRequest, GetDailyMetricCountResponse, GetMetricCountRequest, GetMetricCountResponse } from "./metrics_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service mgmt.v1alpha1.MetricsService - */ -export const MetricsService = { - typeName: "mgmt.v1alpha1.MetricsService", - methods: { - /** - * Retrieve a timed range of records - * - * @generated from rpc mgmt.v1alpha1.MetricsService.GetDailyMetricCount - */ - getDailyMetricCount: { - name: "GetDailyMetricCount", - I: GetDailyMetricCountRequest, - O: GetDailyMetricCountResponse, - kind: MethodKind.Unary, - }, - /** - * For the given metric and time range, returns the total count found - * - * @generated from rpc mgmt.v1alpha1.MetricsService.GetMetricCount - */ - getMetricCount: { - name: "GetMetricCount", - I: GetMetricCountRequest, - O: GetMetricCountResponse, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/metrics_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/metrics_pb.ts index 3fa08922cc..13340d45c6 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/metrics_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/metrics_pb.ts @@ -1,34 +1,17 @@ -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js" +// @generated by protoc-gen-es v2.2.3 with parameter "target=ts,import_extension=.js" // @generated from file mgmt/v1alpha1/metrics.proto (package mgmt.v1alpha1, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum mgmt.v1alpha1.RangedMetricName + * Describes the file mgmt/v1alpha1/metrics.proto. */ -export enum RangedMetricName { - /** - * If unspecified, an error will be thrown - * - * @generated from enum value: RANGED_METRIC_NAME_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * The input_received metric - * - * @generated from enum value: RANGED_METRIC_NAME_INPUT_RECEIVED = 1; - */ - INPUT_RECEIVED = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(RangedMetricName) -proto3.util.setEnumType(RangedMetricName, "mgmt.v1alpha1.RangedMetricName", [ - { no: 0, name: "RANGED_METRIC_NAME_UNSPECIFIED" }, - { no: 1, name: "RANGED_METRIC_NAME_INPUT_RECEIVED" }, -]); +export const file_mgmt_v1alpha1_metrics: GenFile = /*@__PURE__*/ + fileDesc("ChttZ210L3YxYWxwaGExL21ldHJpY3MucHJvdG8SDW1nbXQudjFhbHBoYTEiUgoERGF0ZRIYCgR5ZWFyGAEgASgNQgq6SAcqBRiPTigAEhgKBW1vbnRoGAIgASgNQgm6SAYqBBgfKAASFgoDZGF5GAMgASgNQgm6SAYqBBgfKAAi+QEKGkdldERhaWx5TWV0cmljQ291bnRSZXF1ZXN0EiIKBXN0YXJ0GAEgASgLMhMubWdtdC52MWFscGhhMS5EYXRlEiAKA2VuZBgCIAEoCzITLm1nbXQudjFhbHBoYTEuRGF0ZRIvCgZtZXRyaWMYAyABKA4yHy5tZ210LnYxYWxwaGExLlJhbmdlZE1ldHJpY05hbWUSHgoKYWNjb3VudF9pZBgEIAEoCUIIukgFcgOwAQFIABIaCgZqb2JfaWQYBSABKAlCCLpIBXIDsAEBSAASGgoGcnVuX2lkGAYgASgJQgi6SAVyA7ABAUgAQgwKCmlkZW50aWZpZXIiSAobR2V0RGFpbHlNZXRyaWNDb3VudFJlc3BvbnNlEikKB3Jlc3VsdHMYASADKAsyGC5tZ210LnYxYWxwaGExLkRheVJlc3VsdCI9CglEYXlSZXN1bHQSIQoEZGF0ZRgBIAEoCzITLm1nbXQudjFhbHBoYTEuRGF0ZRINCgVjb3VudBgCIAEoBCKIAgoVR2V0TWV0cmljQ291bnRSZXF1ZXN0Ei8KBm1ldHJpYxgDIAEoDjIfLm1nbXQudjFhbHBoYTEuUmFuZ2VkTWV0cmljTmFtZRIeCgphY2NvdW50X2lkGAQgASgJQgi6SAVyA7ABAUgAEhoKBmpvYl9pZBgFIAEoCUIIukgFcgOwAQFIABIaCgZydW5faWQYBiABKAlCCLpIBXIDsAEBSAASJgoJc3RhcnRfZGF5GAcgASgLMhMubWdtdC52MWFscGhhMS5EYXRlEiQKB2VuZF9kYXkYCCABKAsyEy5tZ210LnYxYWxwaGExLkRhdGVCDAoKaWRlbnRpZmllckoECAEQAkoECAIQAyInChZHZXRNZXRyaWNDb3VudFJlc3BvbnNlEg0KBWNvdW50GAEgASgEKl0KEFJhbmdlZE1ldHJpY05hbWUSIgoeUkFOR0VEX01FVFJJQ19OQU1FX1VOU1BFQ0lGSUVEEAASJQohUkFOR0VEX01FVFJJQ19OQU1FX0lOUFVUX1JFQ0VJVkVEEAEy4QEKDk1ldHJpY3NTZXJ2aWNlEm4KE0dldERhaWx5TWV0cmljQ291bnQSKS5tZ210LnYxYWxwaGExLkdldERhaWx5TWV0cmljQ291bnRSZXF1ZXN0GioubWdtdC52MWFscGhhMS5HZXREYWlseU1ldHJpY0NvdW50UmVzcG9uc2UiABJfCg5HZXRNZXRyaWNDb3VudBIkLm1nbXQudjFhbHBoYTEuR2V0TWV0cmljQ291bnRSZXF1ZXN0GiUubWdtdC52MWFscGhhMS5HZXRNZXRyaWNDb3VudFJlc3BvbnNlIgBCyAEKEWNvbS5tZ210LnYxYWxwaGExQgxNZXRyaWNzUHJvdG9QAVpQZ2l0aHViLmNvbS9udWNsZXVzY2xvdWQvbmVvc3luYy9iYWNrZW5kL2dlbi9nby9wcm90b3MvbWdtdC92MWFscGhhMTttZ210djFhbHBoYTGiAgNNWFiqAg1NZ210LlYxYWxwaGExygINTWdtdFxWMWFscGhhMeICGU1nbXRcVjFhbHBoYTFcR1BCTWV0YWRhdGHqAg5NZ210OjpWMWFscGhhMWIGcHJvdG8z", [file_buf_validate_validate]); /** * Represents a whole or partial calendar date, such as a birthday. The time of @@ -47,14 +30,14 @@ proto3.util.setEnumType(RangedMetricName, "mgmt.v1alpha1.RangedMetricName", [ * * @generated from message mgmt.v1alpha1.Date */ -export class Date extends Message { +export type Date = Message<"mgmt.v1alpha1.Date"> & { /** * Year of the date. Must be from 1 to 9999, or 0 to specify a date without * a year. * * @generated from field: uint32 year = 1; */ - year = 0; + year: number; /** * Month of a year. Must be from 1 to 12, or 0 to specify a year without a @@ -62,7 +45,7 @@ export class Date extends Message { * * @generated from field: uint32 month = 2; */ - month = 0; + month: number; /** * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 @@ -71,42 +54,20 @@ export class Date extends Message { * * @generated from field: uint32 day = 3; */ - day = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.Date"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "year", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "month", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "day", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); + day: number; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): Date { - return new Date().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Date { - return new Date().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Date { - return new Date().fromJsonString(jsonString, options); - } - - static equals(a: Date | PlainMessage | undefined, b: Date | PlainMessage | undefined): boolean { - return proto3.util.equals(Date, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.Date. + * Use `create(DateSchema)` to create a new message. + */ +export const DateSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_metrics, 0); /** * @generated from message mgmt.v1alpha1.GetDailyMetricCountRequest */ -export class GetDailyMetricCountRequest extends Message { +export type GetDailyMetricCountRequest = Message<"mgmt.v1alpha1.GetDailyMetricCountRequest"> & { /** * The start day * @@ -126,7 +87,7 @@ export class GetDailyMetricCountRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetDailyMetricCountRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "start", kind: "message", T: Date }, - { no: 2, name: "end", kind: "message", T: Date }, - { no: 3, name: "metric", kind: "enum", T: proto3.getEnumType(RangedMetricName) }, - { no: 4, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identifier" }, - { no: 5, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identifier" }, - { no: 6, name: "run_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identifier" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetDailyMetricCountRequest { - return new GetDailyMetricCountRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetDailyMetricCountRequest { - return new GetDailyMetricCountRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetDailyMetricCountRequest { - return new GetDailyMetricCountRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetDailyMetricCountRequest | PlainMessage | undefined, b: GetDailyMetricCountRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetDailyMetricCountRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetDailyMetricCountRequest. + * Use `create(GetDailyMetricCountRequestSchema)` to create a new message. + */ +export const GetDailyMetricCountRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_metrics, 1); /** * @generated from message mgmt.v1alpha1.GetDailyMetricCountResponse */ -export class GetDailyMetricCountResponse extends Message { +export type GetDailyMetricCountResponse = Message<"mgmt.v1alpha1.GetDailyMetricCountResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.DayResult results = 1; */ - results: DayResult[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetDailyMetricCountResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "results", kind: "message", T: DayResult, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetDailyMetricCountResponse { - return new GetDailyMetricCountResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetDailyMetricCountResponse { - return new GetDailyMetricCountResponse().fromJson(jsonValue, options); - } + results: DayResult[]; +}; - static fromJsonString(jsonString: string, options?: Partial): GetDailyMetricCountResponse { - return new GetDailyMetricCountResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetDailyMetricCountResponse | PlainMessage | undefined, b: GetDailyMetricCountResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetDailyMetricCountResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetDailyMetricCountResponse. + * Use `create(GetDailyMetricCountResponseSchema)` to create a new message. + */ +export const GetDailyMetricCountResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_metrics, 2); /** * @generated from message mgmt.v1alpha1.DayResult */ -export class DayResult extends Message { +export type DayResult = Message<"mgmt.v1alpha1.DayResult"> & { /** * @generated from field: mgmt.v1alpha1.Date date = 1; */ @@ -239,61 +155,26 @@ export class DayResult extends Message { /** * @generated from field: uint64 count = 2; */ - count = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DayResult"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "date", kind: "message", T: Date }, - { no: 2, name: "count", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); + count: bigint; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): DayResult { - return new DayResult().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DayResult { - return new DayResult().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DayResult { - return new DayResult().fromJsonString(jsonString, options); - } - - static equals(a: DayResult | PlainMessage | undefined, b: DayResult | PlainMessage | undefined): boolean { - return proto3.util.equals(DayResult, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.DayResult. + * Use `create(DayResultSchema)` to create a new message. + */ +export const DayResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_metrics, 3); /** * @generated from message mgmt.v1alpha1.GetMetricCountRequest */ -export class GetMetricCountRequest extends Message { - /** - * @deprecated - use start_day - * - * @generated from field: google.protobuf.Timestamp start = 1; - */ - start?: Timestamp; - - /** - * @deprecated - use end_day - * - * @generated from field: google.protobuf.Timestamp end = 2; - */ - end?: Timestamp; - +export type GetMetricCountRequest = Message<"mgmt.v1alpha1.GetMetricCountRequest"> & { /** * The metric to return * * @generated from field: mgmt.v1alpha1.RangedMetricName metric = 3; */ - metric = RangedMetricName.UNSPECIFIED; + metric: RangedMetricName; /** * @generated from oneof mgmt.v1alpha1.GetMetricCountRequest.identifier @@ -322,7 +203,7 @@ export class GetMetricCountRequest extends Message { */ value: string; case: "runId"; - } | { case: undefined; value?: undefined } = { case: undefined }; + } | { case: undefined; value?: undefined }; /** * @generated from field: mgmt.v1alpha1.Date start_day = 7; @@ -333,78 +214,83 @@ export class GetMetricCountRequest extends Message { * @generated from field: mgmt.v1alpha1.Date end_day = 8; */ endDay?: Date; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetMetricCountRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "start", kind: "message", T: Timestamp }, - { no: 2, name: "end", kind: "message", T: Timestamp }, - { no: 3, name: "metric", kind: "enum", T: proto3.getEnumType(RangedMetricName) }, - { no: 4, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identifier" }, - { no: 5, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identifier" }, - { no: 6, name: "run_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identifier" }, - { no: 7, name: "start_day", kind: "message", T: Date }, - { no: 8, name: "end_day", kind: "message", T: Date }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetMetricCountRequest { - return new GetMetricCountRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetMetricCountRequest { - return new GetMetricCountRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetMetricCountRequest { - return new GetMetricCountRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetMetricCountRequest | PlainMessage | undefined, b: GetMetricCountRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetMetricCountRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetMetricCountRequest. + * Use `create(GetMetricCountRequestSchema)` to create a new message. + */ +export const GetMetricCountRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_metrics, 4); /** * @generated from message mgmt.v1alpha1.GetMetricCountResponse */ -export class GetMetricCountResponse extends Message { +export type GetMetricCountResponse = Message<"mgmt.v1alpha1.GetMetricCountResponse"> & { /** * The summed up count of the metric based on the input query and timerange specified * * @generated from field: uint64 count = 1; */ - count = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + count: bigint; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetMetricCountResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "count", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); +/** + * Describes the message mgmt.v1alpha1.GetMetricCountResponse. + * Use `create(GetMetricCountResponseSchema)` to create a new message. + */ +export const GetMetricCountResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_metrics, 5); - static fromBinary(bytes: Uint8Array, options?: Partial): GetMetricCountResponse { - return new GetMetricCountResponse().fromBinary(bytes, options); - } +/** + * @generated from enum mgmt.v1alpha1.RangedMetricName + */ +export enum RangedMetricName { + /** + * If unspecified, an error will be thrown + * + * @generated from enum value: RANGED_METRIC_NAME_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, - static fromJson(jsonValue: JsonValue, options?: Partial): GetMetricCountResponse { - return new GetMetricCountResponse().fromJson(jsonValue, options); - } + /** + * The input_received metric + * + * @generated from enum value: RANGED_METRIC_NAME_INPUT_RECEIVED = 1; + */ + INPUT_RECEIVED = 1, +} - static fromJsonString(jsonString: string, options?: Partial): GetMetricCountResponse { - return new GetMetricCountResponse().fromJsonString(jsonString, options); - } +/** + * Describes the enum mgmt.v1alpha1.RangedMetricName. + */ +export const RangedMetricNameSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_metrics, 0); - static equals(a: GetMetricCountResponse | PlainMessage | undefined, b: GetMetricCountResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetMetricCountResponse, a, b); - } -} +/** + * @generated from service mgmt.v1alpha1.MetricsService + */ +export const MetricsService: GenService<{ + /** + * Retrieve a timed range of records + * + * @generated from rpc mgmt.v1alpha1.MetricsService.GetDailyMetricCount + */ + getDailyMetricCount: { + methodKind: "unary"; + input: typeof GetDailyMetricCountRequestSchema; + output: typeof GetDailyMetricCountResponseSchema; + }, + /** + * For the given metric and time range, returns the total count found + * + * @generated from rpc mgmt.v1alpha1.MetricsService.GetMetricCount + */ + getMetricCount: { + methodKind: "unary"; + input: typeof GetMetricCountRequestSchema; + output: typeof GetMetricCountResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_mgmt_v1alpha1_metrics, 0); diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/transformer-TransformersService_connectquery.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/transformer-TransformersService_connectquery.ts deleted file mode 100644 index 6a396c7ce9..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/transformer-TransformersService_connectquery.ts +++ /dev/null @@ -1,164 +0,0 @@ -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/transformer.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; -import { CreateUserDefinedTransformerRequest, CreateUserDefinedTransformerResponse, DeleteUserDefinedTransformerRequest, DeleteUserDefinedTransformerResponse, GetSystemTransformerBySourceRequest, GetSystemTransformerBySourceResponse, GetSystemTransformersRequest, GetSystemTransformersResponse, GetTransformPiiEntitiesRequest, GetTransformPiiEntitiesResponse, GetUserDefinedTransformerByIdRequest, GetUserDefinedTransformerByIdResponse, GetUserDefinedTransformersRequest, GetUserDefinedTransformersResponse, IsTransformerNameAvailableRequest, IsTransformerNameAvailableResponse, UpdateUserDefinedTransformerRequest, UpdateUserDefinedTransformerResponse, ValidateUserJavascriptCodeRequest, ValidateUserJavascriptCodeResponse, ValidateUserRegexCodeRequest, ValidateUserRegexCodeResponse } from "./transformer_pb.js"; - -/** - * @generated from rpc mgmt.v1alpha1.TransformersService.GetSystemTransformers - */ -export const getSystemTransformers = { - localName: "getSystemTransformers", - name: "GetSystemTransformers", - kind: MethodKind.Unary, - I: GetSystemTransformersRequest, - O: GetSystemTransformersResponse, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.TransformersService.GetSystemTransformerBySource - */ -export const getSystemTransformerBySource = { - localName: "getSystemTransformerBySource", - name: "GetSystemTransformerBySource", - kind: MethodKind.Unary, - I: GetSystemTransformerBySourceRequest, - O: GetSystemTransformerBySourceResponse, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.TransformersService.GetUserDefinedTransformers - */ -export const getUserDefinedTransformers = { - localName: "getUserDefinedTransformers", - name: "GetUserDefinedTransformers", - kind: MethodKind.Unary, - I: GetUserDefinedTransformersRequest, - O: GetUserDefinedTransformersResponse, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.TransformersService.GetUserDefinedTransformerById - */ -export const getUserDefinedTransformerById = { - localName: "getUserDefinedTransformerById", - name: "GetUserDefinedTransformerById", - kind: MethodKind.Unary, - I: GetUserDefinedTransformerByIdRequest, - O: GetUserDefinedTransformerByIdResponse, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.TransformersService.CreateUserDefinedTransformer - */ -export const createUserDefinedTransformer = { - localName: "createUserDefinedTransformer", - name: "CreateUserDefinedTransformer", - kind: MethodKind.Unary, - I: CreateUserDefinedTransformerRequest, - O: CreateUserDefinedTransformerResponse, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.TransformersService.DeleteUserDefinedTransformer - */ -export const deleteUserDefinedTransformer = { - localName: "deleteUserDefinedTransformer", - name: "DeleteUserDefinedTransformer", - kind: MethodKind.Unary, - I: DeleteUserDefinedTransformerRequest, - O: DeleteUserDefinedTransformerResponse, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.TransformersService.UpdateUserDefinedTransformer - */ -export const updateUserDefinedTransformer = { - localName: "updateUserDefinedTransformer", - name: "UpdateUserDefinedTransformer", - kind: MethodKind.Unary, - I: UpdateUserDefinedTransformerRequest, - O: UpdateUserDefinedTransformerResponse, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.TransformersService.IsTransformerNameAvailable - */ -export const isTransformerNameAvailable = { - localName: "isTransformerNameAvailable", - name: "IsTransformerNameAvailable", - kind: MethodKind.Unary, - I: IsTransformerNameAvailableRequest, - O: IsTransformerNameAvailableResponse, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.TransformersService.ValidateUserJavascriptCode - */ -export const validateUserJavascriptCode = { - localName: "validateUserJavascriptCode", - name: "ValidateUserJavascriptCode", - kind: MethodKind.Unary, - I: ValidateUserJavascriptCodeRequest, - O: ValidateUserJavascriptCodeResponse, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.TransformersService.ValidateUserRegexCode - */ -export const validateUserRegexCode = { - localName: "validateUserRegexCode", - name: "ValidateUserRegexCode", - kind: MethodKind.Unary, - I: ValidateUserRegexCodeRequest, - O: ValidateUserRegexCodeResponse, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; - -/** - * Retrieve a list of available Pii entities for use with the TransformPiiText transformer - * - * @generated from rpc mgmt.v1alpha1.TransformersService.GetTransformPiiEntities - */ -export const getTransformPiiEntities = { - localName: "getTransformPiiEntities", - name: "GetTransformPiiEntities", - kind: MethodKind.Unary, - I: GetTransformPiiEntitiesRequest, - O: GetTransformPiiEntitiesResponse, - idempotency: MethodIdempotency.NoSideEffects, - service: { - typeName: "mgmt.v1alpha1.TransformersService" - } -} as const; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/transformer_connect.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/transformer_connect.ts deleted file mode 100644 index 62de4b0a4c..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/transformer_connect.ts +++ /dev/null @@ -1,119 +0,0 @@ -// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/transformer.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { CreateUserDefinedTransformerRequest, CreateUserDefinedTransformerResponse, DeleteUserDefinedTransformerRequest, DeleteUserDefinedTransformerResponse, GetSystemTransformerBySourceRequest, GetSystemTransformerBySourceResponse, GetSystemTransformersRequest, GetSystemTransformersResponse, GetTransformPiiEntitiesRequest, GetTransformPiiEntitiesResponse, GetUserDefinedTransformerByIdRequest, GetUserDefinedTransformerByIdResponse, GetUserDefinedTransformersRequest, GetUserDefinedTransformersResponse, IsTransformerNameAvailableRequest, IsTransformerNameAvailableResponse, UpdateUserDefinedTransformerRequest, UpdateUserDefinedTransformerResponse, ValidateUserJavascriptCodeRequest, ValidateUserJavascriptCodeResponse, ValidateUserRegexCodeRequest, ValidateUserRegexCodeResponse } from "./transformer_pb.js"; -import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service mgmt.v1alpha1.TransformersService - */ -export const TransformersService = { - typeName: "mgmt.v1alpha1.TransformersService", - methods: { - /** - * @generated from rpc mgmt.v1alpha1.TransformersService.GetSystemTransformers - */ - getSystemTransformers: { - name: "GetSystemTransformers", - I: GetSystemTransformersRequest, - O: GetSystemTransformersResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.TransformersService.GetSystemTransformerBySource - */ - getSystemTransformerBySource: { - name: "GetSystemTransformerBySource", - I: GetSystemTransformerBySourceRequest, - O: GetSystemTransformerBySourceResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.TransformersService.GetUserDefinedTransformers - */ - getUserDefinedTransformers: { - name: "GetUserDefinedTransformers", - I: GetUserDefinedTransformersRequest, - O: GetUserDefinedTransformersResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.TransformersService.GetUserDefinedTransformerById - */ - getUserDefinedTransformerById: { - name: "GetUserDefinedTransformerById", - I: GetUserDefinedTransformerByIdRequest, - O: GetUserDefinedTransformerByIdResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.TransformersService.CreateUserDefinedTransformer - */ - createUserDefinedTransformer: { - name: "CreateUserDefinedTransformer", - I: CreateUserDefinedTransformerRequest, - O: CreateUserDefinedTransformerResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.TransformersService.DeleteUserDefinedTransformer - */ - deleteUserDefinedTransformer: { - name: "DeleteUserDefinedTransformer", - I: DeleteUserDefinedTransformerRequest, - O: DeleteUserDefinedTransformerResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.TransformersService.UpdateUserDefinedTransformer - */ - updateUserDefinedTransformer: { - name: "UpdateUserDefinedTransformer", - I: UpdateUserDefinedTransformerRequest, - O: UpdateUserDefinedTransformerResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.TransformersService.IsTransformerNameAvailable - */ - isTransformerNameAvailable: { - name: "IsTransformerNameAvailable", - I: IsTransformerNameAvailableRequest, - O: IsTransformerNameAvailableResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.TransformersService.ValidateUserJavascriptCode - */ - validateUserJavascriptCode: { - name: "ValidateUserJavascriptCode", - I: ValidateUserJavascriptCodeRequest, - O: ValidateUserJavascriptCodeResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.TransformersService.ValidateUserRegexCode - */ - validateUserRegexCode: { - name: "ValidateUserRegexCode", - I: ValidateUserRegexCodeRequest, - O: ValidateUserRegexCodeResponse, - kind: MethodKind.Unary, - }, - /** - * Retrieve a list of available Pii entities for use with the TransformPiiText transformer - * - * @generated from rpc mgmt.v1alpha1.TransformersService.GetTransformPiiEntities - */ - getTransformPiiEntities: { - name: "GetTransformPiiEntities", - I: GetTransformPiiEntitiesRequest, - O: GetTransformPiiEntitiesResponse, - kind: MethodKind.Unary, - idempotency: MethodIdempotency.NoSideEffects, - }, - } -} as const; - diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/transformer_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/transformer_pb.ts index a793fb3b0a..87f78835cd 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/transformer_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/transformer_pb.ts @@ -1,1371 +1,439 @@ -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js" +// @generated by protoc-gen-es v2.2.3 with parameter "target=ts,import_extension=.js" // @generated from file mgmt/v1alpha1/transformer.proto (package mgmt.v1alpha1, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, Timestamp } from "@bufbuild/protobuf"; +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum mgmt.v1alpha1.TransformerSource + * Describes the file mgmt/v1alpha1/transformer.proto. */ -export enum TransformerSource { - /** - * @generated from enum value: TRANSFORMER_SOURCE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, +export const file_mgmt_v1alpha1_transformer: GenFile = /*@__PURE__*/ + fileDesc("Ch9tZ210L3YxYWxwaGExL3RyYW5zZm9ybWVyLnByb3RvEg1tZ210LnYxYWxwaGExIh4KHEdldFN5c3RlbVRyYW5zZm9ybWVyc1JlcXVlc3QiVwodR2V0U3lzdGVtVHJhbnNmb3JtZXJzUmVzcG9uc2USNgoMdHJhbnNmb3JtZXJzGAEgAygLMiAubWdtdC52MWFscGhhMS5TeXN0ZW1UcmFuc2Zvcm1lciJXCiNHZXRTeXN0ZW1UcmFuc2Zvcm1lckJ5U291cmNlUmVxdWVzdBIwCgZzb3VyY2UYASABKA4yIC5tZ210LnYxYWxwaGExLlRyYW5zZm9ybWVyU291cmNlIl0KJEdldFN5c3RlbVRyYW5zZm9ybWVyQnlTb3VyY2VSZXNwb25zZRI1Cgt0cmFuc2Zvcm1lchgBIAEoCzIgLm1nbXQudjFhbHBoYTEuU3lzdGVtVHJhbnNmb3JtZXIiQQohR2V0VXNlckRlZmluZWRUcmFuc2Zvcm1lcnNSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBImEKIkdldFVzZXJEZWZpbmVkVHJhbnNmb3JtZXJzUmVzcG9uc2USOwoMdHJhbnNmb3JtZXJzGAEgAygLMiUubWdtdC52MWFscGhhMS5Vc2VyRGVmaW5lZFRyYW5zZm9ybWVyIkgKJEdldFVzZXJEZWZpbmVkVHJhbnNmb3JtZXJCeUlkUmVxdWVzdBIgCg50cmFuc2Zvcm1lcl9pZBgBIAEoCUIIukgFcgOwAQEiYwolR2V0VXNlckRlZmluZWRUcmFuc2Zvcm1lckJ5SWRSZXNwb25zZRI6Cgt0cmFuc2Zvcm1lchgBIAEoCzIlLm1nbXQudjFhbHBoYTEuVXNlckRlZmluZWRUcmFuc2Zvcm1lciL3AQojQ3JlYXRlVXNlckRlZmluZWRUcmFuc2Zvcm1lclJlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQESJwoEbmFtZRgCIAEoCUIZukgWchQyEl5bYS16MC05LV17MywxMDB9JBITCgtkZXNjcmlwdGlvbhgDIAEoCRIwCgZzb3VyY2UYBSABKA4yIC5tZ210LnYxYWxwaGExLlRyYW5zZm9ybWVyU291cmNlEjwKEnRyYW5zZm9ybWVyX2NvbmZpZxgGIAEoCzIgLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtZXJDb25maWdKBAgEEAUiYgokQ3JlYXRlVXNlckRlZmluZWRUcmFuc2Zvcm1lclJlc3BvbnNlEjoKC3RyYW5zZm9ybWVyGAEgASgLMiUubWdtdC52MWFscGhhMS5Vc2VyRGVmaW5lZFRyYW5zZm9ybWVyIkcKI0RlbGV0ZVVzZXJEZWZpbmVkVHJhbnNmb3JtZXJSZXF1ZXN0EiAKDnRyYW5zZm9ybWVyX2lkGAEgASgJQgi6SAVyA7ABASImCiREZWxldGVVc2VyRGVmaW5lZFRyYW5zZm9ybWVyUmVzcG9uc2UiwwEKI1VwZGF0ZVVzZXJEZWZpbmVkVHJhbnNmb3JtZXJSZXF1ZXN0EiAKDnRyYW5zZm9ybWVyX2lkGAEgASgJQgi6SAVyA7ABARInCgRuYW1lGAIgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kEhMKC2Rlc2NyaXB0aW9uGAMgASgJEjwKEnRyYW5zZm9ybWVyX2NvbmZpZxgEIAEoCzIgLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtZXJDb25maWciYgokVXBkYXRlVXNlckRlZmluZWRUcmFuc2Zvcm1lclJlc3BvbnNlEjoKC3RyYW5zZm9ybWVyGAEgASgLMiUubWdtdC52MWFscGhhMS5Vc2VyRGVmaW5lZFRyYW5zZm9ybWVyInYKIUlzVHJhbnNmb3JtZXJOYW1lQXZhaWxhYmxlUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABARIzChB0cmFuc2Zvcm1lcl9uYW1lGAIgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kIjoKIklzVHJhbnNmb3JtZXJOYW1lQXZhaWxhYmxlUmVzcG9uc2USFAoMaXNfYXZhaWxhYmxlGAEgASgIIpgDChZVc2VyRGVmaW5lZFRyYW5zZm9ybWVyEhQKAmlkGAEgASgJQgi6SAVyA7ABARIMCgRuYW1lGAIgASgJEhMKC2Rlc2NyaXB0aW9uGAMgASgJEjUKCWRhdGFfdHlwZRgFIAEoDjIiLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtZXJEYXRhVHlwZRIwCgZzb3VyY2UYBiABKA4yIC5tZ210LnYxYWxwaGExLlRyYW5zZm9ybWVyU291cmNlEjAKBmNvbmZpZxgHIAEoCzIgLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtZXJDb25maWcSLgoKY3JlYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASEgoKYWNjb3VudF9pZBgKIAEoCRI2CgpkYXRhX3R5cGVzGAsgAygOMiIubWdtdC52MWFscGhhMS5UcmFuc2Zvcm1lckRhdGFUeXBlIscCChFTeXN0ZW1UcmFuc2Zvcm1lchIMCgRuYW1lGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEjUKCWRhdGFfdHlwZRgDIAEoDjIiLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtZXJEYXRhVHlwZRIwCgZzb3VyY2UYBCABKA4yIC5tZ210LnYxYWxwaGExLlRyYW5zZm9ybWVyU291cmNlEjAKBmNvbmZpZxgFIAEoCzIgLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtZXJDb25maWcSNgoKZGF0YV90eXBlcxgGIAMoDjIiLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtZXJEYXRhVHlwZRI8ChNzdXBwb3J0ZWRfam9iX3R5cGVzGAcgAygOMh8ubWdtdC52MWFscGhhMS5TdXBwb3J0ZWRKb2JUeXBlIv4ZChFUcmFuc2Zvcm1lckNvbmZpZxI9ChVnZW5lcmF0ZV9lbWFpbF9jb25maWcYASABKAsyHC5tZ210LnYxYWxwaGExLkdlbmVyYXRlRW1haWxIABI/ChZ0cmFuc2Zvcm1fZW1haWxfY29uZmlnGAIgASgLMh0ubWdtdC52MWFscGhhMS5UcmFuc2Zvcm1FbWFpbEgAEjsKFGdlbmVyYXRlX2Jvb2xfY29uZmlnGAMgASgLMhsubWdtdC52MWFscGhhMS5HZW5lcmF0ZUJvb2xIABJIChtnZW5lcmF0ZV9jYXJkX251bWJlcl9jb25maWcYBCABKAsyIS5tZ210LnYxYWxwaGExLkdlbmVyYXRlQ2FyZE51bWJlckgAEjsKFGdlbmVyYXRlX2NpdHlfY29uZmlnGAUgASgLMhsubWdtdC52MWFscGhhMS5HZW5lcmF0ZUNpdHlIABJTCiFnZW5lcmF0ZV9lMTY0X3Bob25lX251bWJlcl9jb25maWcYBiABKAsyJi5tZ210LnYxYWxwaGExLkdlbmVyYXRlRTE2NFBob25lTnVtYmVySAASRgoaZ2VuZXJhdGVfZmlyc3RfbmFtZV9jb25maWcYByABKAsyIC5tZ210LnYxYWxwaGExLkdlbmVyYXRlRmlyc3ROYW1lSAASQQoXZ2VuZXJhdGVfZmxvYXQ2NF9jb25maWcYCCABKAsyHi5tZ210LnYxYWxwaGExLkdlbmVyYXRlRmxvYXQ2NEgAEkoKHGdlbmVyYXRlX2Z1bGxfYWRkcmVzc19jb25maWcYCSABKAsyIi5tZ210LnYxYWxwaGExLkdlbmVyYXRlRnVsbEFkZHJlc3NIABJEChlnZW5lcmF0ZV9mdWxsX25hbWVfY29uZmlnGAogASgLMh8ubWdtdC52MWFscGhhMS5HZW5lcmF0ZUZ1bGxOYW1lSAASPwoWZ2VuZXJhdGVfZ2VuZGVyX2NvbmZpZxgLIAEoCzIdLm1nbXQudjFhbHBoYTEuR2VuZXJhdGVHZW5kZXJIABJVCiJnZW5lcmF0ZV9pbnQ2NF9waG9uZV9udW1iZXJfY29uZmlnGAwgASgLMicubWdtdC52MWFscGhhMS5HZW5lcmF0ZUludDY0UGhvbmVOdW1iZXJIABI9ChVnZW5lcmF0ZV9pbnQ2NF9jb25maWcYDSABKAsyHC5tZ210LnYxYWxwaGExLkdlbmVyYXRlSW50NjRIABJEChlnZW5lcmF0ZV9sYXN0X25hbWVfY29uZmlnGA4gASgLMh8ubWdtdC52MWFscGhhMS5HZW5lcmF0ZUxhc3ROYW1lSAASRwoaZ2VuZXJhdGVfc2hhMjU2aGFzaF9jb25maWcYDyABKAsyIS5tZ210LnYxYWxwaGExLkdlbmVyYXRlU2hhMjU2SGFzaEgAEjkKE2dlbmVyYXRlX3Nzbl9jb25maWcYECABKAsyGi5tZ210LnYxYWxwaGExLkdlbmVyYXRlU1NOSAASPQoVZ2VuZXJhdGVfc3RhdGVfY29uZmlnGBEgASgLMhwubWdtdC52MWFscGhhMS5HZW5lcmF0ZVN0YXRlSAASTgoeZ2VuZXJhdGVfc3RyZWV0X2FkZHJlc3NfY29uZmlnGBIgASgLMiQubWdtdC52MWFscGhhMS5HZW5lcmF0ZVN0cmVldEFkZHJlc3NIABJXCiNnZW5lcmF0ZV9zdHJpbmdfcGhvbmVfbnVtYmVyX2NvbmZpZxgTIAEoCzIoLm1nbXQudjFhbHBoYTEuR2VuZXJhdGVTdHJpbmdQaG9uZU51bWJlckgAEj8KFmdlbmVyYXRlX3N0cmluZ19jb25maWcYFCABKAsyHS5tZ210LnYxYWxwaGExLkdlbmVyYXRlU3RyaW5nSAASTQodZ2VuZXJhdGVfdW5peHRpbWVzdGFtcF9jb25maWcYFSABKAsyJC5tZ210LnYxYWxwaGExLkdlbmVyYXRlVW5peFRpbWVzdGFtcEgAEkMKGGdlbmVyYXRlX3VzZXJuYW1lX2NvbmZpZxgWIAEoCzIfLm1nbXQudjFhbHBoYTEuR2VuZXJhdGVVc2VybmFtZUgAEksKHGdlbmVyYXRlX3V0Y3RpbWVzdGFtcF9jb25maWcYFyABKAsyIy5tZ210LnYxYWxwaGExLkdlbmVyYXRlVXRjVGltZXN0YW1wSAASOwoUZ2VuZXJhdGVfdXVpZF9jb25maWcYGCABKAsyGy5tZ210LnYxYWxwaGExLkdlbmVyYXRlVXVpZEgAEkEKF2dlbmVyYXRlX3ppcGNvZGVfY29uZmlnGBkgASgLMh4ubWdtdC52MWFscGhhMS5HZW5lcmF0ZVppcGNvZGVIABJVCiJ0cmFuc2Zvcm1fZTE2NF9waG9uZV9udW1iZXJfY29uZmlnGBogASgLMicubWdtdC52MWFscGhhMS5UcmFuc2Zvcm1FMTY0UGhvbmVOdW1iZXJIABJICht0cmFuc2Zvcm1fZmlyc3RfbmFtZV9jb25maWcYGyABKAsyIS5tZ210LnYxYWxwaGExLlRyYW5zZm9ybUZpcnN0TmFtZUgAEkMKGHRyYW5zZm9ybV9mbG9hdDY0X2NvbmZpZxgcIAEoCzIfLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtRmxvYXQ2NEgAEkYKGnRyYW5zZm9ybV9mdWxsX25hbWVfY29uZmlnGB0gASgLMiAubWdtdC52MWFscGhhMS5UcmFuc2Zvcm1GdWxsTmFtZUgAElcKI3RyYW5zZm9ybV9pbnQ2NF9waG9uZV9udW1iZXJfY29uZmlnGB4gASgLMigubWdtdC52MWFscGhhMS5UcmFuc2Zvcm1JbnQ2NFBob25lTnVtYmVySAASPwoWdHJhbnNmb3JtX2ludDY0X2NvbmZpZxgfIAEoCzIdLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtSW50NjRIABJGChp0cmFuc2Zvcm1fbGFzdF9uYW1lX2NvbmZpZxggIAEoCzIgLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtTGFzdE5hbWVIABJMCh10cmFuc2Zvcm1fcGhvbmVfbnVtYmVyX2NvbmZpZxghIAEoCzIjLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtUGhvbmVOdW1iZXJIABJBChd0cmFuc2Zvcm1fc3RyaW5nX2NvbmZpZxgiIAEoCzIeLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtU3RyaW5nSAASOAoScGFzc3Rocm91Z2hfY29uZmlnGCMgASgLMhoubWdtdC52MWFscGhhMS5QYXNzdGhyb3VnaEgAEikKCm51bGxjb25maWcYJCABKAsyEy5tZ210LnYxYWxwaGExLk51bGxIABJWCh91c2VyX2RlZmluZWRfdHJhbnNmb3JtZXJfY29uZmlnGCUgASgLMisubWdtdC52MWFscGhhMS5Vc2VyRGVmaW5lZFRyYW5zZm9ybWVyQ29uZmlnSAASQQoXZ2VuZXJhdGVfZGVmYXVsdF9jb25maWcYJiABKAsyHi5tZ210LnYxYWxwaGExLkdlbmVyYXRlRGVmYXVsdEgAEkkKG3RyYW5zZm9ybV9qYXZhc2NyaXB0X2NvbmZpZxgnIAEoCzIiLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtSmF2YXNjcmlwdEgAEkkKG2dlbmVyYXRlX2NhdGVnb3JpY2FsX2NvbmZpZxgoIAEoCzIiLm1nbXQudjFhbHBoYTEuR2VuZXJhdGVDYXRlZ29yaWNhbEgAElgKI3RyYW5zZm9ybV9jaGFyYWN0ZXJfc2NyYW1ibGVfY29uZmlnGCkgASgLMikubWdtdC52MWFscGhhMS5UcmFuc2Zvcm1DaGFyYWN0ZXJTY3JhbWJsZUgAEkcKGmdlbmVyYXRlX2phdmFzY3JpcHRfY29uZmlnGCogASgLMiEubWdtdC52MWFscGhhMS5HZW5lcmF0ZUphdmFzY3JpcHRIABJBChdnZW5lcmF0ZV9jb3VudHJ5X2NvbmZpZxgrIAEoCzIeLm1nbXQudjFhbHBoYTEuR2VuZXJhdGVDb3VudHJ5SAASRAoZdHJhbnNmb3JtX3BpaV90ZXh0X2NvbmZpZxgsIAEoCzIfLm1nbXQudjFhbHBoYTEuVHJhbnNmb3JtUGlpVGV4dEgAEkwKHWdlbmVyYXRlX2J1c2luZXNzX25hbWVfY29uZmlnGC0gASgLMiMubWdtdC52MWFscGhhMS5HZW5lcmF0ZUJ1c2luZXNzTmFtZUgAEkYKGmdlbmVyYXRlX2lwX2FkZHJlc3NfY29uZmlnGC4gASgLMiAubWdtdC52MWFscGhhMS5HZW5lcmF0ZUlwQWRkcmVzc0gAQg8KBmNvbmZpZxIFukgCCAEilwIKEFRyYW5zZm9ybVBpaVRleHQSKAoPc2NvcmVfdGhyZXNob2xkGAEgASgCQg+6SAwKCh0AAIA/LQAAAAASOAoSZGVmYXVsdF9hbm9ueW1pemVyGAIgASgLMhwubWdtdC52MWFscGhhMS5QaWlBbm9ueW1pemVyEjoKEGRlbnlfcmVjb2duaXplcnMYAyADKAsyIC5tZ210LnYxYWxwaGExLlBpaURlbnlSZWNvZ25pemVyEiYKEGFsbG93ZWRfZW50aXRpZXMYBCADKAlCDLpICZIBBiIEcgIQARIXCg9hbGxvd2VkX3BocmFzZXMYBSADKAkSFQoIbGFuZ3VhZ2UYBiABKAlIAIgBAUILCglfbGFuZ3VhZ2UiXwoRUGlpRGVueVJlY29nbml6ZXISKAoEbmFtZRgBIAEoCUIaukgXchUyE15bYS16MC05LV9dezEsMTAwfSQSIAoKZGVueV93b3JkcxgCIAMoCUIMukgJkgEGIgRyAhABIuAECg1QaWlBbm9ueW1pemVyEjcKB3JlcGxhY2UYASABKAsyJC5tZ210LnYxYWxwaGExLlBpaUFub255bWl6ZXIuUmVwbGFjZUgAEjUKBnJlZGFjdBgCIAEoCzIjLm1nbXQudjFhbHBoYTEuUGlpQW5vbnltaXplci5SZWRhY3RIABIxCgRtYXNrGAMgASgLMiEubWdtdC52MWFscGhhMS5QaWlBbm9ueW1pemVyLk1hc2tIABIxCgRoYXNoGAQgASgLMiEubWdtdC52MWFscGhhMS5QaWlBbm9ueW1pemVyLkhhc2hIABonCgdSZXBsYWNlEhIKBXZhbHVlGAEgASgJSACIAQFCCAoGX3ZhbHVlGggKBlJlZGFjdBqEAQoETWFzaxIZCgxtYXNraW5nX2NoYXIYASABKAlIAIgBARIaCg1jaGFyc190b19tYXNrGAIgASgFSAGIAQESFQoIZnJvbV9lbmQYAyABKAhIAogBAUIPCg1fbWFza2luZ19jaGFyQhAKDl9jaGFyc190b19tYXNrQgsKCV9mcm9tX2VuZBq0AQoESGFzaBI9CgRhbGdvGAEgASgOMioubWdtdC52MWFscGhhMS5QaWlBbm9ueW1pemVyLkhhc2guSGFzaFR5cGVIAIgBASJkCghIYXNoVHlwZRIZChVIQVNIX1RZUEVfVU5TUEVDSUZJRUQQABIRCg1IQVNIX1RZUEVfTUQ1EAESFAoQSEFTSF9UWVBFX1NIQTI1NhACEhQKEEhBU0hfVFlQRV9TSEE1MTIQA0IHCgVfYWxnb0IICgZjb25maWciWQoNR2VuZXJhdGVFbWFpbBI5CgplbWFpbF90eXBlGAEgASgOMiAubWdtdC52MWFscGhhMS5HZW5lcmF0ZUVtYWlsVHlwZUgAiAEBQg0KC19lbWFpbF90eXBlIrcCCg5UcmFuc2Zvcm1FbWFpbBIcCg9wcmVzZXJ2ZV9kb21haW4YASABKAhIAIgBARIcCg9wcmVzZXJ2ZV9sZW5ndGgYAiABKAhIAYgBARIYChBleGNsdWRlZF9kb21haW5zGAMgAygJEjkKCmVtYWlsX3R5cGUYBCABKA4yIC5tZ210LnYxYWxwaGExLkdlbmVyYXRlRW1haWxUeXBlSAKIAQESRAoUaW52YWxpZF9lbWFpbF9hY3Rpb24YBSABKA4yIS5tZ210LnYxYWxwaGExLkludmFsaWRFbWFpbEFjdGlvbkgDiAEBQhIKEF9wcmVzZXJ2ZV9kb21haW5CEgoQX3ByZXNlcnZlX2xlbmd0aEINCgtfZW1haWxfdHlwZUIXChVfaW52YWxpZF9lbWFpbF9hY3Rpb24iDgoMR2VuZXJhdGVCb29sIjwKEkdlbmVyYXRlQ2FyZE51bWJlchIXCgp2YWxpZF9sdWhuGAEgASgISACIAQFCDQoLX3ZhbGlkX2x1aG4iDgoMR2VuZXJhdGVDaXR5IhEKD0dlbmVyYXRlRGVmYXVsdCJNChdHZW5lcmF0ZUUxNjRQaG9uZU51bWJlchIQCgNtaW4YASABKANIAIgBARIQCgNtYXgYAiABKANIAYgBAUIGCgRfbWluQgYKBF9tYXgiEwoRR2VuZXJhdGVGaXJzdE5hbWUimwEKD0dlbmVyYXRlRmxvYXQ2NBIbCg5yYW5kb21pemVfc2lnbhgBIAEoCEgAiAEBEhAKA21pbhgCIAEoAUgBiAEBEhAKA21heBgDIAEoAUgCiAEBEhYKCXByZWNpc2lvbhgEIAEoA0gDiAEBQhEKD19yYW5kb21pemVfc2lnbkIGCgRfbWluQgYKBF9tYXhCDAoKX3ByZWNpc2lvbiIVChNHZW5lcmF0ZUZ1bGxBZGRyZXNzIhIKEEdlbmVyYXRlRnVsbE5hbWUiOAoOR2VuZXJhdGVHZW5kZXISFwoKYWJicmV2aWF0ZRgBIAEoCEgAiAEBQg0KC19hYmJyZXZpYXRlIhoKGEdlbmVyYXRlSW50NjRQaG9uZU51bWJlciJzCg1HZW5lcmF0ZUludDY0EhsKDnJhbmRvbWl6ZV9zaWduGAEgASgISACIAQESEAoDbWluGAIgASgDSAGIAQESEAoDbWF4GAMgASgDSAKIAQFCEQoPX3JhbmRvbWl6ZV9zaWduQgYKBF9taW5CBgoEX21heCISChBHZW5lcmF0ZUxhc3ROYW1lIhQKEkdlbmVyYXRlU2hhMjU2SGFzaCINCgtHZW5lcmF0ZVNTTiJHCg1HZW5lcmF0ZVN0YXRlEh8KEmdlbmVyYXRlX2Z1bGxfbmFtZRgBIAEoCEgAiAEBQhUKE19nZW5lcmF0ZV9mdWxsX25hbWUiFwoVR2VuZXJhdGVTdHJlZXRBZGRyZXNzIk8KGUdlbmVyYXRlU3RyaW5nUGhvbmVOdW1iZXISEAoDbWluGAIgASgDSACIAQESEAoDbWF4GAMgASgDSAGIAQFCBgoEX21pbkIGCgRfbWF4IkQKDkdlbmVyYXRlU3RyaW5nEhAKA21pbhgBIAEoA0gAiAEBEhAKA21heBgCIAEoA0gBiAEBQgYKBF9taW5CBgoEX21heCIXChVHZW5lcmF0ZVVuaXhUaW1lc3RhbXAiEgoQR2VuZXJhdGVVc2VybmFtZSIWChRHZW5lcmF0ZVV0Y1RpbWVzdGFtcCJACgxHZW5lcmF0ZVV1aWQSHAoPaW5jbHVkZV9oeXBoZW5zGAEgASgISACIAQFCEgoQX2luY2x1ZGVfaHlwaGVucyIRCg9HZW5lcmF0ZVppcGNvZGUiTAoYVHJhbnNmb3JtRTE2NFBob25lTnVtYmVyEhwKD3ByZXNlcnZlX2xlbmd0aBgBIAEoCEgAiAEBQhIKEF9wcmVzZXJ2ZV9sZW5ndGgiRgoSVHJhbnNmb3JtRmlyc3ROYW1lEhwKD3ByZXNlcnZlX2xlbmd0aBgBIAEoCEgAiAEBQhIKEF9wcmVzZXJ2ZV9sZW5ndGgilgEKEFRyYW5zZm9ybUZsb2F0NjQSJAoXcmFuZG9taXphdGlvbl9yYW5nZV9taW4YASABKAFIAIgBARIkChdyYW5kb21pemF0aW9uX3JhbmdlX21heBgCIAEoAUgBiAEBQhoKGF9yYW5kb21pemF0aW9uX3JhbmdlX21pbkIaChhfcmFuZG9taXphdGlvbl9yYW5nZV9tYXgiRQoRVHJhbnNmb3JtRnVsbE5hbWUSHAoPcHJlc2VydmVfbGVuZ3RoGAEgASgISACIAQFCEgoQX3ByZXNlcnZlX2xlbmd0aCJNChlUcmFuc2Zvcm1JbnQ2NFBob25lTnVtYmVyEhwKD3ByZXNlcnZlX2xlbmd0aBgBIAEoCEgAiAEBQhIKEF9wcmVzZXJ2ZV9sZW5ndGgilAEKDlRyYW5zZm9ybUludDY0EiQKF3JhbmRvbWl6YXRpb25fcmFuZ2VfbWluGAEgASgDSACIAQESJAoXcmFuZG9taXphdGlvbl9yYW5nZV9tYXgYAiABKANIAYgBAUIaChhfcmFuZG9taXphdGlvbl9yYW5nZV9taW5CGgoYX3JhbmRvbWl6YXRpb25fcmFuZ2VfbWF4IkUKEVRyYW5zZm9ybUxhc3ROYW1lEhwKD3ByZXNlcnZlX2xlbmd0aBgBIAEoCEgAiAEBQhIKEF9wcmVzZXJ2ZV9sZW5ndGgiSAoUVHJhbnNmb3JtUGhvbmVOdW1iZXISHAoPcHJlc2VydmVfbGVuZ3RoGAEgASgISACIAQFCEgoQX3ByZXNlcnZlX2xlbmd0aCJDCg9UcmFuc2Zvcm1TdHJpbmcSHAoPcHJlc2VydmVfbGVuZ3RoGAEgASgISACIAQFCEgoQX3ByZXNlcnZlX2xlbmd0aCINCgtQYXNzdGhyb3VnaCIGCgROdWxsIiMKE1RyYW5zZm9ybUphdmFzY3JpcHQSDAoEY29kZRgBIAEoCSI0ChxVc2VyRGVmaW5lZFRyYW5zZm9ybWVyQ29uZmlnEhQKAmlkGAEgASgJQgi6SAVyA7ABASJACiFWYWxpZGF0ZVVzZXJKYXZhc2NyaXB0Q29kZVJlcXVlc3QSFQoEY29kZRgCIAEoCUIHukgEcgIQAUoECAEQAiIzCiJWYWxpZGF0ZVVzZXJKYXZhc2NyaXB0Q29kZVJlc3BvbnNlEg0KBXZhbGlkGAEgASgIIj0KE0dlbmVyYXRlQ2F0ZWdvcmljYWwSFwoKY2F0ZWdvcmllcxgBIAEoCUgAiAEBQg0KC19jYXRlZ29yaWVzIlYKGlRyYW5zZm9ybUNoYXJhY3RlclNjcmFtYmxlEiAKE3VzZXJfcHJvdmlkZWRfcmVnZXgYASABKAlIAIgBAUIWChRfdXNlcl9wcm92aWRlZF9yZWdleCIiChJHZW5lcmF0ZUphdmFzY3JpcHQSDAoEY29kZRgBIAEoCSJBChxWYWxpZGF0ZVVzZXJSZWdleENvZGVSZXF1ZXN0EhsKE3VzZXJfcHJvdmlkZWRfcmVnZXgYAiABKAlKBAgBEAIiLgodVmFsaWRhdGVVc2VyUmVnZXhDb2RlUmVzcG9uc2USDQoFdmFsaWQYASABKAgiSQoPR2VuZXJhdGVDb3VudHJ5Eh8KEmdlbmVyYXRlX2Z1bGxfbmFtZRgBIAEoCEgAiAEBQhUKE19nZW5lcmF0ZV9mdWxsX25hbWUiPgoeR2V0VHJhbnNmb3JtUGlpRW50aXRpZXNSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIjMKH0dldFRyYW5zZm9ybVBpaUVudGl0aWVzUmVzcG9uc2USEAoIZW50aXRpZXMYASADKAkiFgoUR2VuZXJhdGVCdXNpbmVzc05hbWUiWwoRR2VuZXJhdGVJcEFkZHJlc3MSOgoHaXBfdHlwZRgBIAEoDjIkLm1nbXQudjFhbHBoYTEuR2VuZXJhdGVJcEFkZHJlc3NUeXBlSACIAQFCCgoIX2lwX3R5cGUq4BAKEVRyYW5zZm9ybWVyU291cmNlEiIKHlRSQU5TRk9STUVSX1NPVVJDRV9VTlNQRUNJRklFRBAAEiIKHlRSQU5TRk9STUVSX1NPVVJDRV9QQVNTVEhST1VHSBABEicKI1RSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9ERUZBVUxUEAISKwonVFJBTlNGT1JNRVJfU09VUkNFX1RSQU5TRk9STV9KQVZBU0NSSVBUEAMSJQohVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX0VNQUlMEAQSJgoiVFJBTlNGT1JNRVJfU09VUkNFX1RSQU5TRk9STV9FTUFJTBAFEiQKIFRSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9CT09MEAYSKwonVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX0NBUkRfTlVNQkVSEAcSJAogVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX0NJVFkQCBIxCi1UUkFOU0ZPUk1FUl9TT1VSQ0VfR0VORVJBVEVfRTE2NF9QSE9ORV9OVU1CRVIQCRIqCiZUUkFOU0ZPUk1FUl9TT1VSQ0VfR0VORVJBVEVfRklSU1RfTkFNRRAKEicKI1RSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9GTE9BVDY0EAsSLAooVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX0ZVTExfQUREUkVTUxAMEikKJVRSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9GVUxMX05BTUUQDRImCiJUUkFOU0ZPUk1FUl9TT1VSQ0VfR0VORVJBVEVfR0VOREVSEA4SMgouVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX0lOVDY0X1BIT05FX05VTUJFUhAPEiUKIVRSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9JTlQ2NBAQEiwKKFRSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9SQU5ET01fSU5UNjQQERIpCiVUUkFOU0ZPUk1FUl9TT1VSQ0VfR0VORVJBVEVfTEFTVF9OQU1FEBISKgomVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX1NIQTI1NkhBU0gQExIjCh9UUkFOU0ZPUk1FUl9TT1VSQ0VfR0VORVJBVEVfU1NOEBQSJQohVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX1NUQVRFEBUSLgoqVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX1NUUkVFVF9BRERSRVNTEBYSMwovVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX1NUUklOR19QSE9ORV9OVU1CRVIQFxImCiJUUkFOU0ZPUk1FUl9TT1VSQ0VfR0VORVJBVEVfU1RSSU5HEBgSLQopVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX1JBTkRPTV9TVFJJTkcQGRItCilUUkFOU0ZPUk1FUl9TT1VSQ0VfR0VORVJBVEVfVU5JWFRJTUVTVEFNUBAaEigKJFRSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9VU0VSTkFNRRAbEiwKKFRSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9VVENUSU1FU1RBTVAQHBIkCiBUUkFOU0ZPUk1FUl9TT1VSQ0VfR0VORVJBVEVfVVVJRBAdEicKI1RSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9aSVBDT0RFEB4SMgouVFJBTlNGT1JNRVJfU09VUkNFX1RSQU5TRk9STV9FMTY0X1BIT05FX05VTUJFUhAfEisKJ1RSQU5TRk9STUVSX1NPVVJDRV9UUkFOU0ZPUk1fRklSU1RfTkFNRRAgEigKJFRSQU5TRk9STUVSX1NPVVJDRV9UUkFOU0ZPUk1fRkxPQVQ2NBAhEioKJlRSQU5TRk9STUVSX1NPVVJDRV9UUkFOU0ZPUk1fRlVMTF9OQU1FECISMwovVFJBTlNGT1JNRVJfU09VUkNFX1RSQU5TRk9STV9JTlQ2NF9QSE9ORV9OVU1CRVIQIxImCiJUUkFOU0ZPUk1FUl9TT1VSQ0VfVFJBTlNGT1JNX0lOVDY0ECQSKgomVFJBTlNGT1JNRVJfU09VUkNFX1RSQU5TRk9STV9MQVNUX05BTUUQJRItCilUUkFOU0ZPUk1FUl9TT1VSQ0VfVFJBTlNGT1JNX1BIT05FX05VTUJFUhAmEicKI1RSQU5TRk9STUVSX1NPVVJDRV9UUkFOU0ZPUk1fU1RSSU5HECcSJAogVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX05VTEwQKBIrCidUUkFOU0ZPUk1FUl9TT1VSQ0VfR0VORVJBVEVfQ0FURUdPUklDQUwQKhIzCi9UUkFOU0ZPUk1FUl9TT1VSQ0VfVFJBTlNGT1JNX0NIQVJBQ1RFUl9TQ1JBTUJMRRArEiMKH1RSQU5TRk9STUVSX1NPVVJDRV9VU0VSX0RFRklORUQQLBIqCiZUUkFOU0ZPUk1FUl9TT1VSQ0VfR0VORVJBVEVfSkFWQVNDUklQVBAtEicKI1RSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9DT1VOVFJZEC4SKQolVFJBTlNGT1JNRVJfU09VUkNFX1RSQU5TRk9STV9QSUlfVEVYVBAvEi0KKVRSQU5TRk9STUVSX1NPVVJDRV9HRU5FUkFURV9CVVNJTkVTU19OQU1FEDASKgomVFJBTlNGT1JNRVJfU09VUkNFX0dFTkVSQVRFX0lQX0FERFJFU1MQMSrEAgoTVHJhbnNmb3JtZXJEYXRhVHlwZRIlCiFUUkFOU0ZPUk1FUl9EQVRBX1RZUEVfVU5TUEVDSUZJRUQQABIgChxUUkFOU0ZPUk1FUl9EQVRBX1RZUEVfU1RSSU5HEAESHwobVFJBTlNGT1JNRVJfREFUQV9UWVBFX0lOVDY0EAISIQodVFJBTlNGT1JNRVJfREFUQV9UWVBFX0JPT0xFQU4QAxIhCh1UUkFOU0ZPUk1FUl9EQVRBX1RZUEVfRkxPQVQ2NBAEEh4KGlRSQU5TRk9STUVSX0RBVEFfVFlQRV9OVUxMEAUSHQoZVFJBTlNGT1JNRVJfREFUQV9UWVBFX0FOWRAGEh4KGlRSQU5TRk9STUVSX0RBVEFfVFlQRV9USU1FEAcSHgoaVFJBTlNGT1JNRVJfREFUQV9UWVBFX1VVSUQQCCp0ChBTdXBwb3J0ZWRKb2JUeXBlEiIKHlNVUFBPUlRFRF9KT0JfVFlQRV9VTlNQRUNJRklFRBAAEhsKF1NVUFBPUlRFRF9KT0JfVFlQRV9TWU5DEAESHwobU1VQUE9SVEVEX0pPQl9UWVBFX0dFTkVSQVRFEAIqewoRR2VuZXJhdGVFbWFpbFR5cGUSIwofR0VORVJBVEVfRU1BSUxfVFlQRV9VTlNQRUNJRklFRBAAEh8KG0dFTkVSQVRFX0VNQUlMX1RZUEVfVVVJRF9WNBABEiAKHEdFTkVSQVRFX0VNQUlMX1RZUEVfRlVMTE5BTUUQAirDAQoSSW52YWxpZEVtYWlsQWN0aW9uEiQKIElOVkFMSURfRU1BSUxfQUNUSU9OX1VOU1BFQ0lGSUVEEAASHwobSU5WQUxJRF9FTUFJTF9BQ1RJT05fUkVKRUNUEAESHQoZSU5WQUxJRF9FTUFJTF9BQ1RJT05fTlVMTBACEiQKIElOVkFMSURfRU1BSUxfQUNUSU9OX1BBU1NUSFJPVUdIEAMSIQodSU5WQUxJRF9FTUFJTF9BQ1RJT05fR0VORVJBVEUQBCqMAwoVR2VuZXJhdGVJcEFkZHJlc3NUeXBlEigKJEdFTkVSQVRFX0lQX0FERFJFU1NfVFlQRV9VTlNQRUNJRklFRBAAEiYKIkdFTkVSQVRFX0lQX0FERFJFU1NfVFlQRV9WNF9QVUJMSUMQARIpCiVHRU5FUkFURV9JUF9BRERSRVNTX1RZUEVfVjRfUFJJVkFURV9BEAISKQolR0VORVJBVEVfSVBfQUREUkVTU19UWVBFX1Y0X1BSSVZBVEVfQhADEikKJUdFTkVSQVRFX0lQX0FERFJFU1NfVFlQRV9WNF9QUklWQVRFX0MQBBIqCiZHRU5FUkFURV9JUF9BRERSRVNTX1RZUEVfVjRfTElOS19MT0NBTBAFEikKJUdFTkVSQVRFX0lQX0FERFJFU1NfVFlQRV9WNF9NVUxUSUNBU1QQBhIoCiRHRU5FUkFURV9JUF9BRERSRVNTX1RZUEVfVjRfTE9PUEJBQ0sQBxIfChtHRU5FUkFURV9JUF9BRERSRVNTX1RZUEVfVjYQCDLRCwoTVHJhbnNmb3JtZXJzU2VydmljZRJ0ChVHZXRTeXN0ZW1UcmFuc2Zvcm1lcnMSKy5tZ210LnYxYWxwaGExLkdldFN5c3RlbVRyYW5zZm9ybWVyc1JlcXVlc3QaLC5tZ210LnYxYWxwaGExLkdldFN5c3RlbVRyYW5zZm9ybWVyc1Jlc3BvbnNlIgASiQEKHEdldFN5c3RlbVRyYW5zZm9ybWVyQnlTb3VyY2USMi5tZ210LnYxYWxwaGExLkdldFN5c3RlbVRyYW5zZm9ybWVyQnlTb3VyY2VSZXF1ZXN0GjMubWdtdC52MWFscGhhMS5HZXRTeXN0ZW1UcmFuc2Zvcm1lckJ5U291cmNlUmVzcG9uc2UiABKDAQoaR2V0VXNlckRlZmluZWRUcmFuc2Zvcm1lcnMSMC5tZ210LnYxYWxwaGExLkdldFVzZXJEZWZpbmVkVHJhbnNmb3JtZXJzUmVxdWVzdBoxLm1nbXQudjFhbHBoYTEuR2V0VXNlckRlZmluZWRUcmFuc2Zvcm1lcnNSZXNwb25zZSIAEowBCh1HZXRVc2VyRGVmaW5lZFRyYW5zZm9ybWVyQnlJZBIzLm1nbXQudjFhbHBoYTEuR2V0VXNlckRlZmluZWRUcmFuc2Zvcm1lckJ5SWRSZXF1ZXN0GjQubWdtdC52MWFscGhhMS5HZXRVc2VyRGVmaW5lZFRyYW5zZm9ybWVyQnlJZFJlc3BvbnNlIgASiQEKHENyZWF0ZVVzZXJEZWZpbmVkVHJhbnNmb3JtZXISMi5tZ210LnYxYWxwaGExLkNyZWF0ZVVzZXJEZWZpbmVkVHJhbnNmb3JtZXJSZXF1ZXN0GjMubWdtdC52MWFscGhhMS5DcmVhdGVVc2VyRGVmaW5lZFRyYW5zZm9ybWVyUmVzcG9uc2UiABKJAQocRGVsZXRlVXNlckRlZmluZWRUcmFuc2Zvcm1lchIyLm1nbXQudjFhbHBoYTEuRGVsZXRlVXNlckRlZmluZWRUcmFuc2Zvcm1lclJlcXVlc3QaMy5tZ210LnYxYWxwaGExLkRlbGV0ZVVzZXJEZWZpbmVkVHJhbnNmb3JtZXJSZXNwb25zZSIAEokBChxVcGRhdGVVc2VyRGVmaW5lZFRyYW5zZm9ybWVyEjIubWdtdC52MWFscGhhMS5VcGRhdGVVc2VyRGVmaW5lZFRyYW5zZm9ybWVyUmVxdWVzdBozLm1nbXQudjFhbHBoYTEuVXBkYXRlVXNlckRlZmluZWRUcmFuc2Zvcm1lclJlc3BvbnNlIgASgwEKGklzVHJhbnNmb3JtZXJOYW1lQXZhaWxhYmxlEjAubWdtdC52MWFscGhhMS5Jc1RyYW5zZm9ybWVyTmFtZUF2YWlsYWJsZVJlcXVlc3QaMS5tZ210LnYxYWxwaGExLklzVHJhbnNmb3JtZXJOYW1lQXZhaWxhYmxlUmVzcG9uc2UiABKDAQoaVmFsaWRhdGVVc2VySmF2YXNjcmlwdENvZGUSMC5tZ210LnYxYWxwaGExLlZhbGlkYXRlVXNlckphdmFzY3JpcHRDb2RlUmVxdWVzdBoxLm1nbXQudjFhbHBoYTEuVmFsaWRhdGVVc2VySmF2YXNjcmlwdENvZGVSZXNwb25zZSIAEnQKFVZhbGlkYXRlVXNlclJlZ2V4Q29kZRIrLm1nbXQudjFhbHBoYTEuVmFsaWRhdGVVc2VyUmVnZXhDb2RlUmVxdWVzdBosLm1nbXQudjFhbHBoYTEuVmFsaWRhdGVVc2VyUmVnZXhDb2RlUmVzcG9uc2UiABJ9ChdHZXRUcmFuc2Zvcm1QaWlFbnRpdGllcxItLm1nbXQudjFhbHBoYTEuR2V0VHJhbnNmb3JtUGlpRW50aXRpZXNSZXF1ZXN0Gi4ubWdtdC52MWFscGhhMS5HZXRUcmFuc2Zvcm1QaWlFbnRpdGllc1Jlc3BvbnNlIgOQAgFCzAEKEWNvbS5tZ210LnYxYWxwaGExQhBUcmFuc2Zvcm1lclByb3RvUAFaUGdpdGh1Yi5jb20vbnVjbGV1c2Nsb3VkL25lb3N5bmMvYmFja2VuZC9nZW4vZ28vcHJvdG9zL21nbXQvdjFhbHBoYTE7bWdtdHYxYWxwaGExogIDTVhYqgINTWdtdC5WMWFscGhhMcoCDU1nbXRcVjFhbHBoYTHiAhlNZ210XFYxYWxwaGExXEdQQk1ldGFkYXRh6gIOTWdtdDo6VjFhbHBoYTFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_timestamp]); - /** - * @generated from enum value: TRANSFORMER_SOURCE_PASSTHROUGH = 1; - */ - PASSTHROUGH = 1, +/** + * @generated from message mgmt.v1alpha1.GetSystemTransformersRequest + */ +export type GetSystemTransformersRequest = Message<"mgmt.v1alpha1.GetSystemTransformersRequest"> & { +}; - /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_DEFAULT = 2; - */ - GENERATE_DEFAULT = 2, +/** + * Describes the message mgmt.v1alpha1.GetSystemTransformersRequest. + * Use `create(GetSystemTransformersRequestSchema)` to create a new message. + */ +export const GetSystemTransformersRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 0); +/** + * @generated from message mgmt.v1alpha1.GetSystemTransformersResponse + */ +export type GetSystemTransformersResponse = Message<"mgmt.v1alpha1.GetSystemTransformersResponse"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_JAVASCRIPT = 3; + * @generated from field: repeated mgmt.v1alpha1.SystemTransformer transformers = 1; */ - TRANSFORM_JAVASCRIPT = 3, + transformers: SystemTransformer[]; +}; - /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_EMAIL = 4; - */ - GENERATE_EMAIL = 4, +/** + * Describes the message mgmt.v1alpha1.GetSystemTransformersResponse. + * Use `create(GetSystemTransformersResponseSchema)` to create a new message. + */ +export const GetSystemTransformersResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 1); +/** + * @generated from message mgmt.v1alpha1.GetSystemTransformerBySourceRequest + */ +export type GetSystemTransformerBySourceRequest = Message<"mgmt.v1alpha1.GetSystemTransformerBySourceRequest"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_EMAIL = 5; + * @generated from field: mgmt.v1alpha1.TransformerSource source = 1; */ - TRANSFORM_EMAIL = 5, + source: TransformerSource; +}; - /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_BOOL = 6; - */ - GENERATE_BOOL = 6, +/** + * Describes the message mgmt.v1alpha1.GetSystemTransformerBySourceRequest. + * Use `create(GetSystemTransformerBySourceRequestSchema)` to create a new message. + */ +export const GetSystemTransformerBySourceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 2); +/** + * @generated from message mgmt.v1alpha1.GetSystemTransformerBySourceResponse + */ +export type GetSystemTransformerBySourceResponse = Message<"mgmt.v1alpha1.GetSystemTransformerBySourceResponse"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_CARD_NUMBER = 7; + * @generated from field: mgmt.v1alpha1.SystemTransformer transformer = 1; */ - GENERATE_CARD_NUMBER = 7, + transformer?: SystemTransformer; +}; - /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_CITY = 8; - */ - GENERATE_CITY = 8, +/** + * Describes the message mgmt.v1alpha1.GetSystemTransformerBySourceResponse. + * Use `create(GetSystemTransformerBySourceResponseSchema)` to create a new message. + */ +export const GetSystemTransformerBySourceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 3); +/** + * @generated from message mgmt.v1alpha1.GetUserDefinedTransformersRequest + */ +export type GetUserDefinedTransformersRequest = Message<"mgmt.v1alpha1.GetUserDefinedTransformersRequest"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_E164_PHONE_NUMBER = 9; + * @generated from field: string account_id = 1; */ - GENERATE_E164_PHONE_NUMBER = 9, + accountId: string; +}; + +/** + * Describes the message mgmt.v1alpha1.GetUserDefinedTransformersRequest. + * Use `create(GetUserDefinedTransformersRequestSchema)` to create a new message. + */ +export const GetUserDefinedTransformersRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 4); +/** + * @generated from message mgmt.v1alpha1.GetUserDefinedTransformersResponse + */ +export type GetUserDefinedTransformersResponse = Message<"mgmt.v1alpha1.GetUserDefinedTransformersResponse"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_FIRST_NAME = 10; + * @generated from field: repeated mgmt.v1alpha1.UserDefinedTransformer transformers = 1; */ - GENERATE_FIRST_NAME = 10, + transformers: UserDefinedTransformer[]; +}; + +/** + * Describes the message mgmt.v1alpha1.GetUserDefinedTransformersResponse. + * Use `create(GetUserDefinedTransformersResponseSchema)` to create a new message. + */ +export const GetUserDefinedTransformersResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 5); +/** + * @generated from message mgmt.v1alpha1.GetUserDefinedTransformerByIdRequest + */ +export type GetUserDefinedTransformerByIdRequest = Message<"mgmt.v1alpha1.GetUserDefinedTransformerByIdRequest"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_FLOAT64 = 11; + * @generated from field: string transformer_id = 1; */ - GENERATE_FLOAT64 = 11, + transformerId: string; +}; +/** + * Describes the message mgmt.v1alpha1.GetUserDefinedTransformerByIdRequest. + * Use `create(GetUserDefinedTransformerByIdRequestSchema)` to create a new message. + */ +export const GetUserDefinedTransformerByIdRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 6); + +/** + * @generated from message mgmt.v1alpha1.GetUserDefinedTransformerByIdResponse + */ +export type GetUserDefinedTransformerByIdResponse = Message<"mgmt.v1alpha1.GetUserDefinedTransformerByIdResponse"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_FULL_ADDRESS = 12; + * @generated from field: mgmt.v1alpha1.UserDefinedTransformer transformer = 1; */ - GENERATE_FULL_ADDRESS = 12, + transformer?: UserDefinedTransformer; +}; + +/** + * Describes the message mgmt.v1alpha1.GetUserDefinedTransformerByIdResponse. + * Use `create(GetUserDefinedTransformerByIdResponseSchema)` to create a new message. + */ +export const GetUserDefinedTransformerByIdResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 7); +/** + * @generated from message mgmt.v1alpha1.CreateUserDefinedTransformerRequest + */ +export type CreateUserDefinedTransformerRequest = Message<"mgmt.v1alpha1.CreateUserDefinedTransformerRequest"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_FULL_NAME = 13; + * @generated from field: string account_id = 1; */ - GENERATE_FULL_NAME = 13, + accountId: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_GENDER = 14; + * @generated from field: string name = 2; */ - GENERATE_GENDER = 14, + name: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_INT64_PHONE_NUMBER = 15; + * @generated from field: string description = 3; */ - GENERATE_INT64_PHONE_NUMBER = 15, + description: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_INT64 = 16; + * @generated from field: mgmt.v1alpha1.TransformerSource source = 5; */ - GENERATE_INT64 = 16, + source: TransformerSource; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_RANDOM_INT64 = 17; + * @generated from field: mgmt.v1alpha1.TransformerConfig transformer_config = 6; */ - GENERATE_RANDOM_INT64 = 17, + transformerConfig?: TransformerConfig; +}; +/** + * Describes the message mgmt.v1alpha1.CreateUserDefinedTransformerRequest. + * Use `create(CreateUserDefinedTransformerRequestSchema)` to create a new message. + */ +export const CreateUserDefinedTransformerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 8); + +/** + * @generated from message mgmt.v1alpha1.CreateUserDefinedTransformerResponse + */ +export type CreateUserDefinedTransformerResponse = Message<"mgmt.v1alpha1.CreateUserDefinedTransformerResponse"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_LAST_NAME = 18; + * @generated from field: mgmt.v1alpha1.UserDefinedTransformer transformer = 1; */ - GENERATE_LAST_NAME = 18, + transformer?: UserDefinedTransformer; +}; + +/** + * Describes the message mgmt.v1alpha1.CreateUserDefinedTransformerResponse. + * Use `create(CreateUserDefinedTransformerResponseSchema)` to create a new message. + */ +export const CreateUserDefinedTransformerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 9); +/** + * @generated from message mgmt.v1alpha1.DeleteUserDefinedTransformerRequest + */ +export type DeleteUserDefinedTransformerRequest = Message<"mgmt.v1alpha1.DeleteUserDefinedTransformerRequest"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_SHA256HASH = 19; + * @generated from field: string transformer_id = 1; */ - GENERATE_SHA256HASH = 19, + transformerId: string; +}; + +/** + * Describes the message mgmt.v1alpha1.DeleteUserDefinedTransformerRequest. + * Use `create(DeleteUserDefinedTransformerRequestSchema)` to create a new message. + */ +export const DeleteUserDefinedTransformerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 10); + +/** + * @generated from message mgmt.v1alpha1.DeleteUserDefinedTransformerResponse + */ +export type DeleteUserDefinedTransformerResponse = Message<"mgmt.v1alpha1.DeleteUserDefinedTransformerResponse"> & { +}; + +/** + * Describes the message mgmt.v1alpha1.DeleteUserDefinedTransformerResponse. + * Use `create(DeleteUserDefinedTransformerResponseSchema)` to create a new message. + */ +export const DeleteUserDefinedTransformerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 11); +/** + * @generated from message mgmt.v1alpha1.UpdateUserDefinedTransformerRequest + */ +export type UpdateUserDefinedTransformerRequest = Message<"mgmt.v1alpha1.UpdateUserDefinedTransformerRequest"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_SSN = 20; + * @generated from field: string transformer_id = 1; */ - GENERATE_SSN = 20, + transformerId: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_STATE = 21; + * @generated from field: string name = 2; */ - GENERATE_STATE = 21, + name: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_STREET_ADDRESS = 22; + * @generated from field: string description = 3; */ - GENERATE_STREET_ADDRESS = 22, + description: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_STRING_PHONE_NUMBER = 23; + * @generated from field: mgmt.v1alpha1.TransformerConfig transformer_config = 4; */ - GENERATE_STRING_PHONE_NUMBER = 23, + transformerConfig?: TransformerConfig; +}; + +/** + * Describes the message mgmt.v1alpha1.UpdateUserDefinedTransformerRequest. + * Use `create(UpdateUserDefinedTransformerRequestSchema)` to create a new message. + */ +export const UpdateUserDefinedTransformerRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 12); +/** + * @generated from message mgmt.v1alpha1.UpdateUserDefinedTransformerResponse + */ +export type UpdateUserDefinedTransformerResponse = Message<"mgmt.v1alpha1.UpdateUserDefinedTransformerResponse"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_STRING = 24; + * @generated from field: mgmt.v1alpha1.UserDefinedTransformer transformer = 1; */ - GENERATE_STRING = 24, + transformer?: UserDefinedTransformer; +}; + +/** + * Describes the message mgmt.v1alpha1.UpdateUserDefinedTransformerResponse. + * Use `create(UpdateUserDefinedTransformerResponseSchema)` to create a new message. + */ +export const UpdateUserDefinedTransformerResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 13); +/** + * @generated from message mgmt.v1alpha1.IsTransformerNameAvailableRequest + */ +export type IsTransformerNameAvailableRequest = Message<"mgmt.v1alpha1.IsTransformerNameAvailableRequest"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_RANDOM_STRING = 25; + * @generated from field: string account_id = 1; */ - GENERATE_RANDOM_STRING = 25, + accountId: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_UNIXTIMESTAMP = 26; + * @generated from field: string transformer_name = 2; */ - GENERATE_UNIXTIMESTAMP = 26, + transformerName: string; +}; + +/** + * Describes the message mgmt.v1alpha1.IsTransformerNameAvailableRequest. + * Use `create(IsTransformerNameAvailableRequestSchema)` to create a new message. + */ +export const IsTransformerNameAvailableRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 14); +/** + * @generated from message mgmt.v1alpha1.IsTransformerNameAvailableResponse + */ +export type IsTransformerNameAvailableResponse = Message<"mgmt.v1alpha1.IsTransformerNameAvailableResponse"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_USERNAME = 27; + * @generated from field: bool is_available = 1; */ - GENERATE_USERNAME = 27, + isAvailable: boolean; +}; +/** + * Describes the message mgmt.v1alpha1.IsTransformerNameAvailableResponse. + * Use `create(IsTransformerNameAvailableResponseSchema)` to create a new message. + */ +export const IsTransformerNameAvailableResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 15); + +/** + * @generated from message mgmt.v1alpha1.UserDefinedTransformer + */ +export type UserDefinedTransformer = Message<"mgmt.v1alpha1.UserDefinedTransformer"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_UTCTIMESTAMP = 28; + * @generated from field: string id = 1; */ - GENERATE_UTCTIMESTAMP = 28, + id: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_UUID = 29; + * @generated from field: string name = 2; */ - GENERATE_UUID = 29, + name: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_ZIPCODE = 30; + * @generated from field: string description = 3; */ - GENERATE_ZIPCODE = 30, + description: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_E164_PHONE_NUMBER = 31; + * This property is readonly and is calculated based off the origin system transformer + * + * @generated from field: mgmt.v1alpha1.TransformerDataType data_type = 5; */ - TRANSFORM_E164_PHONE_NUMBER = 31, + dataType: TransformerDataType; /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_FIRST_NAME = 32; + * @generated from field: mgmt.v1alpha1.TransformerSource source = 6; */ - TRANSFORM_FIRST_NAME = 32, + source: TransformerSource; /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_FLOAT64 = 33; + * @generated from field: mgmt.v1alpha1.TransformerConfig config = 7; */ - TRANSFORM_FLOAT64 = 33, + config?: TransformerConfig; /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_FULL_NAME = 34; + * @generated from field: google.protobuf.Timestamp created_at = 8; */ - TRANSFORM_FULL_NAME = 34, + createdAt?: Timestamp; /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_INT64_PHONE_NUMBER = 35; + * @generated from field: google.protobuf.Timestamp updated_at = 9; */ - TRANSFORM_INT64_PHONE_NUMBER = 35, + updatedAt?: Timestamp; /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_INT64 = 36; + * @generated from field: string account_id = 10; */ - TRANSFORM_INT64 = 36, + accountId: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_LAST_NAME = 37; + * @generated from field: repeated mgmt.v1alpha1.TransformerDataType data_types = 11; */ - TRANSFORM_LAST_NAME = 37, + dataTypes: TransformerDataType[]; +}; + +/** + * Describes the message mgmt.v1alpha1.UserDefinedTransformer. + * Use `create(UserDefinedTransformerSchema)` to create a new message. + */ +export const UserDefinedTransformerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 16); +/** + * @generated from message mgmt.v1alpha1.SystemTransformer + */ +export type SystemTransformer = Message<"mgmt.v1alpha1.SystemTransformer"> & { /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_PHONE_NUMBER = 38; + * @generated from field: string name = 1; */ - TRANSFORM_PHONE_NUMBER = 38, + name: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_STRING = 39; + * @generated from field: string description = 2; */ - TRANSFORM_STRING = 39, + description: string; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_NULL = 40; + * @generated from field: mgmt.v1alpha1.TransformerDataType data_type = 3; */ - GENERATE_NULL = 40, + dataType: TransformerDataType; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_CATEGORICAL = 42; + * @generated from field: mgmt.v1alpha1.TransformerSource source = 4; */ - GENERATE_CATEGORICAL = 42, + source: TransformerSource; /** - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_CHARACTER_SCRAMBLE = 43; + * @generated from field: mgmt.v1alpha1.TransformerConfig config = 5; */ - TRANSFORM_CHARACTER_SCRAMBLE = 43, + config?: TransformerConfig; /** - * @generated from enum value: TRANSFORMER_SOURCE_USER_DEFINED = 44; + * @generated from field: repeated mgmt.v1alpha1.TransformerDataType data_types = 6; */ - USER_DEFINED = 44, + dataTypes: TransformerDataType[]; /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_JAVASCRIPT = 45; + * @generated from field: repeated mgmt.v1alpha1.SupportedJobType supported_job_types = 7; */ - GENERATE_JAVASCRIPT = 45, - - /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_COUNTRY = 46; - */ - GENERATE_COUNTRY = 46, - - /** - * NeosyncCloud/Enterprise only transformer for anonymizing PII Text - * - * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_PII_TEXT = 47; - */ - TRANSFORM_PII_TEXT = 47, - - /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_BUSINESS_NAME = 48; - */ - GENERATE_BUSINESS_NAME = 48, - - /** - * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_IP_ADDRESS = 49; - */ - GENERATE_IP_ADDRESS = 49, -} -// Retrieve enum metadata with: proto3.getEnumType(TransformerSource) -proto3.util.setEnumType(TransformerSource, "mgmt.v1alpha1.TransformerSource", [ - { no: 0, name: "TRANSFORMER_SOURCE_UNSPECIFIED" }, - { no: 1, name: "TRANSFORMER_SOURCE_PASSTHROUGH" }, - { no: 2, name: "TRANSFORMER_SOURCE_GENERATE_DEFAULT" }, - { no: 3, name: "TRANSFORMER_SOURCE_TRANSFORM_JAVASCRIPT" }, - { no: 4, name: "TRANSFORMER_SOURCE_GENERATE_EMAIL" }, - { no: 5, name: "TRANSFORMER_SOURCE_TRANSFORM_EMAIL" }, - { no: 6, name: "TRANSFORMER_SOURCE_GENERATE_BOOL" }, - { no: 7, name: "TRANSFORMER_SOURCE_GENERATE_CARD_NUMBER" }, - { no: 8, name: "TRANSFORMER_SOURCE_GENERATE_CITY" }, - { no: 9, name: "TRANSFORMER_SOURCE_GENERATE_E164_PHONE_NUMBER" }, - { no: 10, name: "TRANSFORMER_SOURCE_GENERATE_FIRST_NAME" }, - { no: 11, name: "TRANSFORMER_SOURCE_GENERATE_FLOAT64" }, - { no: 12, name: "TRANSFORMER_SOURCE_GENERATE_FULL_ADDRESS" }, - { no: 13, name: "TRANSFORMER_SOURCE_GENERATE_FULL_NAME" }, - { no: 14, name: "TRANSFORMER_SOURCE_GENERATE_GENDER" }, - { no: 15, name: "TRANSFORMER_SOURCE_GENERATE_INT64_PHONE_NUMBER" }, - { no: 16, name: "TRANSFORMER_SOURCE_GENERATE_INT64" }, - { no: 17, name: "TRANSFORMER_SOURCE_GENERATE_RANDOM_INT64" }, - { no: 18, name: "TRANSFORMER_SOURCE_GENERATE_LAST_NAME" }, - { no: 19, name: "TRANSFORMER_SOURCE_GENERATE_SHA256HASH" }, - { no: 20, name: "TRANSFORMER_SOURCE_GENERATE_SSN" }, - { no: 21, name: "TRANSFORMER_SOURCE_GENERATE_STATE" }, - { no: 22, name: "TRANSFORMER_SOURCE_GENERATE_STREET_ADDRESS" }, - { no: 23, name: "TRANSFORMER_SOURCE_GENERATE_STRING_PHONE_NUMBER" }, - { no: 24, name: "TRANSFORMER_SOURCE_GENERATE_STRING" }, - { no: 25, name: "TRANSFORMER_SOURCE_GENERATE_RANDOM_STRING" }, - { no: 26, name: "TRANSFORMER_SOURCE_GENERATE_UNIXTIMESTAMP" }, - { no: 27, name: "TRANSFORMER_SOURCE_GENERATE_USERNAME" }, - { no: 28, name: "TRANSFORMER_SOURCE_GENERATE_UTCTIMESTAMP" }, - { no: 29, name: "TRANSFORMER_SOURCE_GENERATE_UUID" }, - { no: 30, name: "TRANSFORMER_SOURCE_GENERATE_ZIPCODE" }, - { no: 31, name: "TRANSFORMER_SOURCE_TRANSFORM_E164_PHONE_NUMBER" }, - { no: 32, name: "TRANSFORMER_SOURCE_TRANSFORM_FIRST_NAME" }, - { no: 33, name: "TRANSFORMER_SOURCE_TRANSFORM_FLOAT64" }, - { no: 34, name: "TRANSFORMER_SOURCE_TRANSFORM_FULL_NAME" }, - { no: 35, name: "TRANSFORMER_SOURCE_TRANSFORM_INT64_PHONE_NUMBER" }, - { no: 36, name: "TRANSFORMER_SOURCE_TRANSFORM_INT64" }, - { no: 37, name: "TRANSFORMER_SOURCE_TRANSFORM_LAST_NAME" }, - { no: 38, name: "TRANSFORMER_SOURCE_TRANSFORM_PHONE_NUMBER" }, - { no: 39, name: "TRANSFORMER_SOURCE_TRANSFORM_STRING" }, - { no: 40, name: "TRANSFORMER_SOURCE_GENERATE_NULL" }, - { no: 42, name: "TRANSFORMER_SOURCE_GENERATE_CATEGORICAL" }, - { no: 43, name: "TRANSFORMER_SOURCE_TRANSFORM_CHARACTER_SCRAMBLE" }, - { no: 44, name: "TRANSFORMER_SOURCE_USER_DEFINED" }, - { no: 45, name: "TRANSFORMER_SOURCE_GENERATE_JAVASCRIPT" }, - { no: 46, name: "TRANSFORMER_SOURCE_GENERATE_COUNTRY" }, - { no: 47, name: "TRANSFORMER_SOURCE_TRANSFORM_PII_TEXT" }, - { no: 48, name: "TRANSFORMER_SOURCE_GENERATE_BUSINESS_NAME" }, - { no: 49, name: "TRANSFORMER_SOURCE_GENERATE_IP_ADDRESS" }, -]); - -/** - * @generated from enum mgmt.v1alpha1.TransformerDataType - */ -export enum TransformerDataType { - /** - * @generated from enum value: TRANSFORMER_DATA_TYPE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: TRANSFORMER_DATA_TYPE_STRING = 1; - */ - STRING = 1, - - /** - * @generated from enum value: TRANSFORMER_DATA_TYPE_INT64 = 2; - */ - INT64 = 2, - - /** - * @generated from enum value: TRANSFORMER_DATA_TYPE_BOOLEAN = 3; - */ - BOOLEAN = 3, - - /** - * @generated from enum value: TRANSFORMER_DATA_TYPE_FLOAT64 = 4; - */ - FLOAT64 = 4, - - /** - * @generated from enum value: TRANSFORMER_DATA_TYPE_NULL = 5; - */ - NULL = 5, - - /** - * @generated from enum value: TRANSFORMER_DATA_TYPE_ANY = 6; - */ - ANY = 6, - - /** - * @generated from enum value: TRANSFORMER_DATA_TYPE_TIME = 7; - */ - TIME = 7, - - /** - * @generated from enum value: TRANSFORMER_DATA_TYPE_UUID = 8; - */ - UUID = 8, -} -// Retrieve enum metadata with: proto3.getEnumType(TransformerDataType) -proto3.util.setEnumType(TransformerDataType, "mgmt.v1alpha1.TransformerDataType", [ - { no: 0, name: "TRANSFORMER_DATA_TYPE_UNSPECIFIED" }, - { no: 1, name: "TRANSFORMER_DATA_TYPE_STRING" }, - { no: 2, name: "TRANSFORMER_DATA_TYPE_INT64" }, - { no: 3, name: "TRANSFORMER_DATA_TYPE_BOOLEAN" }, - { no: 4, name: "TRANSFORMER_DATA_TYPE_FLOAT64" }, - { no: 5, name: "TRANSFORMER_DATA_TYPE_NULL" }, - { no: 6, name: "TRANSFORMER_DATA_TYPE_ANY" }, - { no: 7, name: "TRANSFORMER_DATA_TYPE_TIME" }, - { no: 8, name: "TRANSFORMER_DATA_TYPE_UUID" }, -]); - -/** - * @generated from enum mgmt.v1alpha1.SupportedJobType - */ -export enum SupportedJobType { - /** - * @generated from enum value: SUPPORTED_JOB_TYPE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: SUPPORTED_JOB_TYPE_SYNC = 1; - */ - SYNC = 1, - - /** - * @generated from enum value: SUPPORTED_JOB_TYPE_GENERATE = 2; - */ - GENERATE = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(SupportedJobType) -proto3.util.setEnumType(SupportedJobType, "mgmt.v1alpha1.SupportedJobType", [ - { no: 0, name: "SUPPORTED_JOB_TYPE_UNSPECIFIED" }, - { no: 1, name: "SUPPORTED_JOB_TYPE_SYNC" }, - { no: 2, name: "SUPPORTED_JOB_TYPE_GENERATE" }, -]); - -/** - * @generated from enum mgmt.v1alpha1.GenerateEmailType - */ -export enum GenerateEmailType { - /** - * Unspecified defaults to uuid v4 - * - * @generated from enum value: GENERATE_EMAIL_TYPE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * Generates a random uuid v4 (without hyphens) on the left side of the @. This has all the uniqueness guarantees of the standard uuid v4, along with randomized domains. - * - * @generated from enum value: GENERATE_EMAIL_TYPE_UUID_V4 = 1; - */ - UUID_V4 = 1, - - /** - * Generates a full name (firstnamelastname) on the left side of the @. This has high cardinality but is not guaranteed to be unique. - * - * @generated from enum value: GENERATE_EMAIL_TYPE_FULLNAME = 2; - */ - FULLNAME = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(GenerateEmailType) -proto3.util.setEnumType(GenerateEmailType, "mgmt.v1alpha1.GenerateEmailType", [ - { no: 0, name: "GENERATE_EMAIL_TYPE_UNSPECIFIED" }, - { no: 1, name: "GENERATE_EMAIL_TYPE_UUID_V4" }, - { no: 2, name: "GENERATE_EMAIL_TYPE_FULLNAME" }, -]); - -/** - * Action enumeration that dictates what the transform_email transformer should do in the case that it encounters an email that does not conform to RFC 5322 - * - * @generated from enum mgmt.v1alpha1.InvalidEmailAction - */ -export enum InvalidEmailAction { - /** - * Unspecified defaults to reject. - * - * @generated from enum value: INVALID_EMAIL_ACTION_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * If an invalid email is encountered, the transformer will reject the transformation and exit. - * - * @generated from enum value: INVALID_EMAIL_ACTION_REJECT = 1; - */ - REJECT = 1, - - /** - * The result of the email will be null. This should only be specified if the destination column is also nullable. - * - * @generated from enum value: INVALID_EMAIL_ACTION_NULL = 2; - */ - NULL = 2, - - /** - * The result of the email will be identical to the original value, unmodified. - * - * @generated from enum value: INVALID_EMAIL_ACTION_PASSTHROUGH = 3; - */ - PASSTHROUGH = 3, - - /** - * The result of the email will be a brand new generated email. This is the same result as the generate_email transformer. - * - * @generated from enum value: INVALID_EMAIL_ACTION_GENERATE = 4; - */ - GENERATE = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(InvalidEmailAction) -proto3.util.setEnumType(InvalidEmailAction, "mgmt.v1alpha1.InvalidEmailAction", [ - { no: 0, name: "INVALID_EMAIL_ACTION_UNSPECIFIED" }, - { no: 1, name: "INVALID_EMAIL_ACTION_REJECT" }, - { no: 2, name: "INVALID_EMAIL_ACTION_NULL" }, - { no: 3, name: "INVALID_EMAIL_ACTION_PASSTHROUGH" }, - { no: 4, name: "INVALID_EMAIL_ACTION_GENERATE" }, -]); - -/** - * @generated from enum mgmt.v1alpha1.GenerateIpAddressType - */ -export enum GenerateIpAddressType { - /** - * Unspecified defaults to ipv4 - * - * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * Generates a random ipv4_public - * - * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_PUBLIC = 1; - */ - V4_PUBLIC = 1, - - /** - * Generates a random ipv4_private_a - * - * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_A = 2; - */ - V4_PRIVATE_A = 2, - - /** - * Generates a random ipv4_private_b - * - * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_B = 3; - */ - V4_PRIVATE_B = 3, - - /** - * Generates a random ipv4_private_c - * - * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_C = 4; - */ - V4_PRIVATE_C = 4, - - /** - * Generates a random ipv4_linklocal - * - * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_LINK_LOCAL = 5; - */ - V4_LINK_LOCAL = 5, - - /** - * Generates a random ipv4_multicast - * - * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_MULTICAST = 6; - */ - V4_MULTICAST = 6, - - /** - * Generates a random ipv4_loopback - * - * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_LOOPBACK = 7; - */ - V4_LOOPBACK = 7, - - /** - * Generates a random ipv6 - * - * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V6 = 8; - */ - V6 = 8, -} -// Retrieve enum metadata with: proto3.getEnumType(GenerateIpAddressType) -proto3.util.setEnumType(GenerateIpAddressType, "mgmt.v1alpha1.GenerateIpAddressType", [ - { no: 0, name: "GENERATE_IP_ADDRESS_TYPE_UNSPECIFIED" }, - { no: 1, name: "GENERATE_IP_ADDRESS_TYPE_V4_PUBLIC" }, - { no: 2, name: "GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_A" }, - { no: 3, name: "GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_B" }, - { no: 4, name: "GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_C" }, - { no: 5, name: "GENERATE_IP_ADDRESS_TYPE_V4_LINK_LOCAL" }, - { no: 6, name: "GENERATE_IP_ADDRESS_TYPE_V4_MULTICAST" }, - { no: 7, name: "GENERATE_IP_ADDRESS_TYPE_V4_LOOPBACK" }, - { no: 8, name: "GENERATE_IP_ADDRESS_TYPE_V6" }, -]); - -/** - * @generated from message mgmt.v1alpha1.GetSystemTransformersRequest - */ -export class GetSystemTransformersRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetSystemTransformersRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSystemTransformersRequest { - return new GetSystemTransformersRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSystemTransformersRequest { - return new GetSystemTransformersRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSystemTransformersRequest { - return new GetSystemTransformersRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetSystemTransformersRequest | PlainMessage | undefined, b: GetSystemTransformersRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSystemTransformersRequest, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.GetSystemTransformersResponse - */ -export class GetSystemTransformersResponse extends Message { - /** - * @generated from field: repeated mgmt.v1alpha1.SystemTransformer transformers = 1; - */ - transformers: SystemTransformer[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetSystemTransformersResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transformers", kind: "message", T: SystemTransformer, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSystemTransformersResponse { - return new GetSystemTransformersResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSystemTransformersResponse { - return new GetSystemTransformersResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSystemTransformersResponse { - return new GetSystemTransformersResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetSystemTransformersResponse | PlainMessage | undefined, b: GetSystemTransformersResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSystemTransformersResponse, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.GetSystemTransformerBySourceRequest - */ -export class GetSystemTransformerBySourceRequest extends Message { - /** - * @generated from field: mgmt.v1alpha1.TransformerSource source = 1; - */ - source = TransformerSource.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetSystemTransformerBySourceRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "source", kind: "enum", T: proto3.getEnumType(TransformerSource) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSystemTransformerBySourceRequest { - return new GetSystemTransformerBySourceRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSystemTransformerBySourceRequest { - return new GetSystemTransformerBySourceRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSystemTransformerBySourceRequest { - return new GetSystemTransformerBySourceRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetSystemTransformerBySourceRequest | PlainMessage | undefined, b: GetSystemTransformerBySourceRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSystemTransformerBySourceRequest, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.GetSystemTransformerBySourceResponse - */ -export class GetSystemTransformerBySourceResponse extends Message { - /** - * @generated from field: mgmt.v1alpha1.SystemTransformer transformer = 1; - */ - transformer?: SystemTransformer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetSystemTransformerBySourceResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transformer", kind: "message", T: SystemTransformer }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSystemTransformerBySourceResponse { - return new GetSystemTransformerBySourceResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSystemTransformerBySourceResponse { - return new GetSystemTransformerBySourceResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSystemTransformerBySourceResponse { - return new GetSystemTransformerBySourceResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetSystemTransformerBySourceResponse | PlainMessage | undefined, b: GetSystemTransformerBySourceResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSystemTransformerBySourceResponse, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.GetUserDefinedTransformersRequest - */ -export class GetUserDefinedTransformersRequest extends Message { - /** - * @generated from field: string account_id = 1; - */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetUserDefinedTransformersRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserDefinedTransformersRequest { - return new GetUserDefinedTransformersRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserDefinedTransformersRequest { - return new GetUserDefinedTransformersRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetUserDefinedTransformersRequest { - return new GetUserDefinedTransformersRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetUserDefinedTransformersRequest | PlainMessage | undefined, b: GetUserDefinedTransformersRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetUserDefinedTransformersRequest, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.GetUserDefinedTransformersResponse - */ -export class GetUserDefinedTransformersResponse extends Message { - /** - * @generated from field: repeated mgmt.v1alpha1.UserDefinedTransformer transformers = 1; - */ - transformers: UserDefinedTransformer[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetUserDefinedTransformersResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transformers", kind: "message", T: UserDefinedTransformer, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserDefinedTransformersResponse { - return new GetUserDefinedTransformersResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserDefinedTransformersResponse { - return new GetUserDefinedTransformersResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetUserDefinedTransformersResponse { - return new GetUserDefinedTransformersResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetUserDefinedTransformersResponse | PlainMessage | undefined, b: GetUserDefinedTransformersResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetUserDefinedTransformersResponse, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.GetUserDefinedTransformerByIdRequest - */ -export class GetUserDefinedTransformerByIdRequest extends Message { - /** - * @generated from field: string transformer_id = 1; - */ - transformerId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetUserDefinedTransformerByIdRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transformer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserDefinedTransformerByIdRequest { - return new GetUserDefinedTransformerByIdRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserDefinedTransformerByIdRequest { - return new GetUserDefinedTransformerByIdRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetUserDefinedTransformerByIdRequest { - return new GetUserDefinedTransformerByIdRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetUserDefinedTransformerByIdRequest | PlainMessage | undefined, b: GetUserDefinedTransformerByIdRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetUserDefinedTransformerByIdRequest, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.GetUserDefinedTransformerByIdResponse - */ -export class GetUserDefinedTransformerByIdResponse extends Message { - /** - * @generated from field: mgmt.v1alpha1.UserDefinedTransformer transformer = 1; - */ - transformer?: UserDefinedTransformer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetUserDefinedTransformerByIdResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transformer", kind: "message", T: UserDefinedTransformer }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserDefinedTransformerByIdResponse { - return new GetUserDefinedTransformerByIdResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserDefinedTransformerByIdResponse { - return new GetUserDefinedTransformerByIdResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetUserDefinedTransformerByIdResponse { - return new GetUserDefinedTransformerByIdResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetUserDefinedTransformerByIdResponse | PlainMessage | undefined, b: GetUserDefinedTransformerByIdResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetUserDefinedTransformerByIdResponse, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.CreateUserDefinedTransformerRequest - */ -export class CreateUserDefinedTransformerRequest extends Message { - /** - * @generated from field: string account_id = 1; - */ - accountId = ""; - - /** - * @generated from field: string name = 2; - */ - name = ""; - - /** - * @generated from field: string description = 3; - */ - description = ""; - - /** - * @deprecated - * - * @generated from field: string type = 4; - */ - type = ""; - - /** - * @generated from field: mgmt.v1alpha1.TransformerSource source = 5; - */ - source = TransformerSource.UNSPECIFIED; - - /** - * @generated from field: mgmt.v1alpha1.TransformerConfig transformer_config = 6; - */ - transformerConfig?: TransformerConfig; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateUserDefinedTransformerRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "source", kind: "enum", T: proto3.getEnumType(TransformerSource) }, - { no: 6, name: "transformer_config", kind: "message", T: TransformerConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateUserDefinedTransformerRequest { - return new CreateUserDefinedTransformerRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateUserDefinedTransformerRequest { - return new CreateUserDefinedTransformerRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateUserDefinedTransformerRequest { - return new CreateUserDefinedTransformerRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateUserDefinedTransformerRequest | PlainMessage | undefined, b: CreateUserDefinedTransformerRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateUserDefinedTransformerRequest, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.CreateUserDefinedTransformerResponse - */ -export class CreateUserDefinedTransformerResponse extends Message { - /** - * @generated from field: mgmt.v1alpha1.UserDefinedTransformer transformer = 1; - */ - transformer?: UserDefinedTransformer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateUserDefinedTransformerResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transformer", kind: "message", T: UserDefinedTransformer }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateUserDefinedTransformerResponse { - return new CreateUserDefinedTransformerResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateUserDefinedTransformerResponse { - return new CreateUserDefinedTransformerResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateUserDefinedTransformerResponse { - return new CreateUserDefinedTransformerResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateUserDefinedTransformerResponse | PlainMessage | undefined, b: CreateUserDefinedTransformerResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateUserDefinedTransformerResponse, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.DeleteUserDefinedTransformerRequest - */ -export class DeleteUserDefinedTransformerRequest extends Message { - /** - * @generated from field: string transformer_id = 1; - */ - transformerId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteUserDefinedTransformerRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transformer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteUserDefinedTransformerRequest { - return new DeleteUserDefinedTransformerRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteUserDefinedTransformerRequest { - return new DeleteUserDefinedTransformerRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteUserDefinedTransformerRequest { - return new DeleteUserDefinedTransformerRequest().fromJsonString(jsonString, options); - } - - static equals(a: DeleteUserDefinedTransformerRequest | PlainMessage | undefined, b: DeleteUserDefinedTransformerRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteUserDefinedTransformerRequest, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.DeleteUserDefinedTransformerResponse - */ -export class DeleteUserDefinedTransformerResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.DeleteUserDefinedTransformerResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteUserDefinedTransformerResponse { - return new DeleteUserDefinedTransformerResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteUserDefinedTransformerResponse { - return new DeleteUserDefinedTransformerResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteUserDefinedTransformerResponse { - return new DeleteUserDefinedTransformerResponse().fromJsonString(jsonString, options); - } - - static equals(a: DeleteUserDefinedTransformerResponse | PlainMessage | undefined, b: DeleteUserDefinedTransformerResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteUserDefinedTransformerResponse, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.UpdateUserDefinedTransformerRequest - */ -export class UpdateUserDefinedTransformerRequest extends Message { - /** - * @generated from field: string transformer_id = 1; - */ - transformerId = ""; - - /** - * @generated from field: string name = 2; - */ - name = ""; - - /** - * @generated from field: string description = 3; - */ - description = ""; - - /** - * @generated from field: mgmt.v1alpha1.TransformerConfig transformer_config = 4; - */ - transformerConfig?: TransformerConfig; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateUserDefinedTransformerRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transformer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "transformer_config", kind: "message", T: TransformerConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateUserDefinedTransformerRequest { - return new UpdateUserDefinedTransformerRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateUserDefinedTransformerRequest { - return new UpdateUserDefinedTransformerRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateUserDefinedTransformerRequest { - return new UpdateUserDefinedTransformerRequest().fromJsonString(jsonString, options); - } - - static equals(a: UpdateUserDefinedTransformerRequest | PlainMessage | undefined, b: UpdateUserDefinedTransformerRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateUserDefinedTransformerRequest, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.UpdateUserDefinedTransformerResponse - */ -export class UpdateUserDefinedTransformerResponse extends Message { - /** - * @generated from field: mgmt.v1alpha1.UserDefinedTransformer transformer = 1; - */ - transformer?: UserDefinedTransformer; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UpdateUserDefinedTransformerResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transformer", kind: "message", T: UserDefinedTransformer }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateUserDefinedTransformerResponse { - return new UpdateUserDefinedTransformerResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateUserDefinedTransformerResponse { - return new UpdateUserDefinedTransformerResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdateUserDefinedTransformerResponse { - return new UpdateUserDefinedTransformerResponse().fromJsonString(jsonString, options); - } - - static equals(a: UpdateUserDefinedTransformerResponse | PlainMessage | undefined, b: UpdateUserDefinedTransformerResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdateUserDefinedTransformerResponse, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.IsTransformerNameAvailableRequest - */ -export class IsTransformerNameAvailableRequest extends Message { - /** - * @generated from field: string account_id = 1; - */ - accountId = ""; - - /** - * @generated from field: string transformer_name = 2; - */ - transformerName = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsTransformerNameAvailableRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "transformer_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsTransformerNameAvailableRequest { - return new IsTransformerNameAvailableRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IsTransformerNameAvailableRequest { - return new IsTransformerNameAvailableRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsTransformerNameAvailableRequest { - return new IsTransformerNameAvailableRequest().fromJsonString(jsonString, options); - } - - static equals(a: IsTransformerNameAvailableRequest | PlainMessage | undefined, b: IsTransformerNameAvailableRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(IsTransformerNameAvailableRequest, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.IsTransformerNameAvailableResponse - */ -export class IsTransformerNameAvailableResponse extends Message { - /** - * @generated from field: bool is_available = 1; - */ - isAvailable = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsTransformerNameAvailableResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "is_available", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsTransformerNameAvailableResponse { - return new IsTransformerNameAvailableResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IsTransformerNameAvailableResponse { - return new IsTransformerNameAvailableResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsTransformerNameAvailableResponse { - return new IsTransformerNameAvailableResponse().fromJsonString(jsonString, options); - } - - static equals(a: IsTransformerNameAvailableResponse | PlainMessage | undefined, b: IsTransformerNameAvailableResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(IsTransformerNameAvailableResponse, a, b); - } -} - -/** - * @generated from message mgmt.v1alpha1.UserDefinedTransformer - */ -export class UserDefinedTransformer extends Message { - /** - * @generated from field: string id = 1; - */ - id = ""; - - /** - * @generated from field: string name = 2; - */ - name = ""; - - /** - * @generated from field: string description = 3; - */ - description = ""; - - /** - * This property is readonly and is calculated based off the origin system transformer - * - * @generated from field: mgmt.v1alpha1.TransformerDataType data_type = 5; - */ - dataType = TransformerDataType.UNSPECIFIED; - - /** - * @generated from field: mgmt.v1alpha1.TransformerSource source = 6; - */ - source = TransformerSource.UNSPECIFIED; - - /** - * @generated from field: mgmt.v1alpha1.TransformerConfig config = 7; - */ - config?: TransformerConfig; - - /** - * @generated from field: google.protobuf.Timestamp created_at = 8; - */ - createdAt?: Timestamp; - - /** - * @generated from field: google.protobuf.Timestamp updated_at = 9; - */ - updatedAt?: Timestamp; - - /** - * @generated from field: string account_id = 10; - */ - accountId = ""; - - /** - * @generated from field: repeated mgmt.v1alpha1.TransformerDataType data_types = 11; - */ - dataTypes: TransformerDataType[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UserDefinedTransformer"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "data_type", kind: "enum", T: proto3.getEnumType(TransformerDataType) }, - { no: 6, name: "source", kind: "enum", T: proto3.getEnumType(TransformerSource) }, - { no: 7, name: "config", kind: "message", T: TransformerConfig }, - { no: 8, name: "created_at", kind: "message", T: Timestamp }, - { no: 9, name: "updated_at", kind: "message", T: Timestamp }, - { no: 10, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "data_types", kind: "enum", T: proto3.getEnumType(TransformerDataType), repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UserDefinedTransformer { - return new UserDefinedTransformer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UserDefinedTransformer { - return new UserDefinedTransformer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UserDefinedTransformer { - return new UserDefinedTransformer().fromJsonString(jsonString, options); - } - - static equals(a: UserDefinedTransformer | PlainMessage | undefined, b: UserDefinedTransformer | PlainMessage | undefined): boolean { - return proto3.util.equals(UserDefinedTransformer, a, b); - } -} + supportedJobTypes: SupportedJobType[]; +}; /** - * @generated from message mgmt.v1alpha1.SystemTransformer + * Describes the message mgmt.v1alpha1.SystemTransformer. + * Use `create(SystemTransformerSchema)` to create a new message. */ -export class SystemTransformer extends Message { - /** - * @generated from field: string name = 1; - */ - name = ""; - - /** - * @generated from field: string description = 2; - */ - description = ""; - - /** - * @generated from field: mgmt.v1alpha1.TransformerDataType data_type = 3; - */ - dataType = TransformerDataType.UNSPECIFIED; - - /** - * @generated from field: mgmt.v1alpha1.TransformerSource source = 4; - */ - source = TransformerSource.UNSPECIFIED; - - /** - * @generated from field: mgmt.v1alpha1.TransformerConfig config = 5; - */ - config?: TransformerConfig; - - /** - * @generated from field: repeated mgmt.v1alpha1.TransformerDataType data_types = 6; - */ - dataTypes: TransformerDataType[] = []; - - /** - * @generated from field: repeated mgmt.v1alpha1.SupportedJobType supported_job_types = 7; - */ - supportedJobTypes: SupportedJobType[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SystemTransformer"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "data_type", kind: "enum", T: proto3.getEnumType(TransformerDataType) }, - { no: 4, name: "source", kind: "enum", T: proto3.getEnumType(TransformerSource) }, - { no: 5, name: "config", kind: "message", T: TransformerConfig }, - { no: 6, name: "data_types", kind: "enum", T: proto3.getEnumType(TransformerDataType), repeated: true }, - { no: 7, name: "supported_job_types", kind: "enum", T: proto3.getEnumType(SupportedJobType), repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SystemTransformer { - return new SystemTransformer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SystemTransformer { - return new SystemTransformer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SystemTransformer { - return new SystemTransformer().fromJsonString(jsonString, options); - } - - static equals(a: SystemTransformer | PlainMessage | undefined, b: SystemTransformer | PlainMessage | undefined): boolean { - return proto3.util.equals(SystemTransformer, a, b); - } -} +export const SystemTransformerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 17); /** * @generated from message mgmt.v1alpha1.TransformerConfig */ -export class TransformerConfig extends Message { +export type TransformerConfig = Message<"mgmt.v1alpha1.TransformerConfig"> & { /** * @generated from oneof mgmt.v1alpha1.TransformerConfig.config */ @@ -1647,93 +715,28 @@ export class TransformerConfig extends Message { */ value: GenerateIpAddress; case: "generateIpAddressConfig"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformerConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "generate_email_config", kind: "message", T: GenerateEmail, oneof: "config" }, - { no: 2, name: "transform_email_config", kind: "message", T: TransformEmail, oneof: "config" }, - { no: 3, name: "generate_bool_config", kind: "message", T: GenerateBool, oneof: "config" }, - { no: 4, name: "generate_card_number_config", kind: "message", T: GenerateCardNumber, oneof: "config" }, - { no: 5, name: "generate_city_config", kind: "message", T: GenerateCity, oneof: "config" }, - { no: 6, name: "generate_e164_phone_number_config", kind: "message", T: GenerateE164PhoneNumber, oneof: "config" }, - { no: 7, name: "generate_first_name_config", kind: "message", T: GenerateFirstName, oneof: "config" }, - { no: 8, name: "generate_float64_config", kind: "message", T: GenerateFloat64, oneof: "config" }, - { no: 9, name: "generate_full_address_config", kind: "message", T: GenerateFullAddress, oneof: "config" }, - { no: 10, name: "generate_full_name_config", kind: "message", T: GenerateFullName, oneof: "config" }, - { no: 11, name: "generate_gender_config", kind: "message", T: GenerateGender, oneof: "config" }, - { no: 12, name: "generate_int64_phone_number_config", kind: "message", T: GenerateInt64PhoneNumber, oneof: "config" }, - { no: 13, name: "generate_int64_config", kind: "message", T: GenerateInt64, oneof: "config" }, - { no: 14, name: "generate_last_name_config", kind: "message", T: GenerateLastName, oneof: "config" }, - { no: 15, name: "generate_sha256hash_config", kind: "message", T: GenerateSha256Hash, oneof: "config" }, - { no: 16, name: "generate_ssn_config", kind: "message", T: GenerateSSN, oneof: "config" }, - { no: 17, name: "generate_state_config", kind: "message", T: GenerateState, oneof: "config" }, - { no: 18, name: "generate_street_address_config", kind: "message", T: GenerateStreetAddress, oneof: "config" }, - { no: 19, name: "generate_string_phone_number_config", kind: "message", T: GenerateStringPhoneNumber, oneof: "config" }, - { no: 20, name: "generate_string_config", kind: "message", T: GenerateString, oneof: "config" }, - { no: 21, name: "generate_unixtimestamp_config", kind: "message", T: GenerateUnixTimestamp, oneof: "config" }, - { no: 22, name: "generate_username_config", kind: "message", T: GenerateUsername, oneof: "config" }, - { no: 23, name: "generate_utctimestamp_config", kind: "message", T: GenerateUtcTimestamp, oneof: "config" }, - { no: 24, name: "generate_uuid_config", kind: "message", T: GenerateUuid, oneof: "config" }, - { no: 25, name: "generate_zipcode_config", kind: "message", T: GenerateZipcode, oneof: "config" }, - { no: 26, name: "transform_e164_phone_number_config", kind: "message", T: TransformE164PhoneNumber, oneof: "config" }, - { no: 27, name: "transform_first_name_config", kind: "message", T: TransformFirstName, oneof: "config" }, - { no: 28, name: "transform_float64_config", kind: "message", T: TransformFloat64, oneof: "config" }, - { no: 29, name: "transform_full_name_config", kind: "message", T: TransformFullName, oneof: "config" }, - { no: 30, name: "transform_int64_phone_number_config", kind: "message", T: TransformInt64PhoneNumber, oneof: "config" }, - { no: 31, name: "transform_int64_config", kind: "message", T: TransformInt64, oneof: "config" }, - { no: 32, name: "transform_last_name_config", kind: "message", T: TransformLastName, oneof: "config" }, - { no: 33, name: "transform_phone_number_config", kind: "message", T: TransformPhoneNumber, oneof: "config" }, - { no: 34, name: "transform_string_config", kind: "message", T: TransformString, oneof: "config" }, - { no: 35, name: "passthrough_config", kind: "message", T: Passthrough, oneof: "config" }, - { no: 36, name: "nullconfig", kind: "message", T: Null, oneof: "config" }, - { no: 37, name: "user_defined_transformer_config", kind: "message", T: UserDefinedTransformerConfig, oneof: "config" }, - { no: 38, name: "generate_default_config", kind: "message", T: GenerateDefault, oneof: "config" }, - { no: 39, name: "transform_javascript_config", kind: "message", T: TransformJavascript, oneof: "config" }, - { no: 40, name: "generate_categorical_config", kind: "message", T: GenerateCategorical, oneof: "config" }, - { no: 41, name: "transform_character_scramble_config", kind: "message", T: TransformCharacterScramble, oneof: "config" }, - { no: 42, name: "generate_javascript_config", kind: "message", T: GenerateJavascript, oneof: "config" }, - { no: 43, name: "generate_country_config", kind: "message", T: GenerateCountry, oneof: "config" }, - { no: 44, name: "transform_pii_text_config", kind: "message", T: TransformPiiText, oneof: "config" }, - { no: 45, name: "generate_business_name_config", kind: "message", T: GenerateBusinessName, oneof: "config" }, - { no: 46, name: "generate_ip_address_config", kind: "message", T: GenerateIpAddress, oneof: "config" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransformerConfig { - return new TransformerConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransformerConfig { - return new TransformerConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TransformerConfig { - return new TransformerConfig().fromJsonString(jsonString, options); - } - - static equals(a: TransformerConfig | PlainMessage | undefined, b: TransformerConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformerConfig, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mgmt.v1alpha1.TransformerConfig. + * Use `create(TransformerConfigSchema)` to create a new message. + */ +export const TransformerConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 18); /** * NeosyncCloud/Enterprise only transformer for anonymizing PII Text * * @generated from message mgmt.v1alpha1.TransformPiiText */ -export class TransformPiiText extends Message { +export type TransformPiiText = Message<"mgmt.v1alpha1.TransformPiiText"> & { /** * Minimal detection score for determining PII. 0.0-1.0 * * @generated from field: float score_threshold = 1; */ - scoreThreshold = 0; + scoreThreshold: number; /** * The default anonmyization config used for all instances of detected PII. @@ -1747,7 +750,7 @@ export class TransformPiiText extends Message { * * @generated from field: repeated mgmt.v1alpha1.PiiDenyRecognizer deny_recognizers = 3; */ - denyRecognizers: PiiDenyRecognizer[] = []; + denyRecognizers: PiiDenyRecognizer[]; /** * Configure a list of entities to be used for PII analysis. If not provided or empty, all entities are considiered @@ -1756,14 +759,14 @@ export class TransformPiiText extends Message { * * @generated from field: repeated string allowed_entities = 4; */ - allowedEntities: string[] = []; + allowedEntities: string[]; /** * Exact match of PII phrases identified by the analysis engine. * * @generated from field: repeated string allowed_phrases = 5; */ - allowedPhrases: string[] = []; + allowedPhrases: string[]; /** * Two characters for the desired language in ISO_639-1 format. @@ -1773,91 +776,45 @@ export class TransformPiiText extends Message { * @generated from field: optional string language = 6; */ language?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformPiiText"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "score_threshold", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, - { no: 2, name: "default_anonymizer", kind: "message", T: PiiAnonymizer }, - { no: 3, name: "deny_recognizers", kind: "message", T: PiiDenyRecognizer, repeated: true }, - { no: 4, name: "allowed_entities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 5, name: "allowed_phrases", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 6, name: "language", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransformPiiText { - return new TransformPiiText().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransformPiiText { - return new TransformPiiText().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TransformPiiText { - return new TransformPiiText().fromJsonString(jsonString, options); - } - - static equals(a: TransformPiiText | PlainMessage | undefined, b: TransformPiiText | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformPiiText, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.TransformPiiText. + * Use `create(TransformPiiTextSchema)` to create a new message. + */ +export const TransformPiiTextSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 19); /** * @generated from message mgmt.v1alpha1.PiiDenyRecognizer */ -export class PiiDenyRecognizer extends Message { +export type PiiDenyRecognizer = Message<"mgmt.v1alpha1.PiiDenyRecognizer"> & { /** * Friendly name of this entity * * @generated from field: string name = 1; */ - name = ""; + name: string; /** * List of words that will be treated as PII. * * @generated from field: repeated string deny_words = 2; */ - denyWords: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PiiDenyRecognizer"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "deny_words", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); + denyWords: string[]; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): PiiDenyRecognizer { - return new PiiDenyRecognizer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PiiDenyRecognizer { - return new PiiDenyRecognizer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PiiDenyRecognizer { - return new PiiDenyRecognizer().fromJsonString(jsonString, options); - } - - static equals(a: PiiDenyRecognizer | PlainMessage | undefined, b: PiiDenyRecognizer | PlainMessage | undefined): boolean { - return proto3.util.equals(PiiDenyRecognizer, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PiiDenyRecognizer. + * Use `create(PiiDenyRecognizerSchema)` to create a new message. + */ +export const PiiDenyRecognizerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 20); /** * @generated from message mgmt.v1alpha1.PiiAnonymizer */ -export class PiiAnonymizer extends Message { +export type PiiAnonymizer = Message<"mgmt.v1alpha1.PiiAnonymizer"> & { /** * @generated from oneof mgmt.v1alpha1.PiiAnonymizer.config */ @@ -1893,113 +850,52 @@ export class PiiAnonymizer extends Message { */ value: PiiAnonymizer_Hash; case: "hash"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PiiAnonymizer"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "replace", kind: "message", T: PiiAnonymizer_Replace, oneof: "config" }, - { no: 2, name: "redact", kind: "message", T: PiiAnonymizer_Redact, oneof: "config" }, - { no: 3, name: "mask", kind: "message", T: PiiAnonymizer_Mask, oneof: "config" }, - { no: 4, name: "hash", kind: "message", T: PiiAnonymizer_Hash, oneof: "config" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PiiAnonymizer { - return new PiiAnonymizer().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PiiAnonymizer { - return new PiiAnonymizer().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PiiAnonymizer { - return new PiiAnonymizer().fromJsonString(jsonString, options); - } - - static equals(a: PiiAnonymizer | PlainMessage | undefined, b: PiiAnonymizer | PlainMessage | undefined): boolean { - return proto3.util.equals(PiiAnonymizer, a, b); - } -} + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mgmt.v1alpha1.PiiAnonymizer. + * Use `create(PiiAnonymizerSchema)` to create a new message. + */ +export const PiiAnonymizerSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 21); /** * @generated from message mgmt.v1alpha1.PiiAnonymizer.Replace */ -export class PiiAnonymizer_Replace extends Message { +export type PiiAnonymizer_Replace = Message<"mgmt.v1alpha1.PiiAnonymizer.Replace"> & { /** * The value to replace. If not provided, a template token of the anonymizer is used. * * @generated from field: optional string value = 1; */ value?: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PiiAnonymizer.Replace"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PiiAnonymizer_Replace { - return new PiiAnonymizer_Replace().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PiiAnonymizer_Replace { - return new PiiAnonymizer_Replace().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PiiAnonymizer_Replace { - return new PiiAnonymizer_Replace().fromJsonString(jsonString, options); - } - - static equals(a: PiiAnonymizer_Replace | PlainMessage | undefined, b: PiiAnonymizer_Replace | PlainMessage | undefined): boolean { - return proto3.util.equals(PiiAnonymizer_Replace, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PiiAnonymizer.Replace. + * Use `create(PiiAnonymizer_ReplaceSchema)` to create a new message. + */ +export const PiiAnonymizer_ReplaceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 21, 0); /** * @generated from message mgmt.v1alpha1.PiiAnonymizer.Redact */ -export class PiiAnonymizer_Redact extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PiiAnonymizer.Redact"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PiiAnonymizer_Redact { - return new PiiAnonymizer_Redact().fromBinary(bytes, options); - } +export type PiiAnonymizer_Redact = Message<"mgmt.v1alpha1.PiiAnonymizer.Redact"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): PiiAnonymizer_Redact { - return new PiiAnonymizer_Redact().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PiiAnonymizer_Redact { - return new PiiAnonymizer_Redact().fromJsonString(jsonString, options); - } - - static equals(a: PiiAnonymizer_Redact | PlainMessage | undefined, b: PiiAnonymizer_Redact | PlainMessage | undefined): boolean { - return proto3.util.equals(PiiAnonymizer_Redact, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PiiAnonymizer.Redact. + * Use `create(PiiAnonymizer_RedactSchema)` to create a new message. + */ +export const PiiAnonymizer_RedactSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 21, 1); /** * @generated from message mgmt.v1alpha1.PiiAnonymizer.Mask */ -export class PiiAnonymizer_Mask extends Message { +export type PiiAnonymizer_Mask = Message<"mgmt.v1alpha1.PiiAnonymizer.Mask"> & { /** * Provide a character that will be used for the replacement. * @@ -2020,75 +916,33 @@ export class PiiAnonymizer_Mask extends Message { * @generated from field: optional bool from_end = 3; */ fromEnd?: boolean; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PiiAnonymizer.Mask"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "masking_char", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "chars_to_mask", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 3, name: "from_end", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PiiAnonymizer_Mask { - return new PiiAnonymizer_Mask().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PiiAnonymizer_Mask { - return new PiiAnonymizer_Mask().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PiiAnonymizer_Mask { - return new PiiAnonymizer_Mask().fromJsonString(jsonString, options); - } - - static equals(a: PiiAnonymizer_Mask | PlainMessage | undefined, b: PiiAnonymizer_Mask | PlainMessage | undefined): boolean { - return proto3.util.equals(PiiAnonymizer_Mask, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PiiAnonymizer.Mask. + * Use `create(PiiAnonymizer_MaskSchema)` to create a new message. + */ +export const PiiAnonymizer_MaskSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 21, 2); /** * @generated from message mgmt.v1alpha1.PiiAnonymizer.Hash */ -export class PiiAnonymizer_Hash extends Message { +export type PiiAnonymizer_Hash = Message<"mgmt.v1alpha1.PiiAnonymizer.Hash"> & { /** * The hashing algorithm to use. * * @generated from field: optional mgmt.v1alpha1.PiiAnonymizer.Hash.HashType algo = 1; */ algo?: PiiAnonymizer_Hash_HashType; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.PiiAnonymizer.Hash"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "algo", kind: "enum", T: proto3.getEnumType(PiiAnonymizer_Hash_HashType), opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PiiAnonymizer_Hash { - return new PiiAnonymizer_Hash().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PiiAnonymizer_Hash { - return new PiiAnonymizer_Hash().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PiiAnonymizer_Hash { - return new PiiAnonymizer_Hash().fromJsonString(jsonString, options); - } - - static equals(a: PiiAnonymizer_Hash | PlainMessage | undefined, b: PiiAnonymizer_Hash | PlainMessage | undefined): boolean { - return proto3.util.equals(PiiAnonymizer_Hash, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.PiiAnonymizer.Hash. + * Use `create(PiiAnonymizer_HashSchema)` to create a new message. + */ +export const PiiAnonymizer_HashSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 21, 3); /** * @generated from enum mgmt.v1alpha1.PiiAnonymizer.Hash.HashType @@ -2122,57 +976,36 @@ export enum PiiAnonymizer_Hash_HashType { */ SHA512 = 3, } -// Retrieve enum metadata with: proto3.getEnumType(PiiAnonymizer_Hash_HashType) -proto3.util.setEnumType(PiiAnonymizer_Hash_HashType, "mgmt.v1alpha1.PiiAnonymizer.Hash.HashType", [ - { no: 0, name: "HASH_TYPE_UNSPECIFIED" }, - { no: 1, name: "HASH_TYPE_MD5" }, - { no: 2, name: "HASH_TYPE_SHA256" }, - { no: 3, name: "HASH_TYPE_SHA512" }, -]); + +/** + * Describes the enum mgmt.v1alpha1.PiiAnonymizer.Hash.HashType. + */ +export const PiiAnonymizer_Hash_HashTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_transformer, 21, 3, 0); /** * @generated from message mgmt.v1alpha1.GenerateEmail */ -export class GenerateEmail extends Message { +export type GenerateEmail = Message<"mgmt.v1alpha1.GenerateEmail"> & { /** * Optionally specify the type of email to generate. The types specified determine the contents on the left side of the @. * * @generated from field: optional mgmt.v1alpha1.GenerateEmailType email_type = 1; */ emailType?: GenerateEmailType; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateEmail"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "email_type", kind: "enum", T: proto3.getEnumType(GenerateEmailType), opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateEmail { - return new GenerateEmail().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateEmail { - return new GenerateEmail().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateEmail { - return new GenerateEmail().fromJsonString(jsonString, options); - } - - static equals(a: GenerateEmail | PlainMessage | undefined, b: GenerateEmail | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateEmail, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateEmail. + * Use `create(GenerateEmailSchema)` to create a new message. + */ +export const GenerateEmailSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 22); /** * @generated from message mgmt.v1alpha1.TransformEmail */ -export class TransformEmail extends Message { +export type TransformEmail = Message<"mgmt.v1alpha1.TransformEmail"> & { /** * Whether or not to preserve the original domain, barring what has been specified in the excluded_domains property. * @@ -2192,7 +1025,7 @@ export class TransformEmail extends Message { * * @generated from field: repeated string excluded_domains = 3; */ - excludedDomains: string[] = []; + excludedDomains: string[]; /** * Optionally specify the type of email to generate. The types specified determine the contents on the left side of the @. @@ -2207,173 +1040,75 @@ export class TransformEmail extends Message { * @generated from field: optional mgmt.v1alpha1.InvalidEmailAction invalid_email_action = 5; */ invalidEmailAction?: InvalidEmailAction; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformEmail"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "preserve_domain", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 2, name: "preserve_length", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 3, name: "excluded_domains", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "email_type", kind: "enum", T: proto3.getEnumType(GenerateEmailType), opt: true }, - { no: 5, name: "invalid_email_action", kind: "enum", T: proto3.getEnumType(InvalidEmailAction), opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransformEmail { - return new TransformEmail().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransformEmail { - return new TransformEmail().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TransformEmail { - return new TransformEmail().fromJsonString(jsonString, options); - } - - static equals(a: TransformEmail | PlainMessage | undefined, b: TransformEmail | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformEmail, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.TransformEmail. + * Use `create(TransformEmailSchema)` to create a new message. + */ +export const TransformEmailSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 23); /** * @generated from message mgmt.v1alpha1.GenerateBool */ -export class GenerateBool extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateBool"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateBool { - return new GenerateBool().fromBinary(bytes, options); - } +export type GenerateBool = Message<"mgmt.v1alpha1.GenerateBool"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateBool { - return new GenerateBool().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateBool { - return new GenerateBool().fromJsonString(jsonString, options); - } - - static equals(a: GenerateBool | PlainMessage | undefined, b: GenerateBool | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateBool, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateBool. + * Use `create(GenerateBoolSchema)` to create a new message. + */ +export const GenerateBoolSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 24); /** * @generated from message mgmt.v1alpha1.GenerateCardNumber */ -export class GenerateCardNumber extends Message { +export type GenerateCardNumber = Message<"mgmt.v1alpha1.GenerateCardNumber"> & { /** * @generated from field: optional bool valid_luhn = 1; */ validLuhn?: boolean; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateCardNumber"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "valid_luhn", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateCardNumber { - return new GenerateCardNumber().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateCardNumber { - return new GenerateCardNumber().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateCardNumber { - return new GenerateCardNumber().fromJsonString(jsonString, options); - } - - static equals(a: GenerateCardNumber | PlainMessage | undefined, b: GenerateCardNumber | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateCardNumber, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateCardNumber. + * Use `create(GenerateCardNumberSchema)` to create a new message. + */ +export const GenerateCardNumberSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 25); /** * @generated from message mgmt.v1alpha1.GenerateCity */ -export class GenerateCity extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateCity"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateCity { - return new GenerateCity().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateCity { - return new GenerateCity().fromJson(jsonValue, options); - } +export type GenerateCity = Message<"mgmt.v1alpha1.GenerateCity"> & { +}; - static fromJsonString(jsonString: string, options?: Partial): GenerateCity { - return new GenerateCity().fromJsonString(jsonString, options); - } - - static equals(a: GenerateCity | PlainMessage | undefined, b: GenerateCity | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateCity, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateCity. + * Use `create(GenerateCitySchema)` to create a new message. + */ +export const GenerateCitySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 26); /** * @generated from message mgmt.v1alpha1.GenerateDefault */ -export class GenerateDefault extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateDefault"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateDefault { - return new GenerateDefault().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateDefault { - return new GenerateDefault().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateDefault { - return new GenerateDefault().fromJsonString(jsonString, options); - } +export type GenerateDefault = Message<"mgmt.v1alpha1.GenerateDefault"> & { +}; - static equals(a: GenerateDefault | PlainMessage | undefined, b: GenerateDefault | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateDefault, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateDefault. + * Use `create(GenerateDefaultSchema)` to create a new message. + */ +export const GenerateDefaultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 27); /** * @generated from message mgmt.v1alpha1.GenerateE164PhoneNumber */ -export class GenerateE164PhoneNumber extends Message { +export type GenerateE164PhoneNumber = Message<"mgmt.v1alpha1.GenerateE164PhoneNumber"> & { /** * @generated from field: optional int64 min = 1; */ @@ -2383,71 +1118,32 @@ export class GenerateE164PhoneNumber extends Message { * @generated from field: optional int64 max = 2; */ max?: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateE164PhoneNumber"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "min", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "max", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateE164PhoneNumber { - return new GenerateE164PhoneNumber().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateE164PhoneNumber { - return new GenerateE164PhoneNumber().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateE164PhoneNumber { - return new GenerateE164PhoneNumber().fromJsonString(jsonString, options); - } - - static equals(a: GenerateE164PhoneNumber | PlainMessage | undefined, b: GenerateE164PhoneNumber | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateE164PhoneNumber, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateE164PhoneNumber. + * Use `create(GenerateE164PhoneNumberSchema)` to create a new message. + */ +export const GenerateE164PhoneNumberSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 28); /** * @generated from message mgmt.v1alpha1.GenerateFirstName */ -export class GenerateFirstName extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateFirstName"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateFirstName { - return new GenerateFirstName().fromBinary(bytes, options); - } +export type GenerateFirstName = Message<"mgmt.v1alpha1.GenerateFirstName"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateFirstName { - return new GenerateFirstName().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateFirstName { - return new GenerateFirstName().fromJsonString(jsonString, options); - } - - static equals(a: GenerateFirstName | PlainMessage | undefined, b: GenerateFirstName | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateFirstName, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateFirstName. + * Use `create(GenerateFirstNameSchema)` to create a new message. + */ +export const GenerateFirstNameSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 29); /** * @generated from message mgmt.v1alpha1.GenerateFloat64 */ -export class GenerateFloat64 extends Message { +export type GenerateFloat64 = Message<"mgmt.v1alpha1.GenerateFloat64"> & { /** * @generated from field: optional bool randomize_sign = 1; */ @@ -2467,172 +1163,75 @@ export class GenerateFloat64 extends Message { * @generated from field: optional int64 precision = 4; */ precision?: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateFloat64"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "randomize_sign", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 2, name: "min", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 3, name: "max", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 4, name: "precision", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateFloat64 { - return new GenerateFloat64().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateFloat64 { - return new GenerateFloat64().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateFloat64 { - return new GenerateFloat64().fromJsonString(jsonString, options); - } - - static equals(a: GenerateFloat64 | PlainMessage | undefined, b: GenerateFloat64 | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateFloat64, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateFloat64. + * Use `create(GenerateFloat64Schema)` to create a new message. + */ +export const GenerateFloat64Schema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 30); /** * @generated from message mgmt.v1alpha1.GenerateFullAddress */ -export class GenerateFullAddress extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type GenerateFullAddress = Message<"mgmt.v1alpha1.GenerateFullAddress"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateFullAddress"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateFullAddress { - return new GenerateFullAddress().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateFullAddress { - return new GenerateFullAddress().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateFullAddress { - return new GenerateFullAddress().fromJsonString(jsonString, options); - } - - static equals(a: GenerateFullAddress | PlainMessage | undefined, b: GenerateFullAddress | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateFullAddress, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateFullAddress. + * Use `create(GenerateFullAddressSchema)` to create a new message. + */ +export const GenerateFullAddressSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 31); /** * @generated from message mgmt.v1alpha1.GenerateFullName */ -export class GenerateFullName extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateFullName"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +export type GenerateFullName = Message<"mgmt.v1alpha1.GenerateFullName"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateFullName { - return new GenerateFullName().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateFullName { - return new GenerateFullName().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateFullName { - return new GenerateFullName().fromJsonString(jsonString, options); - } - - static equals(a: GenerateFullName | PlainMessage | undefined, b: GenerateFullName | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateFullName, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateFullName. + * Use `create(GenerateFullNameSchema)` to create a new message. + */ +export const GenerateFullNameSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 32); /** * @generated from message mgmt.v1alpha1.GenerateGender */ -export class GenerateGender extends Message { +export type GenerateGender = Message<"mgmt.v1alpha1.GenerateGender"> & { /** * @generated from field: optional bool abbreviate = 1; */ abbreviate?: boolean; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateGender"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "abbreviate", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateGender { - return new GenerateGender().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateGender { - return new GenerateGender().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateGender { - return new GenerateGender().fromJsonString(jsonString, options); - } - - static equals(a: GenerateGender | PlainMessage | undefined, b: GenerateGender | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateGender, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateGender. + * Use `create(GenerateGenderSchema)` to create a new message. + */ +export const GenerateGenderSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 33); /** * @generated from message mgmt.v1alpha1.GenerateInt64PhoneNumber */ -export class GenerateInt64PhoneNumber extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateInt64PhoneNumber"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateInt64PhoneNumber { - return new GenerateInt64PhoneNumber().fromBinary(bytes, options); - } +export type GenerateInt64PhoneNumber = Message<"mgmt.v1alpha1.GenerateInt64PhoneNumber"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateInt64PhoneNumber { - return new GenerateInt64PhoneNumber().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateInt64PhoneNumber { - return new GenerateInt64PhoneNumber().fromJsonString(jsonString, options); - } - - static equals(a: GenerateInt64PhoneNumber | PlainMessage | undefined, b: GenerateInt64PhoneNumber | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateInt64PhoneNumber, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateInt64PhoneNumber. + * Use `create(GenerateInt64PhoneNumberSchema)` to create a new message. + */ +export const GenerateInt64PhoneNumberSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 34); /** * @generated from message mgmt.v1alpha1.GenerateInt64 */ -export class GenerateInt64 extends Message { +export type GenerateInt64 = Message<"mgmt.v1alpha1.GenerateInt64"> & { /** * @generated from field: optional bool randomize_sign = 1; */ @@ -2647,204 +1246,90 @@ export class GenerateInt64 extends Message { * @generated from field: optional int64 max = 3; */ max?: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateInt64"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "randomize_sign", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 2, name: "min", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 3, name: "max", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateInt64 { - return new GenerateInt64().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateInt64 { - return new GenerateInt64().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateInt64 { - return new GenerateInt64().fromJsonString(jsonString, options); - } - - static equals(a: GenerateInt64 | PlainMessage | undefined, b: GenerateInt64 | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateInt64, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateInt64. + * Use `create(GenerateInt64Schema)` to create a new message. + */ +export const GenerateInt64Schema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 35); /** * @generated from message mgmt.v1alpha1.GenerateLastName */ -export class GenerateLastName extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type GenerateLastName = Message<"mgmt.v1alpha1.GenerateLastName"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateLastName"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateLastName { - return new GenerateLastName().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateLastName { - return new GenerateLastName().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateLastName { - return new GenerateLastName().fromJsonString(jsonString, options); - } - - static equals(a: GenerateLastName | PlainMessage | undefined, b: GenerateLastName | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateLastName, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateLastName. + * Use `create(GenerateLastNameSchema)` to create a new message. + */ +export const GenerateLastNameSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 36); /** * @generated from message mgmt.v1alpha1.GenerateSha256Hash */ -export class GenerateSha256Hash extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateSha256Hash"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +export type GenerateSha256Hash = Message<"mgmt.v1alpha1.GenerateSha256Hash"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateSha256Hash { - return new GenerateSha256Hash().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateSha256Hash { - return new GenerateSha256Hash().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateSha256Hash { - return new GenerateSha256Hash().fromJsonString(jsonString, options); - } - - static equals(a: GenerateSha256Hash | PlainMessage | undefined, b: GenerateSha256Hash | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateSha256Hash, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateSha256Hash. + * Use `create(GenerateSha256HashSchema)` to create a new message. + */ +export const GenerateSha256HashSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 37); /** * @generated from message mgmt.v1alpha1.GenerateSSN */ -export class GenerateSSN extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateSSN"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateSSN { - return new GenerateSSN().fromBinary(bytes, options); - } +export type GenerateSSN = Message<"mgmt.v1alpha1.GenerateSSN"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateSSN { - return new GenerateSSN().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateSSN { - return new GenerateSSN().fromJsonString(jsonString, options); - } - - static equals(a: GenerateSSN | PlainMessage | undefined, b: GenerateSSN | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateSSN, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateSSN. + * Use `create(GenerateSSNSchema)` to create a new message. + */ +export const GenerateSSNSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 38); /** * @generated from message mgmt.v1alpha1.GenerateState */ -export class GenerateState extends Message { +export type GenerateState = Message<"mgmt.v1alpha1.GenerateState"> & { /** * An option to return the full state name of the randomly selected state or return the default of a 2-letter state code. * * @generated from field: optional bool generate_full_name = 1; */ generateFullName?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateState"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "generate_full_name", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateState { - return new GenerateState().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateState { - return new GenerateState().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateState { - return new GenerateState().fromJsonString(jsonString, options); - } - - static equals(a: GenerateState | PlainMessage | undefined, b: GenerateState | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateState, a, b); - } -} +}; /** - * @generated from message mgmt.v1alpha1.GenerateStreetAddress + * Describes the message mgmt.v1alpha1.GenerateState. + * Use `create(GenerateStateSchema)` to create a new message. */ -export class GenerateStreetAddress extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateStreetAddress"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateStreetAddress { - return new GenerateStreetAddress().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateStreetAddress { - return new GenerateStreetAddress().fromJson(jsonValue, options); - } +export const GenerateStateSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 39); - static fromJsonString(jsonString: string, options?: Partial): GenerateStreetAddress { - return new GenerateStreetAddress().fromJsonString(jsonString, options); - } +/** + * @generated from message mgmt.v1alpha1.GenerateStreetAddress + */ +export type GenerateStreetAddress = Message<"mgmt.v1alpha1.GenerateStreetAddress"> & { +}; - static equals(a: GenerateStreetAddress | PlainMessage | undefined, b: GenerateStreetAddress | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateStreetAddress, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateStreetAddress. + * Use `create(GenerateStreetAddressSchema)` to create a new message. + */ +export const GenerateStreetAddressSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 40); /** * @generated from message mgmt.v1alpha1.GenerateStringPhoneNumber */ -export class GenerateStringPhoneNumber extends Message { +export type GenerateStringPhoneNumber = Message<"mgmt.v1alpha1.GenerateStringPhoneNumber"> & { /** * @generated from field: optional int64 min = 2; */ @@ -2854,40 +1339,19 @@ export class GenerateStringPhoneNumber extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateStringPhoneNumber"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "min", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 3, name: "max", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateStringPhoneNumber { - return new GenerateStringPhoneNumber().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateStringPhoneNumber { - return new GenerateStringPhoneNumber().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateStringPhoneNumber { - return new GenerateStringPhoneNumber().fromJsonString(jsonString, options); - } - - static equals(a: GenerateStringPhoneNumber | PlainMessage | undefined, b: GenerateStringPhoneNumber | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateStringPhoneNumber, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateStringPhoneNumber. + * Use `create(GenerateStringPhoneNumberSchema)` to create a new message. + */ +export const GenerateStringPhoneNumberSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 41); /** * @generated from message mgmt.v1alpha1.GenerateString */ -export class GenerateString extends Message { +export type GenerateString = Message<"mgmt.v1alpha1.GenerateString"> & { /** * @generated from field: optional int64 min = 1; */ @@ -2897,1137 +1361,1103 @@ export class GenerateString extends Message { * @generated from field: optional int64 max = 2; */ max?: bigint; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateString"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "min", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "max", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateString { - return new GenerateString().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateString { - return new GenerateString().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateString { - return new GenerateString().fromJsonString(jsonString, options); - } - - static equals(a: GenerateString | PlainMessage | undefined, b: GenerateString | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateString, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateString. + * Use `create(GenerateStringSchema)` to create a new message. + */ +export const GenerateStringSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 42); /** * @generated from message mgmt.v1alpha1.GenerateUnixTimestamp */ -export class GenerateUnixTimestamp extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateUnixTimestamp"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateUnixTimestamp { - return new GenerateUnixTimestamp().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateUnixTimestamp { - return new GenerateUnixTimestamp().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateUnixTimestamp { - return new GenerateUnixTimestamp().fromJsonString(jsonString, options); - } +export type GenerateUnixTimestamp = Message<"mgmt.v1alpha1.GenerateUnixTimestamp"> & { +}; - static equals(a: GenerateUnixTimestamp | PlainMessage | undefined, b: GenerateUnixTimestamp | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateUnixTimestamp, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateUnixTimestamp. + * Use `create(GenerateUnixTimestampSchema)` to create a new message. + */ +export const GenerateUnixTimestampSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 43); /** * @generated from message mgmt.v1alpha1.GenerateUsername */ -export class GenerateUsername extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type GenerateUsername = Message<"mgmt.v1alpha1.GenerateUsername"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateUsername"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +/** + * Describes the message mgmt.v1alpha1.GenerateUsername. + * Use `create(GenerateUsernameSchema)` to create a new message. + */ +export const GenerateUsernameSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 44); - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateUsername { - return new GenerateUsername().fromBinary(bytes, options); - } +/** + * @generated from message mgmt.v1alpha1.GenerateUtcTimestamp + */ +export type GenerateUtcTimestamp = Message<"mgmt.v1alpha1.GenerateUtcTimestamp"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateUsername { - return new GenerateUsername().fromJson(jsonValue, options); - } +/** + * Describes the message mgmt.v1alpha1.GenerateUtcTimestamp. + * Use `create(GenerateUtcTimestampSchema)` to create a new message. + */ +export const GenerateUtcTimestampSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 45); - static fromJsonString(jsonString: string, options?: Partial): GenerateUsername { - return new GenerateUsername().fromJsonString(jsonString, options); - } +/** + * @generated from message mgmt.v1alpha1.GenerateUuid + */ +export type GenerateUuid = Message<"mgmt.v1alpha1.GenerateUuid"> & { + /** + * @generated from field: optional bool include_hyphens = 1; + */ + includeHyphens?: boolean; +}; - static equals(a: GenerateUsername | PlainMessage | undefined, b: GenerateUsername | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateUsername, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateUuid. + * Use `create(GenerateUuidSchema)` to create a new message. + */ +export const GenerateUuidSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 46); /** - * @generated from message mgmt.v1alpha1.GenerateUtcTimestamp + * @generated from message mgmt.v1alpha1.GenerateZipcode */ -export class GenerateUtcTimestamp extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type GenerateZipcode = Message<"mgmt.v1alpha1.GenerateZipcode"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateUtcTimestamp"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +/** + * Describes the message mgmt.v1alpha1.GenerateZipcode. + * Use `create(GenerateZipcodeSchema)` to create a new message. + */ +export const GenerateZipcodeSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 47); - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateUtcTimestamp { - return new GenerateUtcTimestamp().fromBinary(bytes, options); - } +/** + * @generated from message mgmt.v1alpha1.TransformE164PhoneNumber + */ +export type TransformE164PhoneNumber = Message<"mgmt.v1alpha1.TransformE164PhoneNumber"> & { + /** + * @generated from field: optional bool preserve_length = 1; + */ + preserveLength?: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateUtcTimestamp { - return new GenerateUtcTimestamp().fromJson(jsonValue, options); - } +/** + * Describes the message mgmt.v1alpha1.TransformE164PhoneNumber. + * Use `create(TransformE164PhoneNumberSchema)` to create a new message. + */ +export const TransformE164PhoneNumberSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 48); - static fromJsonString(jsonString: string, options?: Partial): GenerateUtcTimestamp { - return new GenerateUtcTimestamp().fromJsonString(jsonString, options); - } +/** + * @generated from message mgmt.v1alpha1.TransformFirstName + */ +export type TransformFirstName = Message<"mgmt.v1alpha1.TransformFirstName"> & { + /** + * @generated from field: optional bool preserve_length = 1; + */ + preserveLength?: boolean; +}; - static equals(a: GenerateUtcTimestamp | PlainMessage | undefined, b: GenerateUtcTimestamp | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateUtcTimestamp, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.TransformFirstName. + * Use `create(TransformFirstNameSchema)` to create a new message. + */ +export const TransformFirstNameSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 49); /** - * @generated from message mgmt.v1alpha1.GenerateUuid + * @generated from message mgmt.v1alpha1.TransformFloat64 */ -export class GenerateUuid extends Message { +export type TransformFloat64 = Message<"mgmt.v1alpha1.TransformFloat64"> & { /** - * @generated from field: optional bool include_hyphens = 1; + * @generated from field: optional double randomization_range_min = 1; */ - includeHyphens?: boolean; + randomizationRangeMin?: number; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from field: optional double randomization_range_max = 2; + */ + randomizationRangeMax?: number; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateUuid"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "include_hyphens", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); +/** + * Describes the message mgmt.v1alpha1.TransformFloat64. + * Use `create(TransformFloat64Schema)` to create a new message. + */ +export const TransformFloat64Schema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 50); - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateUuid { - return new GenerateUuid().fromBinary(bytes, options); - } +/** + * @generated from message mgmt.v1alpha1.TransformFullName + */ +export type TransformFullName = Message<"mgmt.v1alpha1.TransformFullName"> & { + /** + * @generated from field: optional bool preserve_length = 1; + */ + preserveLength?: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateUuid { - return new GenerateUuid().fromJson(jsonValue, options); - } +/** + * Describes the message mgmt.v1alpha1.TransformFullName. + * Use `create(TransformFullNameSchema)` to create a new message. + */ +export const TransformFullNameSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 51); - static fromJsonString(jsonString: string, options?: Partial): GenerateUuid { - return new GenerateUuid().fromJsonString(jsonString, options); - } +/** + * @generated from message mgmt.v1alpha1.TransformInt64PhoneNumber + */ +export type TransformInt64PhoneNumber = Message<"mgmt.v1alpha1.TransformInt64PhoneNumber"> & { + /** + * @generated from field: optional bool preserve_length = 1; + */ + preserveLength?: boolean; +}; - static equals(a: GenerateUuid | PlainMessage | undefined, b: GenerateUuid | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateUuid, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.TransformInt64PhoneNumber. + * Use `create(TransformInt64PhoneNumberSchema)` to create a new message. + */ +export const TransformInt64PhoneNumberSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 52); /** - * @generated from message mgmt.v1alpha1.GenerateZipcode + * @generated from message mgmt.v1alpha1.TransformInt64 */ -export class GenerateZipcode extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type TransformInt64 = Message<"mgmt.v1alpha1.TransformInt64"> & { + /** + * @generated from field: optional int64 randomization_range_min = 1; + */ + randomizationRangeMin?: bigint; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateZipcode"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); + /** + * @generated from field: optional int64 randomization_range_max = 2; + */ + randomizationRangeMax?: bigint; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateZipcode { - return new GenerateZipcode().fromBinary(bytes, options); - } +/** + * Describes the message mgmt.v1alpha1.TransformInt64. + * Use `create(TransformInt64Schema)` to create a new message. + */ +export const TransformInt64Schema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 53); - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateZipcode { - return new GenerateZipcode().fromJson(jsonValue, options); - } +/** + * @generated from message mgmt.v1alpha1.TransformLastName + */ +export type TransformLastName = Message<"mgmt.v1alpha1.TransformLastName"> & { + /** + * @generated from field: optional bool preserve_length = 1; + */ + preserveLength?: boolean; +}; - static fromJsonString(jsonString: string, options?: Partial): GenerateZipcode { - return new GenerateZipcode().fromJsonString(jsonString, options); - } +/** + * Describes the message mgmt.v1alpha1.TransformLastName. + * Use `create(TransformLastNameSchema)` to create a new message. + */ +export const TransformLastNameSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 54); - static equals(a: GenerateZipcode | PlainMessage | undefined, b: GenerateZipcode | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateZipcode, a, b); - } -} +/** + * @generated from message mgmt.v1alpha1.TransformPhoneNumber + */ +export type TransformPhoneNumber = Message<"mgmt.v1alpha1.TransformPhoneNumber"> & { + /** + * @generated from field: optional bool preserve_length = 1; + */ + preserveLength?: boolean; +}; /** - * @generated from message mgmt.v1alpha1.TransformE164PhoneNumber + * Describes the message mgmt.v1alpha1.TransformPhoneNumber. + * Use `create(TransformPhoneNumberSchema)` to create a new message. */ -export class TransformE164PhoneNumber extends Message { +export const TransformPhoneNumberSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 55); + +/** + * @generated from message mgmt.v1alpha1.TransformString + */ +export type TransformString = Message<"mgmt.v1alpha1.TransformString"> & { /** * @generated from field: optional bool preserve_length = 1; */ preserveLength?: boolean; +}; + +/** + * Describes the message mgmt.v1alpha1.TransformString. + * Use `create(TransformStringSchema)` to create a new message. + */ +export const TransformStringSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 56); + +/** + * @generated from message mgmt.v1alpha1.Passthrough + */ +export type Passthrough = Message<"mgmt.v1alpha1.Passthrough"> & { +}; + +/** + * Describes the message mgmt.v1alpha1.Passthrough. + * Use `create(PassthroughSchema)` to create a new message. + */ +export const PassthroughSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 57); - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * @generated from message mgmt.v1alpha1.Null + */ +export type Null = Message<"mgmt.v1alpha1.Null"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformE164PhoneNumber"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "preserve_length", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); +/** + * Describes the message mgmt.v1alpha1.Null. + * Use `create(NullSchema)` to create a new message. + */ +export const NullSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 58); - static fromBinary(bytes: Uint8Array, options?: Partial): TransformE164PhoneNumber { - return new TransformE164PhoneNumber().fromBinary(bytes, options); - } +/** + * @generated from message mgmt.v1alpha1.TransformJavascript + */ +export type TransformJavascript = Message<"mgmt.v1alpha1.TransformJavascript"> & { + /** + * @generated from field: string code = 1; + */ + code: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): TransformE164PhoneNumber { - return new TransformE164PhoneNumber().fromJson(jsonValue, options); - } +/** + * Describes the message mgmt.v1alpha1.TransformJavascript. + * Use `create(TransformJavascriptSchema)` to create a new message. + */ +export const TransformJavascriptSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 59); - static fromJsonString(jsonString: string, options?: Partial): TransformE164PhoneNumber { - return new TransformE164PhoneNumber().fromJsonString(jsonString, options); - } +/** + * @generated from message mgmt.v1alpha1.UserDefinedTransformerConfig + */ +export type UserDefinedTransformerConfig = Message<"mgmt.v1alpha1.UserDefinedTransformerConfig"> & { + /** + * @generated from field: string id = 1; + */ + id: string; +}; - static equals(a: TransformE164PhoneNumber | PlainMessage | undefined, b: TransformE164PhoneNumber | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformE164PhoneNumber, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.UserDefinedTransformerConfig. + * Use `create(UserDefinedTransformerConfigSchema)` to create a new message. + */ +export const UserDefinedTransformerConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 60); /** - * @generated from message mgmt.v1alpha1.TransformFirstName + * @generated from message mgmt.v1alpha1.ValidateUserJavascriptCodeRequest */ -export class TransformFirstName extends Message { +export type ValidateUserJavascriptCodeRequest = Message<"mgmt.v1alpha1.ValidateUserJavascriptCodeRequest"> & { /** - * @generated from field: optional bool preserve_length = 1; + * @generated from field: string code = 2; */ - preserveLength?: boolean; + code: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message mgmt.v1alpha1.ValidateUserJavascriptCodeRequest. + * Use `create(ValidateUserJavascriptCodeRequestSchema)` to create a new message. + */ +export const ValidateUserJavascriptCodeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 61); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformFirstName"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "preserve_length", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); +/** + * @generated from message mgmt.v1alpha1.ValidateUserJavascriptCodeResponse + */ +export type ValidateUserJavascriptCodeResponse = Message<"mgmt.v1alpha1.ValidateUserJavascriptCodeResponse"> & { + /** + * @generated from field: bool valid = 1; + */ + valid: boolean; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): TransformFirstName { - return new TransformFirstName().fromBinary(bytes, options); - } +/** + * Describes the message mgmt.v1alpha1.ValidateUserJavascriptCodeResponse. + * Use `create(ValidateUserJavascriptCodeResponseSchema)` to create a new message. + */ +export const ValidateUserJavascriptCodeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 62); - static fromJson(jsonValue: JsonValue, options?: Partial): TransformFirstName { - return new TransformFirstName().fromJson(jsonValue, options); - } +/** + * @generated from message mgmt.v1alpha1.GenerateCategorical + */ +export type GenerateCategorical = Message<"mgmt.v1alpha1.GenerateCategorical"> & { + /** + * @generated from field: optional string categories = 1; + */ + categories?: string; +}; - static fromJsonString(jsonString: string, options?: Partial): TransformFirstName { - return new TransformFirstName().fromJsonString(jsonString, options); - } +/** + * Describes the message mgmt.v1alpha1.GenerateCategorical. + * Use `create(GenerateCategoricalSchema)` to create a new message. + */ +export const GenerateCategoricalSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 63); - static equals(a: TransformFirstName | PlainMessage | undefined, b: TransformFirstName | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformFirstName, a, b); - } -} +/** + * @generated from message mgmt.v1alpha1.TransformCharacterScramble + */ +export type TransformCharacterScramble = Message<"mgmt.v1alpha1.TransformCharacterScramble"> & { + /** + * a user provided regular expression that they wish to validate if it compiles in GO + * + * @generated from field: optional string user_provided_regex = 1; + */ + userProvidedRegex?: string; +}; /** - * @generated from message mgmt.v1alpha1.TransformFloat64 + * Describes the message mgmt.v1alpha1.TransformCharacterScramble. + * Use `create(TransformCharacterScrambleSchema)` to create a new message. + */ +export const TransformCharacterScrambleSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 64); + +/** + * @generated from message mgmt.v1alpha1.GenerateJavascript */ -export class TransformFloat64 extends Message { +export type GenerateJavascript = Message<"mgmt.v1alpha1.GenerateJavascript"> & { /** - * @generated from field: optional double randomization_range_min = 1; + * @generated from field: string code = 1; */ - randomizationRangeMin?: number; + code: string; +}; + +/** + * Describes the message mgmt.v1alpha1.GenerateJavascript. + * Use `create(GenerateJavascriptSchema)` to create a new message. + */ +export const GenerateJavascriptSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 65); +/** + * @generated from message mgmt.v1alpha1.ValidateUserRegexCodeRequest + */ +export type ValidateUserRegexCodeRequest = Message<"mgmt.v1alpha1.ValidateUserRegexCodeRequest"> & { /** - * @generated from field: optional double randomization_range_max = 2; + * @generated from field: string user_provided_regex = 2; */ - randomizationRangeMax?: number; + userProvidedRegex: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformFloat64"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "randomization_range_min", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 2, name: "randomization_range_max", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransformFloat64 { - return new TransformFloat64().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransformFloat64 { - return new TransformFloat64().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TransformFloat64 { - return new TransformFloat64().fromJsonString(jsonString, options); - } - - static equals(a: TransformFloat64 | PlainMessage | undefined, b: TransformFloat64 | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformFloat64, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ValidateUserRegexCodeRequest. + * Use `create(ValidateUserRegexCodeRequestSchema)` to create a new message. + */ +export const ValidateUserRegexCodeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 66); /** - * @generated from message mgmt.v1alpha1.TransformFullName + * @generated from message mgmt.v1alpha1.ValidateUserRegexCodeResponse */ -export class TransformFullName extends Message { +export type ValidateUserRegexCodeResponse = Message<"mgmt.v1alpha1.ValidateUserRegexCodeResponse"> & { /** - * @generated from field: optional bool preserve_length = 1; + * @generated from field: bool valid = 1; */ - preserveLength?: boolean; + valid: boolean; +}; + +/** + * Describes the message mgmt.v1alpha1.ValidateUserRegexCodeResponse. + * Use `create(ValidateUserRegexCodeResponseSchema)` to create a new message. + */ +export const ValidateUserRegexCodeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 67); + +/** + * @generated from message mgmt.v1alpha1.GenerateCountry + */ +export type GenerateCountry = Message<"mgmt.v1alpha1.GenerateCountry"> & { + /** + * An option to return the full country name of the randomly selected country or return the default of a 2-letter country code. + * + * @generated from field: optional bool generate_full_name = 1; + */ + generateFullName?: boolean; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message mgmt.v1alpha1.GenerateCountry. + * Use `create(GenerateCountrySchema)` to create a new message. + */ +export const GenerateCountrySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 68); + +/** + * @generated from message mgmt.v1alpha1.GetTransformPiiEntitiesRequest + */ +export type GetTransformPiiEntitiesRequest = Message<"mgmt.v1alpha1.GetTransformPiiEntitiesRequest"> & { + /** + * The unique identifier of the account to return entities for. + * + * @generated from field: string account_id = 1; + */ + accountId: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformFullName"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "preserve_length", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); +/** + * Describes the message mgmt.v1alpha1.GetTransformPiiEntitiesRequest. + * Use `create(GetTransformPiiEntitiesRequestSchema)` to create a new message. + */ +export const GetTransformPiiEntitiesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 69); - static fromBinary(bytes: Uint8Array, options?: Partial): TransformFullName { - return new TransformFullName().fromBinary(bytes, options); - } +/** + * @generated from message mgmt.v1alpha1.GetTransformPiiEntitiesResponse + */ +export type GetTransformPiiEntitiesResponse = Message<"mgmt.v1alpha1.GetTransformPiiEntitiesResponse"> & { + /** + * The list of built-in entities that are enabled for the provided account id. + * + * @generated from field: repeated string entities = 1; + */ + entities: string[]; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): TransformFullName { - return new TransformFullName().fromJson(jsonValue, options); - } +/** + * Describes the message mgmt.v1alpha1.GetTransformPiiEntitiesResponse. + * Use `create(GetTransformPiiEntitiesResponseSchema)` to create a new message. + */ +export const GetTransformPiiEntitiesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 70); - static fromJsonString(jsonString: string, options?: Partial): TransformFullName { - return new TransformFullName().fromJsonString(jsonString, options); - } +/** + * @generated from message mgmt.v1alpha1.GenerateBusinessName + */ +export type GenerateBusinessName = Message<"mgmt.v1alpha1.GenerateBusinessName"> & { +}; - static equals(a: TransformFullName | PlainMessage | undefined, b: TransformFullName | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformFullName, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateBusinessName. + * Use `create(GenerateBusinessNameSchema)` to create a new message. + */ +export const GenerateBusinessNameSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 71); /** - * @generated from message mgmt.v1alpha1.TransformInt64PhoneNumber + * @generated from message mgmt.v1alpha1.GenerateIpAddress */ -export class TransformInt64PhoneNumber extends Message { +export type GenerateIpAddress = Message<"mgmt.v1alpha1.GenerateIpAddress"> & { /** - * @generated from field: optional bool preserve_length = 1; + * @generated from field: optional mgmt.v1alpha1.GenerateIpAddressType ip_type = 1; */ - preserveLength?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformInt64PhoneNumber"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "preserve_length", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransformInt64PhoneNumber { - return new TransformInt64PhoneNumber().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransformInt64PhoneNumber { - return new TransformInt64PhoneNumber().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TransformInt64PhoneNumber { - return new TransformInt64PhoneNumber().fromJsonString(jsonString, options); - } + ipType?: GenerateIpAddressType; +}; - static equals(a: TransformInt64PhoneNumber | PlainMessage | undefined, b: TransformInt64PhoneNumber | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformInt64PhoneNumber, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GenerateIpAddress. + * Use `create(GenerateIpAddressSchema)` to create a new message. + */ +export const GenerateIpAddressSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_transformer, 72); /** - * @generated from message mgmt.v1alpha1.TransformInt64 + * @generated from enum mgmt.v1alpha1.TransformerSource */ -export class TransformInt64 extends Message { +export enum TransformerSource { /** - * @generated from field: optional int64 randomization_range_min = 1; + * @generated from enum value: TRANSFORMER_SOURCE_UNSPECIFIED = 0; */ - randomizationRangeMin?: bigint; + UNSPECIFIED = 0, /** - * @generated from field: optional int64 randomization_range_max = 2; + * @generated from enum value: TRANSFORMER_SOURCE_PASSTHROUGH = 1; */ - randomizationRangeMax?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformInt64"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "randomization_range_min", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "randomization_range_max", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransformInt64 { - return new TransformInt64().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransformInt64 { - return new TransformInt64().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TransformInt64 { - return new TransformInt64().fromJsonString(jsonString, options); - } - - static equals(a: TransformInt64 | PlainMessage | undefined, b: TransformInt64 | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformInt64, a, b); - } -} + PASSTHROUGH = 1, -/** - * @generated from message mgmt.v1alpha1.TransformLastName - */ -export class TransformLastName extends Message { /** - * @generated from field: optional bool preserve_length = 1; + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_DEFAULT = 2; */ - preserveLength?: boolean; + GENERATE_DEFAULT = 2, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_JAVASCRIPT = 3; + */ + TRANSFORM_JAVASCRIPT = 3, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformLastName"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "preserve_length", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_EMAIL = 4; + */ + GENERATE_EMAIL = 4, - static fromBinary(bytes: Uint8Array, options?: Partial): TransformLastName { - return new TransformLastName().fromBinary(bytes, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_EMAIL = 5; + */ + TRANSFORM_EMAIL = 5, - static fromJson(jsonValue: JsonValue, options?: Partial): TransformLastName { - return new TransformLastName().fromJson(jsonValue, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_BOOL = 6; + */ + GENERATE_BOOL = 6, - static fromJsonString(jsonString: string, options?: Partial): TransformLastName { - return new TransformLastName().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_CARD_NUMBER = 7; + */ + GENERATE_CARD_NUMBER = 7, - static equals(a: TransformLastName | PlainMessage | undefined, b: TransformLastName | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformLastName, a, b); - } -} + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_CITY = 8; + */ + GENERATE_CITY = 8, -/** - * @generated from message mgmt.v1alpha1.TransformPhoneNumber - */ -export class TransformPhoneNumber extends Message { /** - * @generated from field: optional bool preserve_length = 1; + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_E164_PHONE_NUMBER = 9; */ - preserveLength?: boolean; + GENERATE_E164_PHONE_NUMBER = 9, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_FIRST_NAME = 10; + */ + GENERATE_FIRST_NAME = 10, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformPhoneNumber"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "preserve_length", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_FLOAT64 = 11; + */ + GENERATE_FLOAT64 = 11, - static fromBinary(bytes: Uint8Array, options?: Partial): TransformPhoneNumber { - return new TransformPhoneNumber().fromBinary(bytes, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_FULL_ADDRESS = 12; + */ + GENERATE_FULL_ADDRESS = 12, - static fromJson(jsonValue: JsonValue, options?: Partial): TransformPhoneNumber { - return new TransformPhoneNumber().fromJson(jsonValue, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_FULL_NAME = 13; + */ + GENERATE_FULL_NAME = 13, - static fromJsonString(jsonString: string, options?: Partial): TransformPhoneNumber { - return new TransformPhoneNumber().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_GENDER = 14; + */ + GENERATE_GENDER = 14, - static equals(a: TransformPhoneNumber | PlainMessage | undefined, b: TransformPhoneNumber | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformPhoneNumber, a, b); - } -} + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_INT64_PHONE_NUMBER = 15; + */ + GENERATE_INT64_PHONE_NUMBER = 15, -/** - * @generated from message mgmt.v1alpha1.TransformString - */ -export class TransformString extends Message { /** - * @generated from field: optional bool preserve_length = 1; + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_INT64 = 16; */ - preserveLength?: boolean; + GENERATE_INT64 = 16, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_RANDOM_INT64 = 17; + */ + GENERATE_RANDOM_INT64 = 17, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformString"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "preserve_length", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_LAST_NAME = 18; + */ + GENERATE_LAST_NAME = 18, - static fromBinary(bytes: Uint8Array, options?: Partial): TransformString { - return new TransformString().fromBinary(bytes, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_SHA256HASH = 19; + */ + GENERATE_SHA256HASH = 19, - static fromJson(jsonValue: JsonValue, options?: Partial): TransformString { - return new TransformString().fromJson(jsonValue, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_SSN = 20; + */ + GENERATE_SSN = 20, - static fromJsonString(jsonString: string, options?: Partial): TransformString { - return new TransformString().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_STATE = 21; + */ + GENERATE_STATE = 21, - static equals(a: TransformString | PlainMessage | undefined, b: TransformString | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformString, a, b); - } -} + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_STREET_ADDRESS = 22; + */ + GENERATE_STREET_ADDRESS = 22, -/** - * @generated from message mgmt.v1alpha1.Passthrough - */ -export class Passthrough extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_STRING_PHONE_NUMBER = 23; + */ + GENERATE_STRING_PHONE_NUMBER = 23, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.Passthrough"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_STRING = 24; + */ + GENERATE_STRING = 24, - static fromBinary(bytes: Uint8Array, options?: Partial): Passthrough { - return new Passthrough().fromBinary(bytes, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_RANDOM_STRING = 25; + */ + GENERATE_RANDOM_STRING = 25, - static fromJson(jsonValue: JsonValue, options?: Partial): Passthrough { - return new Passthrough().fromJson(jsonValue, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_UNIXTIMESTAMP = 26; + */ + GENERATE_UNIXTIMESTAMP = 26, - static fromJsonString(jsonString: string, options?: Partial): Passthrough { - return new Passthrough().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_USERNAME = 27; + */ + GENERATE_USERNAME = 27, - static equals(a: Passthrough | PlainMessage | undefined, b: Passthrough | PlainMessage | undefined): boolean { - return proto3.util.equals(Passthrough, a, b); - } -} + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_UTCTIMESTAMP = 28; + */ + GENERATE_UTCTIMESTAMP = 28, -/** - * @generated from message mgmt.v1alpha1.Null - */ -export class Null extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_UUID = 29; + */ + GENERATE_UUID = 29, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.Null"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_ZIPCODE = 30; + */ + GENERATE_ZIPCODE = 30, - static fromBinary(bytes: Uint8Array, options?: Partial): Null { - return new Null().fromBinary(bytes, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_E164_PHONE_NUMBER = 31; + */ + TRANSFORM_E164_PHONE_NUMBER = 31, - static fromJson(jsonValue: JsonValue, options?: Partial): Null { - return new Null().fromJson(jsonValue, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_FIRST_NAME = 32; + */ + TRANSFORM_FIRST_NAME = 32, - static fromJsonString(jsonString: string, options?: Partial): Null { - return new Null().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_FLOAT64 = 33; + */ + TRANSFORM_FLOAT64 = 33, - static equals(a: Null | PlainMessage | undefined, b: Null | PlainMessage | undefined): boolean { - return proto3.util.equals(Null, a, b); - } -} + /** + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_FULL_NAME = 34; + */ + TRANSFORM_FULL_NAME = 34, -/** - * @generated from message mgmt.v1alpha1.TransformJavascript - */ -export class TransformJavascript extends Message { /** - * @generated from field: string code = 1; + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_INT64_PHONE_NUMBER = 35; */ - code = ""; + TRANSFORM_INT64_PHONE_NUMBER = 35, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_INT64 = 36; + */ + TRANSFORM_INT64 = 36, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformJavascript"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + /** + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_LAST_NAME = 37; + */ + TRANSFORM_LAST_NAME = 37, - static fromBinary(bytes: Uint8Array, options?: Partial): TransformJavascript { - return new TransformJavascript().fromBinary(bytes, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_PHONE_NUMBER = 38; + */ + TRANSFORM_PHONE_NUMBER = 38, - static fromJson(jsonValue: JsonValue, options?: Partial): TransformJavascript { - return new TransformJavascript().fromJson(jsonValue, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_STRING = 39; + */ + TRANSFORM_STRING = 39, - static fromJsonString(jsonString: string, options?: Partial): TransformJavascript { - return new TransformJavascript().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_NULL = 40; + */ + GENERATE_NULL = 40, - static equals(a: TransformJavascript | PlainMessage | undefined, b: TransformJavascript | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformJavascript, a, b); - } -} + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_CATEGORICAL = 42; + */ + GENERATE_CATEGORICAL = 42, -/** - * @generated from message mgmt.v1alpha1.UserDefinedTransformerConfig - */ -export class UserDefinedTransformerConfig extends Message { /** - * @generated from field: string id = 1; + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_CHARACTER_SCRAMBLE = 43; */ - id = ""; + TRANSFORM_CHARACTER_SCRAMBLE = 43, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_USER_DEFINED = 44; + */ + USER_DEFINED = 44, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UserDefinedTransformerConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_JAVASCRIPT = 45; + */ + GENERATE_JAVASCRIPT = 45, - static fromBinary(bytes: Uint8Array, options?: Partial): UserDefinedTransformerConfig { - return new UserDefinedTransformerConfig().fromBinary(bytes, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_COUNTRY = 46; + */ + GENERATE_COUNTRY = 46, - static fromJson(jsonValue: JsonValue, options?: Partial): UserDefinedTransformerConfig { - return new UserDefinedTransformerConfig().fromJson(jsonValue, options); - } + /** + * NeosyncCloud/Enterprise only transformer for anonymizing PII Text + * + * @generated from enum value: TRANSFORMER_SOURCE_TRANSFORM_PII_TEXT = 47; + */ + TRANSFORM_PII_TEXT = 47, - static fromJsonString(jsonString: string, options?: Partial): UserDefinedTransformerConfig { - return new UserDefinedTransformerConfig().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_BUSINESS_NAME = 48; + */ + GENERATE_BUSINESS_NAME = 48, - static equals(a: UserDefinedTransformerConfig | PlainMessage | undefined, b: UserDefinedTransformerConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(UserDefinedTransformerConfig, a, b); - } + /** + * @generated from enum value: TRANSFORMER_SOURCE_GENERATE_IP_ADDRESS = 49; + */ + GENERATE_IP_ADDRESS = 49, } /** - * @generated from message mgmt.v1alpha1.ValidateUserJavascriptCodeRequest + * Describes the enum mgmt.v1alpha1.TransformerSource. + */ +export const TransformerSourceSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_transformer, 0); + +/** + * @generated from enum mgmt.v1alpha1.TransformerDataType */ -export class ValidateUserJavascriptCodeRequest extends Message { +export enum TransformerDataType { /** - * @deprecated - an account isn't required to validate js code - * - * @generated from field: string account_id = 1; + * @generated from enum value: TRANSFORMER_DATA_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: TRANSFORMER_DATA_TYPE_STRING = 1; */ - accountId = ""; + STRING = 1, /** - * @generated from field: string code = 2; + * @generated from enum value: TRANSFORMER_DATA_TYPE_INT64 = 2; */ - code = ""; + INT64 = 2, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * @generated from enum value: TRANSFORMER_DATA_TYPE_BOOLEAN = 3; + */ + BOOLEAN = 3, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ValidateUserJavascriptCodeRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + /** + * @generated from enum value: TRANSFORMER_DATA_TYPE_FLOAT64 = 4; + */ + FLOAT64 = 4, - static fromBinary(bytes: Uint8Array, options?: Partial): ValidateUserJavascriptCodeRequest { - return new ValidateUserJavascriptCodeRequest().fromBinary(bytes, options); - } + /** + * @generated from enum value: TRANSFORMER_DATA_TYPE_NULL = 5; + */ + NULL = 5, - static fromJson(jsonValue: JsonValue, options?: Partial): ValidateUserJavascriptCodeRequest { - return new ValidateUserJavascriptCodeRequest().fromJson(jsonValue, options); - } + /** + * @generated from enum value: TRANSFORMER_DATA_TYPE_ANY = 6; + */ + ANY = 6, - static fromJsonString(jsonString: string, options?: Partial): ValidateUserJavascriptCodeRequest { - return new ValidateUserJavascriptCodeRequest().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: TRANSFORMER_DATA_TYPE_TIME = 7; + */ + TIME = 7, - static equals(a: ValidateUserJavascriptCodeRequest | PlainMessage | undefined, b: ValidateUserJavascriptCodeRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ValidateUserJavascriptCodeRequest, a, b); - } + /** + * @generated from enum value: TRANSFORMER_DATA_TYPE_UUID = 8; + */ + UUID = 8, } /** - * @generated from message mgmt.v1alpha1.ValidateUserJavascriptCodeResponse + * Describes the enum mgmt.v1alpha1.TransformerDataType. */ -export class ValidateUserJavascriptCodeResponse extends Message { - /** - * @generated from field: bool valid = 1; - */ - valid = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ValidateUserJavascriptCodeResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "valid", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ValidateUserJavascriptCodeResponse { - return new ValidateUserJavascriptCodeResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ValidateUserJavascriptCodeResponse { - return new ValidateUserJavascriptCodeResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ValidateUserJavascriptCodeResponse { - return new ValidateUserJavascriptCodeResponse().fromJsonString(jsonString, options); - } - - static equals(a: ValidateUserJavascriptCodeResponse | PlainMessage | undefined, b: ValidateUserJavascriptCodeResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ValidateUserJavascriptCodeResponse, a, b); - } -} +export const TransformerDataTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_transformer, 1); /** - * @generated from message mgmt.v1alpha1.GenerateCategorical + * @generated from enum mgmt.v1alpha1.SupportedJobType */ -export class GenerateCategorical extends Message { +export enum SupportedJobType { /** - * @generated from field: optional string categories = 1; + * @generated from enum value: SUPPORTED_JOB_TYPE_UNSPECIFIED = 0; */ - categories?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateCategorical"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "categories", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateCategorical { - return new GenerateCategorical().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateCategorical { - return new GenerateCategorical().fromJson(jsonValue, options); - } + UNSPECIFIED = 0, - static fromJsonString(jsonString: string, options?: Partial): GenerateCategorical { - return new GenerateCategorical().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: SUPPORTED_JOB_TYPE_SYNC = 1; + */ + SYNC = 1, - static equals(a: GenerateCategorical | PlainMessage | undefined, b: GenerateCategorical | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateCategorical, a, b); - } + /** + * @generated from enum value: SUPPORTED_JOB_TYPE_GENERATE = 2; + */ + GENERATE = 2, } /** - * @generated from message mgmt.v1alpha1.TransformCharacterScramble + * Describes the enum mgmt.v1alpha1.SupportedJobType. + */ +export const SupportedJobTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_transformer, 2); + +/** + * @generated from enum mgmt.v1alpha1.GenerateEmailType */ -export class TransformCharacterScramble extends Message { +export enum GenerateEmailType { /** - * a user provided regular expression that they wish to validate if it compiles in GO + * Unspecified defaults to uuid v4 * - * @generated from field: optional string user_provided_regex = 1; + * @generated from enum value: GENERATE_EMAIL_TYPE_UNSPECIFIED = 0; */ - userProvidedRegex?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.TransformCharacterScramble"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "user_provided_regex", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransformCharacterScramble { - return new TransformCharacterScramble().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransformCharacterScramble { - return new TransformCharacterScramble().fromJson(jsonValue, options); - } + UNSPECIFIED = 0, - static fromJsonString(jsonString: string, options?: Partial): TransformCharacterScramble { - return new TransformCharacterScramble().fromJsonString(jsonString, options); - } + /** + * Generates a random uuid v4 (without hyphens) on the left side of the @. This has all the uniqueness guarantees of the standard uuid v4, along with randomized domains. + * + * @generated from enum value: GENERATE_EMAIL_TYPE_UUID_V4 = 1; + */ + UUID_V4 = 1, - static equals(a: TransformCharacterScramble | PlainMessage | undefined, b: TransformCharacterScramble | PlainMessage | undefined): boolean { - return proto3.util.equals(TransformCharacterScramble, a, b); - } + /** + * Generates a full name (firstnamelastname) on the left side of the @. This has high cardinality but is not guaranteed to be unique. + * + * @generated from enum value: GENERATE_EMAIL_TYPE_FULLNAME = 2; + */ + FULLNAME = 2, } /** - * @generated from message mgmt.v1alpha1.GenerateJavascript + * Describes the enum mgmt.v1alpha1.GenerateEmailType. */ -export class GenerateJavascript extends Message { - /** - * @generated from field: string code = 1; - */ - code = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateJavascript"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateJavascript { - return new GenerateJavascript().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateJavascript { - return new GenerateJavascript().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateJavascript { - return new GenerateJavascript().fromJsonString(jsonString, options); - } - - static equals(a: GenerateJavascript | PlainMessage | undefined, b: GenerateJavascript | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateJavascript, a, b); - } -} +export const GenerateEmailTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_transformer, 3); /** - * @generated from message mgmt.v1alpha1.ValidateUserRegexCodeRequest + * Action enumeration that dictates what the transform_email transformer should do in the case that it encounters an email that does not conform to RFC 5322 + * + * @generated from enum mgmt.v1alpha1.InvalidEmailAction */ -export class ValidateUserRegexCodeRequest extends Message { +export enum InvalidEmailAction { /** - * @deprecated - an account isn't required to validate js code + * Unspecified defaults to reject. * - * @generated from field: string account_id = 1; + * @generated from enum value: INVALID_EMAIL_ACTION_UNSPECIFIED = 0; */ - accountId = ""; + UNSPECIFIED = 0, /** - * @generated from field: string user_provided_regex = 2; + * If an invalid email is encountered, the transformer will reject the transformation and exit. + * + * @generated from enum value: INVALID_EMAIL_ACTION_REJECT = 1; */ - userProvidedRegex = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ValidateUserRegexCodeRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "user_provided_regex", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ValidateUserRegexCodeRequest { - return new ValidateUserRegexCodeRequest().fromBinary(bytes, options); - } + REJECT = 1, - static fromJson(jsonValue: JsonValue, options?: Partial): ValidateUserRegexCodeRequest { - return new ValidateUserRegexCodeRequest().fromJson(jsonValue, options); - } + /** + * The result of the email will be null. This should only be specified if the destination column is also nullable. + * + * @generated from enum value: INVALID_EMAIL_ACTION_NULL = 2; + */ + NULL = 2, - static fromJsonString(jsonString: string, options?: Partial): ValidateUserRegexCodeRequest { - return new ValidateUserRegexCodeRequest().fromJsonString(jsonString, options); - } + /** + * The result of the email will be identical to the original value, unmodified. + * + * @generated from enum value: INVALID_EMAIL_ACTION_PASSTHROUGH = 3; + */ + PASSTHROUGH = 3, - static equals(a: ValidateUserRegexCodeRequest | PlainMessage | undefined, b: ValidateUserRegexCodeRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ValidateUserRegexCodeRequest, a, b); - } + /** + * The result of the email will be a brand new generated email. This is the same result as the generate_email transformer. + * + * @generated from enum value: INVALID_EMAIL_ACTION_GENERATE = 4; + */ + GENERATE = 4, } /** - * @generated from message mgmt.v1alpha1.ValidateUserRegexCodeResponse + * Describes the enum mgmt.v1alpha1.InvalidEmailAction. */ -export class ValidateUserRegexCodeResponse extends Message { - /** - * @generated from field: bool valid = 1; - */ - valid = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ValidateUserRegexCodeResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "valid", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ValidateUserRegexCodeResponse { - return new ValidateUserRegexCodeResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ValidateUserRegexCodeResponse { - return new ValidateUserRegexCodeResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ValidateUserRegexCodeResponse { - return new ValidateUserRegexCodeResponse().fromJsonString(jsonString, options); - } - - static equals(a: ValidateUserRegexCodeResponse | PlainMessage | undefined, b: ValidateUserRegexCodeResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ValidateUserRegexCodeResponse, a, b); - } -} +export const InvalidEmailActionSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_transformer, 4); /** - * @generated from message mgmt.v1alpha1.GenerateCountry + * @generated from enum mgmt.v1alpha1.GenerateIpAddressType */ -export class GenerateCountry extends Message { +export enum GenerateIpAddressType { /** - * An option to return the full country name of the randomly selected country or return the default of a 2-letter country code. + * Unspecified defaults to ipv4 * - * @generated from field: optional bool generate_full_name = 1; + * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_UNSPECIFIED = 0; */ - generateFullName?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateCountry"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "generate_full_name", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateCountry { - return new GenerateCountry().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateCountry { - return new GenerateCountry().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateCountry { - return new GenerateCountry().fromJsonString(jsonString, options); - } - - static equals(a: GenerateCountry | PlainMessage | undefined, b: GenerateCountry | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateCountry, a, b); - } -} + UNSPECIFIED = 0, -/** - * @generated from message mgmt.v1alpha1.GetTransformPiiEntitiesRequest - */ -export class GetTransformPiiEntitiesRequest extends Message { /** - * The unique identifier of the account to return entities for. + * Generates a random ipv4_public * - * @generated from field: string account_id = 1; + * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_PUBLIC = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetTransformPiiEntitiesRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetTransformPiiEntitiesRequest { - return new GetTransformPiiEntitiesRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetTransformPiiEntitiesRequest { - return new GetTransformPiiEntitiesRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetTransformPiiEntitiesRequest { - return new GetTransformPiiEntitiesRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetTransformPiiEntitiesRequest | PlainMessage | undefined, b: GetTransformPiiEntitiesRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetTransformPiiEntitiesRequest, a, b); - } -} + V4_PUBLIC = 1, -/** - * @generated from message mgmt.v1alpha1.GetTransformPiiEntitiesResponse - */ -export class GetTransformPiiEntitiesResponse extends Message { /** - * The list of built-in entities that are enabled for the provided account id. + * Generates a random ipv4_private_a * - * @generated from field: repeated string entities = 1; + * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_A = 2; */ - entities: string[] = []; + V4_PRIVATE_A = 2, - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + /** + * Generates a random ipv4_private_b + * + * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_B = 3; + */ + V4_PRIVATE_B = 3, - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetTransformPiiEntitiesResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "entities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); + /** + * Generates a random ipv4_private_c + * + * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_C = 4; + */ + V4_PRIVATE_C = 4, - static fromBinary(bytes: Uint8Array, options?: Partial): GetTransformPiiEntitiesResponse { - return new GetTransformPiiEntitiesResponse().fromBinary(bytes, options); - } + /** + * Generates a random ipv4_linklocal + * + * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_LINK_LOCAL = 5; + */ + V4_LINK_LOCAL = 5, - static fromJson(jsonValue: JsonValue, options?: Partial): GetTransformPiiEntitiesResponse { - return new GetTransformPiiEntitiesResponse().fromJson(jsonValue, options); - } + /** + * Generates a random ipv4_multicast + * + * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_MULTICAST = 6; + */ + V4_MULTICAST = 6, - static fromJsonString(jsonString: string, options?: Partial): GetTransformPiiEntitiesResponse { - return new GetTransformPiiEntitiesResponse().fromJsonString(jsonString, options); - } + /** + * Generates a random ipv4_loopback + * + * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V4_LOOPBACK = 7; + */ + V4_LOOPBACK = 7, - static equals(a: GetTransformPiiEntitiesResponse | PlainMessage | undefined, b: GetTransformPiiEntitiesResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetTransformPiiEntitiesResponse, a, b); - } + /** + * Generates a random ipv6 + * + * @generated from enum value: GENERATE_IP_ADDRESS_TYPE_V6 = 8; + */ + V6 = 8, } /** - * @generated from message mgmt.v1alpha1.GenerateBusinessName + * Describes the enum mgmt.v1alpha1.GenerateIpAddressType. */ -export class GenerateBusinessName extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateBusinessName"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateBusinessName { - return new GenerateBusinessName().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateBusinessName { - return new GenerateBusinessName().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateBusinessName { - return new GenerateBusinessName().fromJsonString(jsonString, options); - } - - static equals(a: GenerateBusinessName | PlainMessage | undefined, b: GenerateBusinessName | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateBusinessName, a, b); - } -} +export const GenerateIpAddressTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_transformer, 5); /** - * @generated from message mgmt.v1alpha1.GenerateIpAddress + * @generated from service mgmt.v1alpha1.TransformersService */ -export class GenerateIpAddress extends Message { +export const TransformersService: GenService<{ /** - * @generated from field: optional mgmt.v1alpha1.GenerateIpAddressType ip_type = 1; + * @generated from rpc mgmt.v1alpha1.TransformersService.GetSystemTransformers */ - ipType?: GenerateIpAddressType; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GenerateIpAddress"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ip_type", kind: "enum", T: proto3.getEnumType(GenerateIpAddressType), opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateIpAddress { - return new GenerateIpAddress().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateIpAddress { - return new GenerateIpAddress().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GenerateIpAddress { - return new GenerateIpAddress().fromJsonString(jsonString, options); - } - - static equals(a: GenerateIpAddress | PlainMessage | undefined, b: GenerateIpAddress | PlainMessage | undefined): boolean { - return proto3.util.equals(GenerateIpAddress, a, b); - } -} + getSystemTransformers: { + methodKind: "unary"; + input: typeof GetSystemTransformersRequestSchema; + output: typeof GetSystemTransformersResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.TransformersService.GetSystemTransformerBySource + */ + getSystemTransformerBySource: { + methodKind: "unary"; + input: typeof GetSystemTransformerBySourceRequestSchema; + output: typeof GetSystemTransformerBySourceResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.TransformersService.GetUserDefinedTransformers + */ + getUserDefinedTransformers: { + methodKind: "unary"; + input: typeof GetUserDefinedTransformersRequestSchema; + output: typeof GetUserDefinedTransformersResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.TransformersService.GetUserDefinedTransformerById + */ + getUserDefinedTransformerById: { + methodKind: "unary"; + input: typeof GetUserDefinedTransformerByIdRequestSchema; + output: typeof GetUserDefinedTransformerByIdResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.TransformersService.CreateUserDefinedTransformer + */ + createUserDefinedTransformer: { + methodKind: "unary"; + input: typeof CreateUserDefinedTransformerRequestSchema; + output: typeof CreateUserDefinedTransformerResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.TransformersService.DeleteUserDefinedTransformer + */ + deleteUserDefinedTransformer: { + methodKind: "unary"; + input: typeof DeleteUserDefinedTransformerRequestSchema; + output: typeof DeleteUserDefinedTransformerResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.TransformersService.UpdateUserDefinedTransformer + */ + updateUserDefinedTransformer: { + methodKind: "unary"; + input: typeof UpdateUserDefinedTransformerRequestSchema; + output: typeof UpdateUserDefinedTransformerResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.TransformersService.IsTransformerNameAvailable + */ + isTransformerNameAvailable: { + methodKind: "unary"; + input: typeof IsTransformerNameAvailableRequestSchema; + output: typeof IsTransformerNameAvailableResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.TransformersService.ValidateUserJavascriptCode + */ + validateUserJavascriptCode: { + methodKind: "unary"; + input: typeof ValidateUserJavascriptCodeRequestSchema; + output: typeof ValidateUserJavascriptCodeResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.TransformersService.ValidateUserRegexCode + */ + validateUserRegexCode: { + methodKind: "unary"; + input: typeof ValidateUserRegexCodeRequestSchema; + output: typeof ValidateUserRegexCodeResponseSchema; + }, + /** + * Retrieve a list of available Pii entities for use with the TransformPiiText transformer + * + * @generated from rpc mgmt.v1alpha1.TransformersService.GetTransformPiiEntities + */ + getTransformPiiEntities: { + methodKind: "unary"; + input: typeof GetTransformPiiEntitiesRequestSchema; + output: typeof GetTransformPiiEntitiesResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_mgmt_v1alpha1_transformer, 0); diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account-UserAccountService_connectquery.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account-UserAccountService_connectquery.ts deleted file mode 100644 index 501ef5d663..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account-UserAccountService_connectquery.ts +++ /dev/null @@ -1,379 +0,0 @@ -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/user_account.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; -import { AcceptTeamAccountInviteRequest, AcceptTeamAccountInviteResponse, ConvertPersonalToTeamAccountRequest, ConvertPersonalToTeamAccountResponse, CreateTeamAccountRequest, CreateTeamAccountResponse, GetAccountBillingCheckoutSessionRequest, GetAccountBillingCheckoutSessionResponse, GetAccountBillingPortalSessionRequest, GetAccountBillingPortalSessionResponse, GetAccountOnboardingConfigRequest, GetAccountOnboardingConfigResponse, GetAccountStatusRequest, GetAccountStatusResponse, GetAccountTemporalConfigRequest, GetAccountTemporalConfigResponse, GetBillingAccountsRequest, GetBillingAccountsResponse, GetSystemInformationRequest, GetSystemInformationResponse, GetTeamAccountInvitesRequest, GetTeamAccountInvitesResponse, GetTeamAccountMembersRequest, GetTeamAccountMembersResponse, GetUserAccountsRequest, GetUserAccountsResponse, GetUserRequest, GetUserResponse, InviteUserToTeamAccountRequest, InviteUserToTeamAccountResponse, IsAccountStatusValidRequest, IsAccountStatusValidResponse, IsUserInAccountRequest, IsUserInAccountResponse, RemoveTeamAccountInviteRequest, RemoveTeamAccountInviteResponse, RemoveTeamAccountMemberRequest, RemoveTeamAccountMemberResponse, SetAccountOnboardingConfigRequest, SetAccountOnboardingConfigResponse, SetAccountTemporalConfigRequest, SetAccountTemporalConfigResponse, SetBillingMeterEventRequest, SetBillingMeterEventResponse, SetPersonalAccountRequest, SetPersonalAccountResponse, SetUserRequest, SetUserResponse, SetUserRoleRequest, SetUserRoleResponse } from "./user_account_pb.js"; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetUser - */ -export const getUser = { - localName: "getUser", - name: "GetUser", - kind: MethodKind.Unary, - I: GetUserRequest, - O: GetUserResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetUser - */ -export const setUser = { - localName: "setUser", - name: "SetUser", - kind: MethodKind.Unary, - I: SetUserRequest, - O: SetUserResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetUserAccounts - */ -export const getUserAccounts = { - localName: "getUserAccounts", - name: "GetUserAccounts", - kind: MethodKind.Unary, - I: GetUserAccountsRequest, - O: GetUserAccountsResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetPersonalAccount - */ -export const setPersonalAccount = { - localName: "setPersonalAccount", - name: "SetPersonalAccount", - kind: MethodKind.Unary, - I: SetPersonalAccountRequest, - O: SetPersonalAccountResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * Convert a personal account to a team account retaining all of the jobs and connections. This will also create a new empty personal account. - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount - */ -export const convertPersonalToTeamAccount = { - localName: "convertPersonalToTeamAccount", - name: "ConvertPersonalToTeamAccount", - kind: MethodKind.Unary, - I: ConvertPersonalToTeamAccountRequest, - O: ConvertPersonalToTeamAccountResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * Creates a new team account - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.CreateTeamAccount - */ -export const createTeamAccount = { - localName: "createTeamAccount", - name: "CreateTeamAccount", - kind: MethodKind.Unary, - I: CreateTeamAccountRequest, - O: CreateTeamAccountResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.IsUserInAccount - */ -export const isUserInAccount = { - localName: "isUserInAccount", - name: "IsUserInAccount", - kind: MethodKind.Unary, - I: IsUserInAccountRequest, - O: IsUserInAccountResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig - */ -export const getAccountTemporalConfig = { - localName: "getAccountTemporalConfig", - name: "GetAccountTemporalConfig", - kind: MethodKind.Unary, - I: GetAccountTemporalConfigRequest, - O: GetAccountTemporalConfigResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig - */ -export const setAccountTemporalConfig = { - localName: "setAccountTemporalConfig", - name: "SetAccountTemporalConfig", - kind: MethodKind.Unary, - I: SetAccountTemporalConfigRequest, - O: SetAccountTemporalConfigResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers - */ -export const getTeamAccountMembers = { - localName: "getTeamAccountMembers", - name: "GetTeamAccountMembers", - kind: MethodKind.Unary, - I: GetTeamAccountMembersRequest, - O: GetTeamAccountMembersResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember - */ -export const removeTeamAccountMember = { - localName: "removeTeamAccountMember", - name: "RemoveTeamAccountMember", - kind: MethodKind.Unary, - I: RemoveTeamAccountMemberRequest, - O: RemoveTeamAccountMemberResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount - */ -export const inviteUserToTeamAccount = { - localName: "inviteUserToTeamAccount", - name: "InviteUserToTeamAccount", - kind: MethodKind.Unary, - I: InviteUserToTeamAccountRequest, - O: InviteUserToTeamAccountResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites - */ -export const getTeamAccountInvites = { - localName: "getTeamAccountInvites", - name: "GetTeamAccountInvites", - kind: MethodKind.Unary, - I: GetTeamAccountInvitesRequest, - O: GetTeamAccountInvitesResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite - */ -export const removeTeamAccountInvite = { - localName: "removeTeamAccountInvite", - name: "RemoveTeamAccountInvite", - kind: MethodKind.Unary, - I: RemoveTeamAccountInviteRequest, - O: RemoveTeamAccountInviteResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite - */ -export const acceptTeamAccountInvite = { - localName: "acceptTeamAccountInvite", - name: "AcceptTeamAccountInvite", - kind: MethodKind.Unary, - I: AcceptTeamAccountInviteRequest, - O: AcceptTeamAccountInviteResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetSystemInformation - */ -export const getSystemInformation = { - localName: "getSystemInformation", - name: "GetSystemInformation", - kind: MethodKind.Unary, - I: GetSystemInformationRequest, - O: GetSystemInformationResponse, - idempotency: MethodIdempotency.NoSideEffects, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig - */ -export const getAccountOnboardingConfig = { - localName: "getAccountOnboardingConfig", - name: "GetAccountOnboardingConfig", - kind: MethodKind.Unary, - I: GetAccountOnboardingConfigRequest, - O: GetAccountOnboardingConfigResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig - */ -export const setAccountOnboardingConfig = { - localName: "setAccountOnboardingConfig", - name: "SetAccountOnboardingConfig", - kind: MethodKind.Unary, - I: SetAccountOnboardingConfigRequest, - O: SetAccountOnboardingConfigResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * Returns different metrics on the account status for the active billing period - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountStatus - */ -export const getAccountStatus = { - localName: "getAccountStatus", - name: "GetAccountStatus", - kind: MethodKind.Unary, - I: GetAccountStatusRequest, - O: GetAccountStatusResponse, - idempotency: MethodIdempotency.NoSideEffects, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * Distils the account status down to whether not it is in a valid state. - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.IsAccountStatusValid - */ -export const isAccountStatusValid = { - localName: "isAccountStatusValid", - name: "IsAccountStatusValid", - kind: MethodKind.Unary, - I: IsAccountStatusValidRequest, - O: IsAccountStatusValidResponse, - idempotency: MethodIdempotency.NoSideEffects, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * Returns a new checkout session for the account to subscribe - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession - */ -export const getAccountBillingCheckoutSession = { - localName: "getAccountBillingCheckoutSession", - name: "GetAccountBillingCheckoutSession", - kind: MethodKind.Unary, - I: GetAccountBillingCheckoutSessionRequest, - O: GetAccountBillingCheckoutSessionResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * Returns a new billing portal session if the account has a billing customer id - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession - */ -export const getAccountBillingPortalSession = { - localName: "getAccountBillingPortalSession", - name: "GetAccountBillingPortalSession", - kind: MethodKind.Unary, - I: GetAccountBillingPortalSessionRequest, - O: GetAccountBillingPortalSessionResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * Returns user accounts that have a billing id. - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetBillingAccounts - */ -export const getBillingAccounts = { - localName: "getBillingAccounts", - name: "GetBillingAccounts", - kind: MethodKind.Unary, - I: GetBillingAccountsRequest, - O: GetBillingAccountsResponse, - idempotency: MethodIdempotency.NoSideEffects, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * Sends a new metered event to the billing system - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent - */ -export const setBillingMeterEvent = { - localName: "setBillingMeterEvent", - name: "SetBillingMeterEvent", - kind: MethodKind.Unary, - I: SetBillingMeterEventRequest, - O: SetBillingMeterEventResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; - -/** - * Sets the users role - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetUserRole - */ -export const setUserRole = { - localName: "setUserRole", - name: "SetUserRole", - kind: MethodKind.Unary, - I: SetUserRoleRequest, - O: SetUserRoleResponse, - service: { - typeName: "mgmt.v1alpha1.UserAccountService" - } -} as const; diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_connect.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_connect.ts deleted file mode 100644 index 8ec3eb5d90..0000000000 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_connect.ts +++ /dev/null @@ -1,264 +0,0 @@ -// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts,import_extension=.js" -// @generated from file mgmt/v1alpha1/user_account.proto (package mgmt.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { AcceptTeamAccountInviteRequest, AcceptTeamAccountInviteResponse, ConvertPersonalToTeamAccountRequest, ConvertPersonalToTeamAccountResponse, CreateTeamAccountRequest, CreateTeamAccountResponse, GetAccountBillingCheckoutSessionRequest, GetAccountBillingCheckoutSessionResponse, GetAccountBillingPortalSessionRequest, GetAccountBillingPortalSessionResponse, GetAccountOnboardingConfigRequest, GetAccountOnboardingConfigResponse, GetAccountStatusRequest, GetAccountStatusResponse, GetAccountTemporalConfigRequest, GetAccountTemporalConfigResponse, GetBillingAccountsRequest, GetBillingAccountsResponse, GetSystemInformationRequest, GetSystemInformationResponse, GetTeamAccountInvitesRequest, GetTeamAccountInvitesResponse, GetTeamAccountMembersRequest, GetTeamAccountMembersResponse, GetUserAccountsRequest, GetUserAccountsResponse, GetUserRequest, GetUserResponse, InviteUserToTeamAccountRequest, InviteUserToTeamAccountResponse, IsAccountStatusValidRequest, IsAccountStatusValidResponse, IsUserInAccountRequest, IsUserInAccountResponse, RemoveTeamAccountInviteRequest, RemoveTeamAccountInviteResponse, RemoveTeamAccountMemberRequest, RemoveTeamAccountMemberResponse, SetAccountOnboardingConfigRequest, SetAccountOnboardingConfigResponse, SetAccountTemporalConfigRequest, SetAccountTemporalConfigResponse, SetBillingMeterEventRequest, SetBillingMeterEventResponse, SetPersonalAccountRequest, SetPersonalAccountResponse, SetUserRequest, SetUserResponse, SetUserRoleRequest, SetUserRoleResponse } from "./user_account_pb.js"; -import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; - -/** - * @generated from service mgmt.v1alpha1.UserAccountService - */ -export const UserAccountService = { - typeName: "mgmt.v1alpha1.UserAccountService", - methods: { - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetUser - */ - getUser: { - name: "GetUser", - I: GetUserRequest, - O: GetUserResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetUser - */ - setUser: { - name: "SetUser", - I: SetUserRequest, - O: SetUserResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetUserAccounts - */ - getUserAccounts: { - name: "GetUserAccounts", - I: GetUserAccountsRequest, - O: GetUserAccountsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetPersonalAccount - */ - setPersonalAccount: { - name: "SetPersonalAccount", - I: SetPersonalAccountRequest, - O: SetPersonalAccountResponse, - kind: MethodKind.Unary, - }, - /** - * Convert a personal account to a team account retaining all of the jobs and connections. This will also create a new empty personal account. - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount - */ - convertPersonalToTeamAccount: { - name: "ConvertPersonalToTeamAccount", - I: ConvertPersonalToTeamAccountRequest, - O: ConvertPersonalToTeamAccountResponse, - kind: MethodKind.Unary, - }, - /** - * Creates a new team account - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.CreateTeamAccount - */ - createTeamAccount: { - name: "CreateTeamAccount", - I: CreateTeamAccountRequest, - O: CreateTeamAccountResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.IsUserInAccount - */ - isUserInAccount: { - name: "IsUserInAccount", - I: IsUserInAccountRequest, - O: IsUserInAccountResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig - */ - getAccountTemporalConfig: { - name: "GetAccountTemporalConfig", - I: GetAccountTemporalConfigRequest, - O: GetAccountTemporalConfigResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig - */ - setAccountTemporalConfig: { - name: "SetAccountTemporalConfig", - I: SetAccountTemporalConfigRequest, - O: SetAccountTemporalConfigResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers - */ - getTeamAccountMembers: { - name: "GetTeamAccountMembers", - I: GetTeamAccountMembersRequest, - O: GetTeamAccountMembersResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember - */ - removeTeamAccountMember: { - name: "RemoveTeamAccountMember", - I: RemoveTeamAccountMemberRequest, - O: RemoveTeamAccountMemberResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount - */ - inviteUserToTeamAccount: { - name: "InviteUserToTeamAccount", - I: InviteUserToTeamAccountRequest, - O: InviteUserToTeamAccountResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites - */ - getTeamAccountInvites: { - name: "GetTeamAccountInvites", - I: GetTeamAccountInvitesRequest, - O: GetTeamAccountInvitesResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite - */ - removeTeamAccountInvite: { - name: "RemoveTeamAccountInvite", - I: RemoveTeamAccountInviteRequest, - O: RemoveTeamAccountInviteResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite - */ - acceptTeamAccountInvite: { - name: "AcceptTeamAccountInvite", - I: AcceptTeamAccountInviteRequest, - O: AcceptTeamAccountInviteResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetSystemInformation - */ - getSystemInformation: { - name: "GetSystemInformation", - I: GetSystemInformationRequest, - O: GetSystemInformationResponse, - kind: MethodKind.Unary, - idempotency: MethodIdempotency.NoSideEffects, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig - */ - getAccountOnboardingConfig: { - name: "GetAccountOnboardingConfig", - I: GetAccountOnboardingConfigRequest, - O: GetAccountOnboardingConfigResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig - */ - setAccountOnboardingConfig: { - name: "SetAccountOnboardingConfig", - I: SetAccountOnboardingConfigRequest, - O: SetAccountOnboardingConfigResponse, - kind: MethodKind.Unary, - }, - /** - * Returns different metrics on the account status for the active billing period - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountStatus - */ - getAccountStatus: { - name: "GetAccountStatus", - I: GetAccountStatusRequest, - O: GetAccountStatusResponse, - kind: MethodKind.Unary, - idempotency: MethodIdempotency.NoSideEffects, - }, - /** - * Distils the account status down to whether not it is in a valid state. - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.IsAccountStatusValid - */ - isAccountStatusValid: { - name: "IsAccountStatusValid", - I: IsAccountStatusValidRequest, - O: IsAccountStatusValidResponse, - kind: MethodKind.Unary, - idempotency: MethodIdempotency.NoSideEffects, - }, - /** - * Returns a new checkout session for the account to subscribe - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession - */ - getAccountBillingCheckoutSession: { - name: "GetAccountBillingCheckoutSession", - I: GetAccountBillingCheckoutSessionRequest, - O: GetAccountBillingCheckoutSessionResponse, - kind: MethodKind.Unary, - }, - /** - * Returns a new billing portal session if the account has a billing customer id - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession - */ - getAccountBillingPortalSession: { - name: "GetAccountBillingPortalSession", - I: GetAccountBillingPortalSessionRequest, - O: GetAccountBillingPortalSessionResponse, - kind: MethodKind.Unary, - }, - /** - * Returns user accounts that have a billing id. - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.GetBillingAccounts - */ - getBillingAccounts: { - name: "GetBillingAccounts", - I: GetBillingAccountsRequest, - O: GetBillingAccountsResponse, - kind: MethodKind.Unary, - idempotency: MethodIdempotency.NoSideEffects, - }, - /** - * Sends a new metered event to the billing system - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent - */ - setBillingMeterEvent: { - name: "SetBillingMeterEvent", - I: SetBillingMeterEventRequest, - O: SetBillingMeterEventResponse, - kind: MethodKind.Unary, - }, - /** - * Sets the users role - * - * @generated from rpc mgmt.v1alpha1.UserAccountService.SetUserRole - */ - setUserRole: { - name: "SetUserRole", - I: SetUserRoleRequest, - O: SetUserRoleResponse, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_pb.ts index 0b3b5b56a8..421a323396 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_pb.ts @@ -1,471 +1,160 @@ -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js" +// @generated by protoc-gen-es v2.2.3 with parameter "target=ts,import_extension=.js" // @generated from file mgmt/v1alpha1/user_account.proto (package mgmt.v1alpha1, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.js"; +import type { Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; /** - * @generated from enum mgmt.v1alpha1.UserAccountType + * Describes the file mgmt/v1alpha1/user_account.proto. */ -export enum UserAccountType { - /** - * @generated from enum value: USER_ACCOUNT_TYPE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: USER_ACCOUNT_TYPE_PERSONAL = 1; - */ - PERSONAL = 1, - - /** - * @generated from enum value: USER_ACCOUNT_TYPE_TEAM = 2; - */ - TEAM = 2, - - /** - * @generated from enum value: USER_ACCOUNT_TYPE_ENTERPRISE = 3; - */ - ENTERPRISE = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(UserAccountType) -proto3.util.setEnumType(UserAccountType, "mgmt.v1alpha1.UserAccountType", [ - { no: 0, name: "USER_ACCOUNT_TYPE_UNSPECIFIED" }, - { no: 1, name: "USER_ACCOUNT_TYPE_PERSONAL" }, - { no: 2, name: "USER_ACCOUNT_TYPE_TEAM" }, - { no: 3, name: "USER_ACCOUNT_TYPE_ENTERPRISE" }, -]); +export const file_mgmt_v1alpha1_user_account: GenFile = /*@__PURE__*/ + fileDesc("CiBtZ210L3YxYWxwaGExL3VzZXJfYWNjb3VudC5wcm90bxINbWdtdC52MWFscGhhMSIQCg5HZXRVc2VyUmVxdWVzdCIiCg9HZXRVc2VyUmVzcG9uc2USDwoHdXNlcl9pZBgBIAEoCSIQCg5TZXRVc2VyUmVxdWVzdCIiCg9TZXRVc2VyUmVzcG9uc2USDwoHdXNlcl9pZBgBIAEoCSIYChZHZXRVc2VyQWNjb3VudHNSZXF1ZXN0IkcKF0dldFVzZXJBY2NvdW50c1Jlc3BvbnNlEiwKCGFjY291bnRzGAEgAygLMhoubWdtdC52MWFscGhhMS5Vc2VyQWNjb3VudCJ1CgtVc2VyQWNjb3VudBIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEiwKBHR5cGUYAyABKA4yHi5tZ210LnYxYWxwaGExLlVzZXJBY2NvdW50VHlwZRIeChZoYXNfc3RyaXBlX2N1c3RvbWVyX2lkGAQgASgIIoABCiNDb252ZXJ0UGVyc29uYWxUb1RlYW1BY2NvdW50UmVxdWVzdBInCgRuYW1lGAEgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kEiEKCmFjY291bnRfaWQYAiABKAlCCLpIBXIDsAEBSACIAQFCDQoLX2FjY291bnRfaWQilwEKJENvbnZlcnRQZXJzb25hbFRvVGVhbUFjY291bnRSZXNwb25zZRISCgphY2NvdW50X2lkGAEgASgJEiEKFGNoZWNrb3V0X3Nlc3Npb25fdXJsGAIgASgJSACIAQESHwoXbmV3X3BlcnNvbmFsX2FjY291bnRfaWQYAyABKAlCFwoVX2NoZWNrb3V0X3Nlc3Npb25fdXJsIhsKGVNldFBlcnNvbmFsQWNjb3VudFJlcXVlc3QiMAoaU2V0UGVyc29uYWxBY2NvdW50UmVzcG9uc2USEgoKYWNjb3VudF9pZBgBIAEoCSI2ChZJc1VzZXJJbkFjY291bnRSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIiUKF0lzVXNlckluQWNjb3VudFJlc3BvbnNlEgoKAm9rGAEgASgIIj8KH0dldEFjY291bnRUZW1wb3JhbENvbmZpZ1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQEiWAogR2V0QWNjb3VudFRlbXBvcmFsQ29uZmlnUmVzcG9uc2USNAoGY29uZmlnGAEgASgLMiQubWdtdC52MWFscGhhMS5BY2NvdW50VGVtcG9yYWxDb25maWcidQofU2V0QWNjb3VudFRlbXBvcmFsQ29uZmlnUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABARI0CgZjb25maWcYAiABKAsyJC5tZ210LnYxYWxwaGExLkFjY291bnRUZW1wb3JhbENvbmZpZyJYCiBTZXRBY2NvdW50VGVtcG9yYWxDb25maWdSZXNwb25zZRI0CgZjb25maWcYASABKAsyJC5tZ210LnYxYWxwaGExLkFjY291bnRUZW1wb3JhbENvbmZpZyJvChVBY2NvdW50VGVtcG9yYWxDb25maWcSFAoDdXJsGAEgASgJQge6SARyAhABEhoKCW5hbWVzcGFjZRgCIAEoCUIHukgEcgIQARIkChNzeW5jX2pvYl9xdWV1ZV9uYW1lGAMgASgJQge6SARyAhABIkMKGENyZWF0ZVRlYW1BY2NvdW50UmVxdWVzdBInCgRuYW1lGAEgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kImsKGUNyZWF0ZVRlYW1BY2NvdW50UmVzcG9uc2USEgoKYWNjb3VudF9pZBgBIAEoCRIhChRjaGVja291dF9zZXNzaW9uX3VybBgCIAEoCUgAiAEBQhcKFV9jaGVja291dF9zZXNzaW9uX3VybCJvCgtBY2NvdW50VXNlchIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEg0KBWltYWdlGAMgASgJEg0KBWVtYWlsGAQgASgJEigKBHJvbGUYBSABKA4yGi5tZ210LnYxYWxwaGExLkFjY291bnRSb2xlIjwKHEdldFRlYW1BY2NvdW50TWVtYmVyc1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQEiSgodR2V0VGVhbUFjY291bnRNZW1iZXJzUmVzcG9uc2USKQoFdXNlcnMYASADKAsyGi5tZ210LnYxYWxwaGExLkFjY291bnRVc2VyIlkKHlJlbW92ZVRlYW1BY2NvdW50TWVtYmVyUmVxdWVzdBIZCgd1c2VyX2lkGAEgASgJQgi6SAVyA7ABARIcCgphY2NvdW50X2lkGAIgASgJQgi6SAVyA7ABASIhCh9SZW1vdmVUZWFtQWNjb3VudE1lbWJlclJlc3BvbnNlIo4BCh5JbnZpdGVVc2VyVG9UZWFtQWNjb3VudFJlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQESFgoFZW1haWwYAiABKAlCB7pIBHICEAESLQoEcm9sZRgDIAEoDjIaLm1nbXQudjFhbHBoYTEuQWNjb3VudFJvbGVIAIgBAUIHCgVfcm9sZSKxAgoNQWNjb3VudEludml0ZRIKCgJpZBgBIAEoCRISCgphY2NvdW50X2lkGAIgASgJEhYKDnNlbmRlcl91c2VyX2lkGAMgASgJEg0KBWVtYWlsGAQgASgJEg0KBXRva2VuGAUgASgJEhAKCGFjY2VwdGVkGAYgASgIEi4KCmNyZWF0ZWRfYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmV4cGlyZXNfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEigKBHJvbGUYCiABKA4yGi5tZ210LnYxYWxwaGExLkFjY291bnRSb2xlIk8KH0ludml0ZVVzZXJUb1RlYW1BY2NvdW50UmVzcG9uc2USLAoGaW52aXRlGAEgASgLMhwubWdtdC52MWFscGhhMS5BY2NvdW50SW52aXRlIjwKHEdldFRlYW1BY2NvdW50SW52aXRlc1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQEiTgodR2V0VGVhbUFjY291bnRJbnZpdGVzUmVzcG9uc2USLQoHaW52aXRlcxgBIAMoCzIcLm1nbXQudjFhbHBoYTEuQWNjb3VudEludml0ZSI2Ch5SZW1vdmVUZWFtQWNjb3VudEludml0ZVJlcXVlc3QSFAoCaWQYASABKAlCCLpIBXIDsAEBIiEKH1JlbW92ZVRlYW1BY2NvdW50SW52aXRlUmVzcG9uc2UiOAoeQWNjZXB0VGVhbUFjY291bnRJbnZpdGVSZXF1ZXN0EhYKBXRva2VuGAEgASgJQge6SARyAhABIk4KH0FjY2VwdFRlYW1BY2NvdW50SW52aXRlUmVzcG9uc2USKwoHYWNjb3VudBgBIAEoCzIaLm1nbXQudjFhbHBoYTEuVXNlckFjY291bnQiHQobR2V0U3lzdGVtSW5mb3JtYXRpb25SZXF1ZXN0IsIBChxHZXRTeXN0ZW1JbmZvcm1hdGlvblJlc3BvbnNlEg8KB3ZlcnNpb24YASABKAkSDgoGY29tbWl0GAIgASgJEhAKCGNvbXBpbGVyGAMgASgJEhAKCHBsYXRmb3JtGAQgASgJEi4KCmJ1aWxkX2RhdGUYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi0KB2xpY2Vuc2UYBiABKAsyHC5tZ210LnYxYWxwaGExLlN5c3RlbUxpY2Vuc2UiawoNU3lzdGVtTGljZW5zZRIQCghpc192YWxpZBgBIAEoCBIuCgpleHBpcmVzX2F0GAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIYChBpc19uZW9zeW5jX2Nsb3VkGAMgASgIIkEKIUdldEFjY291bnRPbmJvYXJkaW5nQ29uZmlnUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASJcCiJHZXRBY2NvdW50T25ib2FyZGluZ0NvbmZpZ1Jlc3BvbnNlEjYKBmNvbmZpZxgBIAEoCzImLm1nbXQudjFhbHBoYTEuQWNjb3VudE9uYm9hcmRpbmdDb25maWcieQohU2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBEjYKBmNvbmZpZxgCIAEoCzImLm1nbXQudjFhbHBoYTEuQWNjb3VudE9uYm9hcmRpbmdDb25maWciXAoiU2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXNwb25zZRI2CgZjb25maWcYASABKAsyJi5tZ210LnYxYWxwaGExLkFjY291bnRPbmJvYXJkaW5nQ29uZmlnIlMKF0FjY291bnRPbmJvYXJkaW5nQ29uZmlnEiAKGGhhc19jb21wbGV0ZWRfb25ib2FyZGluZxgFIAEoCEoECAEQAkoECAIQA0oECAMQBEoECAQQBSI3ChdHZXRBY2NvdW50U3RhdHVzUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASKsAQoYR2V0QWNjb3VudFN0YXR1c1Jlc3BvbnNlEhkKEXVzZWRfcmVjb3JkX2NvdW50GAEgASgEEiEKFGFsbG93ZWRfcmVjb3JkX2NvdW50GAIgASgESACIAQESOQoTc3Vic2NyaXB0aW9uX3N0YXR1cxgDIAEoDjIcLm1nbXQudjFhbHBoYTEuQmlsbGluZ1N0YXR1c0IXChVfYWxsb3dlZF9yZWNvcmRfY291bnQiewobSXNBY2NvdW50U3RhdHVzVmFsaWRSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBEiMKFnJlcXVlc3RlZF9yZWNvcmRfY291bnQYAiABKARIAIgBAUIZChdfcmVxdWVzdGVkX3JlY29yZF9jb3VudCL3AQocSXNBY2NvdW50U3RhdHVzVmFsaWRSZXNwb25zZRIQCghpc192YWxpZBgBIAEoCBITCgZyZWFzb24YAiABKAlIAIgBARITCgtzaG91bGRfcG9sbBgDIAEoCBI0Cg5hY2NvdW50X3N0YXR1cxgGIAEoDjIcLm1nbXQudjFhbHBoYTEuQWNjb3VudFN0YXR1cxI5ChB0cmlhbF9leHBpcmVzX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEgBiAEBQgkKB19yZWFzb25CEwoRX3RyaWFsX2V4cGlyZXNfYXRKBAgEEAVKBAgFEAYiRwonR2V0QWNjb3VudEJpbGxpbmdDaGVja291dFNlc3Npb25SZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIkgKKEdldEFjY291bnRCaWxsaW5nQ2hlY2tvdXRTZXNzaW9uUmVzcG9uc2USHAoUY2hlY2tvdXRfc2Vzc2lvbl91cmwYASABKAkiRQolR2V0QWNjb3VudEJpbGxpbmdQb3J0YWxTZXNzaW9uUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASJECiZHZXRBY2NvdW50QmlsbGluZ1BvcnRhbFNlc3Npb25SZXNwb25zZRIaChJwb3J0YWxfc2Vzc2lvbl91cmwYASABKAkiMAoZR2V0QmlsbGluZ0FjY291bnRzUmVxdWVzdBITCgthY2NvdW50X2lkcxgBIAMoCSJKChpHZXRCaWxsaW5nQWNjb3VudHNSZXNwb25zZRIsCghhY2NvdW50cxgBIAMoCzIaLm1nbXQudjFhbHBoYTEuVXNlckFjY291bnQisQEKG1NldEJpbGxpbmdNZXRlckV2ZW50UmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABARIbCgpldmVudF9uYW1lGAIgASgJQge6SARyAhABEhYKBXZhbHVlGAMgASgJQge6SARyAhABEhkKCGV2ZW50X2lkGAQgASgJQge6SARyAhABEhYKCXRpbWVzdGFtcBgFIAEoBEgAiAEBQgwKCl90aW1lc3RhbXAiHgocU2V0QmlsbGluZ01ldGVyRXZlbnRSZXNwb25zZSJ3ChJTZXRVc2VyUm9sZVJlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQESGQoHdXNlcl9pZBgCIAEoCUIIukgFcgOwAQESKAoEcm9sZRgDIAEoDjIaLm1nbXQudjFhbHBoYTEuQWNjb3VudFJvbGUiFQoTU2V0VXNlclJvbGVSZXNwb25zZSqSAQoPVXNlckFjY291bnRUeXBlEiEKHVVTRVJfQUNDT1VOVF9UWVBFX1VOU1BFQ0lGSUVEEAASHgoaVVNFUl9BQ0NPVU5UX1RZUEVfUEVSU09OQUwQARIaChZVU0VSX0FDQ09VTlRfVFlQRV9URUFNEAISIAocVVNFUl9BQ0NPVU5UX1RZUEVfRU5URVJQUklTRRADKqkBCg1CaWxsaW5nU3RhdHVzEh4KGkJJTExJTkdfU1RBVFVTX1VOU1BFQ0lGSUVEEAASGQoVQklMTElOR19TVEFUVVNfQUNUSVZFEAESGgoWQklMTElOR19TVEFUVVNfRVhQSVJFRBACEh8KG0JJTExJTkdfU1RBVFVTX1RSSUFMX0FDVElWRRADEiAKHEJJTExJTkdfU1RBVFVTX1RSSUFMX0VYUElSRUQQBCqQAgoNQWNjb3VudFN0YXR1cxIlCiFBQ0NPVU5UX1NUQVRVU19SRUFTT05fVU5TUEVDSUZJRUQQABIrCidBQ0NPVU5UX1NUQVRVU19BQ0NPVU5UX0lOX0VYUElSRURfU1RBVEUQAxInCiNBQ0NPVU5UX1NUQVRVU19BQ0NPVU5UX1RSSUFMX0FDVElWRRAEEigKJEFDQ09VTlRfU1RBVFVTX0FDQ09VTlRfVFJJQUxfRVhQSVJFRBAFIgQIARABIgQIAhACKiRBQ0NPVU5UX1NUQVRVU19FWENFRURTX0FMTE9XRURfTElNSVQqJkFDQ09VTlRfU1RBVFVTX1JFUVVFU1RFRF9FWENFRURTX0xJTUlUKp8BCgtBY2NvdW50Um9sZRIcChhBQ0NPVU5UX1JPTEVfVU5TUEVDSUZJRUQQABIWChJBQ0NPVU5UX1JPTEVfQURNSU4QARIeChpBQ0NPVU5UX1JPTEVfSk9CX0RFVkVMT1BFUhACEhsKF0FDQ09VTlRfUk9MRV9KT0JfVklFV0VSEAMSHQoZQUNDT1VOVF9ST0xFX0pPQl9FWEVDVVRPUhAEMvgWChJVc2VyQWNjb3VudFNlcnZpY2USSgoHR2V0VXNlchIdLm1nbXQudjFhbHBoYTEuR2V0VXNlclJlcXVlc3QaHi5tZ210LnYxYWxwaGExLkdldFVzZXJSZXNwb25zZSIAEkoKB1NldFVzZXISHS5tZ210LnYxYWxwaGExLlNldFVzZXJSZXF1ZXN0Gh4ubWdtdC52MWFscGhhMS5TZXRVc2VyUmVzcG9uc2UiABJiCg9HZXRVc2VyQWNjb3VudHMSJS5tZ210LnYxYWxwaGExLkdldFVzZXJBY2NvdW50c1JlcXVlc3QaJi5tZ210LnYxYWxwaGExLkdldFVzZXJBY2NvdW50c1Jlc3BvbnNlIgASawoSU2V0UGVyc29uYWxBY2NvdW50EigubWdtdC52MWFscGhhMS5TZXRQZXJzb25hbEFjY291bnRSZXF1ZXN0GikubWdtdC52MWFscGhhMS5TZXRQZXJzb25hbEFjY291bnRSZXNwb25zZSIAEokBChxDb252ZXJ0UGVyc29uYWxUb1RlYW1BY2NvdW50EjIubWdtdC52MWFscGhhMS5Db252ZXJ0UGVyc29uYWxUb1RlYW1BY2NvdW50UmVxdWVzdBozLm1nbXQudjFhbHBoYTEuQ29udmVydFBlcnNvbmFsVG9UZWFtQWNjb3VudFJlc3BvbnNlIgASaAoRQ3JlYXRlVGVhbUFjY291bnQSJy5tZ210LnYxYWxwaGExLkNyZWF0ZVRlYW1BY2NvdW50UmVxdWVzdBooLm1nbXQudjFhbHBoYTEuQ3JlYXRlVGVhbUFjY291bnRSZXNwb25zZSIAEmIKD0lzVXNlckluQWNjb3VudBIlLm1nbXQudjFhbHBoYTEuSXNVc2VySW5BY2NvdW50UmVxdWVzdBomLm1nbXQudjFhbHBoYTEuSXNVc2VySW5BY2NvdW50UmVzcG9uc2UiABJ9ChhHZXRBY2NvdW50VGVtcG9yYWxDb25maWcSLi5tZ210LnYxYWxwaGExLkdldEFjY291bnRUZW1wb3JhbENvbmZpZ1JlcXVlc3QaLy5tZ210LnYxYWxwaGExLkdldEFjY291bnRUZW1wb3JhbENvbmZpZ1Jlc3BvbnNlIgASfQoYU2V0QWNjb3VudFRlbXBvcmFsQ29uZmlnEi4ubWdtdC52MWFscGhhMS5TZXRBY2NvdW50VGVtcG9yYWxDb25maWdSZXF1ZXN0Gi8ubWdtdC52MWFscGhhMS5TZXRBY2NvdW50VGVtcG9yYWxDb25maWdSZXNwb25zZSIAEnQKFUdldFRlYW1BY2NvdW50TWVtYmVycxIrLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRNZW1iZXJzUmVxdWVzdBosLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRNZW1iZXJzUmVzcG9uc2UiABJ6ChdSZW1vdmVUZWFtQWNjb3VudE1lbWJlchItLm1nbXQudjFhbHBoYTEuUmVtb3ZlVGVhbUFjY291bnRNZW1iZXJSZXF1ZXN0Gi4ubWdtdC52MWFscGhhMS5SZW1vdmVUZWFtQWNjb3VudE1lbWJlclJlc3BvbnNlIgASegoXSW52aXRlVXNlclRvVGVhbUFjY291bnQSLS5tZ210LnYxYWxwaGExLkludml0ZVVzZXJUb1RlYW1BY2NvdW50UmVxdWVzdBouLm1nbXQudjFhbHBoYTEuSW52aXRlVXNlclRvVGVhbUFjY291bnRSZXNwb25zZSIAEnQKFUdldFRlYW1BY2NvdW50SW52aXRlcxIrLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRJbnZpdGVzUmVxdWVzdBosLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRJbnZpdGVzUmVzcG9uc2UiABJ6ChdSZW1vdmVUZWFtQWNjb3VudEludml0ZRItLm1nbXQudjFhbHBoYTEuUmVtb3ZlVGVhbUFjY291bnRJbnZpdGVSZXF1ZXN0Gi4ubWdtdC52MWFscGhhMS5SZW1vdmVUZWFtQWNjb3VudEludml0ZVJlc3BvbnNlIgASegoXQWNjZXB0VGVhbUFjY291bnRJbnZpdGUSLS5tZ210LnYxYWxwaGExLkFjY2VwdFRlYW1BY2NvdW50SW52aXRlUmVxdWVzdBouLm1nbXQudjFhbHBoYTEuQWNjZXB0VGVhbUFjY291bnRJbnZpdGVSZXNwb25zZSIAEnQKFEdldFN5c3RlbUluZm9ybWF0aW9uEioubWdtdC52MWFscGhhMS5HZXRTeXN0ZW1JbmZvcm1hdGlvblJlcXVlc3QaKy5tZ210LnYxYWxwaGExLkdldFN5c3RlbUluZm9ybWF0aW9uUmVzcG9uc2UiA5ACARKDAQoaR2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWcSMC5tZ210LnYxYWxwaGExLkdldEFjY291bnRPbmJvYXJkaW5nQ29uZmlnUmVxdWVzdBoxLm1nbXQudjFhbHBoYTEuR2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXNwb25zZSIAEoMBChpTZXRBY2NvdW50T25ib2FyZGluZ0NvbmZpZxIwLm1nbXQudjFhbHBoYTEuU2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXF1ZXN0GjEubWdtdC52MWFscGhhMS5TZXRBY2NvdW50T25ib2FyZGluZ0NvbmZpZ1Jlc3BvbnNlIgASaAoQR2V0QWNjb3VudFN0YXR1cxImLm1nbXQudjFhbHBoYTEuR2V0QWNjb3VudFN0YXR1c1JlcXVlc3QaJy5tZ210LnYxYWxwaGExLkdldEFjY291bnRTdGF0dXNSZXNwb25zZSIDkAIBEnQKFElzQWNjb3VudFN0YXR1c1ZhbGlkEioubWdtdC52MWFscGhhMS5Jc0FjY291bnRTdGF0dXNWYWxpZFJlcXVlc3QaKy5tZ210LnYxYWxwaGExLklzQWNjb3VudFN0YXR1c1ZhbGlkUmVzcG9uc2UiA5ACARKVAQogR2V0QWNjb3VudEJpbGxpbmdDaGVja291dFNlc3Npb24SNi5tZ210LnYxYWxwaGExLkdldEFjY291bnRCaWxsaW5nQ2hlY2tvdXRTZXNzaW9uUmVxdWVzdBo3Lm1nbXQudjFhbHBoYTEuR2V0QWNjb3VudEJpbGxpbmdDaGVja291dFNlc3Npb25SZXNwb25zZSIAEo8BCh5HZXRBY2NvdW50QmlsbGluZ1BvcnRhbFNlc3Npb24SNC5tZ210LnYxYWxwaGExLkdldEFjY291bnRCaWxsaW5nUG9ydGFsU2Vzc2lvblJlcXVlc3QaNS5tZ210LnYxYWxwaGExLkdldEFjY291bnRCaWxsaW5nUG9ydGFsU2Vzc2lvblJlc3BvbnNlIgASbgoSR2V0QmlsbGluZ0FjY291bnRzEigubWdtdC52MWFscGhhMS5HZXRCaWxsaW5nQWNjb3VudHNSZXF1ZXN0GikubWdtdC52MWFscGhhMS5HZXRCaWxsaW5nQWNjb3VudHNSZXNwb25zZSIDkAIBEnEKFFNldEJpbGxpbmdNZXRlckV2ZW50EioubWdtdC52MWFscGhhMS5TZXRCaWxsaW5nTWV0ZXJFdmVudFJlcXVlc3QaKy5tZ210LnYxYWxwaGExLlNldEJpbGxpbmdNZXRlckV2ZW50UmVzcG9uc2UiABJWCgtTZXRVc2VyUm9sZRIhLm1nbXQudjFhbHBoYTEuU2V0VXNlclJvbGVSZXF1ZXN0GiIubWdtdC52MWFscGhhMS5TZXRVc2VyUm9sZVJlc3BvbnNlIgBCzAEKEWNvbS5tZ210LnYxYWxwaGExQhBVc2VyQWNjb3VudFByb3RvUAFaUGdpdGh1Yi5jb20vbnVjbGV1c2Nsb3VkL25lb3N5bmMvYmFja2VuZC9nZW4vZ28vcHJvdG9zL21nbXQvdjFhbHBoYTE7bWdtdHYxYWxwaGExogIDTVhYqgINTWdtdC5WMWFscGhhMcoCDU1nbXRcVjFhbHBoYTHiAhlNZ210XFYxYWxwaGExXEdQQk1ldGFkYXRh6gIOTWdtdDo6VjFhbHBoYTFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_timestamp]); /** - * @generated from enum mgmt.v1alpha1.BillingStatus + * @generated from message mgmt.v1alpha1.GetUserRequest */ -export enum BillingStatus { - /** - * @generated from enum value: BILLING_STATUS_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * Corresponds to a billing subscription and rolls up various states into active - * This may be split into the future to be more granular and mirror the underlying billing system - * - * @generated from enum value: BILLING_STATUS_ACTIVE = 1; - */ - ACTIVE = 1, - - /** - * If the system could not find any active subscriptions - * - * @generated from enum value: BILLING_STATUS_EXPIRED = 2; - */ - EXPIRED = 2, - - /** - * The account does not have an active subscription and is in a valid trial period - * - * @generated from enum value: BILLING_STATUS_TRIAL_ACTIVE = 3; - */ - TRIAL_ACTIVE = 3, - - /** - * The account does not have an active subscription and the trial period has ended - * - * @generated from enum value: BILLING_STATUS_TRIAL_EXPIRED = 4; - */ - TRIAL_EXPIRED = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(BillingStatus) -proto3.util.setEnumType(BillingStatus, "mgmt.v1alpha1.BillingStatus", [ - { no: 0, name: "BILLING_STATUS_UNSPECIFIED" }, - { no: 1, name: "BILLING_STATUS_ACTIVE" }, - { no: 2, name: "BILLING_STATUS_EXPIRED" }, - { no: 3, name: "BILLING_STATUS_TRIAL_ACTIVE" }, - { no: 4, name: "BILLING_STATUS_TRIAL_EXPIRED" }, -]); +export type GetUserRequest = Message<"mgmt.v1alpha1.GetUserRequest"> & { +}; /** - * @generated from enum mgmt.v1alpha1.AccountStatus + * Describes the message mgmt.v1alpha1.GetUserRequest. + * Use `create(GetUserRequestSchema)` to create a new message. */ -export enum AccountStatus { - /** - * Default value, should be used when no reason is specified - * - * @generated from enum value: ACCOUNT_STATUS_REASON_UNSPECIFIED = 0; - */ - REASON_UNSPECIFIED = 0, - - /** - * @deprecated - Current usage exceeds allowed limit - * - * @generated from enum value: ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT = 1; - */ - EXCEEDS_ALLOWED_LIMIT = 1, - - /** - * @deprecated - Adding requested records exceeds the allowed limit - * - * @generated from enum value: ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT = 2; - */ - REQUESTED_EXCEEDS_LIMIT = 2, - - /** - * Account is currently in an expired state - * - * @generated from enum value: ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE = 3; - */ - ACCOUNT_IN_EXPIRED_STATE = 3, - - /** - * The account is currently in an active trial period - * - * @generated from enum value: ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE = 4; - */ - ACCOUNT_TRIAL_ACTIVE = 4, - - /** - * The account is past the active trial period - * - * @generated from enum value: ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED = 5; - */ - ACCOUNT_TRIAL_EXPIRED = 5, -} -// Retrieve enum metadata with: proto3.getEnumType(AccountStatus) -proto3.util.setEnumType(AccountStatus, "mgmt.v1alpha1.AccountStatus", [ - { no: 0, name: "ACCOUNT_STATUS_REASON_UNSPECIFIED" }, - { no: 1, name: "ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT" }, - { no: 2, name: "ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT" }, - { no: 3, name: "ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE" }, - { no: 4, name: "ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE" }, - { no: 5, name: "ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED" }, -]); +export const GetUserRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 0); /** - * @generated from enum mgmt.v1alpha1.AccountRole + * @generated from message mgmt.v1alpha1.GetUserResponse */ -export enum AccountRole { - /** - * Default value, this should not be used, but will default to ACCOUNT_ROLE_JOB_VIEWER - * - * @generated from enum value: ACCOUNT_ROLE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * Admin, can do anything in the account. - * - * @generated from enum value: ACCOUNT_ROLE_ADMIN = 1; - */ - ADMIN = 1, - - /** - * Can view, edit jobs and connections - * - * @generated from enum value: ACCOUNT_ROLE_JOB_DEVELOPER = 2; - */ - JOB_DEVELOPER = 2, - - /** - * Can view - * - * @generated from enum value: ACCOUNT_ROLE_JOB_VIEWER = 3; - */ - JOB_VIEWER = 3, - +export type GetUserResponse = Message<"mgmt.v1alpha1.GetUserResponse"> & { /** - * Can view and execute - * - * @generated from enum value: ACCOUNT_ROLE_JOB_EXECUTOR = 4; + * @generated from field: string user_id = 1; */ - JOB_EXECUTOR = 4, -} -// Retrieve enum metadata with: proto3.getEnumType(AccountRole) -proto3.util.setEnumType(AccountRole, "mgmt.v1alpha1.AccountRole", [ - { no: 0, name: "ACCOUNT_ROLE_UNSPECIFIED" }, - { no: 1, name: "ACCOUNT_ROLE_ADMIN" }, - { no: 2, name: "ACCOUNT_ROLE_JOB_DEVELOPER" }, - { no: 3, name: "ACCOUNT_ROLE_JOB_VIEWER" }, - { no: 4, name: "ACCOUNT_ROLE_JOB_EXECUTOR" }, -]); + userId: string; +}; /** - * @generated from message mgmt.v1alpha1.GetUserRequest + * Describes the message mgmt.v1alpha1.GetUserResponse. + * Use `create(GetUserResponseSchema)` to create a new message. */ -export class GetUserRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetUserRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserRequest { - return new GetUserRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserRequest { - return new GetUserRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetUserRequest { - return new GetUserRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetUserRequest | PlainMessage | undefined, b: GetUserRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetUserRequest, a, b); - } -} +export const GetUserResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 1); /** - * @generated from message mgmt.v1alpha1.GetUserResponse + * @generated from message mgmt.v1alpha1.SetUserRequest */ -export class GetUserResponse extends Message { - /** - * @generated from field: string user_id = 1; - */ - userId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetUserResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserResponse { - return new GetUserResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserResponse { - return new GetUserResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetUserResponse { - return new GetUserResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetUserResponse | PlainMessage | undefined, b: GetUserResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetUserResponse, a, b); - } -} +export type SetUserRequest = Message<"mgmt.v1alpha1.SetUserRequest"> & { +}; /** - * @generated from message mgmt.v1alpha1.SetUserRequest + * Describes the message mgmt.v1alpha1.SetUserRequest. + * Use `create(SetUserRequestSchema)` to create a new message. */ -export class SetUserRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetUserRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetUserRequest { - return new SetUserRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetUserRequest { - return new SetUserRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetUserRequest { - return new SetUserRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetUserRequest | PlainMessage | undefined, b: SetUserRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetUserRequest, a, b); - } -} +export const SetUserRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 2); /** * @generated from message mgmt.v1alpha1.SetUserResponse */ -export class SetUserResponse extends Message { +export type SetUserResponse = Message<"mgmt.v1alpha1.SetUserResponse"> & { /** * @generated from field: string user_id = 1; */ - userId = ""; + userId: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetUserResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetUserResponse { - return new SetUserResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetUserResponse { - return new SetUserResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetUserResponse { - return new SetUserResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetUserResponse | PlainMessage | undefined, b: SetUserResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetUserResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetUserResponse. + * Use `create(SetUserResponseSchema)` to create a new message. + */ +export const SetUserResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 3); /** * @generated from message mgmt.v1alpha1.GetUserAccountsRequest */ -export class GetUserAccountsRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type GetUserAccountsRequest = Message<"mgmt.v1alpha1.GetUserAccountsRequest"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetUserAccountsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserAccountsRequest { - return new GetUserAccountsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserAccountsRequest { - return new GetUserAccountsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetUserAccountsRequest { - return new GetUserAccountsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetUserAccountsRequest | PlainMessage | undefined, b: GetUserAccountsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetUserAccountsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetUserAccountsRequest. + * Use `create(GetUserAccountsRequestSchema)` to create a new message. + */ +export const GetUserAccountsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 4); /** * @generated from message mgmt.v1alpha1.GetUserAccountsResponse */ -export class GetUserAccountsResponse extends Message { +export type GetUserAccountsResponse = Message<"mgmt.v1alpha1.GetUserAccountsResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.UserAccount accounts = 1; */ - accounts: UserAccount[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + accounts: UserAccount[]; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetUserAccountsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "accounts", kind: "message", T: UserAccount, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserAccountsResponse { - return new GetUserAccountsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserAccountsResponse { - return new GetUserAccountsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetUserAccountsResponse { - return new GetUserAccountsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetUserAccountsResponse | PlainMessage | undefined, b: GetUserAccountsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetUserAccountsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetUserAccountsResponse. + * Use `create(GetUserAccountsResponseSchema)` to create a new message. + */ +export const GetUserAccountsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 5); /** * @generated from message mgmt.v1alpha1.UserAccount */ -export class UserAccount extends Message { +export type UserAccount = Message<"mgmt.v1alpha1.UserAccount"> & { /** * The unique identifier of the account * * @generated from field: string id = 1; */ - id = ""; + id: string; /** * The account slug * * @generated from field: string name = 2; */ - name = ""; + name: string; /** * The type of account * * @generated from field: mgmt.v1alpha1.UserAccountType type = 3; */ - type = UserAccountType.UNSPECIFIED; + type: UserAccountType; /** * Whether or not the account has an associated stripe customer id * * @generated from field: bool has_stripe_customer_id = 4; */ - hasStripeCustomerId = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.UserAccount"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "type", kind: "enum", T: proto3.getEnumType(UserAccountType) }, - { no: 4, name: "has_stripe_customer_id", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UserAccount { - return new UserAccount().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UserAccount { - return new UserAccount().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UserAccount { - return new UserAccount().fromJsonString(jsonString, options); - } - - static equals(a: UserAccount | PlainMessage | undefined, b: UserAccount | PlainMessage | undefined): boolean { - return proto3.util.equals(UserAccount, a, b); - } -} + hasStripeCustomerId: boolean; +}; + +/** + * Describes the message mgmt.v1alpha1.UserAccount. + * Use `create(UserAccountSchema)` to create a new message. + */ +export const UserAccountSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 6); /** * @generated from message mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest */ -export class ConvertPersonalToTeamAccountRequest extends Message { +export type ConvertPersonalToTeamAccountRequest = Message<"mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest"> & { /** * The name of the team account * * @generated from field: string name = 1; */ - name = ""; + name: string; /** * Optionally provide the personal account to convert. This may be used in break-glass scenarios where there are multiple personal accounts @@ -474,46 +163,25 @@ export class ConvertPersonalToTeamAccountRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConvertPersonalToTeamAccountRequest { - return new ConvertPersonalToTeamAccountRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConvertPersonalToTeamAccountRequest { - return new ConvertPersonalToTeamAccountRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConvertPersonalToTeamAccountRequest { - return new ConvertPersonalToTeamAccountRequest().fromJsonString(jsonString, options); - } - - static equals(a: ConvertPersonalToTeamAccountRequest | PlainMessage | undefined, b: ConvertPersonalToTeamAccountRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ConvertPersonalToTeamAccountRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest. + * Use `create(ConvertPersonalToTeamAccountRequestSchema)` to create a new message. + */ +export const ConvertPersonalToTeamAccountRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 7); /** * @generated from message mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse */ -export class ConvertPersonalToTeamAccountResponse extends Message { +export type ConvertPersonalToTeamAccountResponse = Message<"mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse"> & { /** * The id of the team account (will be the same identifier as the personal account) * * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * If NeosyncCloud, will respond with a checkout session url so they can setup billing @@ -527,430 +195,207 @@ export class ConvertPersonalToTeamAccountResponse extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "checkout_session_url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "new_personal_account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + newPersonalAccountId: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): ConvertPersonalToTeamAccountResponse { - return new ConvertPersonalToTeamAccountResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConvertPersonalToTeamAccountResponse { - return new ConvertPersonalToTeamAccountResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConvertPersonalToTeamAccountResponse { - return new ConvertPersonalToTeamAccountResponse().fromJsonString(jsonString, options); - } - - static equals(a: ConvertPersonalToTeamAccountResponse | PlainMessage | undefined, b: ConvertPersonalToTeamAccountResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ConvertPersonalToTeamAccountResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse. + * Use `create(ConvertPersonalToTeamAccountResponseSchema)` to create a new message. + */ +export const ConvertPersonalToTeamAccountResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 8); /** * @generated from message mgmt.v1alpha1.SetPersonalAccountRequest */ -export class SetPersonalAccountRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetPersonalAccountRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetPersonalAccountRequest { - return new SetPersonalAccountRequest().fromBinary(bytes, options); - } +export type SetPersonalAccountRequest = Message<"mgmt.v1alpha1.SetPersonalAccountRequest"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): SetPersonalAccountRequest { - return new SetPersonalAccountRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetPersonalAccountRequest { - return new SetPersonalAccountRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetPersonalAccountRequest | PlainMessage | undefined, b: SetPersonalAccountRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetPersonalAccountRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetPersonalAccountRequest. + * Use `create(SetPersonalAccountRequestSchema)` to create a new message. + */ +export const SetPersonalAccountRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 9); /** * @generated from message mgmt.v1alpha1.SetPersonalAccountResponse */ -export class SetPersonalAccountResponse extends Message { +export type SetPersonalAccountResponse = Message<"mgmt.v1alpha1.SetPersonalAccountResponse"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetPersonalAccountResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetPersonalAccountResponse { - return new SetPersonalAccountResponse().fromBinary(bytes, options); - } + accountId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): SetPersonalAccountResponse { - return new SetPersonalAccountResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetPersonalAccountResponse { - return new SetPersonalAccountResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetPersonalAccountResponse | PlainMessage | undefined, b: SetPersonalAccountResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetPersonalAccountResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetPersonalAccountResponse. + * Use `create(SetPersonalAccountResponseSchema)` to create a new message. + */ +export const SetPersonalAccountResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 10); /** * @generated from message mgmt.v1alpha1.IsUserInAccountRequest */ -export class IsUserInAccountRequest extends Message { +export type IsUserInAccountRequest = Message<"mgmt.v1alpha1.IsUserInAccountRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsUserInAccountRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsUserInAccountRequest { - return new IsUserInAccountRequest().fromBinary(bytes, options); - } + accountId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): IsUserInAccountRequest { - return new IsUserInAccountRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsUserInAccountRequest { - return new IsUserInAccountRequest().fromJsonString(jsonString, options); - } - - static equals(a: IsUserInAccountRequest | PlainMessage | undefined, b: IsUserInAccountRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(IsUserInAccountRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.IsUserInAccountRequest. + * Use `create(IsUserInAccountRequestSchema)` to create a new message. + */ +export const IsUserInAccountRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 11); /** * @generated from message mgmt.v1alpha1.IsUserInAccountResponse */ -export class IsUserInAccountResponse extends Message { +export type IsUserInAccountResponse = Message<"mgmt.v1alpha1.IsUserInAccountResponse"> & { /** * @generated from field: bool ok = 1; */ - ok = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsUserInAccountResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ok", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsUserInAccountResponse { - return new IsUserInAccountResponse().fromBinary(bytes, options); - } + ok: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): IsUserInAccountResponse { - return new IsUserInAccountResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsUserInAccountResponse { - return new IsUserInAccountResponse().fromJsonString(jsonString, options); - } - - static equals(a: IsUserInAccountResponse | PlainMessage | undefined, b: IsUserInAccountResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(IsUserInAccountResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.IsUserInAccountResponse. + * Use `create(IsUserInAccountResponseSchema)` to create a new message. + */ +export const IsUserInAccountResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 12); /** * @generated from message mgmt.v1alpha1.GetAccountTemporalConfigRequest */ -export class GetAccountTemporalConfigRequest extends Message { +export type GetAccountTemporalConfigRequest = Message<"mgmt.v1alpha1.GetAccountTemporalConfigRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountTemporalConfigRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountTemporalConfigRequest { - return new GetAccountTemporalConfigRequest().fromBinary(bytes, options); - } + accountId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountTemporalConfigRequest { - return new GetAccountTemporalConfigRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountTemporalConfigRequest { - return new GetAccountTemporalConfigRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountTemporalConfigRequest | PlainMessage | undefined, b: GetAccountTemporalConfigRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountTemporalConfigRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountTemporalConfigRequest. + * Use `create(GetAccountTemporalConfigRequestSchema)` to create a new message. + */ +export const GetAccountTemporalConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 13); /** * @generated from message mgmt.v1alpha1.GetAccountTemporalConfigResponse */ -export class GetAccountTemporalConfigResponse extends Message { +export type GetAccountTemporalConfigResponse = Message<"mgmt.v1alpha1.GetAccountTemporalConfigResponse"> & { /** * @generated from field: mgmt.v1alpha1.AccountTemporalConfig config = 1; */ config?: AccountTemporalConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountTemporalConfigResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "config", kind: "message", T: AccountTemporalConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountTemporalConfigResponse { - return new GetAccountTemporalConfigResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountTemporalConfigResponse { - return new GetAccountTemporalConfigResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountTemporalConfigResponse { - return new GetAccountTemporalConfigResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountTemporalConfigResponse | PlainMessage | undefined, b: GetAccountTemporalConfigResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountTemporalConfigResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountTemporalConfigResponse. + * Use `create(GetAccountTemporalConfigResponseSchema)` to create a new message. + */ +export const GetAccountTemporalConfigResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 14); /** * @generated from message mgmt.v1alpha1.SetAccountTemporalConfigRequest */ -export class SetAccountTemporalConfigRequest extends Message { +export type SetAccountTemporalConfigRequest = Message<"mgmt.v1alpha1.SetAccountTemporalConfigRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * @generated from field: mgmt.v1alpha1.AccountTemporalConfig config = 2; */ config?: AccountTemporalConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetAccountTemporalConfigRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "config", kind: "message", T: AccountTemporalConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetAccountTemporalConfigRequest { - return new SetAccountTemporalConfigRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetAccountTemporalConfigRequest { - return new SetAccountTemporalConfigRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetAccountTemporalConfigRequest { - return new SetAccountTemporalConfigRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetAccountTemporalConfigRequest | PlainMessage | undefined, b: SetAccountTemporalConfigRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetAccountTemporalConfigRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetAccountTemporalConfigRequest. + * Use `create(SetAccountTemporalConfigRequestSchema)` to create a new message. + */ +export const SetAccountTemporalConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 15); /** * @generated from message mgmt.v1alpha1.SetAccountTemporalConfigResponse */ -export class SetAccountTemporalConfigResponse extends Message { +export type SetAccountTemporalConfigResponse = Message<"mgmt.v1alpha1.SetAccountTemporalConfigResponse"> & { /** * @generated from field: mgmt.v1alpha1.AccountTemporalConfig config = 1; */ config?: AccountTemporalConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetAccountTemporalConfigResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "config", kind: "message", T: AccountTemporalConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetAccountTemporalConfigResponse { - return new SetAccountTemporalConfigResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetAccountTemporalConfigResponse { - return new SetAccountTemporalConfigResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetAccountTemporalConfigResponse { - return new SetAccountTemporalConfigResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetAccountTemporalConfigResponse | PlainMessage | undefined, b: SetAccountTemporalConfigResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetAccountTemporalConfigResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetAccountTemporalConfigResponse. + * Use `create(SetAccountTemporalConfigResponseSchema)` to create a new message. + */ +export const SetAccountTemporalConfigResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 16); /** * @generated from message mgmt.v1alpha1.AccountTemporalConfig */ -export class AccountTemporalConfig extends Message { +export type AccountTemporalConfig = Message<"mgmt.v1alpha1.AccountTemporalConfig"> & { /** * @generated from field: string url = 1; */ - url = ""; + url: string; /** * @generated from field: string namespace = 2; */ - namespace = ""; + namespace: string; /** * @generated from field: string sync_job_queue_name = 3; */ - syncJobQueueName = ""; + syncJobQueueName: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AccountTemporalConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "namespace", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "sync_job_queue_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AccountTemporalConfig { - return new AccountTemporalConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AccountTemporalConfig { - return new AccountTemporalConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AccountTemporalConfig { - return new AccountTemporalConfig().fromJsonString(jsonString, options); - } - - static equals(a: AccountTemporalConfig | PlainMessage | undefined, b: AccountTemporalConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(AccountTemporalConfig, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AccountTemporalConfig. + * Use `create(AccountTemporalConfigSchema)` to create a new message. + */ +export const AccountTemporalConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 17); /** * @generated from message mgmt.v1alpha1.CreateTeamAccountRequest */ -export class CreateTeamAccountRequest extends Message { +export type CreateTeamAccountRequest = Message<"mgmt.v1alpha1.CreateTeamAccountRequest"> & { /** * The name of the team account * * @generated from field: string name = 1; */ - name = ""; + name: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateTeamAccountRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateTeamAccountRequest { - return new CreateTeamAccountRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateTeamAccountRequest { - return new CreateTeamAccountRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateTeamAccountRequest { - return new CreateTeamAccountRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateTeamAccountRequest | PlainMessage | undefined, b: CreateTeamAccountRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateTeamAccountRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateTeamAccountRequest. + * Use `create(CreateTeamAccountRequestSchema)` to create a new message. + */ +export const CreateTeamAccountRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 18); /** * @generated from message mgmt.v1alpha1.CreateTeamAccountResponse */ -export class CreateTeamAccountResponse extends Message { +export type CreateTeamAccountResponse = Message<"mgmt.v1alpha1.CreateTeamAccountResponse"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * If NeosyncCloud, will respond with a checkout session url so they can setup billing @@ -958,264 +403,140 @@ export class CreateTeamAccountResponse extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.CreateTeamAccountResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "checkout_session_url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateTeamAccountResponse { - return new CreateTeamAccountResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateTeamAccountResponse { - return new CreateTeamAccountResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateTeamAccountResponse { - return new CreateTeamAccountResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateTeamAccountResponse | PlainMessage | undefined, b: CreateTeamAccountResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateTeamAccountResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.CreateTeamAccountResponse. + * Use `create(CreateTeamAccountResponseSchema)` to create a new message. + */ +export const CreateTeamAccountResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 19); /** * @generated from message mgmt.v1alpha1.AccountUser */ -export class AccountUser extends Message { +export type AccountUser = Message<"mgmt.v1alpha1.AccountUser"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; /** * @generated from field: string name = 2; */ - name = ""; + name: string; /** * @generated from field: string image = 3; */ - image = ""; + image: string; /** * @generated from field: string email = 4; */ - email = ""; + email: string; /** * The role of the user in the account. If RBAC is not enabled, will be unspecified. * * @generated from field: mgmt.v1alpha1.AccountRole role = 5; */ - role = AccountRole.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AccountUser"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "role", kind: "enum", T: proto3.getEnumType(AccountRole) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AccountUser { - return new AccountUser().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AccountUser { - return new AccountUser().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AccountUser { - return new AccountUser().fromJsonString(jsonString, options); - } - - static equals(a: AccountUser | PlainMessage | undefined, b: AccountUser | PlainMessage | undefined): boolean { - return proto3.util.equals(AccountUser, a, b); - } -} + role: AccountRole; +}; + +/** + * Describes the message mgmt.v1alpha1.AccountUser. + * Use `create(AccountUserSchema)` to create a new message. + */ +export const AccountUserSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 20); /** * @generated from message mgmt.v1alpha1.GetTeamAccountMembersRequest */ -export class GetTeamAccountMembersRequest extends Message { +export type GetTeamAccountMembersRequest = Message<"mgmt.v1alpha1.GetTeamAccountMembersRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + accountId: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetTeamAccountMembersRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetTeamAccountMembersRequest { - return new GetTeamAccountMembersRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetTeamAccountMembersRequest { - return new GetTeamAccountMembersRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetTeamAccountMembersRequest { - return new GetTeamAccountMembersRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetTeamAccountMembersRequest | PlainMessage | undefined, b: GetTeamAccountMembersRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetTeamAccountMembersRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetTeamAccountMembersRequest. + * Use `create(GetTeamAccountMembersRequestSchema)` to create a new message. + */ +export const GetTeamAccountMembersRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 21); /** * @generated from message mgmt.v1alpha1.GetTeamAccountMembersResponse */ -export class GetTeamAccountMembersResponse extends Message { +export type GetTeamAccountMembersResponse = Message<"mgmt.v1alpha1.GetTeamAccountMembersResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.AccountUser users = 1; */ - users: AccountUser[] = []; + users: AccountUser[]; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetTeamAccountMembersResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "users", kind: "message", T: AccountUser, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetTeamAccountMembersResponse { - return new GetTeamAccountMembersResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetTeamAccountMembersResponse { - return new GetTeamAccountMembersResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetTeamAccountMembersResponse { - return new GetTeamAccountMembersResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetTeamAccountMembersResponse | PlainMessage | undefined, b: GetTeamAccountMembersResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetTeamAccountMembersResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetTeamAccountMembersResponse. + * Use `create(GetTeamAccountMembersResponseSchema)` to create a new message. + */ +export const GetTeamAccountMembersResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 22); /** * @generated from message mgmt.v1alpha1.RemoveTeamAccountMemberRequest */ -export class RemoveTeamAccountMemberRequest extends Message { +export type RemoveTeamAccountMemberRequest = Message<"mgmt.v1alpha1.RemoveTeamAccountMemberRequest"> & { /** * @generated from field: string user_id = 1; */ - userId = ""; + userId: string; /** * @generated from field: string account_id = 2; */ - accountId = ""; + accountId: string; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.RemoveTeamAccountMemberRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoveTeamAccountMemberRequest { - return new RemoveTeamAccountMemberRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoveTeamAccountMemberRequest { - return new RemoveTeamAccountMemberRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RemoveTeamAccountMemberRequest { - return new RemoveTeamAccountMemberRequest().fromJsonString(jsonString, options); - } - - static equals(a: RemoveTeamAccountMemberRequest | PlainMessage | undefined, b: RemoveTeamAccountMemberRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(RemoveTeamAccountMemberRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.RemoveTeamAccountMemberRequest. + * Use `create(RemoveTeamAccountMemberRequestSchema)` to create a new message. + */ +export const RemoveTeamAccountMemberRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 23); /** * @generated from message mgmt.v1alpha1.RemoveTeamAccountMemberResponse */ -export class RemoveTeamAccountMemberResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type RemoveTeamAccountMemberResponse = Message<"mgmt.v1alpha1.RemoveTeamAccountMemberResponse"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.RemoveTeamAccountMemberResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoveTeamAccountMemberResponse { - return new RemoveTeamAccountMemberResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoveTeamAccountMemberResponse { - return new RemoveTeamAccountMemberResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RemoveTeamAccountMemberResponse { - return new RemoveTeamAccountMemberResponse().fromJsonString(jsonString, options); - } - - static equals(a: RemoveTeamAccountMemberResponse | PlainMessage | undefined, b: RemoveTeamAccountMemberResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(RemoveTeamAccountMemberResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.RemoveTeamAccountMemberResponse. + * Use `create(RemoveTeamAccountMemberResponseSchema)` to create a new message. + */ +export const RemoveTeamAccountMemberResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 24); /** * @generated from message mgmt.v1alpha1.InviteUserToTeamAccountRequest */ -export class InviteUserToTeamAccountRequest extends Message { +export type InviteUserToTeamAccountRequest = Message<"mgmt.v1alpha1.InviteUserToTeamAccountRequest"> & { /** * The account id to invite the user to * * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * The email of the user to invite * * @generated from field: string email = 2; */ - email = ""; + email: string; /** * The role of the user to invite. Only used if RBAC is enabled. @@ -1223,70 +544,48 @@ export class InviteUserToTeamAccountRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.InviteUserToTeamAccountRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "role", kind: "enum", T: proto3.getEnumType(AccountRole), opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): InviteUserToTeamAccountRequest { - return new InviteUserToTeamAccountRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): InviteUserToTeamAccountRequest { - return new InviteUserToTeamAccountRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): InviteUserToTeamAccountRequest { - return new InviteUserToTeamAccountRequest().fromJsonString(jsonString, options); - } - - static equals(a: InviteUserToTeamAccountRequest | PlainMessage | undefined, b: InviteUserToTeamAccountRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(InviteUserToTeamAccountRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.InviteUserToTeamAccountRequest. + * Use `create(InviteUserToTeamAccountRequestSchema)` to create a new message. + */ +export const InviteUserToTeamAccountRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 25); /** * @generated from message mgmt.v1alpha1.AccountInvite */ -export class AccountInvite extends Message { +export type AccountInvite = Message<"mgmt.v1alpha1.AccountInvite"> & { /** * @generated from field: string id = 1; */ - id = ""; + id: string; /** * @generated from field: string account_id = 2; */ - accountId = ""; + accountId: string; /** * @generated from field: string sender_user_id = 3; */ - senderUserId = ""; + senderUserId: string; /** * @generated from field: string email = 4; */ - email = ""; + email: string; /** * @generated from field: string token = 5; */ - token = ""; + token: string; /** * @generated from field: bool accepted = 6; */ - accepted = false; + accepted: boolean; /** * @generated from field: google.protobuf.Timestamp created_at = 7; @@ -1308,669 +607,349 @@ export class AccountInvite extends Message { * * @generated from field: mgmt.v1alpha1.AccountRole role = 10; */ - role = AccountRole.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AccountInvite"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "sender_user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "accepted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 7, name: "created_at", kind: "message", T: Timestamp }, - { no: 8, name: "updated_at", kind: "message", T: Timestamp }, - { no: 9, name: "expires_at", kind: "message", T: Timestamp }, - { no: 10, name: "role", kind: "enum", T: proto3.getEnumType(AccountRole) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AccountInvite { - return new AccountInvite().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AccountInvite { - return new AccountInvite().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AccountInvite { - return new AccountInvite().fromJsonString(jsonString, options); - } - - static equals(a: AccountInvite | PlainMessage | undefined, b: AccountInvite | PlainMessage | undefined): boolean { - return proto3.util.equals(AccountInvite, a, b); - } -} + role: AccountRole; +}; + +/** + * Describes the message mgmt.v1alpha1.AccountInvite. + * Use `create(AccountInviteSchema)` to create a new message. + */ +export const AccountInviteSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 26); /** * @generated from message mgmt.v1alpha1.InviteUserToTeamAccountResponse */ -export class InviteUserToTeamAccountResponse extends Message { +export type InviteUserToTeamAccountResponse = Message<"mgmt.v1alpha1.InviteUserToTeamAccountResponse"> & { /** * @generated from field: mgmt.v1alpha1.AccountInvite invite = 1; */ invite?: AccountInvite; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.InviteUserToTeamAccountResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "invite", kind: "message", T: AccountInvite }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): InviteUserToTeamAccountResponse { - return new InviteUserToTeamAccountResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): InviteUserToTeamAccountResponse { - return new InviteUserToTeamAccountResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): InviteUserToTeamAccountResponse { - return new InviteUserToTeamAccountResponse().fromJsonString(jsonString, options); - } - - static equals(a: InviteUserToTeamAccountResponse | PlainMessage | undefined, b: InviteUserToTeamAccountResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(InviteUserToTeamAccountResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.InviteUserToTeamAccountResponse. + * Use `create(InviteUserToTeamAccountResponseSchema)` to create a new message. + */ +export const InviteUserToTeamAccountResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 27); /** * @generated from message mgmt.v1alpha1.GetTeamAccountInvitesRequest */ -export class GetTeamAccountInvitesRequest extends Message { +export type GetTeamAccountInvitesRequest = Message<"mgmt.v1alpha1.GetTeamAccountInvitesRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + accountId: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetTeamAccountInvitesRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetTeamAccountInvitesRequest { - return new GetTeamAccountInvitesRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetTeamAccountInvitesRequest { - return new GetTeamAccountInvitesRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetTeamAccountInvitesRequest { - return new GetTeamAccountInvitesRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetTeamAccountInvitesRequest | PlainMessage | undefined, b: GetTeamAccountInvitesRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetTeamAccountInvitesRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetTeamAccountInvitesRequest. + * Use `create(GetTeamAccountInvitesRequestSchema)` to create a new message. + */ +export const GetTeamAccountInvitesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 28); /** * @generated from message mgmt.v1alpha1.GetTeamAccountInvitesResponse */ -export class GetTeamAccountInvitesResponse extends Message { +export type GetTeamAccountInvitesResponse = Message<"mgmt.v1alpha1.GetTeamAccountInvitesResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.AccountInvite invites = 1; */ - invites: AccountInvite[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + invites: AccountInvite[]; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetTeamAccountInvitesResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "invites", kind: "message", T: AccountInvite, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetTeamAccountInvitesResponse { - return new GetTeamAccountInvitesResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetTeamAccountInvitesResponse { - return new GetTeamAccountInvitesResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetTeamAccountInvitesResponse { - return new GetTeamAccountInvitesResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetTeamAccountInvitesResponse | PlainMessage | undefined, b: GetTeamAccountInvitesResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetTeamAccountInvitesResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetTeamAccountInvitesResponse. + * Use `create(GetTeamAccountInvitesResponseSchema)` to create a new message. + */ +export const GetTeamAccountInvitesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 29); /** * @generated from message mgmt.v1alpha1.RemoveTeamAccountInviteRequest */ -export class RemoveTeamAccountInviteRequest extends Message { +export type RemoveTeamAccountInviteRequest = Message<"mgmt.v1alpha1.RemoveTeamAccountInviteRequest"> & { /** * @generated from field: string id = 1; */ - id = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + id: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.RemoveTeamAccountInviteRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoveTeamAccountInviteRequest { - return new RemoveTeamAccountInviteRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoveTeamAccountInviteRequest { - return new RemoveTeamAccountInviteRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RemoveTeamAccountInviteRequest { - return new RemoveTeamAccountInviteRequest().fromJsonString(jsonString, options); - } - - static equals(a: RemoveTeamAccountInviteRequest | PlainMessage | undefined, b: RemoveTeamAccountInviteRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(RemoveTeamAccountInviteRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.RemoveTeamAccountInviteRequest. + * Use `create(RemoveTeamAccountInviteRequestSchema)` to create a new message. + */ +export const RemoveTeamAccountInviteRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 30); /** * @generated from message mgmt.v1alpha1.RemoveTeamAccountInviteResponse */ -export class RemoveTeamAccountInviteResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type RemoveTeamAccountInviteResponse = Message<"mgmt.v1alpha1.RemoveTeamAccountInviteResponse"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.RemoveTeamAccountInviteResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoveTeamAccountInviteResponse { - return new RemoveTeamAccountInviteResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoveTeamAccountInviteResponse { - return new RemoveTeamAccountInviteResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RemoveTeamAccountInviteResponse { - return new RemoveTeamAccountInviteResponse().fromJsonString(jsonString, options); - } - - static equals(a: RemoveTeamAccountInviteResponse | PlainMessage | undefined, b: RemoveTeamAccountInviteResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(RemoveTeamAccountInviteResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.RemoveTeamAccountInviteResponse. + * Use `create(RemoveTeamAccountInviteResponseSchema)` to create a new message. + */ +export const RemoveTeamAccountInviteResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 31); /** * @generated from message mgmt.v1alpha1.AcceptTeamAccountInviteRequest */ -export class AcceptTeamAccountInviteRequest extends Message { +export type AcceptTeamAccountInviteRequest = Message<"mgmt.v1alpha1.AcceptTeamAccountInviteRequest"> & { /** * @generated from field: string token = 1; */ - token = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + token: string; +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AcceptTeamAccountInviteRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AcceptTeamAccountInviteRequest { - return new AcceptTeamAccountInviteRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AcceptTeamAccountInviteRequest { - return new AcceptTeamAccountInviteRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AcceptTeamAccountInviteRequest { - return new AcceptTeamAccountInviteRequest().fromJsonString(jsonString, options); - } - - static equals(a: AcceptTeamAccountInviteRequest | PlainMessage | undefined, b: AcceptTeamAccountInviteRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(AcceptTeamAccountInviteRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AcceptTeamAccountInviteRequest. + * Use `create(AcceptTeamAccountInviteRequestSchema)` to create a new message. + */ +export const AcceptTeamAccountInviteRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 32); /** * @generated from message mgmt.v1alpha1.AcceptTeamAccountInviteResponse */ -export class AcceptTeamAccountInviteResponse extends Message { +export type AcceptTeamAccountInviteResponse = Message<"mgmt.v1alpha1.AcceptTeamAccountInviteResponse"> & { /** * @generated from field: mgmt.v1alpha1.UserAccount account = 1; */ account?: UserAccount; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AcceptTeamAccountInviteResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account", kind: "message", T: UserAccount }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AcceptTeamAccountInviteResponse { - return new AcceptTeamAccountInviteResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AcceptTeamAccountInviteResponse { - return new AcceptTeamAccountInviteResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AcceptTeamAccountInviteResponse { - return new AcceptTeamAccountInviteResponse().fromJsonString(jsonString, options); - } - - static equals(a: AcceptTeamAccountInviteResponse | PlainMessage | undefined, b: AcceptTeamAccountInviteResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(AcceptTeamAccountInviteResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.AcceptTeamAccountInviteResponse. + * Use `create(AcceptTeamAccountInviteResponseSchema)` to create a new message. + */ +export const AcceptTeamAccountInviteResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 33); /** * @generated from message mgmt.v1alpha1.GetSystemInformationRequest */ -export class GetSystemInformationRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export type GetSystemInformationRequest = Message<"mgmt.v1alpha1.GetSystemInformationRequest"> & { +}; - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetSystemInformationRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSystemInformationRequest { - return new GetSystemInformationRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSystemInformationRequest { - return new GetSystemInformationRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSystemInformationRequest { - return new GetSystemInformationRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetSystemInformationRequest | PlainMessage | undefined, b: GetSystemInformationRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSystemInformationRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetSystemInformationRequest. + * Use `create(GetSystemInformationRequestSchema)` to create a new message. + */ +export const GetSystemInformationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 34); /** * @generated from message mgmt.v1alpha1.GetSystemInformationResponse */ -export class GetSystemInformationResponse extends Message { +export type GetSystemInformationResponse = Message<"mgmt.v1alpha1.GetSystemInformationResponse"> & { /** * The Git tagged version * * @generated from field: string version = 1; */ - version = ""; + version: string; /** * The Git commit * * @generated from field: string commit = 2; */ - commit = ""; + commit: string; /** * The Go compiler flag that was used to build this version of Neosync * * @generated from field: string compiler = 3; */ - compiler = ""; + compiler: string; /** * The Go platform flag that was used to build this version of Neosync * * @generated from field: string platform = 4; */ - platform = ""; + platform: string; /** + * The time when the build was created + * * @generated from field: google.protobuf.Timestamp build_date = 5; */ buildDate?: Timestamp; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetSystemInformationResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "commit", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "compiler", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "platform", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "build_date", kind: "message", T: Timestamp }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetSystemInformationResponse { - return new GetSystemInformationResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetSystemInformationResponse { - return new GetSystemInformationResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetSystemInformationResponse { - return new GetSystemInformationResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetSystemInformationResponse | PlainMessage | undefined, b: GetSystemInformationResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetSystemInformationResponse, a, b); - } -} + /** + * The license information for the system + * + * @generated from field: mgmt.v1alpha1.SystemLicense license = 6; + */ + license?: SystemLicense; +}; /** - * @generated from message mgmt.v1alpha1.GetAccountOnboardingConfigRequest + * Describes the message mgmt.v1alpha1.GetSystemInformationResponse. + * Use `create(GetSystemInformationResponseSchema)` to create a new message. + */ +export const GetSystemInformationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 35); + +/** + * @generated from message mgmt.v1alpha1.SystemLicense */ -export class GetAccountOnboardingConfigRequest extends Message { +export type SystemLicense = Message<"mgmt.v1alpha1.SystemLicense"> & { /** - * @generated from field: string account_id = 1; + * Whether or not a valid license was found + * + * @generated from field: bool is_valid = 1; */ - accountId = ""; + isValid: boolean; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountOnboardingConfigRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + /** + * The time when the license expires + * + * @generated from field: google.protobuf.Timestamp expires_at = 2; + */ + expiresAt?: Timestamp; - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountOnboardingConfigRequest { - return new GetAccountOnboardingConfigRequest().fromBinary(bytes, options); - } + /** + * Whether or not the license is for NeosyncCloud + * + * @generated from field: bool is_neosync_cloud = 3; + */ + isNeosyncCloud: boolean; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountOnboardingConfigRequest { - return new GetAccountOnboardingConfigRequest().fromJson(jsonValue, options); - } +/** + * Describes the message mgmt.v1alpha1.SystemLicense. + * Use `create(SystemLicenseSchema)` to create a new message. + */ +export const SystemLicenseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 36); - static fromJsonString(jsonString: string, options?: Partial): GetAccountOnboardingConfigRequest { - return new GetAccountOnboardingConfigRequest().fromJsonString(jsonString, options); - } +/** + * @generated from message mgmt.v1alpha1.GetAccountOnboardingConfigRequest + */ +export type GetAccountOnboardingConfigRequest = Message<"mgmt.v1alpha1.GetAccountOnboardingConfigRequest"> & { + /** + * @generated from field: string account_id = 1; + */ + accountId: string; +}; - static equals(a: GetAccountOnboardingConfigRequest | PlainMessage | undefined, b: GetAccountOnboardingConfigRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountOnboardingConfigRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountOnboardingConfigRequest. + * Use `create(GetAccountOnboardingConfigRequestSchema)` to create a new message. + */ +export const GetAccountOnboardingConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 37); /** * @generated from message mgmt.v1alpha1.GetAccountOnboardingConfigResponse */ -export class GetAccountOnboardingConfigResponse extends Message { +export type GetAccountOnboardingConfigResponse = Message<"mgmt.v1alpha1.GetAccountOnboardingConfigResponse"> & { /** * @generated from field: mgmt.v1alpha1.AccountOnboardingConfig config = 1; */ config?: AccountOnboardingConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountOnboardingConfigResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "config", kind: "message", T: AccountOnboardingConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountOnboardingConfigResponse { - return new GetAccountOnboardingConfigResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountOnboardingConfigResponse { - return new GetAccountOnboardingConfigResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountOnboardingConfigResponse { - return new GetAccountOnboardingConfigResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountOnboardingConfigResponse | PlainMessage | undefined, b: GetAccountOnboardingConfigResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountOnboardingConfigResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountOnboardingConfigResponse. + * Use `create(GetAccountOnboardingConfigResponseSchema)` to create a new message. + */ +export const GetAccountOnboardingConfigResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 38); /** * @generated from message mgmt.v1alpha1.SetAccountOnboardingConfigRequest */ -export class SetAccountOnboardingConfigRequest extends Message { +export type SetAccountOnboardingConfigRequest = Message<"mgmt.v1alpha1.SetAccountOnboardingConfigRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * @generated from field: mgmt.v1alpha1.AccountOnboardingConfig config = 2; */ config?: AccountOnboardingConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetAccountOnboardingConfigRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "config", kind: "message", T: AccountOnboardingConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetAccountOnboardingConfigRequest { - return new SetAccountOnboardingConfigRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetAccountOnboardingConfigRequest { - return new SetAccountOnboardingConfigRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetAccountOnboardingConfigRequest { - return new SetAccountOnboardingConfigRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetAccountOnboardingConfigRequest | PlainMessage | undefined, b: SetAccountOnboardingConfigRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetAccountOnboardingConfigRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetAccountOnboardingConfigRequest. + * Use `create(SetAccountOnboardingConfigRequestSchema)` to create a new message. + */ +export const SetAccountOnboardingConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 39); /** * @generated from message mgmt.v1alpha1.SetAccountOnboardingConfigResponse */ -export class SetAccountOnboardingConfigResponse extends Message { +export type SetAccountOnboardingConfigResponse = Message<"mgmt.v1alpha1.SetAccountOnboardingConfigResponse"> & { /** * @generated from field: mgmt.v1alpha1.AccountOnboardingConfig config = 1; */ config?: AccountOnboardingConfig; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetAccountOnboardingConfigResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "config", kind: "message", T: AccountOnboardingConfig }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetAccountOnboardingConfigResponse { - return new SetAccountOnboardingConfigResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetAccountOnboardingConfigResponse { - return new SetAccountOnboardingConfigResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetAccountOnboardingConfigResponse { - return new SetAccountOnboardingConfigResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetAccountOnboardingConfigResponse | PlainMessage | undefined, b: SetAccountOnboardingConfigResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetAccountOnboardingConfigResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetAccountOnboardingConfigResponse. + * Use `create(SetAccountOnboardingConfigResponseSchema)` to create a new message. + */ +export const SetAccountOnboardingConfigResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 40); /** * @generated from message mgmt.v1alpha1.AccountOnboardingConfig */ -export class AccountOnboardingConfig extends Message { - /** - * @deprecated - use has_completed_onboarding - * - * @generated from field: bool has_created_source_connection = 1; - */ - hasCreatedSourceConnection = false; - - /** - * @deprecated - use has_completed_onboarding - * - * @generated from field: bool has_created_destination_connection = 2; - */ - hasCreatedDestinationConnection = false; - - /** - * @deprecated - use has_completed_onboarding - * - * @generated from field: bool has_created_job = 3; - */ - hasCreatedJob = false; - - /** - * @deprecated - use has_completed_onboarding - * - * @generated from field: bool has_invited_members = 4; - */ - hasInvitedMembers = false; - +export type AccountOnboardingConfig = Message<"mgmt.v1alpha1.AccountOnboardingConfig"> & { /** * @generated from field: bool has_completed_onboarding = 5; */ - hasCompletedOnboarding = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.AccountOnboardingConfig"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "has_created_source_connection", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "has_created_destination_connection", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: "has_created_job", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 4, name: "has_invited_members", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 5, name: "has_completed_onboarding", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AccountOnboardingConfig { - return new AccountOnboardingConfig().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AccountOnboardingConfig { - return new AccountOnboardingConfig().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AccountOnboardingConfig { - return new AccountOnboardingConfig().fromJsonString(jsonString, options); - } - - static equals(a: AccountOnboardingConfig | PlainMessage | undefined, b: AccountOnboardingConfig | PlainMessage | undefined): boolean { - return proto3.util.equals(AccountOnboardingConfig, a, b); - } -} + hasCompletedOnboarding: boolean; +}; + +/** + * Describes the message mgmt.v1alpha1.AccountOnboardingConfig. + * Use `create(AccountOnboardingConfigSchema)` to create a new message. + */ +export const AccountOnboardingConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 41); /** * @generated from message mgmt.v1alpha1.GetAccountStatusRequest */ -export class GetAccountStatusRequest extends Message { +export type GetAccountStatusRequest = Message<"mgmt.v1alpha1.GetAccountStatusRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountStatusRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountStatusRequest { - return new GetAccountStatusRequest().fromBinary(bytes, options); - } + accountId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountStatusRequest { - return new GetAccountStatusRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountStatusRequest { - return new GetAccountStatusRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountStatusRequest | PlainMessage | undefined, b: GetAccountStatusRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountStatusRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountStatusRequest. + * Use `create(GetAccountStatusRequestSchema)` to create a new message. + */ +export const GetAccountStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 42); /** * @generated from message mgmt.v1alpha1.GetAccountStatusResponse */ -export class GetAccountStatusResponse extends Message { +export type GetAccountStatusResponse = Message<"mgmt.v1alpha1.GetAccountStatusResponse"> & { /** * A count of the currently used records for the current billing period. * This may go over the allowed record count depending on when the record count is polled by the metric system. * * @generated from field: uint64 used_record_count = 1; */ - usedRecordCount = protoInt64.zero; + usedRecordCount: bigint; /** * The allowed record count. It will be null if there is no limit. @@ -1984,46 +963,24 @@ export class GetAccountStatusResponse extends Message * * @generated from field: mgmt.v1alpha1.BillingStatus subscription_status = 3; */ - subscriptionStatus = BillingStatus.UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountStatusResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "used_record_count", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: "allowed_record_count", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, - { no: 3, name: "subscription_status", kind: "enum", T: proto3.getEnumType(BillingStatus) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountStatusResponse { - return new GetAccountStatusResponse().fromBinary(bytes, options); - } + subscriptionStatus: BillingStatus; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountStatusResponse { - return new GetAccountStatusResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountStatusResponse { - return new GetAccountStatusResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountStatusResponse | PlainMessage | undefined, b: GetAccountStatusResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountStatusResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountStatusResponse. + * Use `create(GetAccountStatusResponseSchema)` to create a new message. + */ +export const GetAccountStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 43); /** * @generated from message mgmt.v1alpha1.IsAccountStatusValidRequest */ -export class IsAccountStatusValidRequest extends Message { +export type IsAccountStatusValidRequest = Message<"mgmt.v1alpha1.IsAccountStatusValidRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * An optional count of records to be added to the current usage for validation. @@ -2031,44 +988,23 @@ export class IsAccountStatusValidRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsAccountStatusValidRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "requested_record_count", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsAccountStatusValidRequest { - return new IsAccountStatusValidRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IsAccountStatusValidRequest { - return new IsAccountStatusValidRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsAccountStatusValidRequest { - return new IsAccountStatusValidRequest().fromJsonString(jsonString, options); - } - - static equals(a: IsAccountStatusValidRequest | PlainMessage | undefined, b: IsAccountStatusValidRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(IsAccountStatusValidRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.IsAccountStatusValidRequest. + * Use `create(IsAccountStatusValidRequestSchema)` to create a new message. + */ +export const IsAccountStatusValidRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 44); /** * @generated from message mgmt.v1alpha1.IsAccountStatusValidResponse */ -export class IsAccountStatusValidResponse extends Message { +export type IsAccountStatusValidResponse = Message<"mgmt.v1alpha1.IsAccountStatusValidResponse"> & { /** * @generated from field: bool is_valid = 1; */ - isValid = false; + isValid: boolean; /** * If the account is not valid, a reason for why may be provided. @@ -2082,31 +1018,14 @@ export class IsAccountStatusValidResponse extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.IsAccountStatusValidResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "is_valid", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "should_poll", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 4, name: "used_record_count", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 5, name: "allowed_record_count", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, - { no: 6, name: "account_status", kind: "enum", T: proto3.getEnumType(AccountStatus) }, - { no: 7, name: "trial_expires_at", kind: "message", T: Timestamp, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IsAccountStatusValidResponse { - return new IsAccountStatusValidResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IsAccountStatusValidResponse { - return new IsAccountStatusValidResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IsAccountStatusValidResponse { - return new IsAccountStatusValidResponse().fromJsonString(jsonString, options); - } - - static equals(a: IsAccountStatusValidResponse | PlainMessage | undefined, b: IsAccountStatusValidResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(IsAccountStatusValidResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.IsAccountStatusValidResponse. + * Use `create(IsAccountStatusValidResponseSchema)` to create a new message. + */ +export const IsAccountStatusValidResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 45); /** * @generated from message mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest */ -export class GetAccountBillingCheckoutSessionRequest extends Message { +export type GetAccountBillingCheckoutSessionRequest = Message<"mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountBillingCheckoutSessionRequest { - return new GetAccountBillingCheckoutSessionRequest().fromBinary(bytes, options); - } + accountId: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountBillingCheckoutSessionRequest { - return new GetAccountBillingCheckoutSessionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountBillingCheckoutSessionRequest { - return new GetAccountBillingCheckoutSessionRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountBillingCheckoutSessionRequest | PlainMessage | undefined, b: GetAccountBillingCheckoutSessionRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountBillingCheckoutSessionRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest. + * Use `create(GetAccountBillingCheckoutSessionRequestSchema)` to create a new message. + */ +export const GetAccountBillingCheckoutSessionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 46); /** * @generated from message mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse */ -export class GetAccountBillingCheckoutSessionResponse extends Message { +export type GetAccountBillingCheckoutSessionResponse = Message<"mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse"> & { /** * The url that will be redirected to * * @generated from field: string checkout_session_url = 1; */ - checkoutSessionUrl = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "checkout_session_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountBillingCheckoutSessionResponse { - return new GetAccountBillingCheckoutSessionResponse().fromBinary(bytes, options); - } + checkoutSessionUrl: string; +}; - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountBillingCheckoutSessionResponse { - return new GetAccountBillingCheckoutSessionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountBillingCheckoutSessionResponse { - return new GetAccountBillingCheckoutSessionResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountBillingCheckoutSessionResponse | PlainMessage | undefined, b: GetAccountBillingCheckoutSessionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountBillingCheckoutSessionResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse. + * Use `create(GetAccountBillingCheckoutSessionResponseSchema)` to create a new message. + */ +export const GetAccountBillingCheckoutSessionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 47); /** * @generated from message mgmt.v1alpha1.GetAccountBillingPortalSessionRequest */ -export class GetAccountBillingPortalSessionRequest extends Message { +export type GetAccountBillingPortalSessionRequest = Message<"mgmt.v1alpha1.GetAccountBillingPortalSessionRequest"> & { /** * @generated from field: string account_id = 1; */ - accountId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountBillingPortalSessionRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + accountId: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountBillingPortalSessionRequest { - return new GetAccountBillingPortalSessionRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountBillingPortalSessionRequest { - return new GetAccountBillingPortalSessionRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountBillingPortalSessionRequest { - return new GetAccountBillingPortalSessionRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountBillingPortalSessionRequest | PlainMessage | undefined, b: GetAccountBillingPortalSessionRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountBillingPortalSessionRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountBillingPortalSessionRequest. + * Use `create(GetAccountBillingPortalSessionRequestSchema)` to create a new message. + */ +export const GetAccountBillingPortalSessionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 48); /** * @generated from message mgmt.v1alpha1.GetAccountBillingPortalSessionResponse */ -export class GetAccountBillingPortalSessionResponse extends Message { +export type GetAccountBillingPortalSessionResponse = Message<"mgmt.v1alpha1.GetAccountBillingPortalSessionResponse"> & { /** * The url that will be redirected to * * @generated from field: string portal_session_url = 1; */ - portalSessionUrl = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetAccountBillingPortalSessionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "portal_session_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); + portalSessionUrl: string; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GetAccountBillingPortalSessionResponse { - return new GetAccountBillingPortalSessionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetAccountBillingPortalSessionResponse { - return new GetAccountBillingPortalSessionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetAccountBillingPortalSessionResponse { - return new GetAccountBillingPortalSessionResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetAccountBillingPortalSessionResponse | PlainMessage | undefined, b: GetAccountBillingPortalSessionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetAccountBillingPortalSessionResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetAccountBillingPortalSessionResponse. + * Use `create(GetAccountBillingPortalSessionResponseSchema)` to create a new message. + */ +export const GetAccountBillingPortalSessionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 49); /** * @generated from message mgmt.v1alpha1.GetBillingAccountsRequest */ -export class GetBillingAccountsRequest extends Message { +export type GetBillingAccountsRequest = Message<"mgmt.v1alpha1.GetBillingAccountsRequest"> & { /** * Optional list of account identifiers to filter the response by * * @generated from field: repeated string account_ids = 1; */ - accountIds: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetBillingAccountsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); + accountIds: string[]; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GetBillingAccountsRequest { - return new GetBillingAccountsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetBillingAccountsRequest { - return new GetBillingAccountsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetBillingAccountsRequest { - return new GetBillingAccountsRequest().fromJsonString(jsonString, options); - } - - static equals(a: GetBillingAccountsRequest | PlainMessage | undefined, b: GetBillingAccountsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GetBillingAccountsRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetBillingAccountsRequest. + * Use `create(GetBillingAccountsRequestSchema)` to create a new message. + */ +export const GetBillingAccountsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 50); /** * @generated from message mgmt.v1alpha1.GetBillingAccountsResponse */ -export class GetBillingAccountsResponse extends Message { +export type GetBillingAccountsResponse = Message<"mgmt.v1alpha1.GetBillingAccountsResponse"> & { /** * @generated from field: repeated mgmt.v1alpha1.UserAccount accounts = 1; */ - accounts: UserAccount[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.GetBillingAccountsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "accounts", kind: "message", T: UserAccount, repeated: true }, - ]); + accounts: UserAccount[]; +}; - static fromBinary(bytes: Uint8Array, options?: Partial): GetBillingAccountsResponse { - return new GetBillingAccountsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetBillingAccountsResponse { - return new GetBillingAccountsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetBillingAccountsResponse { - return new GetBillingAccountsResponse().fromJsonString(jsonString, options); - } - - static equals(a: GetBillingAccountsResponse | PlainMessage | undefined, b: GetBillingAccountsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(GetBillingAccountsResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.GetBillingAccountsResponse. + * Use `create(GetBillingAccountsResponseSchema)` to create a new message. + */ +export const GetBillingAccountsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 51); /** * @generated from message mgmt.v1alpha1.SetBillingMeterEventRequest */ -export class SetBillingMeterEventRequest extends Message { +export type SetBillingMeterEventRequest = Message<"mgmt.v1alpha1.SetBillingMeterEventRequest"> & { /** * The account id to apply this metered event to * * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * The metered event name * * @generated from field: string event_name = 2; */ - eventName = ""; + eventName: string; /** * The value of the meter for the given time * * @generated from field: string value = 3; */ - value = ""; + value: string; /** * The unique identifier of this metered event * * @generated from field: string event_id = 4; */ - eventId = ""; + eventId: string; /** * The time of the event in Unix Epoch format. Defaults to the current timestamp if not specified. @@ -2415,153 +1188,457 @@ export class SetBillingMeterEventRequest extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetBillingMeterEventRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "event_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "event_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "timestamp", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetBillingMeterEventRequest { - return new SetBillingMeterEventRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetBillingMeterEventRequest { - return new SetBillingMeterEventRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetBillingMeterEventRequest { - return new SetBillingMeterEventRequest().fromJsonString(jsonString, options); - } - - static equals(a: SetBillingMeterEventRequest | PlainMessage | undefined, b: SetBillingMeterEventRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetBillingMeterEventRequest, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetBillingMeterEventRequest. + * Use `create(SetBillingMeterEventRequestSchema)` to create a new message. + */ +export const SetBillingMeterEventRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 52); /** * @generated from message mgmt.v1alpha1.SetBillingMeterEventResponse */ -export class SetBillingMeterEventResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetBillingMeterEventResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetBillingMeterEventResponse { - return new SetBillingMeterEventResponse().fromBinary(bytes, options); - } +export type SetBillingMeterEventResponse = Message<"mgmt.v1alpha1.SetBillingMeterEventResponse"> & { +}; - static fromJson(jsonValue: JsonValue, options?: Partial): SetBillingMeterEventResponse { - return new SetBillingMeterEventResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetBillingMeterEventResponse { - return new SetBillingMeterEventResponse().fromJsonString(jsonString, options); - } - - static equals(a: SetBillingMeterEventResponse | PlainMessage | undefined, b: SetBillingMeterEventResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetBillingMeterEventResponse, a, b); - } -} +/** + * Describes the message mgmt.v1alpha1.SetBillingMeterEventResponse. + * Use `create(SetBillingMeterEventResponseSchema)` to create a new message. + */ +export const SetBillingMeterEventResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 53); /** * @generated from message mgmt.v1alpha1.SetUserRoleRequest */ -export class SetUserRoleRequest extends Message { +export type SetUserRoleRequest = Message<"mgmt.v1alpha1.SetUserRoleRequest"> & { /** * The account id to apply this role to * * @generated from field: string account_id = 1; */ - accountId = ""; + accountId: string; /** * The user that this will be applied to * * @generated from field: string user_id = 2; */ - userId = ""; + userId: string; /** * The role that this user will obtain * * @generated from field: mgmt.v1alpha1.AccountRole role = 3; */ - role = AccountRole.UNSPECIFIED; + role: AccountRole; +}; - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +/** + * Describes the message mgmt.v1alpha1.SetUserRoleRequest. + * Use `create(SetUserRoleRequestSchema)` to create a new message. + */ +export const SetUserRoleRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 54); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetUserRoleRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "account_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "role", kind: "enum", T: proto3.getEnumType(AccountRole) }, - ]); +/** + * @generated from message mgmt.v1alpha1.SetUserRoleResponse + */ +export type SetUserRoleResponse = Message<"mgmt.v1alpha1.SetUserRoleResponse"> & { +}; - static fromBinary(bytes: Uint8Array, options?: Partial): SetUserRoleRequest { - return new SetUserRoleRequest().fromBinary(bytes, options); - } +/** + * Describes the message mgmt.v1alpha1.SetUserRoleResponse. + * Use `create(SetUserRoleResponseSchema)` to create a new message. + */ +export const SetUserRoleResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 55); - static fromJson(jsonValue: JsonValue, options?: Partial): SetUserRoleRequest { - return new SetUserRoleRequest().fromJson(jsonValue, options); - } +/** + * @generated from enum mgmt.v1alpha1.UserAccountType + */ +export enum UserAccountType { + /** + * @generated from enum value: USER_ACCOUNT_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, - static fromJsonString(jsonString: string, options?: Partial): SetUserRoleRequest { - return new SetUserRoleRequest().fromJsonString(jsonString, options); - } + /** + * @generated from enum value: USER_ACCOUNT_TYPE_PERSONAL = 1; + */ + PERSONAL = 1, - static equals(a: SetUserRoleRequest | PlainMessage | undefined, b: SetUserRoleRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SetUserRoleRequest, a, b); - } + /** + * @generated from enum value: USER_ACCOUNT_TYPE_TEAM = 2; + */ + TEAM = 2, + + /** + * @generated from enum value: USER_ACCOUNT_TYPE_ENTERPRISE = 3; + */ + ENTERPRISE = 3, } /** - * @generated from message mgmt.v1alpha1.SetUserRoleResponse + * Describes the enum mgmt.v1alpha1.UserAccountType. */ -export class SetUserRoleResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } +export const UserAccountTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_user_account, 0); - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "mgmt.v1alpha1.SetUserRoleResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); +/** + * @generated from enum mgmt.v1alpha1.BillingStatus + */ +export enum BillingStatus { + /** + * @generated from enum value: BILLING_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, - static fromBinary(bytes: Uint8Array, options?: Partial): SetUserRoleResponse { - return new SetUserRoleResponse().fromBinary(bytes, options); - } + /** + * Corresponds to a billing subscription and rolls up various states into active + * This may be split into the future to be more granular and mirror the underlying billing system + * + * @generated from enum value: BILLING_STATUS_ACTIVE = 1; + */ + ACTIVE = 1, - static fromJson(jsonValue: JsonValue, options?: Partial): SetUserRoleResponse { - return new SetUserRoleResponse().fromJson(jsonValue, options); - } + /** + * If the system could not find any active subscriptions + * + * @generated from enum value: BILLING_STATUS_EXPIRED = 2; + */ + EXPIRED = 2, - static fromJsonString(jsonString: string, options?: Partial): SetUserRoleResponse { - return new SetUserRoleResponse().fromJsonString(jsonString, options); - } + /** + * The account does not have an active subscription and is in a valid trial period + * + * @generated from enum value: BILLING_STATUS_TRIAL_ACTIVE = 3; + */ + TRIAL_ACTIVE = 3, - static equals(a: SetUserRoleResponse | PlainMessage | undefined, b: SetUserRoleResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SetUserRoleResponse, a, b); - } + /** + * The account does not have an active subscription and the trial period has ended + * + * @generated from enum value: BILLING_STATUS_TRIAL_EXPIRED = 4; + */ + TRIAL_EXPIRED = 4, } +/** + * Describes the enum mgmt.v1alpha1.BillingStatus. + */ +export const BillingStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_user_account, 1); + +/** + * @generated from enum mgmt.v1alpha1.AccountStatus + */ +export enum AccountStatus { + /** + * Default value, should be used when no reason is specified + * + * @generated from enum value: ACCOUNT_STATUS_REASON_UNSPECIFIED = 0; + */ + REASON_UNSPECIFIED = 0, + + /** + * Account is currently in an expired state + * + * @generated from enum value: ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE = 3; + */ + ACCOUNT_IN_EXPIRED_STATE = 3, + + /** + * The account is currently in an active trial period + * + * @generated from enum value: ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE = 4; + */ + ACCOUNT_TRIAL_ACTIVE = 4, + + /** + * The account is past the active trial period + * + * @generated from enum value: ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED = 5; + */ + ACCOUNT_TRIAL_EXPIRED = 5, +} + +/** + * Describes the enum mgmt.v1alpha1.AccountStatus. + */ +export const AccountStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_user_account, 2); + +/** + * @generated from enum mgmt.v1alpha1.AccountRole + */ +export enum AccountRole { + /** + * Default value, this should not be used, but will default to ACCOUNT_ROLE_JOB_VIEWER + * + * @generated from enum value: ACCOUNT_ROLE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Admin, can do anything in the account. + * + * @generated from enum value: ACCOUNT_ROLE_ADMIN = 1; + */ + ADMIN = 1, + + /** + * Can view, edit jobs and connections + * + * @generated from enum value: ACCOUNT_ROLE_JOB_DEVELOPER = 2; + */ + JOB_DEVELOPER = 2, + + /** + * Can view + * + * @generated from enum value: ACCOUNT_ROLE_JOB_VIEWER = 3; + */ + JOB_VIEWER = 3, + + /** + * Can view and execute + * + * @generated from enum value: ACCOUNT_ROLE_JOB_EXECUTOR = 4; + */ + JOB_EXECUTOR = 4, +} + +/** + * Describes the enum mgmt.v1alpha1.AccountRole. + */ +export const AccountRoleSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_mgmt_v1alpha1_user_account, 3); + +/** + * @generated from service mgmt.v1alpha1.UserAccountService + */ +export const UserAccountService: GenService<{ + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetUser + */ + getUser: { + methodKind: "unary"; + input: typeof GetUserRequestSchema; + output: typeof GetUserResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.SetUser + */ + setUser: { + methodKind: "unary"; + input: typeof SetUserRequestSchema; + output: typeof SetUserResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetUserAccounts + */ + getUserAccounts: { + methodKind: "unary"; + input: typeof GetUserAccountsRequestSchema; + output: typeof GetUserAccountsResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.SetPersonalAccount + */ + setPersonalAccount: { + methodKind: "unary"; + input: typeof SetPersonalAccountRequestSchema; + output: typeof SetPersonalAccountResponseSchema; + }, + /** + * Convert a personal account to a team account retaining all of the jobs and connections. This will also create a new empty personal account. + * + * @generated from rpc mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount + */ + convertPersonalToTeamAccount: { + methodKind: "unary"; + input: typeof ConvertPersonalToTeamAccountRequestSchema; + output: typeof ConvertPersonalToTeamAccountResponseSchema; + }, + /** + * Creates a new team account + * + * @generated from rpc mgmt.v1alpha1.UserAccountService.CreateTeamAccount + */ + createTeamAccount: { + methodKind: "unary"; + input: typeof CreateTeamAccountRequestSchema; + output: typeof CreateTeamAccountResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.IsUserInAccount + */ + isUserInAccount: { + methodKind: "unary"; + input: typeof IsUserInAccountRequestSchema; + output: typeof IsUserInAccountResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig + */ + getAccountTemporalConfig: { + methodKind: "unary"; + input: typeof GetAccountTemporalConfigRequestSchema; + output: typeof GetAccountTemporalConfigResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig + */ + setAccountTemporalConfig: { + methodKind: "unary"; + input: typeof SetAccountTemporalConfigRequestSchema; + output: typeof SetAccountTemporalConfigResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers + */ + getTeamAccountMembers: { + methodKind: "unary"; + input: typeof GetTeamAccountMembersRequestSchema; + output: typeof GetTeamAccountMembersResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember + */ + removeTeamAccountMember: { + methodKind: "unary"; + input: typeof RemoveTeamAccountMemberRequestSchema; + output: typeof RemoveTeamAccountMemberResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount + */ + inviteUserToTeamAccount: { + methodKind: "unary"; + input: typeof InviteUserToTeamAccountRequestSchema; + output: typeof InviteUserToTeamAccountResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites + */ + getTeamAccountInvites: { + methodKind: "unary"; + input: typeof GetTeamAccountInvitesRequestSchema; + output: typeof GetTeamAccountInvitesResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite + */ + removeTeamAccountInvite: { + methodKind: "unary"; + input: typeof RemoveTeamAccountInviteRequestSchema; + output: typeof RemoveTeamAccountInviteResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite + */ + acceptTeamAccountInvite: { + methodKind: "unary"; + input: typeof AcceptTeamAccountInviteRequestSchema; + output: typeof AcceptTeamAccountInviteResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetSystemInformation + */ + getSystemInformation: { + methodKind: "unary"; + input: typeof GetSystemInformationRequestSchema; + output: typeof GetSystemInformationResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig + */ + getAccountOnboardingConfig: { + methodKind: "unary"; + input: typeof GetAccountOnboardingConfigRequestSchema; + output: typeof GetAccountOnboardingConfigResponseSchema; + }, + /** + * @generated from rpc mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig + */ + setAccountOnboardingConfig: { + methodKind: "unary"; + input: typeof SetAccountOnboardingConfigRequestSchema; + output: typeof SetAccountOnboardingConfigResponseSchema; + }, + /** + * Returns different metrics on the account status for the active billing period + * + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountStatus + */ + getAccountStatus: { + methodKind: "unary"; + input: typeof GetAccountStatusRequestSchema; + output: typeof GetAccountStatusResponseSchema; + }, + /** + * Distils the account status down to whether not it is in a valid state. + * + * @generated from rpc mgmt.v1alpha1.UserAccountService.IsAccountStatusValid + */ + isAccountStatusValid: { + methodKind: "unary"; + input: typeof IsAccountStatusValidRequestSchema; + output: typeof IsAccountStatusValidResponseSchema; + }, + /** + * Returns a new checkout session for the account to subscribe + * + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession + */ + getAccountBillingCheckoutSession: { + methodKind: "unary"; + input: typeof GetAccountBillingCheckoutSessionRequestSchema; + output: typeof GetAccountBillingCheckoutSessionResponseSchema; + }, + /** + * Returns a new billing portal session if the account has a billing customer id + * + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession + */ + getAccountBillingPortalSession: { + methodKind: "unary"; + input: typeof GetAccountBillingPortalSessionRequestSchema; + output: typeof GetAccountBillingPortalSessionResponseSchema; + }, + /** + * Returns user accounts that have a billing id. + * + * @generated from rpc mgmt.v1alpha1.UserAccountService.GetBillingAccounts + */ + getBillingAccounts: { + methodKind: "unary"; + input: typeof GetBillingAccountsRequestSchema; + output: typeof GetBillingAccountsResponseSchema; + }, + /** + * Sends a new metered event to the billing system + * + * @generated from rpc mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent + */ + setBillingMeterEvent: { + methodKind: "unary"; + input: typeof SetBillingMeterEventRequestSchema; + output: typeof SetBillingMeterEventResponseSchema; + }, + /** + * Sets the users role + * + * @generated from rpc mgmt.v1alpha1.UserAccountService.SetUserRole + */ + setUserRole: { + methodKind: "unary"; + input: typeof SetUserRoleRequestSchema; + output: typeof SetUserRoleResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_mgmt_v1alpha1_user_account, 0); + diff --git a/frontend/packages/sdk/src/connectquery.ts b/frontend/packages/sdk/src/connectquery.ts deleted file mode 100644 index 932455a3ca..0000000000 --- a/frontend/packages/sdk/src/connectquery.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './client/mgmt/v1alpha1/api_key-ApiKeyService_connectquery.js'; -export * from './client/mgmt/v1alpha1/connection-ConnectionService_connectquery.js'; -export * from './client/mgmt/v1alpha1/connection_data-ConnectionDataService_connectquery.js'; -export * from './client/mgmt/v1alpha1/job-JobService_connectquery.js'; -export * from './client/mgmt/v1alpha1/metrics-MetricsService_connectquery.js'; -export * from './client/mgmt/v1alpha1/transformer-TransformersService_connectquery.js'; -export * from './client/mgmt/v1alpha1/user_account-UserAccountService_connectquery.js'; diff --git a/frontend/packages/sdk/src/index.ts b/frontend/packages/sdk/src/index.ts index 4a459f8865..968b6dd5a1 100644 --- a/frontend/packages/sdk/src/index.ts +++ b/frontend/packages/sdk/src/index.ts @@ -1,3 +1,3 @@ export { Code, ConnectError } from '@connectrpc/connect'; -export type { PromiseClient } from '@connectrpc/connect'; +export type { Client } from '@connectrpc/connect'; export * from './client/index.js'; diff --git a/go.mod b/go.mod index feac9768e3..f74d02f0f4 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,6 @@ require ( github.com/gliderlabs/ssh v0.3.7 github.com/go-logr/logr v1.4.2 github.com/go-sql-driver/mysql v1.8.1 - github.com/gofrs/uuid v4.4.0+incompatible github.com/golang-migrate/migrate/v4 v4.18.1 github.com/google/uuid v1.6.0 github.com/itchyny/gojq v0.12.17 @@ -236,6 +235,7 @@ require ( github.com/goccy/go-json v0.10.3 // indirect github.com/gocql/gocql v1.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.1 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect diff --git a/internal/benthos/benthos-builder/benthos-builder.go b/internal/benthos/benthos-builder/benthos-builder.go index fa801008fb..cac1b3bc35 100644 --- a/internal/benthos/benthos-builder/benthos-builder.go +++ b/internal/benthos/benthos-builder/benthos-builder.go @@ -36,7 +36,7 @@ type BenthosConfigResponse struct { // Combines a connection type and job type to uniquely identify a builder configuration type BuilderKey struct { - ConnType bb_internal.ConnectionType + ConnType bb_shared.ConnectionType JobType bb_internal.JobType } @@ -61,7 +61,7 @@ func NewBuilderProvider(logger *slog.Logger) *BuilderProvider { } // Handles registering new builders -func (r *BuilderProvider) Register(jobType bb_internal.JobType, connType bb_internal.ConnectionType, builder bb_internal.BenthosBuilder) { +func (r *BuilderProvider) Register(jobType bb_internal.JobType, connType bb_shared.ConnectionType, builder bb_internal.BenthosBuilder) { key := BuilderKey{ConnType: connType, JobType: jobType} r.mu.Lock() @@ -79,7 +79,10 @@ func (r *BuilderProvider) GetBuilder( job *mgmtv1alpha1.Job, connection *mgmtv1alpha1.Connection, ) (bb_internal.BenthosBuilder, error) { - connectionType := bb_internal.GetConnectionType(connection) + connectionType, err := bb_shared.GetConnectionType(connection) + if err != nil { + return nil, err + } jobType := bb_internal.GetJobType(job) key := BuilderKey{ConnType: connectionType, JobType: jobType} @@ -103,33 +106,40 @@ func (b *BuilderProvider) registerStandardBuilders( redisConfig *shared.RedisConfig, selectQueryBuilder bb_shared.SelectQueryMapBuilder, ) error { - sourceConnectionType := bb_internal.GetConnectionType(sourceConnection) + sourceConnectionType, err := bb_shared.GetConnectionType(sourceConnection) + if err != nil { + return err + } jobType := bb_internal.GetJobType(job) - connectionTypes := []bb_internal.ConnectionType{sourceConnectionType} + connectionTypes := []bb_shared.ConnectionType{sourceConnectionType} for _, dest := range destinationConnections { - connectionTypes = append(connectionTypes, bb_internal.GetConnectionType(dest)) + destConnType, err := bb_shared.GetConnectionType(dest) + if err != nil { + return err + } + connectionTypes = append(connectionTypes, destConnType) } if jobType == bb_internal.JobTypeSync { for _, connectionType := range connectionTypes { switch connectionType { - case bb_internal.ConnectionTypePostgres: + case bb_shared.ConnectionTypePostgres: sqlbuilder := bb_conns.NewSqlSyncBuilder(transformerclient, sqlmanagerclient, redisConfig, sqlmanager_shared.PostgresDriver, selectQueryBuilder) b.Register(bb_internal.JobTypeSync, connectionType, sqlbuilder) - case bb_internal.ConnectionTypeMysql: + case bb_shared.ConnectionTypeMysql: sqlbuilder := bb_conns.NewSqlSyncBuilder(transformerclient, sqlmanagerclient, redisConfig, sqlmanager_shared.MysqlDriver, selectQueryBuilder) b.Register(bb_internal.JobTypeSync, connectionType, sqlbuilder) - case bb_internal.ConnectionTypeMssql: + case bb_shared.ConnectionTypeMssql: sqlbuilder := bb_conns.NewSqlSyncBuilder(transformerclient, sqlmanagerclient, redisConfig, sqlmanager_shared.MssqlDriver, selectQueryBuilder) b.Register(bb_internal.JobTypeSync, connectionType, sqlbuilder) - case bb_internal.ConnectionTypeAwsS3: - b.Register(bb_internal.JobTypeSync, bb_internal.ConnectionTypeAwsS3, bb_conns.NewAwsS3SyncBuilder()) - case bb_internal.ConnectionTypeDynamodb: - b.Register(bb_internal.JobTypeSync, bb_internal.ConnectionTypeDynamodb, bb_conns.NewDynamoDbSyncBuilder(transformerclient)) - case bb_internal.ConnectionTypeMongo: - b.Register(bb_internal.JobTypeSync, bb_internal.ConnectionTypeMongo, bb_conns.NewMongoDbSyncBuilder(transformerclient)) - case bb_internal.ConnectionTypeGCP: - b.Register(bb_internal.JobTypeSync, bb_internal.ConnectionTypeGCP, bb_conns.NewGcpCloudStorageSyncBuilder()) + case bb_shared.ConnectionTypeAwsS3: + b.Register(bb_internal.JobTypeSync, bb_shared.ConnectionTypeAwsS3, bb_conns.NewAwsS3SyncBuilder()) + case bb_shared.ConnectionTypeDynamodb: + b.Register(bb_internal.JobTypeSync, bb_shared.ConnectionTypeDynamodb, bb_conns.NewDynamoDbSyncBuilder(transformerclient)) + case bb_shared.ConnectionTypeMongo: + b.Register(bb_internal.JobTypeSync, bb_shared.ConnectionTypeMongo, bb_conns.NewMongoDbSyncBuilder(transformerclient)) + case bb_shared.ConnectionTypeGCP: + b.Register(bb_internal.JobTypeSync, bb_shared.ConnectionTypeGCP, bb_conns.NewGcpCloudStorageSyncBuilder()) default: return fmt.Errorf("unsupport connection type for sync job: %s", connectionType) } @@ -140,13 +150,16 @@ func (b *BuilderProvider) registerStandardBuilders( if len(destinationConnections) != 1 { return fmt.Errorf("unsupported destination count for AI generate job: %d", len(destinationConnections)) } - destConnType := bb_internal.GetConnectionType(destinationConnections[0]) + destConnType, err := bb_shared.GetConnectionType(destinationConnections[0]) + if err != nil { + return err + } driver, err := bb_internal.GetSqlDriverByConnectionType(destConnType) if err != nil { return err } builder := bb_conns.NewGenerateAIBuilder(transformerclient, sqlmanagerclient, connectionclient, driver) - b.Register(bb_internal.JobTypeAIGenerate, bb_internal.ConnectionTypeOpenAI, builder) + b.Register(bb_internal.JobTypeAIGenerate, bb_shared.ConnectionTypeOpenAI, builder) b.Register(bb_internal.JobTypeAIGenerate, destConnType, builder) } if jobType == bb_internal.JobTypeGenerate { @@ -164,7 +177,10 @@ func withBenthosConfigLoggerTags( ) []any { keyvals := []any{} - sourceConnectionType := bb_internal.GetConnectionType(sourceConnection) + sourceConnectionType, err := bb_shared.GetConnectionType(sourceConnection) + if err != nil { + sourceConnectionType = "unknown" + } jobType := bb_internal.GetJobType(job) if sourceConnectionType != "" { @@ -276,7 +292,10 @@ func NewCliBenthosConfigManager( return nil, err } - sourceProvider := NewCliSourceBuilderProvider(config) + sourceProvider, err := NewCliSourceBuilderProvider(config) + if err != nil { + return nil, err + } logger := config.Logger.With(withBenthosConfigLoggerTags(config.Job, config.SourceConnection)...) return &BenthosConfigManager{ @@ -294,10 +313,13 @@ func NewCliBenthosConfigManager( // NewCliSourceBuilderProvider creates a specialized provider for CLI source operations func NewCliSourceBuilderProvider( config *CliBenthosConfig, -) *BuilderProvider { +) (*BuilderProvider, error) { provider := NewBuilderProvider(config.Logger) - sourceConnectionType := bb_internal.GetConnectionType(config.SourceConnection) + sourceConnectionType, err := bb_shared.GetConnectionType(config.SourceConnection) + if err != nil { + return nil, err + } jobType := bb_internal.GetJobType(config.Job) builder := bb_conns.NewNeosyncConnectionDataSyncBuilder( @@ -311,11 +333,11 @@ func NewCliSourceBuilderProvider( if jobType == bb_internal.JobTypeSync { switch sourceConnectionType { - case bb_internal.ConnectionTypePostgres, bb_internal.ConnectionTypeMysql, - bb_internal.ConnectionTypeMssql, bb_internal.ConnectionTypeAwsS3, bb_internal.ConnectionTypeDynamodb: + case bb_shared.ConnectionTypePostgres, bb_shared.ConnectionTypeMysql, + bb_shared.ConnectionTypeMssql, bb_shared.ConnectionTypeAwsS3, bb_shared.ConnectionTypeDynamodb: provider.Register(bb_internal.JobTypeSync, sourceConnectionType, builder) } } - return provider + return provider, nil } diff --git a/internal/benthos/benthos-builder/builders/benthos-builder_test.go b/internal/benthos/benthos-builder/builders/benthos-builder_test.go index 061789f3bd..dafaead854 100644 --- a/internal/benthos/benthos-builder/builders/benthos-builder_test.go +++ b/internal/benthos/benthos-builder/builders/benthos-builder_test.go @@ -493,7 +493,6 @@ func Test_convertUserDefinedFunctionConfig(t *testing.T) { } expected := &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_TRANSFORM_EMAIL, Config: &mgmtv1alpha1.TransformerConfig{ Config: &mgmtv1alpha1.TransformerConfig_TransformEmailConfig{ TransformEmailConfig: &mgmtv1alpha1.TransformEmail{ diff --git a/internal/benthos/benthos-builder/builders/neosync-connection-data.go b/internal/benthos/benthos-builder/builders/neosync-connection-data.go index 19a988da4b..248c8d9cc3 100644 --- a/internal/benthos/benthos-builder/builders/neosync-connection-data.go +++ b/internal/benthos/benthos-builder/builders/neosync-connection-data.go @@ -21,7 +21,7 @@ type neosyncConnectionDataBuilder struct { sourceJobRunId *string syncConfigs []*tabledependency.RunConfig destinationConnection *mgmtv1alpha1.Connection - sourceConnectionType bb_internal.ConnectionType + sourceConnectionType bb_shared.ConnectionType } func NewNeosyncConnectionDataSyncBuilder( @@ -30,7 +30,7 @@ func NewNeosyncConnectionDataSyncBuilder( sourceJobRunId *string, syncConfigs []*tabledependency.RunConfig, destinationConnection *mgmtv1alpha1.Connection, - sourceConnectionType bb_internal.ConnectionType, + sourceConnectionType bb_shared.ConnectionType, ) bb_internal.BenthosBuilder { return &neosyncConnectionDataBuilder{ connectiondataclient: connectiondataclient, diff --git a/internal/benthos/benthos-builder/builders/processors.go b/internal/benthos/benthos-builder/builders/processors.go index 79878aac94..7441ee5c2b 100644 --- a/internal/benthos/benthos-builder/builders/processors.go +++ b/internal/benthos/benthos-builder/builders/processors.go @@ -253,9 +253,9 @@ func isJavascriptTransformer(jmt *mgmtv1alpha1.JobMappingTransformer) bool { if jmt == nil { return false } - isSource := jmt.GetSource() == mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_TRANSFORM_JAVASCRIPT || jmt.GetSource() == mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_GENERATE_JAVASCRIPT + isConfig := jmt.GetConfig().GetTransformJavascriptConfig() != nil || jmt.GetConfig().GetGenerateJavascriptConfig() != nil - return isSource || isConfig + return isConfig } func buildMutationConfigs( @@ -475,7 +475,6 @@ func convertUserDefinedFunctionConfig( transformer := transformerResp.Msg.GetTransformer() return &mgmtv1alpha1.JobMappingTransformer{ - Source: transformer.GetSource(), Config: transformer.GetConfig(), }, nil } diff --git a/internal/benthos/benthos-builder/builders/sql-util.go b/internal/benthos/benthos-builder/builders/sql-util.go index d09654fb92..e13117db8c 100644 --- a/internal/benthos/benthos-builder/builders/sql-util.go +++ b/internal/benthos/benthos-builder/builders/sql-util.go @@ -494,10 +494,6 @@ func getSqlJobSourceOpts( case *mgmtv1alpha1.PostgresSourceConnectionOptions_NewColumnAdditionStrategy_AutoMap_: shouldGenerateNewColTransforms = true } - // deprecated fallback if no strategy has been defined - if !shouldHalt && !shouldGenerateNewColTransforms { - shouldHalt = jobSourceConfig.Postgres.GetHaltOnNewColumnAddition() - } return &sqlJobSourceOpts{ HaltOnNewColumnAddition: shouldHalt, diff --git a/internal/benthos/benthos-builder/internal/types.go b/internal/benthos/benthos-builder/internal/types.go index 016b02f656..ba06270826 100644 --- a/internal/benthos/benthos-builder/internal/types.go +++ b/internal/benthos/benthos-builder/internal/types.go @@ -13,56 +13,14 @@ import ( neosync_benthos "github.com/nucleuscloud/neosync/worker/pkg/benthos" ) -// ConnectionType represents supported connection types -type ConnectionType string - -const ( - ConnectionTypePostgres ConnectionType = "postgres" - ConnectionTypeMysql ConnectionType = "mysql" - ConnectionTypeMssql ConnectionType = "mssql" - ConnectionTypeAwsS3 ConnectionType = "aws-s3" - ConnectionTypeGCP ConnectionType = "gcp-cloud-storage" - ConnectionTypeMongo ConnectionType = "mongodb" - ConnectionTypeDynamodb ConnectionType = "aws-dynamodb" - ConnectionTypeLocalDir ConnectionType = "local-directory" - ConnectionTypeOpenAI ConnectionType = "openai" - ConnectionTypeNeosyncData ConnectionType = "neosync-data-stream" -) - -// Determines type of connection from Connection -func GetConnectionType(connection *mgmtv1alpha1.Connection) ConnectionType { - switch connection.GetConnectionConfig().GetConfig().(type) { - case *mgmtv1alpha1.ConnectionConfig_PgConfig: - return ConnectionTypePostgres - case *mgmtv1alpha1.ConnectionConfig_MysqlConfig: - return ConnectionTypeMysql - case *mgmtv1alpha1.ConnectionConfig_MssqlConfig: - return ConnectionTypeMssql - case *mgmtv1alpha1.ConnectionConfig_AwsS3Config: - return ConnectionTypeAwsS3 - case *mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig: - return ConnectionTypeGCP - case *mgmtv1alpha1.ConnectionConfig_MongoConfig: - return ConnectionTypeMongo - case *mgmtv1alpha1.ConnectionConfig_DynamodbConfig: - return ConnectionTypeDynamodb - case *mgmtv1alpha1.ConnectionConfig_LocalDirConfig: - return ConnectionTypeLocalDir - case *mgmtv1alpha1.ConnectionConfig_OpenaiConfig: - return ConnectionTypeOpenAI - default: - return "unknown" - } -} - // Determines SQL driver from connection type -func GetSqlDriverByConnectionType(connectionType ConnectionType) (string, error) { +func GetSqlDriverByConnectionType(connectionType bb_shared.ConnectionType) (string, error) { switch connectionType { - case ConnectionTypePostgres: + case bb_shared.ConnectionTypePostgres: return sqlmanager_shared.PostgresDriver, nil - case ConnectionTypeMysql: + case bb_shared.ConnectionTypeMysql: return sqlmanager_shared.MysqlDriver, nil - case ConnectionTypeMssql: + case bb_shared.ConnectionTypeMssql: return sqlmanager_shared.MssqlDriver, nil default: return "", fmt.Errorf("unsupported SQL connection type: %s", connectionType) diff --git a/internal/benthos/benthos-builder/shared/types.go b/internal/benthos/benthos-builder/shared/types.go index 5c18070ab9..9e8ae105c0 100644 --- a/internal/benthos/benthos-builder/shared/types.go +++ b/internal/benthos/benthos-builder/shared/types.go @@ -3,6 +3,7 @@ package benthosbuilder_shared import ( "fmt" + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" sqlmanager_shared "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager/shared" tabledependency "github.com/nucleuscloud/neosync/backend/pkg/table-dependency" ) @@ -33,3 +34,45 @@ type SelectQueryMapBuilder interface { func WithEnvInterpolation(input string) string { return fmt.Sprintf("${%s}", input) } + +// ConnectionType represents supported connection types +type ConnectionType string + +const ( + ConnectionTypePostgres ConnectionType = "postgres" + ConnectionTypeMysql ConnectionType = "mysql" + ConnectionTypeMssql ConnectionType = "mssql" + ConnectionTypeAwsS3 ConnectionType = "aws-s3" + ConnectionTypeGCP ConnectionType = "gcp-cloud-storage" + ConnectionTypeMongo ConnectionType = "mongodb" + ConnectionTypeDynamodb ConnectionType = "aws-dynamodb" + ConnectionTypeLocalDir ConnectionType = "local-directory" + ConnectionTypeOpenAI ConnectionType = "openai" + ConnectionTypeNeosyncData ConnectionType = "neosync-data-stream" +) + +// Determines type of connection from Connection +func GetConnectionType(connection *mgmtv1alpha1.Connection) (ConnectionType, error) { + switch connection.GetConnectionConfig().GetConfig().(type) { + case *mgmtv1alpha1.ConnectionConfig_PgConfig: + return ConnectionTypePostgres, nil + case *mgmtv1alpha1.ConnectionConfig_MysqlConfig: + return ConnectionTypeMysql, nil + case *mgmtv1alpha1.ConnectionConfig_MssqlConfig: + return ConnectionTypeMssql, nil + case *mgmtv1alpha1.ConnectionConfig_AwsS3Config: + return ConnectionTypeAwsS3, nil + case *mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig: + return ConnectionTypeGCP, nil + case *mgmtv1alpha1.ConnectionConfig_MongoConfig: + return ConnectionTypeMongo, nil + case *mgmtv1alpha1.ConnectionConfig_DynamodbConfig: + return ConnectionTypeDynamodb, nil + case *mgmtv1alpha1.ConnectionConfig_LocalDirConfig: + return ConnectionTypeLocalDir, nil + case *mgmtv1alpha1.ConnectionConfig_OpenaiConfig: + return ConnectionTypeOpenAI, nil + default: + return "", fmt.Errorf("unsupported connection type: %T", connection.GetConnectionConfig().GetConfig()) + } +} diff --git a/internal/dynamodb/utils.go b/internal/dynamodb/utils.go index 510aa7c8c6..0a8ae68acc 100644 --- a/internal/dynamodb/utils.go +++ b/internal/dynamodb/utils.go @@ -32,12 +32,18 @@ func ParseDynamoDBAttributeValue(key string, value any, keyTypeMap map[string]ne case "S": return dynamoValue.(string) case "B": - s := dynamoValue.(string) - byteSlice, err := base64.StdEncoding.DecodeString(s) - if err != nil { + switch v := dynamoValue.(type) { + case string: + byteSlice, err := base64.StdEncoding.DecodeString(v) + if err != nil { + return dynamoValue + } + return byteSlice + case []byte: + return v + default: return dynamoValue } - return byteSlice case "N": n, err := gotypeutil.ParseStringAsNumber(dynamoValue.(string)) if err != nil { @@ -67,36 +73,62 @@ func ParseDynamoDBAttributeValue(key string, value any, keyTypeMap map[string]ne } return mAny case "BS": - bytes := dynamoValue.([]any) - result := make([][]byte, len(bytes)) - for i, b := range bytes { - s := b.(string) - byteSlice, err := base64.StdEncoding.DecodeString(s) - if err != nil { - return dynamoValue + var result [][]byte + switch bytes := dynamoValue.(type) { + case []any: + result = make([][]byte, len(bytes)) + for i, b := range bytes { + s := b.(string) + byteSlice, err := base64.StdEncoding.DecodeString(s) + if err != nil { + return dynamoValue + } + result[i] = byteSlice } - - result[i] = byteSlice + case [][]byte: + return bytes + default: + return dynamoValue } return result case "SS": keyTypeMap[key] = neosync_types.StringSet - ss := dynamoValue.([]any) - result := make([]string, len(ss)) - for i, s := range ss { - result[i] = s.(string) + switch ss := dynamoValue.(type) { + case []any: + result := make([]string, len(ss)) + for i, s := range ss { + result[i] = s.(string) + } + return result + case []string: + return ss + default: + return dynamoValue } - return result case "NS": keyTypeMap[key] = neosync_types.NumberSet - numbers := dynamoValue.([]any) - result := make([]any, len(numbers)) - for i, num := range numbers { - n, err := gotypeutil.ParseStringAsNumber(num.(string)) - if err != nil { - result[i] = num + var result []any + switch ns := dynamoValue.(type) { + case []any: + result = make([]any, len(ns)) + for i, num := range ns { + n, err := gotypeutil.ParseStringAsNumber(num.(string)) + if err != nil { + result[i] = num + } + result[i] = n } - result[i] = n + case []string: + result = make([]any, len(ns)) + for i, num := range ns { + n, err := gotypeutil.ParseStringAsNumber(num) + if err != nil { + result[i] = num + } + result[i] = n + } + default: + return dynamoValue } return result } @@ -311,7 +343,7 @@ func anyToString(value any) string { } } -func ConvertAttributeValueToDynamoDBJSON(av dynamotypes.AttributeValue) (map[string]any, error) { +func ConvertAttributeValueToGoMap(av dynamotypes.AttributeValue) (map[string]any, error) { switch v := av.(type) { case *dynamotypes.AttributeValueMemberS: return map[string]any{"S": v.Value}, nil @@ -327,7 +359,7 @@ func ConvertAttributeValueToDynamoDBJSON(av dynamotypes.AttributeValue) (map[str m := make(map[string]any) for k, val := range v.Value { var err error - m[k], err = ConvertAttributeValueToDynamoDBJSON(val) + m[k], err = ConvertAttributeValueToGoMap(val) if err != nil { return nil, err } @@ -337,7 +369,7 @@ func ConvertAttributeValueToDynamoDBJSON(av dynamotypes.AttributeValue) (map[str l := make([]any, len(v.Value)) for i, val := range v.Value { var err error - l[i], err = ConvertAttributeValueToDynamoDBJSON(val) + l[i], err = ConvertAttributeValueToGoMap(val) if err != nil { return nil, err } @@ -354,16 +386,16 @@ func ConvertAttributeValueToDynamoDBJSON(av dynamotypes.AttributeValue) (map[str } } -func ConvertMapToJSONBytes(input map[string]dynamotypes.AttributeValue) ([]byte, error) { +func ConvertDynamoItemToGoMap(input map[string]dynamotypes.AttributeValue) (map[string]any, error) { result := make(map[string]any) for key, av := range input { - dynamoDBJSON, err := ConvertAttributeValueToDynamoDBJSON(av) + dynamoDBJSON, err := ConvertAttributeValueToGoMap(av) if err != nil { return nil, fmt.Errorf("error converting key %s: %w", key, err) } result[key] = dynamoDBJSON } - return json.Marshal(result) + return result, nil } diff --git a/internal/ee/cloud-license/license.go b/internal/ee/cloud-license/license.go index 405250de4d..7044724f30 100644 --- a/internal/ee/cloud-license/license.go +++ b/internal/ee/cloud-license/license.go @@ -25,6 +25,7 @@ type licenseFile struct { type Interface interface { IsValid() bool + ExpiresAt() time.Time } var _ Interface = (*CloudLicense)(nil) @@ -51,6 +52,13 @@ func (c *CloudLicense) IsValid() bool { return c.contents != nil && c.contents.IsValid() } +func (c *CloudLicense) ExpiresAt() time.Time { + if c.contents == nil { + return time.Now().UTC() + } + return c.contents.ExpiresAt +} + type licenseContents struct { Version string `json:"version"` Id string `json:"id"` diff --git a/internal/ee/license/cascade.go b/internal/ee/license/cascade.go index 39b88e364c..37a46316b1 100644 --- a/internal/ee/license/cascade.go +++ b/internal/ee/license/cascade.go @@ -1,21 +1,30 @@ package license +import "time" + type CascadeLicense struct { - isValid bool + isValid bool + expiresAt time.Time } // Checks multiple licenses in input order to see if any are valid func NewCascadeLicense(licenses ...EEInterface) *CascadeLicense { isValid := false + expiresAt := time.Time{} for _, l := range licenses { if l.IsValid() { isValid = true + expiresAt = l.ExpiresAt() break } } - return &CascadeLicense{isValid: isValid} + return &CascadeLicense{isValid: isValid, expiresAt: expiresAt} } func (c *CascadeLicense) IsValid() bool { return c.isValid } + +func (c *CascadeLicense) ExpiresAt() time.Time { + return c.expiresAt +} diff --git a/internal/ee/license/license.go b/internal/ee/license/license.go index 61571c5d95..1726340871 100644 --- a/internal/ee/license/license.go +++ b/internal/ee/license/license.go @@ -29,6 +29,7 @@ type licenseFile struct { type EEInterface interface { IsValid() bool + ExpiresAt() time.Time } var _ EEInterface = (*EELicense)(nil) @@ -41,6 +42,13 @@ func (e *EELicense) IsValid() bool { return e.contents != nil && e.contents.IsValid() } +func (e *EELicense) ExpiresAt() time.Time { + if e.contents == nil { + return time.Now().UTC() + } + return e.contents.ExpiresAt +} + // Retrieves the EE license from the environment // If not enabled, will still return valid struct. // Errors if not able to properly parse a provided EE license from the environment diff --git a/internal/gob/gob.go b/internal/gob/gob.go new file mode 100644 index 0000000000..1a421c96c9 --- /dev/null +++ b/internal/gob/gob.go @@ -0,0 +1,35 @@ +package gob + +import ( + "encoding/gob" + "time" + + dynamotypes "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" + "github.com/jackc/pgx/v5/pgtype" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" +) + +// need to register all the types that are used in the connection data service +// because we use interfaces for the types +func RegisterGobTypes() { + gob.Register(map[string]any{}) + gob.Register(pgtype.Numeric{}) // TODO fix this + gob.Register([]any{}) + gob.Register(time.Time{}) + gob.Register([][]uint8{}) + gob.RegisterName("neosynctypes.NeosyncDateTime", &neosynctypes.NeosyncDateTime{}) + gob.RegisterName("neosynctypes.Bits", &neosynctypes.Bits{}) + gob.RegisterName("neosynctypes.Binary", &neosynctypes.Binary{}) + gob.RegisterName("neosynctypes.NeosyncArray", &neosynctypes.NeosyncArray{}) + gob.RegisterName("neosynctypes.Interval", &neosynctypes.Interval{}) + gob.RegisterName("dynamodb.AttributeValueMemberB", &dynamotypes.AttributeValueMemberB{}) + gob.RegisterName("dynamodb.AttributeValueMemberBOOL", &dynamotypes.AttributeValueMemberBOOL{}) + gob.RegisterName("dynamodb.AttributeValueMemberBS", &dynamotypes.AttributeValueMemberBS{}) + gob.RegisterName("dynamodb.AttributeValueMemberL", &dynamotypes.AttributeValueMemberL{}) + gob.RegisterName("dynamodb.AttributeValueMemberM", &dynamotypes.AttributeValueMemberM{}) + gob.RegisterName("dynamodb.AttributeValueMemberN", &dynamotypes.AttributeValueMemberN{}) + gob.RegisterName("dynamodb.AttributeValueMemberNS", &dynamotypes.AttributeValueMemberNS{}) + gob.RegisterName("dynamodb.AttributeValueMemberNULL", &dynamotypes.AttributeValueMemberNULL{}) + gob.RegisterName("dynamodb.AttributeValueMemberS", &dynamotypes.AttributeValueMemberS{}) + gob.RegisterName("dynamodb.AttributeValueMemberSS", &dynamotypes.AttributeValueMemberSS{}) +} diff --git a/internal/mysql/mysql.go b/internal/mysql/mysql.go index 6f183f44c3..930dd32992 100644 --- a/internal/mysql/mysql.go +++ b/internal/mysql/mysql.go @@ -4,8 +4,9 @@ import ( "database/sql" "encoding/json" "strings" + "time" - "github.com/nucleuscloud/neosync/internal/sqlscanners" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" ) func MysqlSqlRowToMap(rows *sql.Rows) (map[string]any, error) { @@ -25,13 +26,7 @@ func MysqlSqlRowToMap(rows *sql.Rows) (map[string]any, error) { values := make([]any, len(columnNames)) valuesWrapped := make([]any, 0, len(columnNames)) for i := range values { - colType := cTypes[i].DatabaseTypeName() - if isBitDataType(colType) { - values[i] = &sqlscanners.BitString{} - valuesWrapped = append(valuesWrapped, values[i]) - } else { - valuesWrapped = append(valuesWrapped, &values[i]) - } + valuesWrapped = append(valuesWrapped, &values[i]) } if err := rows.Scan(valuesWrapped...); err != nil { return nil, err @@ -47,8 +42,13 @@ func parseMysqlRowValues(values []any, columnNames, columnDbTypes []string) map[ col := columnNames[i] colDataType := columnDbTypes[i] switch t := v.(type) { - case string: - jObj[col] = t + case time.Time: + dt, err := neosynctypes.NewDateTimeFromMysql(t) + if err != nil { + jObj[col] = t + continue + } + jObj[col] = dt case []byte: if IsJsonDataType(colDataType) { var js any @@ -56,18 +56,23 @@ func parseMysqlRowValues(values []any, columnNames, columnDbTypes []string) map[ jObj[col] = js continue } - } - if isBinaryDataType(colDataType) { - jObj[col] = t + } else if isBinaryDataType(colDataType) { + binary, err := neosynctypes.NewBinaryFromMysql(t) + if err != nil { + jObj[col] = t + continue + } + jObj[col] = binary + } else if isBitDataType(colDataType) || strings.EqualFold(colDataType, "varbit") { + bits, err := neosynctypes.NewBitsFromMysql(t) + if err != nil { + jObj[col] = t + continue + } + jObj[col] = bits } else { jObj[col] = string(t) } - case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - jObj[col] = t - case float32, float64: - jObj[col] = t - case bool: - jObj[col] = t default: jObj[col] = t } diff --git a/internal/mysql/mysql_test.go b/internal/mysql/mysql_test.go index 7c0fc8892d..772ebf4600 100644 --- a/internal/mysql/mysql_test.go +++ b/internal/mysql/mysql_test.go @@ -3,10 +3,11 @@ package mysql import ( "testing" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" "github.com/stretchr/testify/require" ) -func Test_parsePgRowValues(t *testing.T) { +func Test_parseMysqlRowValues(t *testing.T) { t.Run("Multiple Columns", func(t *testing.T) { binaryData := []byte{0x01, 0x02, 0x03} @@ -32,12 +33,20 @@ func Test_parsePgRowValues(t *testing.T) { } result := parseMysqlRowValues(values, columnNames, cTypes) expected := map[string]any{ - "text_col": "Hello", - "int_col": int64(42), - "bool_col": true, - "nil_col": nil, - "json_col": map[string]any{"key": "value"}, - "binary_col": binaryData, + "text_col": "Hello", + "int_col": int64(42), + "bool_col": true, + "nil_col": nil, + "json_col": map[string]any{"key": "value"}, + "binary_col": &neosynctypes.Binary{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_BINARY", + }, + }, + Bytes: binaryData, + }, } require.Equal(t, expected, result) }) diff --git a/internal/neosync-types/array.go b/internal/neosync-types/array.go index f1fedf8249..e998f23078 100644 --- a/internal/neosync-types/array.go +++ b/internal/neosync-types/array.go @@ -3,6 +3,7 @@ package neosynctypes import ( "fmt" + "github.com/lib/pq" "github.com/nucleuscloud/neosync/internal/gotypeutil" ) @@ -61,7 +62,7 @@ func (a *NeosyncArray) ValuePgx() (any, error) { } values[i] = v } - return values, nil + return pq.Array(values), nil } func (a *NeosyncArray) ScanJson(value any) error { @@ -91,3 +92,39 @@ func (a *NeosyncArray) ValueJson() (any, error) { } return values, nil } + +func (a *NeosyncArray) ScanMysql(value any) error { + valueSlice, err := gotypeutil.ParseSlice(value) + if err != nil { + return err + } + if len(valueSlice) != len(a.Elements) { + return fmt.Errorf("length mismatch: got %d elements, expected %d", len(valueSlice), len(a.Elements)) + } + for i, v := range valueSlice { + if err := a.Elements[i].ScanMysql(v); err != nil { + return fmt.Errorf("scanning element %d: %w", i, err) + } + } + return nil +} + +func (a *NeosyncArray) ValueMysql() (any, error) { + values := make([]any, len(a.Elements)) + for i, e := range a.Elements { + v, err := e.ValueMysql() + if err != nil { + return nil, fmt.Errorf("getting value for element %d: %w", i, err) + } + values[i] = v + } + return values, nil +} + +func (a *NeosyncArray) ScanMssql(value any) error { + return a.ScanMysql(value) +} + +func (a *NeosyncArray) ValueMssql() (any, error) { + return a.ValueMysql() +} diff --git a/internal/neosync-types/array_test.go b/internal/neosync-types/array_test.go index 666dd2a72b..902d597a95 100644 --- a/internal/neosync-types/array_test.go +++ b/internal/neosync-types/array_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/jackc/pgx/v5/pgtype" + "github.com/lib/pq" "github.com/stretchr/testify/require" ) @@ -98,21 +99,12 @@ func Test_NeosyncArray(t *testing.T) { value, err := array.ValuePgx() require.NoError(t, err) - values, ok := value.([]interface{}) + values, ok := value.(pq.GenericArray) require.True(t, ok) - require.Len(t, values, 2) - - pgInterval1, ok := values[0].(*pgtype.Interval) - require.True(t, ok) - require.Equal(t, int64(1000000), pgInterval1.Microseconds) - require.Equal(t, int32(7), pgInterval1.Days) - require.Equal(t, int32(1), pgInterval1.Months) - pgInterval2, ok := values[1].(*pgtype.Interval) - require.True(t, ok) - require.Equal(t, int64(2000000), pgInterval2.Microseconds) - require.Equal(t, int32(14), pgInterval2.Days) - require.Equal(t, int32(2), pgInterval2.Months) + arrValues, err := values.Value() + require.NoError(t, err) + require.Equal(t, `{"1 mon 7 day 00:00:01","2 mon 14 day 00:00:02"}`, arrValues) }) t.Run("ScanJson handles type mismatch", func(t *testing.T) { diff --git a/internal/neosync-types/binary.go b/internal/neosync-types/binary.go new file mode 100644 index 0000000000..fd231a0b86 --- /dev/null +++ b/internal/neosync-types/binary.go @@ -0,0 +1,127 @@ +package neosynctypes + +type Binary struct { + BaseType `json:",inline"` + JsonScanner `json:"-"` + Bytes []byte `json:"bytes"` +} + +func (b *Binary) ScanPgx(value any) error { + if value == nil { + return nil + } + b.Bytes = value.([]byte) + return nil +} + +func (b *Binary) ValuePgx() (any, error) { + if b == nil || b.Bytes == nil { + return nil, nil + } + return b.Bytes, nil +} + +func (b *Binary) ScanMysql(value any) error { + if value == nil { + return nil + } + b.Bytes = value.([]byte) + return nil +} + +func (b *Binary) ValueMysql() (any, error) { + if b == nil || b.Bytes == nil { + return nil, nil + } + return b.Bytes, nil +} + +func (b *Binary) ScanMssql(value any) error { + return b.ScanMysql(value) +} + +func (b *Binary) ValueMssql() (any, error) { + if b == nil || b.Bytes == nil { + return nil, nil + } + return b.Bytes, nil +} + +func (b *Binary) ScanJson(value any) error { + return b.JsonScanner.ScanJson(value, b) +} + +func (b *Binary) ValueJson() (any, error) { + return b.JsonScanner.ValueJson(b) +} + +func (b *Binary) setVersion(v Version) { + b.Neosync.Version = v +} + +func (b *Binary) GetVersion() Version { + return b.Neosync.Version +} + +func NewBinary(opts ...NeosyncTypeOption) (*Binary, error) { + binary := &Binary{} + binary.Neosync.TypeId = NeosyncBinaryId + binary.setVersion(LatestVersion) + + if err := applyOptions(binary, opts...); err != nil { + return nil, err + } + return binary, nil +} + +func NewBinaryFromPgx(value any, opts ...NeosyncTypeOption) (*Binary, error) { + binary, err := NewBinary(opts...) + if err != nil { + return nil, err + } + err = binary.ScanPgx(value) + if err != nil { + return nil, err + } + return binary, nil +} + +func NewBinaryFromMysql(value any, opts ...NeosyncTypeOption) (*Binary, error) { + binary, err := NewBinary(opts...) + if err != nil { + return nil, err + } + err = binary.ScanMysql(value) + if err != nil { + return nil, err + } + return binary, nil +} + +func NewBinaryFromMssql(value any, opts ...NeosyncTypeOption) (*Binary, error) { + binary, err := NewBinary(opts...) + if err != nil { + return nil, err + } + err = binary.ScanMssql(value) + if err != nil { + return nil, err + } + return binary, nil +} + +func NewBinaryArrayFromPgx(elements [][]byte, opts []NeosyncTypeOption, arrayOpts ...NeosyncTypeOption) (*NeosyncArray, error) { + neosyncAdapters := make([]NeosyncAdapter, len(elements)) + for i, e := range elements { + newBinary, err := NewBinary(opts...) + if err != nil { + return nil, err + } + neosyncAdapters[i] = newBinary + err = neosyncAdapters[i].ScanPgx(e) + if err != nil { + return nil, err + } + } + return NewNeosyncArray(neosyncAdapters) +} diff --git a/internal/neosync-types/bits.go b/internal/neosync-types/bits.go new file mode 100644 index 0000000000..889f6e1c8f --- /dev/null +++ b/internal/neosync-types/bits.go @@ -0,0 +1,143 @@ +package neosynctypes + +import ( + "fmt" + "math" + + "github.com/jackc/pgx/v5/pgtype" +) + +type Bits struct { + BaseType `json:",inline"` + JsonScanner `json:"-"` + Bytes []byte `json:"bytes"` + Len int32 `json:"len"` +} + +func (b *Bits) ScanPgx(value any) error { + if value == nil { + return nil + } + bits, ok := value.(*pgtype.Bits) + if !ok { + return fmt.Errorf("expected *pgtype.Bit, got %T", value) + } + b.Bytes = bits.Bytes + b.Len = bits.Len + return nil +} + +func (b *Bits) ValuePgx() (any, error) { + return &pgtype.Bits{ + Bytes: b.Bytes, + Len: b.Len, + Valid: true, + }, nil +} + +func (b *Bits) ScanMysql(value any) error { + if value == nil { + return nil + } + bits, ok := value.([]byte) + if !ok { + return fmt.Errorf("expected *sqlscanners.BitString, got %T", value) + } + if len(bits) > math.MaxInt32 { + return fmt.Errorf("bit string length %d exceeds maximum int32 value", len(bits)) + } + b.Bytes = bits + b.Len = int32(len(bits)) //nolint:gosec + return nil +} + +func (b *Bits) ScanMssql(value any) error { + return b.ScanMysql(value) +} + +func (b *Bits) ValueMssql() (any, error) { + return b.ValueMysql() +} + +func (b *Bits) ValueMysql() (any, error) { + return b.Bytes, nil +} + +func (b *Bits) ScanJson(value any) error { + return b.JsonScanner.ScanJson(value, b) +} + +func (b *Bits) ValueJson() (any, error) { + return b.JsonScanner.ValueJson(b) +} + +func (b *Bits) setVersion(v Version) { + b.Neosync.Version = v +} + +func (b *Bits) GetVersion() Version { + return b.Neosync.Version +} + +func NewBitsFromPgx(value any, opts ...NeosyncTypeOption) (*Bits, error) { + bits, err := NewBits(opts...) + if err != nil { + return nil, err + } + err = bits.ScanPgx(value) + if err != nil { + return nil, err + } + return bits, nil +} + +func NewBitsFromMysql(value any, opts ...NeosyncTypeOption) (*Bits, error) { + bits, err := NewBits(opts...) + if err != nil { + return nil, err + } + err = bits.ScanMysql(value) + if err != nil { + return nil, err + } + return bits, nil +} + +func NewBitsFromMssql(value any, opts ...NeosyncTypeOption) (*Bits, error) { + bits, err := NewBits(opts...) + if err != nil { + return nil, err + } + err = bits.ScanMssql(value) + if err != nil { + return nil, err + } + return bits, nil +} + +func NewBits(opts ...NeosyncTypeOption) (*Bits, error) { + bits := &Bits{} + bits.Neosync.TypeId = NeosyncBitsId + bits.setVersion(LatestVersion) + + if err := applyOptions(bits, opts...); err != nil { + return nil, err + } + return bits, nil +} + +func NewBitsArrayFromPgx(elements []*pgtype.Bits, opts []NeosyncTypeOption, arrayOpts ...NeosyncTypeOption) (*NeosyncArray, error) { + neosyncAdapters := make([]NeosyncAdapter, len(elements)) + for i, e := range elements { + newBits, err := NewBits(opts...) + if err != nil { + return nil, err + } + neosyncAdapters[i] = newBits + err = neosyncAdapters[i].ScanPgx(e) + if err != nil { + return nil, err + } + } + return NewNeosyncArray(neosyncAdapters) +} diff --git a/internal/neosync-types/datetime.go b/internal/neosync-types/datetime.go new file mode 100644 index 0000000000..ba2ac0c548 --- /dev/null +++ b/internal/neosync-types/datetime.go @@ -0,0 +1,339 @@ +package neosynctypes + +import ( + "fmt" + "time" + + "github.com/jackc/pgx/v5/pgtype" +) + +type NeosyncDateTime struct { + BaseType `json:",inline"` + JsonScanner `json:"-"` + + Year int `json:"year"` // Absolute year number (converted to negative for BC dates) + Month int `json:"month"` // 1-12 + Day int `json:"day"` // 1-31 + Hour int `json:"hour"` // 0-23 + Minute int `json:"minute"` // 0-59 + Second int `json:"second"` // 0-59 + Nano int `json:"nano"` // 0-999999999 + + TimeZone string `json:"timezone,omitempty"` + Precision int8 `json:"precision,omitempty"` + IsBC bool `json:"is_bc,omitempty"` +} + +func (dt *NeosyncDateTime) setVersion(v Version) { + dt.Neosync.Version = v +} + +func (dt *NeosyncDateTime) GetVersion() Version { + return dt.Neosync.Version +} + +func (dt *NeosyncDateTime) ScanJson(value any) error { + return dt.JsonScanner.ScanJson(value, dt) +} + +func (dt *NeosyncDateTime) ValueJson() (any, error) { + return dt.JsonScanner.ValueJson(dt) +} + +func (dt *NeosyncDateTime) ScanPgx(value any) error { + if value == nil { + return nil + } + + var t time.Time + var valid bool + var tz string + + switch v := value.(type) { + case *pgtype.Timestamp: + if !v.Valid { + return nil + } + t = v.Time + valid = true + case *pgtype.Timestamptz: + if !v.Valid { + return nil + } + t = v.Time + valid = true + tz = t.Location().String() + case *pgtype.Date: + if !v.Valid { + return nil + } + t = v.Time + valid = true + tz = "UTC" + case time.Time: + t = v + valid = true + if loc := t.Location(); loc != time.UTC { + tz = loc.String() + } + default: + return fmt.Errorf("unsupported type for DateTime: %T", value) + } + + if !valid { + return nil + } + + dt.IsBC = t.Year() <= 0 + year := t.Year() + if dt.IsBC { + year = -year + 1 // Convert BC year to positive internal format + } + dt.Year = year + dt.Month = int(t.Month()) + dt.Day = t.Day() + dt.Hour = t.Hour() + dt.Minute = t.Minute() + dt.Second = t.Second() + dt.Nano = t.Nanosecond() + dt.TimeZone = tz + + return nil +} + +func (dt *NeosyncDateTime) ValuePgx() (any, error) { + year := dt.Year + if dt.IsBC { + return dt.handlePgxBCDate() + } + + if dt.TimeZone != "" { + loc, err := time.LoadLocation(dt.TimeZone) + if err != nil { + return nil, fmt.Errorf("invalid timezone: %w", err) + } + // Create the time directly in the target timezone + t := time.Date( + year, + time.Month(dt.Month), + dt.Day, + dt.Hour, + dt.Minute, + dt.Second, + dt.Nano, + loc, + ) + return &pgtype.Timestamptz{Time: t, Valid: true}, nil + } + + // For non-timezone times, create in UTC + t := time.Date( + year, + time.Month(dt.Month), + dt.Day, + dt.Hour, + dt.Minute, + dt.Second, + dt.Nano, + time.UTC, + ) + + // If precision is -1, treat as date + if dt.Precision == -1 { + return &pgtype.Date{Time: t, Valid: true}, nil + } + + return &pgtype.Timestamp{Time: t, Valid: true}, nil +} + +func (dt *NeosyncDateTime) handlePgxBCDate() (any, error) { + year := -dt.Year + 1 // Convert to BC year + + t := time.Date( + year, + time.Month(dt.Month), + dt.Day, + dt.Hour, + dt.Minute, + dt.Second, + dt.Nano, + time.UTC, + ) + + if dt.TimeZone != "" { + return &pgtype.Timestamptz{Time: t, Valid: true}, nil + } + + if dt.Precision == -1 { + return &pgtype.Date{Time: t, Valid: true}, nil + } + + return &pgtype.Timestamp{Time: t, Valid: true}, nil +} + +func (dt *NeosyncDateTime) ScanMysql(value any) error { + if value == nil { + return nil + } + + switch v := value.(type) { + case time.Time: + dt.IsBC = v.Year() <= 0 + year := v.Year() + if dt.IsBC { + year = -year + 1 // Convert BC year to positive internal format + } + dt.Year = year + dt.Month = int(v.Month()) + dt.Day = v.Day() + dt.Hour = v.Hour() + dt.Minute = v.Minute() + dt.Second = v.Second() + dt.Nano = v.Nanosecond() + if loc := v.Location(); loc != time.UTC { + dt.TimeZone = loc.String() + } + return nil + default: + return fmt.Errorf("unsupported type for DateTime: %T", value) + } +} + +func (dt *NeosyncDateTime) ValueMysql() (any, error) { + year := dt.Year + if dt.IsBC { + year = -year + 1 // Convert to BC year + } + + loc := time.UTC + if dt.TimeZone != "" { + var err error + loc, err = time.LoadLocation(dt.TimeZone) + if err != nil { + return nil, fmt.Errorf("invalid timezone: %w", err) + } + } + + t := time.Date( + year, + time.Month(dt.Month), + dt.Day, + dt.Hour, + dt.Minute, + dt.Second, + dt.Nano, + loc, + ) + + // For dates with only year/month/day, return as DATE + if dt.Hour == 0 && dt.Minute == 0 && dt.Second == 0 && dt.Nano == 0 { + return t.Format(time.DateOnly), nil + } + + // Otherwise return as DATETIME + return t.Format(time.DateTime), nil +} + +func (dt *NeosyncDateTime) ScanMssql(value any) error { + if value == nil { + return nil + } + + switch v := value.(type) { + case time.Time: + dt.Year = v.Year() + dt.Month = int(v.Month()) + dt.Day = v.Day() + dt.Hour = v.Hour() + dt.Minute = v.Minute() + dt.Second = v.Second() + dt.Nano = v.Nanosecond() + dt.TimeZone = v.Format("-07:00") + return nil + default: + return fmt.Errorf("unsupported type for DateTime: %T", value) + } +} + +func (dt *NeosyncDateTime) ValueMssql() (any, error) { + year := dt.Year + + loc := time.UTC + if dt.TimeZone != "" { + // Handle timezone offset format like "+02:00" + offset, err := time.Parse("-07:00", dt.TimeZone) + if err == nil { + // Convert the parsed time's UTC offset into seconds + _, offsetSeconds := offset.Zone() + loc = time.FixedZone("", offsetSeconds) + } else { + // Try loading as named timezone if not an offset + var tzErr error + loc, tzErr = time.LoadLocation(dt.TimeZone) + if tzErr != nil { + return nil, fmt.Errorf("invalid timezone: %w", tzErr) + } + } + } + + t := time.Date( + year, + time.Month(dt.Month), + dt.Day, + dt.Hour, + dt.Minute, + dt.Second, + dt.Nano, + loc, + ) + + // For dates with only year/month/day, return as DATE + if dt.Hour == 0 && dt.Minute == 0 && dt.Second == 0 && dt.Nano == 0 { + return t.Format(time.DateOnly), nil + } + + return t, nil +} + +func NewDateTimeFromMysql(value any, opts ...NeosyncTypeOption) (*NeosyncDateTime, error) { + dt, err := NewDateTime(opts...) + if err != nil { + return nil, err + } + if err := dt.ScanMysql(value); err != nil { + return nil, err + } + return dt, nil +} + +func NewDateTimeFromMssql(value any, opts ...NeosyncTypeOption) (*NeosyncDateTime, error) { + dt, err := NewDateTime(opts...) + if err != nil { + return nil, err + } + if err := dt.ScanMssql(value); err != nil { + return nil, err + } + return dt, nil +} + +func NewDateTimeFromPgx(value any, opts ...NeosyncTypeOption) (*NeosyncDateTime, error) { + dt, err := NewDateTime(opts...) + if err != nil { + return nil, err + } + if err := dt.ScanPgx(value); err != nil { + return nil, err + } + return dt, nil +} + +func NewDateTime(opts ...NeosyncTypeOption) (*NeosyncDateTime, error) { + dt := &NeosyncDateTime{} + dt.Neosync.TypeId = NeosyncDateTimeId + dt.setVersion(LatestVersion) + if err := applyOptions(dt, opts...); err != nil { + return nil, err + } + return dt, nil +} diff --git a/internal/neosync-types/datetime_test.go b/internal/neosync-types/datetime_test.go new file mode 100644 index 0000000000..8e3955ca5d --- /dev/null +++ b/internal/neosync-types/datetime_test.go @@ -0,0 +1,318 @@ +package neosynctypes + +import ( + "testing" + "time" + + "github.com/jackc/pgx/v5/pgtype" + "github.com/stretchr/testify/assert" +) + +func TestNeosyncDateTime(t *testing.T) { + t.Run("ScanPgx_Timestamp", func(t *testing.T) { + dt := &NeosyncDateTime{} + ts := &pgtype.Timestamp{ + Time: time.Date(2023, 6, 15, 14, 30, 45, 123456789, time.UTC), + Valid: true, + } + + err := dt.ScanPgx(ts) + assert.NoError(t, err) + assert.Equal(t, 2023, dt.Year) + assert.Equal(t, 6, dt.Month) + assert.Equal(t, 15, dt.Day) + assert.Equal(t, 14, dt.Hour) + assert.Equal(t, 30, dt.Minute) + assert.Equal(t, 45, dt.Second) + assert.Equal(t, 123456789, dt.Nano) + assert.Empty(t, dt.TimeZone) + assert.False(t, dt.IsBC) + }) + + t.Run("ScanPgx_TimestampBC", func(t *testing.T) { + dt := &NeosyncDateTime{} + ts := &pgtype.Timestamp{ + Time: time.Date(-44, 3, 15, 12, 0, 0, 0, time.UTC), + Valid: true, + } + + err := dt.ScanPgx(ts) + assert.NoError(t, err) + assert.Equal(t, 45, dt.Year) + assert.Equal(t, 3, dt.Month) + assert.Equal(t, 15, dt.Day) + assert.True(t, dt.IsBC) + }) + + t.Run("ScanPgx_Timestamptz", func(t *testing.T) { + dt := &NeosyncDateTime{} + loc := time.FixedZone("UTC+1", 3600) + ts := &pgtype.Timestamptz{ + Time: time.Date(2023, 12, 25, 23, 59, 59, 999999999, loc), + Valid: true, + } + + err := dt.ScanPgx(ts) + assert.NoError(t, err) + assert.Equal(t, 2023, dt.Year) + assert.Equal(t, 12, dt.Month) + assert.Equal(t, 25, dt.Day) + assert.Equal(t, 23, dt.Hour) + assert.Equal(t, 59, dt.Minute) + assert.Equal(t, 59, dt.Second) + assert.Equal(t, 999999999, dt.Nano) + assert.Equal(t, "UTC+1", dt.TimeZone) + }) + + t.Run("ScanPgx_Date", func(t *testing.T) { + dt := &NeosyncDateTime{} + d := &pgtype.Date{ + Time: time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC), + Valid: true, + } + + err := dt.ScanPgx(d) + assert.NoError(t, err) + assert.Equal(t, 2000, dt.Year) + assert.Equal(t, 1, dt.Month) + assert.Equal(t, 1, dt.Day) + assert.Equal(t, 0, dt.Hour) + assert.Equal(t, 0, dt.Minute) + assert.Equal(t, 0, dt.Second) + assert.Equal(t, 0, dt.Nano) + assert.Equal(t, "UTC", dt.TimeZone) + }) + + t.Run("ScanPgx_TimeTime", func(t *testing.T) { + dt := &NeosyncDateTime{} + loc := time.FixedZone("UTC+2", 7200) + tt := time.Date(2024, 3, 18, 10, 30, 45, 123456789, loc) + + err := dt.ScanPgx(tt) + assert.NoError(t, err) + assert.Equal(t, 2024, dt.Year) + assert.Equal(t, 3, dt.Month) + assert.Equal(t, 18, dt.Day) + assert.Equal(t, 10, dt.Hour) + assert.Equal(t, 30, dt.Minute) + assert.Equal(t, 45, dt.Second) + assert.Equal(t, 123456789, dt.Nano) + assert.Equal(t, "UTC+2", dt.TimeZone) + }) + + t.Run("ScanPgx_TimeTime_UTC", func(t *testing.T) { + dt := &NeosyncDateTime{} + tt := time.Date(2024, 3, 18, 10, 30, 45, 123456789, time.UTC) + + err := dt.ScanPgx(tt) + assert.NoError(t, err) + assert.Equal(t, 2024, dt.Year) + assert.Equal(t, 3, dt.Month) + assert.Equal(t, 18, dt.Day) + assert.Equal(t, 10, dt.Hour) + assert.Equal(t, 30, dt.Minute) + assert.Equal(t, 45, dt.Second) + assert.Equal(t, 123456789, dt.Nano) + assert.Empty(t, dt.TimeZone) + }) + + t.Run("ScanPgx_TimeTime_BC", func(t *testing.T) { + dt := &NeosyncDateTime{} + tt := time.Date(-44, 3, 15, 12, 0, 0, 0, time.UTC) + + err := dt.ScanPgx(tt) + assert.NoError(t, err) + assert.Equal(t, 45, dt.Year) + assert.Equal(t, 3, dt.Month) + assert.Equal(t, 15, dt.Day) + assert.Equal(t, 12, dt.Hour) + assert.Equal(t, 0, dt.Minute) + assert.Equal(t, 0, dt.Second) + assert.Equal(t, 0, dt.Nano) + assert.True(t, dt.IsBC) + }) + + t.Run("ValuePgx_Timestamp", func(t *testing.T) { + dt := &NeosyncDateTime{ + Year: 2023, + Month: 7, + Day: 4, + Hour: 16, + Minute: 20, + Second: 30, + Nano: 500000000, + } + + val, err := dt.ValuePgx() + assert.NoError(t, err) + ts, ok := val.(*pgtype.Timestamp) + assert.True(t, ok) + assert.True(t, ts.Valid) + assert.Equal(t, time.Date(2023, 7, 4, 16, 20, 30, 500000000, time.UTC), ts.Time) + }) + + t.Run("ValuePgx_TimestampBC", func(t *testing.T) { + dt := &NeosyncDateTime{ + Year: 100, + Month: 1, + Day: 1, + IsBC: true, + } + + val, err := dt.ValuePgx() + assert.NoError(t, err) + ts, ok := val.(*pgtype.Timestamp) + assert.True(t, ok) + assert.True(t, ts.Valid) + assert.Equal(t, time.Date(-99, 1, 1, 0, 0, 0, 0, time.UTC), ts.Time) + }) + + t.Run("ValuePgx_DateBC", func(t *testing.T) { + dt := &NeosyncDateTime{ + Year: 100, + Month: 1, + Day: 1, + IsBC: true, + Precision: -1, + } + + val, err := dt.ValuePgx() + assert.NoError(t, err) + d, ok := val.(*pgtype.Date) + assert.True(t, ok) + assert.True(t, d.Valid) + assert.Equal(t, time.Date(-99, 1, 1, 0, 0, 0, 0, time.UTC), d.Time) + }) + + t.Run("ValuePgx_TimestamptzBC", func(t *testing.T) { + dt := &NeosyncDateTime{ + Year: 100, + Month: 7, + Day: 4, + Hour: 16, + Minute: 20, + Second: 30, + IsBC: true, + TimeZone: "America/New_York", + } + + val, err := dt.ValuePgx() + assert.NoError(t, err) + tstz, ok := val.(*pgtype.Timestamptz) + assert.True(t, ok) + assert.True(t, tstz.Valid) + assert.Equal(t, time.Date(-99, 7, 4, 16, 20, 30, 0, time.UTC), tstz.Time) + }) + + t.Run("ValuePgx_Date", func(t *testing.T) { + dt := &NeosyncDateTime{ + Year: 2024, + Month: 2, + Day: 29, + Precision: -1, + } + + val, err := dt.ValuePgx() + assert.NoError(t, err) + d, ok := val.(*pgtype.Date) + assert.True(t, ok) + assert.True(t, d.Valid) + assert.Equal(t, time.Date(2024, 2, 29, 0, 0, 0, 0, time.UTC), d.Time) + }) + + t.Run("ValuePgx_Timestamptz", func(t *testing.T) { + dt := &NeosyncDateTime{ + Year: 2023, + Month: 8, + Day: 15, + Hour: 13, + Minute: 45, + Second: 0, + TimeZone: "America/New_York", + } + + val, err := dt.ValuePgx() + assert.NoError(t, err) + tstz, ok := val.(*pgtype.Timestamptz) + assert.True(t, ok) + assert.True(t, tstz.Valid) + loc, _ := time.LoadLocation("America/New_York") + assert.Equal(t, time.Date(2023, 8, 15, 13, 45, 0, 0, loc), tstz.Time) + }) + + t.Run("ValueMysql_DateTime", func(t *testing.T) { + dt := &NeosyncDateTime{ + Year: 2023, + Month: 8, + Day: 15, + Hour: 13, + Minute: 45, + Second: 30, + TimeZone: "America/New_York", + } + + val, err := dt.ValueMysql() + assert.NoError(t, err) + assert.Equal(t, "2023-08-15 13:45:30", val) + }) + + t.Run("ValueMysql_Date", func(t *testing.T) { + dt := &NeosyncDateTime{ + Year: 2024, + Month: 2, + Day: 29, + } + + val, err := dt.ValueMysql() + assert.NoError(t, err) + assert.Equal(t, "2024-02-29", val) + }) + + t.Run("ValueMysql_BC", func(t *testing.T) { + dt := &NeosyncDateTime{ + Year: 100, + Month: 7, + Day: 4, + Hour: 16, + Minute: 20, + Second: 30, + IsBC: true, + TimeZone: "America/New_York", + } + + val, err := dt.ValueMysql() + assert.NoError(t, err) + assert.Equal(t, "-0099-07-04 16:20:30", val) + }) + + t.Run("ScanMysql", func(t *testing.T) { + dt := &NeosyncDateTime{} + loc, _ := time.LoadLocation("America/New_York") + err := dt.ScanMysql(time.Date(2023, 8, 15, 13, 45, 30, 0, loc)) + assert.NoError(t, err) + + assert.Equal(t, 2023, dt.Year) + assert.Equal(t, 8, dt.Month) + assert.Equal(t, 15, dt.Day) + assert.Equal(t, 13, dt.Hour) + assert.Equal(t, 45, dt.Minute) + assert.Equal(t, 30, dt.Second) + assert.Equal(t, "America/New_York", dt.TimeZone) + }) + + t.Run("ScanMysql_BC", func(t *testing.T) { + dt := &NeosyncDateTime{} + loc, _ := time.LoadLocation("America/New_York") + err := dt.ScanMysql(time.Date(-99, 7, 4, 16, 20, 30, 0, loc)) + assert.NoError(t, err) + + assert.Equal(t, 100, dt.Year) + assert.Equal(t, 7, dt.Month) + assert.Equal(t, 4, dt.Day) + assert.Equal(t, 16, dt.Hour) + assert.Equal(t, 20, dt.Minute) + assert.Equal(t, 30, dt.Second) + assert.Equal(t, "America/New_York", dt.TimeZone) + assert.True(t, dt.IsBC) + }) +} diff --git a/internal/neosync-types/interval.go b/internal/neosync-types/interval.go index 5245cd49d1..c43ef2b444 100644 --- a/internal/neosync-types/interval.go +++ b/internal/neosync-types/interval.go @@ -1,6 +1,7 @@ package neosynctypes import ( + "errors" "fmt" "github.com/jackc/pgx/v5/pgtype" @@ -48,6 +49,22 @@ func (i *Interval) ValueJson() (any, error) { return i.JsonScanner.ValueJson(i) } +func (i *Interval) ScanMysql(value any) error { + return errors.ErrUnsupported +} + +func (i *Interval) ValueMysql() (any, error) { + return nil, errors.ErrUnsupported +} + +func (i *Interval) ScanMssql(value any) error { + return errors.ErrUnsupported +} + +func (i *Interval) ValueMssql() (any, error) { + return nil, errors.ErrUnsupported +} + func (i *Interval) setVersion(v Version) { i.Neosync.Version = v } diff --git a/internal/neosync-types/registry.go b/internal/neosync-types/registry.go index 2ef41789a1..937f9080be 100644 --- a/internal/neosync-types/registry.go +++ b/internal/neosync-types/registry.go @@ -6,6 +6,10 @@ import ( "log/slog" ) +type NeosyncTypeRegistry interface { + Unmarshal(value any) (any, error) +} + type TypeRegistry struct { logger *slog.Logger types map[string]map[Version]func() (NeosyncAdapter, error) @@ -25,6 +29,18 @@ func NewTypeRegistry(logger *slog.Logger) *TypeRegistry { return NewNeosyncArray([]NeosyncAdapter{}, WithVersion(LatestVersion)) }) + registry.Register(NeosyncBitsId, LatestVersion, func() (NeosyncAdapter, error) { + return NewBits(WithVersion(LatestVersion)) + }) + + registry.Register(NeosyncBinaryId, LatestVersion, func() (NeosyncAdapter, error) { + return NewBinary(WithVersion(LatestVersion)) + }) + + registry.Register(NeosyncDateTimeId, LatestVersion, func() (NeosyncAdapter, error) { + return NewDateTime(WithVersion(LatestVersion)) + }) + return registry } @@ -55,52 +71,40 @@ func (r *TypeRegistry) New(typeId string, version Version) (NeosyncAdapter, erro return nil, fmt.Errorf("unknown version %d for type Id: %s. latest version not found.", version, typeId) } -// Unmarshal deserializes JSON data into an appropriate type based on the Neosync type system. -// It handles both regular JSON data and specialized Neosync objects that contain type information -// in a "_neosync" metadata field. +// UnmarshalAny deserializes a value of type any into an appropriate type based on the Neosync type system. +// It handles specialized Neosync objects that contain type information in a "_neosync" metadata field. // // Parameters: -// - data: []byte - Raw JSON data to unmarshal +// - value: any - The value to unmarshal, expected to be map[string]any // // Returns: // - any: The unmarshaled object, which could be: -// - The original data if it's not valid JSON +// - The original value if it's not a map[string]any // - A new instance of the appropriate type for Neosync objects // - A NeosyncArray containing unmarshaled elements for array types -// -// Special handling for arrays: -// When typeId is NeosyncArrayId, each element in the array is recursively -// unmarshaled and must implement the NeosyncAdapter interface. -func (r *TypeRegistry) Unmarshal(data []byte) (any, error) { - isValidJson := json.Valid(data) - if !isValidJson { - return data, nil - } - var anyValue any - if err := json.Unmarshal(data, &anyValue); err != nil { - return nil, err - } - - rawMsg, ok := anyValue.(map[string]any) +func (r *TypeRegistry) Unmarshal(value any) (any, error) { + rawMsg, ok := getMapFromAny(value) if !ok { - return data, nil + return value, nil } neosyncRaw, ok := rawMsg["_neosync"].(map[string]any) if !ok { - r.logger.Debug("JSON data not a neosync type") - return data, nil + r.logger.Debug("value not a neosync type") + return value, nil } typeId, ok := neosyncRaw["type_id"].(string) if !ok { - r.logger.Debug("JSON data missing _neosync.type_id field") - return data, nil + r.logger.Debug("value missing _neosync.type_id field") + return value, nil } - version, ok := neosyncRaw["version"].(Version) - if !ok { - r.logger.Debug("JSON data missing _neosync.version. Using latest version instead.") + var version Version + if versionRaw, ok := neosyncRaw["version"].(float64); ok { + version = Version(uint(versionRaw)) + } else { + r.logger.Debug("value missing _neosync.version. Using latest version instead.") version = LatestVersion } r.logger.Debug(fmt.Sprintf("Neosync type %s version %d", typeId, version)) @@ -121,13 +125,8 @@ func (r *TypeRegistry) Unmarshal(data []byte) (any, error) { neosyncArray.Elements = make([]NeosyncAdapter, len(elements)) for i, element := range elements { - elementBytes, err := json.Marshal(element) - if err != nil { - return nil, fmt.Errorf("error marshaling array element %d: %w", i, err) - } - // Recursively unmarshal each element - unmarshaledElement, err := r.Unmarshal(elementBytes) + unmarshaledElement, err := r.Unmarshal(element) if err != nil { return nil, fmt.Errorf("error unmarshaling array element %d: %w", i, err) } @@ -142,9 +141,32 @@ func (r *TypeRegistry) Unmarshal(data []byte) (any, error) { return neosyncArray, nil } + // Convert back to JSON to use standard unmarshaling + data, err := json.Marshal(rawMsg) + if err != nil { + return nil, fmt.Errorf("error marshaling value: %w", err) + } + if err := json.Unmarshal(data, obj); err != nil { - return nil, err + return nil, fmt.Errorf("error unmarshaling value into neosync types: %w", err) } return obj, nil } + +func getMapFromAny(value any) (map[string]any, bool) { + // If value is already a map, return it + if rawMsg, ok := value.(map[string]any); ok { + return rawMsg, true + } + + // If value is bytes, try to unmarshal into a map + if rawBytes, ok := value.([]byte); ok && json.Valid(rawBytes) { + var rawMsg map[string]any + if err := json.Unmarshal(rawBytes, &rawMsg); err == nil { + return rawMsg, true + } + } + + return nil, false +} diff --git a/internal/neosync-types/registry_test.go b/internal/neosync-types/registry_test.go index c95df95d38..d83c6c6e1a 100644 --- a/internal/neosync-types/registry_test.go +++ b/internal/neosync-types/registry_test.go @@ -93,6 +93,26 @@ func Test_TypeRegistry(t *testing.T) { require.NotNil(t, interval) }) + t.Run("Unmarshal handles NeosyncInterval type in map[string]any", func(t *testing.T) { + registry := NewTypeRegistry(testutil.GetTestLogger(t)) + intervalMap := map[string]any{ + "_neosync": map[string]any{ + "type_id": "NEOSYNC_INTERVAL", + "version": 1, + }, + "microseconds": 1, + "days": 10, + "months": 0, + } + + result, err := registry.Unmarshal(intervalMap) + require.NoError(t, err) + + interval, ok := result.(NeosyncAdapter) + require.True(t, ok) + require.NotNil(t, interval) + }) + t.Run("Unmarshal handles NeosyncArray type", func(t *testing.T) { registry := NewTypeRegistry(testutil.GetTestLogger(t)) arrayJSON := []byte(`{ diff --git a/internal/neosync-types/types.go b/internal/neosync-types/types.go index e14d2b4bb1..aaa44b503c 100644 --- a/internal/neosync-types/types.go +++ b/internal/neosync-types/types.go @@ -13,22 +13,41 @@ const ( ) const ( - NeosyncIntervalId = "NEOSYNC_INTERVAL" NeosyncArrayId = "NEOSYNC_ARRAY" + NeosyncBitsId = "NEOSYNC_BIT" + NeosyncBinaryId = "NEOSYNC_BINARY" + NeosyncDateTimeId = "NEOSYNC_DATETIME" + NeosyncIntervalId = "NEOSYNC_INTERVAL" ) type NeosyncAdapter interface { NeosyncMetadataType + // Pgx ScanPgx(value any) error ValuePgx() (any, error) + // Json ScanJson(value any) error ValueJson() (any, error) + // Mysql + ScanMysql(value any) error + ValueMysql() (any, error) + // Mssql + ScanMssql(value any) error + ValueMssql() (any, error) } type NeosyncPgxValuer interface { ValuePgx() (any, error) } +type NeosyncMysqlValuer interface { + ValueMysql() (any, error) +} + +type NeosyncMssqlValuer interface { + ValueMssql() (any, error) +} + type NeosyncJsonValuer interface { ValueJson() (any, error) } diff --git a/internal/postgres/utils.go b/internal/postgres/utils.go index 922f68765a..f700c58784 100644 --- a/internal/postgres/utils.go +++ b/internal/postgres/utils.go @@ -8,6 +8,7 @@ import ( "reflect" "strconv" "strings" + "time" "github.com/jackc/pgx/v5/pgtype" neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" @@ -168,6 +169,12 @@ func SqlRowToPgTypesMap(rows *sql.Rows) (map[string]any, error) { case strings.EqualFold(dbTypeName, "_interval"): values[i] = &PgxArray[*pgtype.Interval]{colDataType: dbTypeName} scanTargets = append(scanTargets, values[i]) + case strings.EqualFold(dbTypeName, "_bytea") || strings.EqualFold(dbTypeName, "_varbit"): + values[i] = &PgxArray[[]byte]{colDataType: dbTypeName} + scanTargets = append(scanTargets, values[i]) + case strings.EqualFold(dbTypeName, "_bit"): + values[i] = &PgxArray[*pgtype.Bits]{colDataType: dbTypeName} + scanTargets = append(scanTargets, values[i]) case strings.EqualFold(dbTypeName, "interval"): values[i] = &pgtype.Interval{} scanTargets = append(scanTargets, values[i]) @@ -182,17 +189,30 @@ func SqlRowToPgTypesMap(rows *sql.Rows) (map[string]any, error) { return nil, err } - jObj := parsePgRowValues(values, columnNames) + columnTypes := make([]string, len(cTypes)) + for i, ct := range cTypes { + columnTypes[i] = ct.DatabaseTypeName() + } + + jObj := parsePgRowValues(values, columnNames, columnTypes) return jObj, nil } -func parsePgRowValues(values []any, columnNames []string) map[string]any { +func parsePgRowValues(values []any, columnNames, columnTypes []string) map[string]any { jObj := map[string]any{} for i, v := range values { col := columnNames[i] + colType := columnTypes[i] switch t := v.(type) { case nil: jObj[col] = t + case time.Time: + dt, err := neosynctypes.NewDateTimeFromPgx(t) + if err != nil { + jObj[col] = t + continue + } + jObj[col] = dt case *sql.NullString: var val any = nil if t.Valid { @@ -212,6 +232,20 @@ func parsePgRowValues(values []any, columnNames []string) map[string]any { continue } jObj[col] = ia + case *PgxArray[[]byte]: + ba, err := toBinaryArray(t) + if err != nil { + jObj[col] = t + continue + } + jObj[col] = ba + case *PgxArray[*pgtype.Bits]: + ba, err := toBitsArray(t) + if err != nil { + jObj[col] = t + continue + } + jObj[col] = ba case *PgxArray[any]: jObj[col] = pgArrayToGoSlice(t) case *pgtype.Interval: @@ -226,7 +260,24 @@ func parsePgRowValues(values []any, columnNames []string) map[string]any { } jObj[col] = neoInterval default: - jObj[col] = t + switch { + case strings.EqualFold(colType, "bit"), strings.EqualFold(colType, "varbit"): + bits, err := neosynctypes.NewBitsFromPgx(t) + if err != nil { + jObj[col] = t + continue + } + jObj[col] = bits + case strings.EqualFold(colType, "bytea"): + binary, err := neosynctypes.NewBinaryFromPgx(t) + if err != nil { + jObj[col] = t + continue + } + jObj[col] = binary + default: + jObj[col] = t + } } } return jObj @@ -247,7 +298,41 @@ func IsPgArrayColumnDataType(colDataType string) bool { return strings.HasSuffix(colDataType, "[]") } -func toIntervalArray(array *PgxArray[*pgtype.Interval]) (any, error) { +func toBinaryArray(array *PgxArray[[]byte]) (*neosynctypes.NeosyncArray, error) { + if array.Elements == nil { + return nil, nil + } + + dim := array.Dimensions() + if len(dim) > 1 { + return nil, errors.ErrUnsupported + } + + binaryArray, err := neosynctypes.NewBinaryArrayFromPgx(array.Elements, []neosynctypes.NeosyncTypeOption{}) + if err != nil { + return nil, err + } + return binaryArray, nil +} + +func toBitsArray(array *PgxArray[*pgtype.Bits]) (*neosynctypes.NeosyncArray, error) { + if array.Elements == nil { + return nil, nil + } + + dim := array.Dimensions() + if len(dim) > 1 { + return nil, errors.ErrUnsupported + } + + bitsArray, err := neosynctypes.NewBitsArrayFromPgx(array.Elements, []neosynctypes.NeosyncTypeOption{}) + if err != nil { + return nil, err + } + return bitsArray, nil +} + +func toIntervalArray(array *PgxArray[*pgtype.Interval]) (*neosynctypes.NeosyncArray, error) { if array.Elements == nil { return nil, nil } diff --git a/internal/postgres/utils_test.go b/internal/postgres/utils_test.go index 65a1ce8979..ef68795407 100644 --- a/internal/postgres/utils_test.go +++ b/internal/postgres/utils_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/jackc/pgx/v5/pgtype" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" "github.com/stretchr/testify/require" ) @@ -193,19 +194,150 @@ func Test_parsePgRowValues(t *testing.T) { "text_col", "int_col", "bool_col", "nil_col", "json_col", "array_col", "binary_col", "xml_col", "uuid_col", } + columnTypes := []string{ + "text", "integer", "boolean", "text", "json", "_integer", "bytea", "xml", "uuid", + } + + result := parsePgRowValues(values, columnNames, columnTypes) + expected := map[string]any{ + "text_col": "Hello", + "int_col": int64(42), + "bool_col": true, + "nil_col": nil, + "json_col": map[string]any{"key": "value"}, + "array_col": []any{1, 2, 3}, + "binary_col": &neosynctypes.Binary{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_BINARY", + }, + }, + Bytes: binaryData, + }, + "xml_col": xmlStr, + "uuid_col": uuidValue, + } + require.Equal(t, expected, result) + }) + + t.Run("Bit and Binary Columns", func(t *testing.T) { + // Test bit type + bits := &pgtype.Bits{Bytes: []byte{0x05}, Len: 3, Valid: true} // binary 101 + + // Test varbit type + varbits := &pgtype.Bits{Bytes: []byte{0x0D}, Len: 4, Valid: true} // binary 1101 + + // Test bytea + byteaValue := []byte{0xDE, 0xAD, 0xBE, 0xEF} + + // Test array types + bitArray := &PgxArray[*pgtype.Bits]{ + Array: pgtype.Array[*pgtype.Bits]{ + Elements: []*pgtype.Bits{ + {Bytes: []byte{0x05}, Len: 3, Valid: true}, // 101 + {Bytes: []byte{0x03}, Len: 2, Valid: true}, // 11 + }, + }, + colDataType: "_bit", + } + + byteaArray := &PgxArray[[]byte]{ + Array: pgtype.Array[[]byte]{ + Elements: [][]byte{ + {0x01, 0x02}, + {0x03, 0x04}, + }, + }, + colDataType: "_bytea", + } + + values := []any{ + bits, + varbits, + byteaValue, + bitArray, + byteaArray, + } + + columnNames := []string{ + "bit_col", + "varbit_col", + "bytea_col", + "bit_array_col", + "bytea_array_col", + } + + columnTypes := []string{ + "_bit", "_varbit", "_bytea", "_bit[]", "_bytea[]", + } + + result := parsePgRowValues(values, columnNames, columnTypes) - result := parsePgRowValues(values, columnNames) expected := map[string]any{ - "text_col": "Hello", - "int_col": int64(42), - "bool_col": true, - "nil_col": nil, - "json_col": map[string]any{"key": "value"}, - "array_col": []any{1, 2, 3}, - "binary_col": binaryData, - "xml_col": xmlStr, - "uuid_col": uuidValue, + "bit_col": bits, + "varbit_col": varbits, + "bytea_col": byteaValue, + "bit_array_col": &neosynctypes.NeosyncArray{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_ARRAY", + }, + }, + Elements: []neosynctypes.NeosyncAdapter{ + &neosynctypes.Bits{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_BIT", + }, + }, + Bytes: []byte{0x05}, + Len: 3, + }, + &neosynctypes.Bits{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_BIT", + }, + }, + Bytes: []byte{0x03}, + Len: 2, + }, + }, + }, + "bytea_array_col": &neosynctypes.NeosyncArray{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_ARRAY", + }, + }, + Elements: []neosynctypes.NeosyncAdapter{ + &neosynctypes.Binary{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_BINARY", + }, + }, + Bytes: []byte{0x01, 0x02}, + }, + &neosynctypes.Binary{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_BINARY", + }, + }, + Bytes: []byte{0x03, 0x04}, + }, + }, + }, } + require.Equal(t, expected, result) }) @@ -219,8 +351,9 @@ func Test_parsePgRowValues(t *testing.T) { &NullableJSON{RawMessage: json.RawMessage(`[1,2,3]`), Valid: true}, } columnNames := []string{"text_col", "bool_col", "null_col", "int_col", "json_col", "array_col"} + columnTypes := []string{"json", "json", "json", "json", "json", "_json"} - result := parsePgRowValues(values, columnNames) + result := parsePgRowValues(values, columnNames, columnTypes) expected := map[string]any{ "text_col": "Hello", @@ -260,8 +393,8 @@ func Test_parsePgRowValues(t *testing.T) { }}, colDataType: "_json", }, - &PgxArray[any]{ - Array: pgtype.Array[any]{Elements: []any{binaryData1, binaryData2}}, + &PgxArray[[]byte]{ + Array: pgtype.Array[[]byte]{Elements: [][]byte{binaryData1, binaryData2}}, colDataType: "_bytea", }, &PgxArray[any]{ @@ -286,24 +419,51 @@ func Test_parsePgRowValues(t *testing.T) { "binary_array", "xml_array", "uuid_array", "multidim_array", } - result := parsePgRowValues(values, columnNames) + columnTypes := []string{ + "_text", "_integer", "_boolean", "_json", + "_bytea", "_xml", "_uuid", "_integer[]", + } + result := parsePgRowValues(values, columnNames, columnTypes) expected := map[string]any{ - "text_array": []any{"Hello", "World"}, - "int_array": []any{int64(42), int64(43)}, - "bool_array": []any{true, false}, - "json_array": []any{map[string]any{"key": "value1"}, map[string]any{"key": "value2"}}, - "binary_array": []any{binaryData1, binaryData2}, + "text_array": []any{"Hello", "World"}, + "int_array": []any{int64(42), int64(43)}, + "bool_array": []any{true, false}, + "json_array": []any{map[string]any{"key": "value1"}, map[string]any{"key": "value2"}}, + "binary_array": &neosynctypes.NeosyncArray{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_ARRAY", + }, + }, + Elements: []neosynctypes.NeosyncAdapter{ + &neosynctypes.Binary{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_BINARY", + }, + }, + Bytes: binaryData1, + }, + &neosynctypes.Binary{ + BaseType: neosynctypes.BaseType{ + Neosync: neosynctypes.Neosync{ + Version: 1, + TypeId: "NEOSYNC_BINARY", + }, + }, + Bytes: binaryData2, + }, + }, + }, "xml_array": []any{xmlData1, xmlData2}, "uuid_array": []any{uuidValue1, uuidValue2}, "multidim_array": []any{[]any{1, 2}, []any{3, 4}}, } - for key, expectedArray := range expected { - actual, ok := result[key] - require.True(t, ok) - require.ElementsMatch(t, actual, expectedArray) - } + require.Equal(t, expected, result) }) t.Run("Null Values", func(t *testing.T) { @@ -312,8 +472,9 @@ func Test_parsePgRowValues(t *testing.T) { &NullableJSON{Valid: false}, } columnNames := []string{"null_string", "null_json"} + columnTypes := []string{"text", "text"} - result := parsePgRowValues(values, columnNames) + result := parsePgRowValues(values, columnNames, columnTypes) expected := map[string]any{ "null_string": nil, diff --git a/internal/sqlscanners/scanners.go b/internal/sqlscanners/scanners.go deleted file mode 100644 index 8bdfc2d9c9..0000000000 --- a/internal/sqlscanners/scanners.go +++ /dev/null @@ -1,90 +0,0 @@ -package sqlscanners - -import ( - "database/sql/driver" - "fmt" - "strconv" -) - -type SqlScanner interface { - Scan(value any) error - Value() (driver.Value, error) - String() string -} - -type BitString struct { - IsValid bool - Bytes []byte - BitString string -} - -// Scan implements the sql.Scanner interface for BitString -func (b *BitString) Scan(value any) error { - if value == nil { - b.IsValid = false - return nil - } - - b.IsValid = true - - switch v := value.(type) { - case []byte: - b.Bytes = make([]byte, len(v)) - copy(b.Bytes, v) - if len(v) == 1 { - // BIT(1) to BIT(8) - b.BitString = strconv.FormatUint(uint64(v[0]), 2) - } else { - // BIT(9) to BIT(64) - val := uint64(0) - for i, byte := range v { - // Calculate the shift amount - shiftAmount := 8 * (len(v) - 1 - i) - // Convert byte to uint64 and shift it - shiftedByte := uint64(byte) << shiftAmount - // Bitwise OR - val |= shiftedByte - } - b.BitString = strconv.FormatUint(val, 2) - } - case int64: - b.BitString = strconv.FormatInt(v, 2) - b.Bytes = []byte{byte(v)} - case uint64: - b.BitString = strconv.FormatUint(v, 2) - b.Bytes = []byte{byte(v)} - case string: - b.BitString = v - val, err := strconv.ParseUint(v, 2, 64) - if err != nil { - return fmt.Errorf("invalid binary string: %v", err) - } - b.Bytes = make([]byte, (len(v)+7)/8) - for i := range b.Bytes { - bitPosition := len(b.Bytes) - i - 1 - if bitPosition < 0 || bitPosition > len(b.Bytes) { - return fmt.Errorf("error scanning bit. invalid bit position") - } - shiftAmount := uint(8) * uint(bitPosition) - b.Bytes[i] = byte(val >> shiftAmount) - } - default: - return fmt.Errorf("cannot scan type %T into BitString", value) - } - return nil -} - -// Value implements the driver.Valuer interface for BitString -func (b BitString) Value() (driver.Value, error) { - if !b.IsValid { - return nil, nil - } - return b.Bytes, nil -} - -func (b BitString) String() string { - if !b.IsValid { - return "" - } - return b.BitString -} diff --git a/internal/sqlscanners/scanners_test.go b/internal/sqlscanners/scanners_test.go deleted file mode 100644 index b9f00d5407..0000000000 --- a/internal/sqlscanners/scanners_test.go +++ /dev/null @@ -1,104 +0,0 @@ -package sqlscanners - -import ( - "database/sql/driver" - "testing" - - "github.com/stretchr/testify/require" -) - -func Test_BitString_Scan(t *testing.T) { - t.Run("Nil Value", func(t *testing.T) { - var b BitString - err := b.Scan(nil) - require.NoError(t, err) - require.False(t, b.IsValid) - }) - - t.Run("[]byte BIT(1) to BIT(8)", func(t *testing.T) { - var b BitString - err := b.Scan([]byte{5}) - require.NoError(t, err) - require.True(t, b.IsValid) - require.Equal(t, []byte{5}, b.Bytes) - require.Equal(t, "101", b.BitString) - }) - - t.Run("[]byte BIT(9) to BIT(64)", func(t *testing.T) { - var b BitString - err := b.Scan([]byte{1, 2}) - require.NoError(t, err) - require.True(t, b.IsValid) - require.Equal(t, []byte{1, 2}, b.Bytes) - require.Equal(t, "100000010", b.BitString) - }) - - t.Run("int64", func(t *testing.T) { - var b BitString - err := b.Scan(int64(5)) - require.NoError(t, err) - require.True(t, b.IsValid) - require.Equal(t, []byte{5}, b.Bytes) - require.Equal(t, "101", b.BitString) - }) - - t.Run("uint64", func(t *testing.T) { - var b BitString - err := b.Scan(uint64(5)) - require.NoError(t, err) - require.True(t, b.IsValid) - require.Equal(t, []byte{5}, b.Bytes) - require.Equal(t, "101", b.BitString) - }) - - t.Run("string", func(t *testing.T) { - var b BitString - err := b.Scan("101") - require.NoError(t, err) - require.True(t, b.IsValid) - require.Equal(t, []byte{5}, b.Bytes) - require.Equal(t, "101", b.BitString) - }) - - t.Run("Invalid Type", func(t *testing.T) { - var b BitString - err := b.Scan(3.14) - require.Error(t, err) - require.Contains(t, err.Error(), "cannot scan type float64 into BitString") - }) - - t.Run("Invalid Binary String", func(t *testing.T) { - var b BitString - err := b.Scan("12") - require.Error(t, err) - require.Contains(t, err.Error(), "invalid binary string") - }) -} - -func Test_BitString_Value(t *testing.T) { - t.Run("Valid BitString", func(t *testing.T) { - b := BitString{IsValid: true, Bytes: []byte{5}, BitString: "101"} - v, err := b.Value() - require.NoError(t, err) - require.Equal(t, driver.Value([]byte{5}), v) - }) - - t.Run("Invalid BitString", func(t *testing.T) { - b := BitString{IsValid: false} - v, err := b.Value() - require.NoError(t, err) - require.Nil(t, v) - }) -} - -func Test_BitString_String(t *testing.T) { - t.Run("Valid BitString", func(t *testing.T) { - b := BitString{IsValid: true, BitString: "101"} - require.Equal(t, "101", b.String()) - }) - - t.Run("Invalid BitString", func(t *testing.T) { - b := BitString{IsValid: false} - require.Equal(t, "", b.String()) - }) -} diff --git a/internal/sqlserver/utils.go b/internal/sqlserver/utils.go index e3deabdf5f..6f366c06d0 100644 --- a/internal/sqlserver/utils.go +++ b/internal/sqlserver/utils.go @@ -4,9 +4,11 @@ import ( "database/sql" "fmt" "strings" + "time" - "github.com/gofrs/uuid" + mssql "github.com/microsoft/go-mssqldb" sqlmanager_shared "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager/shared" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" neosync_benthos "github.com/nucleuscloud/neosync/worker/pkg/benthos" ) @@ -21,10 +23,21 @@ func SqlRowToSqlServerTypesMap(rows *sql.Rows) (map[string]any, error) { return nil, err } + columnDbTypes := []string{} + for _, c := range cTypes { + columnDbTypes = append(columnDbTypes, c.DatabaseTypeName()) + } + values := make([]any, len(columnNames)) valuesWrapped := make([]any, 0, len(columnNames)) for i := range values { - valuesWrapped = append(valuesWrapped, &values[i]) + colType := columnDbTypes[i] + if strings.EqualFold(colType, "uniqueidentifier") { + values[i] = &mssql.UniqueIdentifier{} + valuesWrapped = append(valuesWrapped, values[i]) + } else { + valuesWrapped = append(valuesWrapped, &values[i]) + } } if err := rows.Scan(valuesWrapped...); err != nil { return nil, err @@ -33,25 +46,36 @@ func SqlRowToSqlServerTypesMap(rows *sql.Rows) (map[string]any, error) { jObj := map[string]any{} for i, v := range values { col := columnNames[i] - colType := cTypes[i] + colType := columnDbTypes[i] switch t := v.(type) { - case string: - jObj[col] = t + case time.Time: + dt, err := neosynctypes.NewDateTimeFromMssql(t) + if err != nil { + jObj[col] = t + continue + } + jObj[col] = dt + case *mssql.UniqueIdentifier: + jObj[col] = t.String() case []byte: - if IsUuidDataType(colType.DatabaseTypeName()) { - uuidStr, err := BitsToUuidString(t) - if err == nil { - jObj[col] = uuidStr + switch { + case strings.EqualFold(colType, "binary"): + binary, err := neosynctypes.NewBinaryFromMssql(t) + if err != nil { + jObj[col] = t + continue + } + jObj[col] = binary + case strings.EqualFold(colType, "varbinary"): + bits, err := neosynctypes.NewBitsFromMssql(t) + if err != nil { + jObj[col] = t continue } + jObj[col] = bits + default: + jObj[col] = string(t) } - jObj[col] = string(t) - case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - jObj[col] = t - case float32, float64: - jObj[col] = t - case bool: - jObj[col] = t default: jObj[col] = t } @@ -60,18 +84,6 @@ func SqlRowToSqlServerTypesMap(rows *sql.Rows) (map[string]any, error) { return jObj, nil } -func IsUuidDataType(colDataType string) bool { - return strings.EqualFold(colDataType, "uniqueidentifier") -} - -func BitsToUuidString(bits []byte) (string, error) { - u, err := uuid.FromBytes(bits) - if err != nil { - return "", err - } - return u.String(), nil -} - func GeSqlServerDefaultValuesInsertSql(schema, table string, rowCount int) string { var sqlStr string for i := 0; i < rowCount; i++ { diff --git a/internal/testutil/testcontainers/dynamodb/dynamodb.go b/internal/testutil/testcontainers/dynamodb/dynamodb.go new file mode 100644 index 0000000000..4c78c3df33 --- /dev/null +++ b/internal/testutil/testcontainers/dynamodb/dynamodb.go @@ -0,0 +1,262 @@ +package testcontainers_dynamodb + +import ( + "context" + "fmt" + "testing" + + "github.com/aws/aws-sdk-go-v2/service/dynamodb" + dyntypes "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" + "github.com/docker/go-connections/nat" + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + awsmanager "github.com/nucleuscloud/neosync/internal/aws" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" + "golang.org/x/sync/errgroup" +) + +type DynamoDBTestSyncContainer struct { + Source *DynamoDBTestContainer + Target *DynamoDBTestContainer +} + +func NewDynamoDBTestSyncContainer(ctx context.Context, t *testing.T, sourceOpts, destOpts []Option) (*DynamoDBTestSyncContainer, error) { + tc := &DynamoDBTestSyncContainer{} + errgrp := errgroup.Group{} + errgrp.Go(func() error { + d, err := NewDynamoDBTestContainer(ctx, t, sourceOpts...) + if err != nil { + return err + } + tc.Source = d + return nil + }) + + errgrp.Go(func() error { + d, err := NewDynamoDBTestContainer(ctx, t, destOpts...) + if err != nil { + return err + } + tc.Target = d + return nil + }) + + err := errgrp.Wait() + if err != nil { + return nil, err + } + + return tc, nil +} + +func (d *DynamoDBTestSyncContainer) TearDown(ctx context.Context) error { + if d.Source != nil { + if d.Source.TestContainer != nil { + err := d.Source.TestContainer.Terminate(ctx) + if err != nil { + return err + } + } + } + if d.Target != nil { + if d.Target.TestContainer != nil { + err := d.Target.TestContainer.Terminate(ctx) + if err != nil { + return err + } + } + } + return nil +} + +// Holds the DynamoDB test container and client +type DynamoDBTestContainer struct { + Client *dynamodb.Client + URL string + TestContainer testcontainers.Container + Credentials *mgmtv1alpha1.AwsS3Credentials + awsId string + awsSecret string + awsToken string +} + +// Option is a functional option for configuring the DynamoDB Test Container +type Option func(*DynamoDBTestContainer) + +// WithAwsId sets the AWS access key ID +func WithAwsId(id string) Option { + return func(d *DynamoDBTestContainer) { + d.awsId = id + } +} + +// WithAwsSecret sets the AWS secret access key +func WithAwsSecret(secret string) Option { + return func(d *DynamoDBTestContainer) { + d.awsSecret = secret + } +} + +// WithAwsToken sets the AWS session token +func WithAwsToken(token string) Option { + return func(d *DynamoDBTestContainer) { + d.awsToken = token + } +} + +// NewDynamoDBTestContainer initializes a new DynamoDB Test Container with functional options +func NewDynamoDBTestContainer(ctx context.Context, t *testing.T, opts ...Option) (*DynamoDBTestContainer, error) { + d := &DynamoDBTestContainer{ + awsId: "fakeid", // default value + awsSecret: "fakesecret", // default value + awsToken: "faketoken", // default value + } + for _, opt := range opts { + opt(d) + } + return d.Setup(ctx, t) +} + +// Creates and starts a DynamoDB test container +func (d *DynamoDBTestContainer) Setup(ctx context.Context, t *testing.T) (*DynamoDBTestContainer, error) { + port := nat.Port("8000/tcp") + container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + Image: "amazon/dynamodb-local:2.5.2", + ExposedPorts: []string{string(port)}, + WaitingFor: wait.ForListeningPort(port), + }, + Started: true, + }) + if err != nil { + return nil, err + } + + mappedport, err := container.MappedPort(ctx, port) + if err != nil { + return nil, err + } + host, err := container.Host(ctx) + if err != nil { + return nil, err + } + + endpoint := fmt.Sprintf("http://%s:%d", host, mappedport.Int()) + + awscfg, err := awsmanager.GetAwsConfig(ctx, &awsmanager.AwsCredentialsConfig{ + Endpoint: endpoint, + Id: d.awsId, + Secret: d.awsSecret, + Token: d.awsToken, + }) + if err != nil { + return nil, err + } + + dtoAwsCreds := &mgmtv1alpha1.AwsS3Credentials{ + AccessKeyId: &d.awsId, + SecretAccessKey: &d.awsSecret, + SessionToken: &d.awsToken, + } + + client := dynamodb.NewFromConfig(*awscfg, func(o *dynamodb.Options) { + o.BaseEndpoint = &endpoint + }) + + return &DynamoDBTestContainer{ + Client: client, + URL: endpoint, + TestContainer: container, + Credentials: dtoAwsCreds, + awsId: d.awsId, + awsSecret: d.awsSecret, + awsToken: d.awsToken, + }, nil +} + +// Terminates the container +func (d *DynamoDBTestContainer) TearDown(ctx context.Context) error { + if d.TestContainer != nil { + return d.TestContainer.Terminate(ctx) + } + return nil +} + +func (d *DynamoDBTestContainer) SetupDynamoDbTable(ctx context.Context, tableName, primaryKey string) error { + out, err := d.Client.CreateTable(ctx, &dynamodb.CreateTableInput{ + TableName: &tableName, + KeySchema: []dyntypes.KeySchemaElement{{KeyType: dyntypes.KeyTypeHash, AttributeName: &primaryKey}}, + AttributeDefinitions: []dyntypes.AttributeDefinition{{AttributeName: &primaryKey, AttributeType: dyntypes.ScalarAttributeTypeS}}, + BillingMode: dyntypes.BillingModePayPerRequest, + }) + if err != nil { + return err + } + if out.TableDescription.TableStatus == dyntypes.TableStatusActive { + return nil + } + if out.TableDescription.TableStatus == dyntypes.TableStatusCreating { + return d.waitUntilDynamoTableExists(ctx, tableName) + } + return fmt.Errorf("%s dynamo table created but unexpected table status: %s", tableName, out.TableDescription.TableStatus) +} + +func (d *DynamoDBTestContainer) waitUntilDynamoTableExists(ctx context.Context, tableName string) error { + input := &dynamodb.DescribeTableInput{TableName: &tableName} + for { + out, err := d.Client.DescribeTable(ctx, input) + if err != nil && !awsmanager.IsNotFound(err) { + return err + } + if err != nil && awsmanager.IsNotFound(err) { + continue + } + if out.Table.TableStatus == dyntypes.TableStatusActive { + return nil + } + } +} + +func (d *DynamoDBTestContainer) DestroyDynamoDbTable(ctx context.Context, tableName string) error { + _, err := d.Client.DeleteTable(ctx, &dynamodb.DeleteTableInput{ + TableName: &tableName, + }) + if err != nil { + return err + } + return d.waitUntilDynamoTableDestroy(ctx, tableName) +} + +func (d *DynamoDBTestContainer) waitUntilDynamoTableDestroy(ctx context.Context, tableName string) error { + input := &dynamodb.DescribeTableInput{TableName: &tableName} + for { + _, err := d.Client.DescribeTable(ctx, input) + if err != nil && !awsmanager.IsNotFound(err) { + return err + } + if err != nil && awsmanager.IsNotFound(err) { + return nil + } + } +} + +func (d *DynamoDBTestContainer) InsertDynamoDBRecords(ctx context.Context, tableName string, data []map[string]dyntypes.AttributeValue) error { + writeRequests := make([]dyntypes.WriteRequest, len(data)) + for i, record := range data { + writeRequests[i] = dyntypes.WriteRequest{ + PutRequest: &dyntypes.PutRequest{ + Item: record, + }, + } + } + + _, err := d.Client.BatchWriteItem(ctx, &dynamodb.BatchWriteItemInput{ + RequestItems: map[string][]dyntypes.WriteRequest{ + tableName: writeRequests, + }, + }) + if err != nil { + return err + } + return nil +} diff --git a/internal/testutil/testcontainers/mongodb/mongodb.go b/internal/testutil/testcontainers/mongodb/mongodb.go new file mode 100644 index 0000000000..606e0af793 --- /dev/null +++ b/internal/testutil/testcontainers/mongodb/mongodb.go @@ -0,0 +1,137 @@ +package testcontainers_mongodb + +import ( + "context" + "fmt" + "testing" + + "github.com/testcontainers/testcontainers-go" + testmongodb "github.com/testcontainers/testcontainers-go/modules/mongodb" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "golang.org/x/sync/errgroup" +) + +type MongoDBTestSyncContainer struct { + Source *MongoDBTestContainer + Target *MongoDBTestContainer +} + +func NewMongoDBTestSyncContainer(ctx context.Context, t *testing.T) (*MongoDBTestSyncContainer, error) { + tc := &MongoDBTestSyncContainer{} + errgrp := errgroup.Group{} + errgrp.Go(func() error { + d, err := NewMongoDBTestContainer(ctx, t) + if err != nil { + return err + } + tc.Source = d + return nil + }) + + errgrp.Go(func() error { + d, err := NewMongoDBTestContainer(ctx, t) + if err != nil { + return err + } + tc.Target = d + return nil + }) + + err := errgrp.Wait() + if err != nil { + return nil, err + } + + return tc, nil +} + +func (d *MongoDBTestSyncContainer) TearDown(ctx context.Context) error { + if d.Source != nil { + if d.Source.TestContainer != nil { + err := d.Source.TestContainer.Terminate(ctx) + if err != nil { + return err + } + } + } + if d.Target != nil { + if d.Target.TestContainer != nil { + err := d.Target.TestContainer.Terminate(ctx) + if err != nil { + return err + } + } + } + return nil +} + +type MongoDBTestContainer struct { + Client *mongo.Client + URL string + TestContainer testcontainers.Container +} + +func NewMongoDBTestContainer(ctx context.Context, t *testing.T) (*MongoDBTestContainer, error) { + m := &MongoDBTestContainer{} + return m.Setup(ctx, t) +} + +func (m *MongoDBTestContainer) Setup(ctx context.Context, t *testing.T) (*MongoDBTestContainer, error) { + container, err := testmongodb.Run(ctx, "mongo:6") + if err != nil { + return nil, err + } + + uri, err := container.ConnectionString(ctx) + if err != nil { + return nil, err + } + + client, err := mongo.Connect(ctx, options.Client().ApplyURI(uri)) + if err != nil { + return nil, err + } + + return &MongoDBTestContainer{ + Client: client, + URL: uri, + TestContainer: container, + }, nil +} + +func (m *MongoDBTestContainer) TearDown(ctx context.Context) error { + if m.Client != nil { + if err := m.Client.Disconnect(ctx); err != nil { + return err + } + } + if m.TestContainer != nil { + return m.TestContainer.Terminate(ctx) + } + return nil +} + +func (m *MongoDBTestContainer) InsertMongoDbRecords(ctx context.Context, database, collection string, documents []any) (int, error) { + db := m.Client.Database(database) + col := db.Collection(collection) + + result, err := col.InsertMany(ctx, documents) + if err != nil { + return 0, fmt.Errorf("failed to insert mongodb records: %v", err) + } + + return len(result.InsertedIDs), nil +} + +func (m *MongoDBTestContainer) DropMongoDbCollection(ctx context.Context, database, collection string) error { + db := m.Client.Database(database) + collections, err := db.ListCollectionNames(ctx, map[string]any{"name": collection}) + if err != nil { + return err + } + if len(collections) == 0 { + return nil + } + return db.Collection(collection).Drop(ctx) +} diff --git a/internal/testutil/testcontainers/mysql/mysql.go b/internal/testutil/testcontainers/mysql/mysql.go index 70dd0f9e39..f54993050b 100644 --- a/internal/testutil/testcontainers/mysql/mysql.go +++ b/internal/testutil/testcontainers/mysql/mysql.go @@ -272,18 +272,18 @@ func (m *MysqlTestContainer) RunSqlFiles(ctx context.Context, folder *string, fi } // Creates schema and sets USE to schema before running SQL files -func (m *MysqlTestContainer) RunCreateStmtsInDatabase(ctx context.Context, folder *string, files []string, database string) error { +func (m *MysqlTestContainer) RunCreateStmtsInDatabase(ctx context.Context, folder string, files []string, database string) error { for _, file := range files { filePath := file - if folder != nil && *folder != "" { - filePath = fmt.Sprintf("./%s/%s", *folder, file) + if folder != "" { + filePath = fmt.Sprintf("./%s/%s", folder, file) } sqlStr, err := os.ReadFile(filePath) if err != nil { return err } - setSchemaSql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s; \n USE %s; \n", database, database) + setSchemaSql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS `%s`; \n USE `%s`; \n", database, database) _, err = m.DB.ExecContext(ctx, setSchemaSql+string(sqlStr)) if err != nil { return fmt.Errorf("unable to exec sql when running postgres sql files: %w", err) @@ -292,11 +292,21 @@ func (m *MysqlTestContainer) RunCreateStmtsInDatabase(ctx context.Context, folde return nil } -func (m *MysqlTestContainer) CreateDatabases(ctx context.Context, schemas []string) error { - for _, schema := range schemas { - _, err := m.DB.ExecContext(ctx, fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s;", schema)) +func (m *MysqlTestContainer) CreateDatabases(ctx context.Context, databases []string) error { + for _, database := range databases { + _, err := m.DB.ExecContext(ctx, fmt.Sprintf("CREATE DATABASE IF NOT EXISTS `%s`;", database)) + if err != nil { + return fmt.Errorf("unable to create database %s: %w", database, err) + } + } + return nil +} + +func (m *MysqlTestContainer) DropDatabases(ctx context.Context, databases []string) error { + for _, database := range databases { + _, err := m.DB.ExecContext(ctx, fmt.Sprintf("DROP DATABASE IF EXISTS `%s`;", database)) if err != nil { - return fmt.Errorf("unable to create schema %s: %w", schema, err) + return fmt.Errorf("unable to drop database %s: %w", database, err) } } return nil diff --git a/internal/testutil/testcontainers/postgres/postgres.go b/internal/testutil/testcontainers/postgres/postgres.go index 82d3a42b56..f25bd41915 100644 --- a/internal/testutil/testcontainers/postgres/postgres.go +++ b/internal/testutil/testcontainers/postgres/postgres.go @@ -277,17 +277,17 @@ func (p *PostgresTestContainer) RunSqlFiles(ctx context.Context, folder *string, } // Creates schema and sets search_path to schema before running SQL files -func (p *PostgresTestContainer) RunCreateStmtsInSchema(ctx context.Context, folder *string, files []string, schema string) error { +func (p *PostgresTestContainer) RunCreateStmtsInSchema(ctx context.Context, folder string, files []string, schema string) error { for _, file := range files { filePath := file - if folder != nil && *folder != "" { - filePath = fmt.Sprintf("./%s/%s", *folder, file) + if folder != "" { + filePath = fmt.Sprintf("./%s/%s", folder, file) } sqlStr, err := os.ReadFile(filePath) if err != nil { return err } - setSchemaSql := fmt.Sprintf("CREATE SCHEMA IF NOT EXISTS %s; \n SET search_path TO %s; \n", schema, schema) + setSchemaSql := fmt.Sprintf("CREATE SCHEMA IF NOT EXISTS %q; \n SET search_path TO %q; \n", schema, schema) _, err = p.DB.Exec(ctx, setSchemaSql+string(sqlStr)) if err != nil { return fmt.Errorf("unable to exec sql when running postgres sql files: %w", err) @@ -298,7 +298,7 @@ func (p *PostgresTestContainer) RunCreateStmtsInSchema(ctx context.Context, fold func (p *PostgresTestContainer) CreateSchemas(ctx context.Context, schemas []string) error { for _, schema := range schemas { - _, err := p.DB.Exec(ctx, fmt.Sprintf("CREATE SCHEMA IF NOT EXISTS %s;", schema)) + _, err := p.DB.Exec(ctx, fmt.Sprintf("CREATE SCHEMA IF NOT EXISTS %q;", schema)) if err != nil { return fmt.Errorf("unable to create schema %s: %w", schema, err) } @@ -306,6 +306,16 @@ func (p *PostgresTestContainer) CreateSchemas(ctx context.Context, schemas []str return nil } +func (p *PostgresTestContainer) DropSchemas(ctx context.Context, schemas []string) error { + for _, schema := range schemas { + _, err := p.DB.Exec(ctx, fmt.Sprintf("DROP SCHEMA IF EXISTS %q CASCADE;", schema)) + if err != nil { + return fmt.Errorf("unable to drop schema %s: %w", schema, err) + } + } + return nil +} + func (p *PostgresTestContainer) GetTableRowCount(ctx context.Context, schema, table string) (int, error) { rows := p.DB.QueryRow(ctx, fmt.Sprintf("SELECT COUNT(*) FROM %q.%q;", schema, table)) var count int diff --git a/internal/testutil/testcontainers/sqlserver/sqlserver.go b/internal/testutil/testcontainers/sqlserver/sqlserver.go index 4bbe311a64..d88d36019a 100644 --- a/internal/testutil/testcontainers/sqlserver/sqlserver.go +++ b/internal/testutil/testcontainers/sqlserver/sqlserver.go @@ -8,6 +8,7 @@ import ( "fmt" "net/url" "os" + "strings" "time" "github.com/nucleuscloud/neosync/internal/sshtunnel/connectors/mssqltunconnector" @@ -250,3 +251,56 @@ func (m *MssqlTestContainer) RunSqlFiles(ctx context.Context, folder *string, fi } return nil } + +func (m *MssqlTestContainer) RunCreateStmtsInSchema(ctx context.Context, folder string, files []string, schema string) error { + for _, file := range files { + filePath := file + if folder != "" { + filePath = fmt.Sprintf("./%s/%s", folder, file) + } + sqlStr, err := os.ReadFile(filePath) + if err != nil { + return err + } + createSchema := fmt.Sprintf("CREATE SCHEMA [%s];", schema) + _, err = m.DB.ExecContext(ctx, createSchema) + if err != nil { + return fmt.Errorf("unable to exec SQL when running MsSQL create schema: %w", err) + } + _, err = m.DB.ExecContext(ctx, strings.ReplaceAll(string(sqlStr), "neo_schema", schema)) + if err != nil { + return fmt.Errorf("unable to exec SQL when running MsSQL SQL files: %w", err) + } + } + return nil +} + +func (m *MssqlTestContainer) CreateSchemas(ctx context.Context, schemas []string) error { + for _, schema := range schemas { + _, err := m.DB.ExecContext(ctx, fmt.Sprintf("CREATE SCHEMA [%s];", schema)) + if err != nil { + return fmt.Errorf("unable to create mssql schema: %w", err) + } + } + return nil +} + +func (m *MssqlTestContainer) DropSchemas(ctx context.Context, schemas []string) error { + for _, schema := range schemas { + _, err := m.DB.ExecContext(ctx, fmt.Sprintf("DROP SCHEMA [%s];", schema)) + if err != nil { + return fmt.Errorf("unable to drop mssql schema: %w", err) + } + } + return nil +} + +func (m *MssqlTestContainer) GetTableRowCount(ctx context.Context, schema, table string) (int, error) { + rows := m.DB.QueryRowContext(ctx, fmt.Sprintf("SELECT COUNT(*) FROM [%s].[%s];", schema, table)) + var count int + err := rows.Scan(&count) + if err != nil { + return 0, err + } + return count, nil +} diff --git a/internal/testutil/testdata/gen_jobmappings_config.json b/internal/testutil/testdata/gen_jobmappings_config.json index cf61de37f2..cf29d83b32 100644 --- a/internal/testutil/testdata/gen_jobmappings_config.json +++ b/internal/testutil/testdata/gen_jobmappings_config.json @@ -9,6 +9,31 @@ "sql_file": "create-tables.sql", "driver": "postgres" }, + { + "folder": "postgres/edgecases", + "sql_file": "create-tables.sql", + "driver": "postgres" + }, + { + "folder": "postgres/uuids", + "sql_file": "create-tables.sql", + "driver": "postgres" + }, + { + "folder": "postgres/transformers", + "sql_file": "create-tables.sql", + "driver": "postgres" + }, + { + "folder": "postgres/foreignkey-violations", + "sql_file": "create-tables.sql", + "driver": "postgres" + }, + { + "folder": "postgres/subsetting", + "sql_file": "create-tables.sql", + "driver": "postgres" + }, { "folder": "mysql/alltypes", "sql_file": "create-tables.sql", @@ -18,5 +43,20 @@ "folder": "mysql/humanresources", "sql_file": "create-tables.sql", "driver": "mysql" + }, + { + "folder": "mysql/composite-keys", + "sql_file": "create-tables.sql", + "driver": "mysql" + }, + { + "folder": "mysql/edgecases", + "sql_file": "create-tables.sql", + "driver": "mysql" + }, + { + "folder": "mssql/alltypes", + "sql_file": "create-tables.sql", + "driver": "mssql" } ] diff --git a/internal/testutil/testdata/generators.go b/internal/testutil/testdata/generators.go index c37d56bd4f..031aaf5cf0 100644 --- a/internal/testutil/testdata/generators.go +++ b/internal/testutil/testdata/generators.go @@ -1,3 +1,3 @@ package testutil_testdata -//go:generate go run jobmapping_generator.go gen_jobmappings_config.json $GOPACKAGE +//go:generate go run jobmapping-generator.go gen_jobmappings_config.json $GOPACKAGE diff --git a/internal/testutil/testdata/jobmapping_generator.go b/internal/testutil/testdata/jobmapping-generator.go similarity index 81% rename from internal/testutil/testdata/jobmapping_generator.go rename to internal/testutil/testdata/jobmapping-generator.go index c8c96dc4c0..ad72c88e51 100644 --- a/internal/testutil/testdata/jobmapping_generator.go +++ b/internal/testutil/testdata/jobmapping-generator.go @@ -1,3 +1,5 @@ +//go:build ignore + package main import ( @@ -15,7 +17,6 @@ import ( "github.com/antlr4-go/antlr/v4" parser "github.com/nucleuscloud/go-antlrv4-parser/tsql" - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" pg_query "github.com/pganalyze/pg_query_go/v5" ) @@ -26,8 +27,9 @@ type Input struct { } type Column struct { - Name string - TypeStr string + Name string + TypeStr string + IsGenerated bool } type Table struct { @@ -57,8 +59,23 @@ func parsePostegresStatements(sql string) ([]*Table, error) { columns := []*Column{} for _, col := range s.GetCreateStmt().GetTableElts() { if col.GetColumnDef() != nil { + colDef := col.GetColumnDef() + + isGenerated := false + // Check for GENERATED columns in constraints + for _, constraint := range colDef.Constraints { + if constraint.GetConstraint() != nil { + // contype 5 is CONSTR_GENERATED + if constraint.GetConstraint().Contype == 5 { + isGenerated = true + break + } + } + } + columns = append(columns, &Column{ - Name: col.GetColumnDef().Colname, + Name: colDef.Colname, + IsGenerated: isGenerated, }) } } @@ -74,7 +91,7 @@ func parsePostegresStatements(sql string) ([]*Table, error) { // todo fix very brittle func parseSQLStatements(sql string) []*Table { lines := strings.Split(sql, "\n") - tableColumnsMap := make(map[string][]string) + tableColumnsMap := make(map[string][]*Column) var currentTable string reCreateTable := regexp.MustCompile(`CREATE\s+TABLE\s+IF\s+NOT\s+EXISTS\s+(\w+)\s*\.\s*(\w+)\s*\(`) @@ -93,7 +110,14 @@ func parseSQLStatements(sql string) []*Table { if slices.Contains([]string{"primary key", "constraint", "key", "unique", "primary", "alter"}, strings.ToLower(matches[1])) { continue } - tableColumnsMap[currentTable] = append(tableColumnsMap[currentTable], columnName) + isGenerated := false + if strings.Contains(line, "GENERATED ALWAYS AS") { + isGenerated = true + } + tableColumnsMap[currentTable] = append(tableColumnsMap[currentTable], &Column{ + Name: columnName, + IsGenerated: isGenerated, + }) } else if strings.HasPrefix(line, "PRIMARY KEY") || strings.HasPrefix(line, "CONSTRAINT") || strings.HasPrefix(line, "UNIQUE") || strings.HasPrefix(line, "KEY") || strings.HasPrefix(line, "ENGINE") || strings.HasPrefix(line, ")") { // Ignore key constraints and end of table definition if strings.HasPrefix(line, ")") { @@ -104,47 +128,28 @@ func parseSQLStatements(sql string) []*Table { } res := []*Table{} for table, cols := range tableColumnsMap { - tableCols := []*Column{} - for _, c := range cols { - tableCols = append(tableCols, &Column{ - Name: c, - }) - } res = append(res, &Table{ Name: table, - Columns: tableCols, + Columns: cols, }) } - return res -} - -func generateJobMapping(tables []*Table) []*mgmtv1alpha1.JobMapping { - mappings := []*mgmtv1alpha1.JobMapping{} - for _, t := range tables { - for _, c := range t.Columns { - mappings = append(mappings, &mgmtv1alpha1.JobMapping{ - Table: t.Name, - Column: c.Name, - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }) + // Sort tables by name + slices.SortFunc(res, func(a, b *Table) int { + return strings.Compare(a.Name, b.Name) + }) - } - } - return mappings + return res } type TemplateData struct { SourceFile string PackageName string - Mappings []*mgmtv1alpha1.JobMapping Tables []*Table GenerateTypeMap bool } -func formatJobMappings(pkgName string, sqlFile string, mappings []*mgmtv1alpha1.JobMapping, tables []*Table, generateTypeMap bool) (string, error) { +func formatJobMappings(pkgName string, sqlFile string, tables []*Table, generateTypeMap bool) (string, error) { const tmpl = ` // Code generated by Neosync jobmapping_generator. DO NOT EDIT. // source: {{ .SourceFile }} @@ -157,16 +162,31 @@ import ( func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { return []*mgmtv1alpha1.JobMapping{ - {{- range .Mappings }} + {{- range .Tables }} + {{- $tableName := .Name }} + {{- range .Columns }} { Schema: schema, - Table: "{{ .Table }}", - Column: "{{ .Column }}", + Table: "{{ $tableName }}", + Column: "{{ .Name }}", Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, + Config: {{- if .IsGenerated }} + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_GenerateDefaultConfig{ + GenerateDefaultConfig: &mgmtv1alpha1.GenerateDefault{}, + }, + }, + {{- else }} + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + {{- end }} }, }, {{- end }} + {{- end }} } } {{ if .GenerateTypeMap }} @@ -188,7 +208,6 @@ func GetTableColumnTypeMap() map[string]map[string]string { data := TemplateData{ SourceFile: sqlFile, PackageName: pkgName, - Mappings: mappings, Tables: tables, GenerateTypeMap: generateTypeMap, } @@ -264,20 +283,18 @@ func main() { } else if input.Driver == "mysql" { t := parseSQLStatements(sqlContent) tables = t - } else if input.Driver == "sqlserver" { + } else if input.Driver == "sqlserver" || input.Driver == "mssql" { t := parseTsql(sqlContent) tables = t } - jobMapping := generateJobMapping(tables) - - formattedJobMappings, err := formatJobMappings(goPkgName, input.SqlFile, jobMapping, tables, input.Driver == "sqlserver") + formattedJobMappings, err := formatJobMappings(goPkgName, input.SqlFile, tables, input.Driver == "sqlserver") if err != nil { fmt.Println("Error formatting job mappings:", err) return } - output := fmt.Sprintf("%s/job_mappings.go", input.Folder) + output := fmt.Sprintf("%s/job-mappings.go", input.Folder) outputFile, err := os.Create(output) if err != nil { fmt.Println("Error creating jobmapping.go file:", err) diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/insert.sql b/internal/testutil/testdata/mssql/alltypes/create-tables.sql similarity index 57% rename from worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/insert.sql rename to internal/testutil/testdata/mssql/alltypes/create-tables.sql index 5760036acc..e8d9555d90 100644 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/insert.sql +++ b/internal/testutil/testdata/mssql/alltypes/create-tables.sql @@ -1,4 +1,55 @@ -INSERT INTO alltypes.alldatatypes ( +CREATE TABLE neo_schema.alldatatypes ( + id INT IDENTITY (1, 1) PRIMARY KEY, + -- Exact numerics + col_bigint BIGINT, + col_numeric NUMERIC(18,0), + col_bit BIT, + col_smallint SMALLINT, + col_decimal DECIMAL(18,0), + col_smallmoney SMALLMONEY, + col_int INT, + col_tinyint TINYINT, + col_money MONEY, + + -- Approximate numerics + col_float FLOAT, + col_real REAL, + + -- Date and time + col_date DATE, + col_datetimeoffset DATETIMEOFFSET, + col_datetime2 DATETIME2, + col_smalldatetime SMALLDATETIME, + col_datetime DATETIME, + col_time TIME, + + -- Character strings + col_char CHAR(10), + col_varchar VARCHAR(50), + col_text TEXT, + + -- Unicode character strings + col_nchar NCHAR(10), + col_nvarchar NVARCHAR(50), + col_ntext NTEXT, + + -- Binary strings + col_binary BINARY(10), + col_varbinary VARBINARY(50), + -- col_image IMAGE, BROKEN + + -- Other data types + col_uniqueidentifier UNIQUEIDENTIFIER, + col_xml XML + -- BROKEN + -- col_geography GEOGRAPHY, + -- col_geometry GEOMETRY, + -- col_hierarchyid HIERARCHYID, + -- col_sql_variant SQL_VARIANT +); + + +INSERT INTO neo_schema.alldatatypes ( -- Exact numerics col_bigint, col_numeric, col_bit, @@ -10,9 +61,10 @@ INSERT INTO alltypes.alldatatypes ( -- Character strings col_char, col_varchar, col_text, -- Unicode character strings - col_nchar, col_nvarchar, col_json, col_ntext, + col_nchar, col_nvarchar, col_ntext, -- -- Binary strings - -- col_binary, col_varbinary, col_image, + col_binary, col_varbinary, + -- col_image, -- Other data types col_uniqueidentifier, col_xml @@ -52,16 +104,15 @@ VALUES ( -- Unicode character strings N'NCHAR ', -- NCHAR(10) N'NVARCHAR', -- NVARCHAR(50) - N'{"key": "value"}', -- JSON N'This is an NTEXT column', -- NTEXT -- -- Binary strings - -- 0x0123456789, -- BINARY(10) - -- 0x0123456789ABCDEF, -- VARBINARY(50) + CAST('NEOSYNC' AS binary(10)), -- BINARY(10) + CAST('NEOSYNC' AS varbinary(50)), -- VARBINARY(50) -- 0x0123456789ABCDEF0123456789ABCDEF, -- IMAGE -- Other data types - '123e4567-e89b-12d3-a456-426614174000', -- UNIQUEIDENTIFIER + '707f085c-254e-4237-a9fc-5bf05d4298b8', -- UNIQUEIDENTIFIER 'XML Data' -- XML -- geography::Point(47.65100, -122.34900, 4326), -- GEOGRAPHY -- geometry::STGeomFromText('POINT (3 4)', 0), -- GEOMETRY diff --git a/internal/testutil/testdata/mssql/alltypes/job-mappings.go b/internal/testutil/testdata/mssql/alltypes/job-mappings.go new file mode 100644 index 0000000000..502c16c06f --- /dev/null +++ b/internal/testutil/testdata/mssql/alltypes/job-mappings.go @@ -0,0 +1,379 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package mssql_alltypes + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "alldatatypes", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_bigint", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_numeric", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_bit", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_smallint", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_decimal", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_smallmoney", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_int", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_tinyint", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_money", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_float", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_real", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_datetimeoffset", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_datetime2", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_smalldatetime", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_datetime", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_time", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_char", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_varchar", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_text", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_nchar", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_nvarchar", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_ntext", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_binary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_varbinary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_uniqueidentifier", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "alldatatypes", + Column: "col_xml", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/insert.sql b/internal/testutil/testdata/mssql/commerce/create-tables.sql similarity index 85% rename from worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/insert.sql rename to internal/testutil/testdata/mssql/commerce/create-tables.sql index ce6905b6e7..c772e7dad8 100644 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/insert.sql +++ b/internal/testutil/testdata/mssql/commerce/create-tables.sql @@ -1,4 +1,102 @@ +CREATE TABLE production.categories ( + category_id INT IDENTITY (1, 1) PRIMARY KEY, + category_name VARCHAR (255) NOT NULL +); + +CREATE TABLE production.brands ( + brand_id INT IDENTITY (1, 1) PRIMARY KEY, + brand_name VARCHAR (255) NOT NULL +); + +CREATE TABLE production.products ( + product_id INT IDENTITY (1, 1) PRIMARY KEY, + product_name VARCHAR (255) NOT NULL, + brand_id INT NOT NULL, + category_id INT NOT NULL, + model_year SMALLINT NOT NULL, + list_price DECIMAL (10, 2) NOT NULL, + FOREIGN KEY (category_id) REFERENCES production.categories (category_id) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (brand_id) REFERENCES production.brands (brand_id) ON DELETE CASCADE ON UPDATE CASCADE +); + +CREATE TABLE production.identities( + id INT IDENTITY (1,1) PRIMARY KEY +) + +CREATE TABLE sales.customers ( + customer_id INT IDENTITY (1, 1) PRIMARY KEY, + first_name VARCHAR (255) NOT NULL, + last_name VARCHAR (255) NOT NULL, + phone VARCHAR (25), + email VARCHAR (255) NOT NULL, + street VARCHAR (255), + city VARCHAR (50), + state VARCHAR (25), + zip_code VARCHAR (5) +); + +CREATE TABLE sales.stores ( + store_id INT IDENTITY (1, 1) PRIMARY KEY, + store_name VARCHAR (255) NOT NULL, + phone VARCHAR (25), + email VARCHAR (255), + street VARCHAR (255), + city VARCHAR (255), + state VARCHAR (10), + zip_code VARCHAR (5) +); + +CREATE TABLE sales.staffs ( + staff_id INT IDENTITY (1, 1) PRIMARY KEY, + first_name VARCHAR (50) NOT NULL, + last_name VARCHAR (50) NOT NULL, + email VARCHAR (255) NOT NULL UNIQUE, + phone VARCHAR (25), + active tinyint NOT NULL, + store_id INT NOT NULL, + manager_id INT, + FOREIGN KEY (store_id) REFERENCES sales.stores (store_id) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (manager_id) REFERENCES sales.staffs (staff_id) ON DELETE NO ACTION ON UPDATE NO ACTION +); + +CREATE TABLE sales.orders ( + order_id INT IDENTITY (1, 1) PRIMARY KEY, + customer_id INT, + order_status tinyint NOT NULL, + -- Order status: 1 = Pending; 2 = Processing; 3 = Rejected; 4 = Completed + order_date DATE NOT NULL, + required_date DATE NOT NULL, + shipped_date DATE, + store_id INT NOT NULL, + staff_id INT NOT NULL, + FOREIGN KEY (customer_id) REFERENCES sales.customers (customer_id) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (store_id) REFERENCES sales.stores (store_id) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (staff_id) REFERENCES sales.staffs (staff_id) ON DELETE NO ACTION ON UPDATE NO ACTION +); + +CREATE TABLE sales.order_items ( + order_id INT, + item_id INT, + product_id INT NOT NULL, + quantity INT NOT NULL, + list_price DECIMAL (10, 2) NOT NULL, + discount DECIMAL (4, 2) NOT NULL DEFAULT 0, + PRIMARY KEY (order_id, item_id), + FOREIGN KEY (order_id) REFERENCES sales.orders (order_id) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (product_id) REFERENCES production.products (product_id) ON DELETE CASCADE ON UPDATE CASCADE +); + +CREATE TABLE production.stocks ( + store_id INT, + product_id INT, + quantity INT, + PRIMARY KEY (store_id, product_id), + FOREIGN KEY (store_id) REFERENCES sales.stores (store_id) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (product_id) REFERENCES production.products (product_id) ON DELETE CASCADE ON UPDATE CASCADE +); + + SET IDENTITY_INSERT production.brands ON; INSERT INTO production.brands(brand_id,brand_name) VALUES(1,'Electra') INSERT INTO production.brands(brand_id,brand_name) VALUES(2,'Haro') @@ -169,3 +267,4 @@ INSERT INTO production.identities DEFAULT VALUES; INSERT INTO production.identities DEFAULT VALUES; INSERT INTO production.identities DEFAULT VALUES; INSERT INTO production.identities DEFAULT VALUES; + diff --git a/internal/testutil/testdata/mssql/commerce/job-mappings.go b/internal/testutil/testdata/mssql/commerce/job-mappings.go new file mode 100644 index 0000000000..38bbc52b21 --- /dev/null +++ b/internal/testutil/testdata/mssql/commerce/job-mappings.go @@ -0,0 +1,724 @@ +package mssql_simple + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings() []*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: "production", + Table: "categories", + Column: "category_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "categories", + Column: "category_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "brands", + Column: "brand_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "brands", + Column: "brand_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "products", + Column: "product_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "products", + Column: "product_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "products", + Column: "brand_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "products", + Column: "category_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "products", + Column: "model_year", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "products", + Column: "list_price", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "identities", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "customers", + Column: "customer_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "customers", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "customers", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "customers", + Column: "phone", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "customers", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "customers", + Column: "street", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "customers", + Column: "city", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "customers", + Column: "state", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "customers", + Column: "zip_code", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "stores", + Column: "store_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "stores", + Column: "store_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "stores", + Column: "phone", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "stores", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "stores", + Column: "street", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "stores", + Column: "city", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "stores", + Column: "state", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "stores", + Column: "zip_code", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "staffs", + Column: "staff_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "staffs", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "staffs", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "staffs", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "staffs", + Column: "phone", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "staffs", + Column: "active", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "staffs", + Column: "store_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "staffs", + Column: "manager_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "orders", + Column: "order_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "orders", + Column: "customer_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "orders", + Column: "order_status", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "orders", + Column: "order_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "orders", + Column: "required_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "orders", + Column: "shipped_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "orders", + Column: "store_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "orders", + Column: "staff_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "order_items", + Column: "order_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "order_items", + Column: "item_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "order_items", + Column: "product_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "order_items", + Column: "quantity", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "order_items", + Column: "list_price", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "sales", + Table: "order_items", + Column: "discount", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "stocks", + Column: "store_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "stocks", + Column: "product_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: "production", + Table: "stocks", + Column: "quantity", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + +func GetTableColumnTypeMap() map[string]map[string]string { + return map[string]map[string]string{ + "production.categories": { + "category_id": "INTIDENTITY(1,1)", + "category_name": "VARCHAR(255)", + }, + "production.brands": { + "brand_id": "INTIDENTITY(1,1)", + "brand_name": "VARCHAR(255)", + }, + "production.products": { + "product_id": "INTIDENTITY(1,1)", + "product_name": "VARCHAR(255)", + "brand_id": "INT", + "category_id": "INT", + "model_year": "SMALLINT", + "list_price": "DECIMAL(10,2)", + }, + "production.identities": { + "id": "INTIDENTITY(1,1)", + }, + "sales.customers": { + "customer_id": "INTIDENTITY(1,1)", + "first_name": "VARCHAR(255)", + "last_name": "VARCHAR(255)", + "phone": "VARCHAR(25)", + "email": "VARCHAR(255)", + "street": "VARCHAR(255)", + "city": "VARCHAR(50)", + "state": "VARCHAR(25)", + "zip_code": "VARCHAR(5)", + }, + "sales.stores": { + "store_id": "INTIDENTITY(1,1)", + "store_name": "VARCHAR(255)", + "phone": "VARCHAR(25)", + "email": "VARCHAR(255)", + "street": "VARCHAR(255)", + "city": "VARCHAR(255)", + "state": "VARCHAR(10)", + "zip_code": "VARCHAR(5)", + }, + "sales.staffs": { + "staff_id": "INTIDENTITY(1,1)", + "first_name": "VARCHAR(50)", + "last_name": "VARCHAR(50)", + "email": "VARCHAR(255)", + "phone": "VARCHAR(25)", + "active": "tinyint", + "store_id": "INT", + "manager_id": "INT", + }, + "sales.orders": { + "order_id": "INTIDENTITY(1,1)", + "customer_id": "INT", + "order_status": "tinyint", + "order_date": "DATE", + "required_date": "DATE", + "shipped_date": "DATE", + "store_id": "INT", + "staff_id": "INT", + }, + "sales.order_items": { + "order_id": "INT", + "item_id": "INT", + "product_id": "INT", + "quantity": "INT", + "list_price": "DECIMAL(10,2)", + "discount": "DECIMAL(4,2)", + }, + "production.stocks": { + "store_id": "INT", + "product_id": "INT", + "quantity": "INT", + }, + } +} diff --git a/internal/testutil/testdata/mysql/alltypes/create-tables.sql b/internal/testutil/testdata/mysql/alltypes/create-tables.sql index 024a32152e..f0d12ef83a 100644 --- a/internal/testutil/testdata/mysql/alltypes/create-tables.sql +++ b/internal/testutil/testdata/mysql/alltypes/create-tables.sql @@ -53,10 +53,6 @@ CREATE TABLE IF NOT EXISTS all_data_types ( set_as_array SET('value1', 'value2', 'value3', 'value4', 'value5') ); -CREATE TABLE json_data ( - id INT AUTO_INCREMENT PRIMARY KEY, - data JSON -); INSERT INTO all_data_types ( tinyint_col, smallint_col, mediumint_col, int_col, bigint_col, @@ -73,7 +69,7 @@ INSERT INTO all_data_types ( json_col, set_as_array ) VALUES ( - 127, 32767, 8388607, 2147483647, 922337203685477580, + 127, 32767, 8388607, 2147483647, 922337203685477632, 1234.56, 3.1415, 3.14159265359, b'10101010', '2023-09-12', '14:30:00', '2023-09-12 14:30:00', 2023, @@ -96,12 +92,17 @@ INSERT INTO all_data_types ( INSERT INTO all_data_types (id) VALUES (DEFAULT); +CREATE TABLE IF NOT EXISTS json_data ( + id INT AUTO_INCREMENT PRIMARY KEY, + data JSON +); + INSERT INTO json_data (data) VALUES ('"Hello, world!"'); INSERT INTO json_data (data) VALUES ('42'); INSERT INTO json_data (data) VALUES ('3.14'); INSERT INTO json_data (data) VALUES ('true'); INSERT INTO json_data (data) VALUES ('false'); -INSERT INTO json_data (data) VALUES ('null'); +INSERT INTO json_data (data) VALUES (NULL); INSERT INTO json_data (data) VALUES ('{"name": "John", "age": 30}'); INSERT INTO json_data (data) VALUES ('{"coords": {"x": 10, "y": 20}}'); diff --git a/internal/testutil/testdata/mysql/alltypes/job-mappings.go b/internal/testutil/testdata/mysql/alltypes/job-mappings.go new file mode 100644 index 0000000000..03234f7fb5 --- /dev/null +++ b/internal/testutil/testdata/mysql/alltypes/job-mappings.go @@ -0,0 +1,444 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package mysql_alltypes + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "all_data_types", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "tinyint_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "smallint_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "mediumint_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "int_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "bigint_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "decimal_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "float_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "double_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "bit_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "date_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "time_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "datetime_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "timestamp_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "year_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "char_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "varchar_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "binary_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "varbinary_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "tinyblob_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "tinytext_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "blob_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "text_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "mediumblob_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "mediumtext_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "longblob_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "longtext_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "enum_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "set_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "json_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "set_as_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "json_data", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "json_data", + Column: "data", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/internal/testutil/testdata/mysql/alltypes/job_mappings.go b/internal/testutil/testdata/mysql/alltypes/job_mappings.go deleted file mode 100644 index 0143ff7402..0000000000 --- a/internal/testutil/testdata/mysql/alltypes/job_mappings.go +++ /dev/null @@ -1,263 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create-tables.sql - -package mysql_alltypes - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: schema, - Table: "all_data_types", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "tinyint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "smallint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "mediumint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "int_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "bigint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "decimal_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "float_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "double_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "bit_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "date_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "time_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "datetime_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "timestamp_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "year_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "char_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "varchar_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "binary_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "varbinary_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "tinyblob_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "tinytext_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "blob_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "text_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "mediumblob_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "mediumtext_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "longblob_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "longtext_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "enum_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "set_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "json_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "set_as_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/insert.sql b/internal/testutil/testdata/mysql/composite-keys/create-tables.sql similarity index 82% rename from worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/insert.sql rename to internal/testutil/testdata/mysql/composite-keys/create-tables.sql index c5cc48bff6..15e3881d8c 100644 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/insert.sql +++ b/internal/testutil/testdata/mysql/composite-keys/create-tables.sql @@ -1,4 +1,53 @@ -use composite; +CREATE TABLE IF NOT EXISTS orders ( + order_id CHAR(36) NOT NULL, + product_id CHAR(36) NOT NULL, + order_date DATE, + PRIMARY KEY (order_id, product_id) +); + + +CREATE TABLE IF NOT EXISTS order_details ( + detail_id CHAR(36) NOT NULL, + order_id CHAR(36) NOT NULL, + product_id CHAR(36) NOT NULL, + quantity INT, + PRIMARY KEY (detail_id) +); + + +CREATE TABLE IF NOT EXISTS order_shipping ( + shipping_id CHAR(36) NOT NULL, + order_id CHAR(36) NOT NULL, + product_id CHAR(36) NOT NULL, + shipping_date DATE, + PRIMARY KEY (shipping_id) +); + +CREATE TABLE IF NOT EXISTS shipping_status ( + status_id CHAR(36) NOT NULL, + order_id CHAR(36) NOT NULL, + product_id CHAR(36) NOT NULL, + status VARCHAR(255), + status_date DATE, + PRIMARY KEY (status_id) +); + + + +ALTER TABLE order_details +ADD FOREIGN KEY (order_id, product_id) +REFERENCES orders (order_id, product_id); + + +ALTER TABLE order_shipping +ADD FOREIGN KEY (order_id, product_id) +REFERENCES orders (order_id, product_id); + + +ALTER TABLE shipping_status +ADD FOREIGN KEY (order_id, product_id) +REFERENCES order_shipping (order_id, product_id); + INSERT INTO `orders` (order_id, product_id, order_date) VALUES ('550e8400-e29b-41d4-a716-446655440000', 'd94f8bdc-6a8b-4d3b-8b1d-601c6c5d5d10', '2023-01-01'), diff --git a/internal/testutil/testdata/mysql/composite-keys/job-mappings.go b/internal/testutil/testdata/mysql/composite-keys/job-mappings.go new file mode 100644 index 0000000000..ce5003597d --- /dev/null +++ b/internal/testutil/testdata/mysql/composite-keys/job-mappings.go @@ -0,0 +1,223 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package mysql_compositekeys + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "order_details", + Column: "detail_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "order_details", + Column: "order_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "order_details", + Column: "product_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "order_details", + Column: "quantity", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "order_shipping", + Column: "shipping_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "order_shipping", + Column: "order_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "order_shipping", + Column: "product_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "order_shipping", + Column: "shipping_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "orders", + Column: "order_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "orders", + Column: "product_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "orders", + Column: "order_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "shipping_status", + Column: "status_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "shipping_status", + Column: "order_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "shipping_status", + Column: "product_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "shipping_status", + Column: "status", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "shipping_status", + Column: "status_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/create.sql b/internal/testutil/testdata/mysql/edgecases/create-tables.sql similarity index 60% rename from worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/create.sql rename to internal/testutil/testdata/mysql/edgecases/create-tables.sql index a8848127f2..5bc8de6ac9 100644 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/create.sql +++ b/internal/testutil/testdata/mysql/edgecases/create-tables.sql @@ -1,21 +1,5 @@ -CREATE DATABASE IF NOT EXISTS init_schema; -CREATE DATABASE IF NOT EXISTS init_schema2; -CREATE DATABASE IF NOT EXISTS init_schema3; -USE init_schema; -CREATE TABLE IF NOT EXISTS container_status ( - id int NOT NULL AUTO_INCREMENT, - PRIMARY KEY (id)) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb3; -CREATE TABLE IF NOT EXISTS container ( - id int NOT NULL AUTO_INCREMENT, - code varchar(32) NOT NULL, - container_status_id int NOT NULL, -PRIMARY KEY (id), -UNIQUE KEY container_code_uniq (code), -KEY container_container_status_fk (container_status_id)); - -USE init_schema2; CREATE TABLE IF NOT EXISTS container_status ( id int NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb3; @@ -28,8 +12,6 @@ PRIMARY KEY (id), UNIQUE KEY container_code_uniq (code), KEY container_container_status_fk (container_status_id)); -USE init_schema3; - CREATE TABLE IF NOT EXISTS users ( id INT AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(50) NOT NULL, @@ -93,6 +75,8 @@ CREATE TABLE IF NOT EXISTS t5 ( z INT NULL ); +-- Testing init schema + -- DELIMITER // CREATE FUNCTION generate_custom_id() RETURNS VARCHAR(255) @@ -138,15 +122,83 @@ CREATE TABLE IF NOT EXISTS tablewithcount ( -- Foreign key constraints -USE init_schema; ALTER TABLE container ADD CONSTRAINT container_container_status_fk FOREIGN KEY (container_status_id) REFERENCES container_status (id); -USE init_schema2; -ALTER TABLE container ADD CONSTRAINT container_container_status_fk FOREIGN KEY (container_status_id) REFERENCES container_status (id); - -USE init_schema3; ALTER TABLE t1 ADD CONSTRAINT t1_b_fkey FOREIGN KEY (b) REFERENCES t1(a); ALTER TABLE t2 ADD CONSTRAINT t2_b_fkey FOREIGN KEY (b) REFERENCES t3(a); ALTER TABLE t3 ADD CONSTRAINT t3_b_fkey FOREIGN KEY (b) REFERENCES t2(a); ALTER TABLE child1 ADD CONSTRAINT fk_child1_parent_id_parent1_id FOREIGN KEY (parent_id) REFERENCES parent1(id) ON DELETE CASCADE; ALTER TABLE t5 ADD CONSTRAINT t5_t4_fkey FOREIGN KEY (x, y) REFERENCES t4 (a, b); + + +-- Disable foreign key checks +SET foreign_key_checks = 0; + + +INSERT INTO container_status (id) VALUES (1), (2), (3), (4), (5); + +INSERT INTO container (code, container_status_id) VALUES +('code1', 1), +('code2', 2), +('code3', 3), +('code4', 4), +('code5', 5); + +INSERT INTO users (first_name, last_name, age, current_salary) VALUES +('John', 'Doe', 30, 50000.00), +('Jane', 'Smith', 25, 60000.00), +('Alice', 'Johnson', 28, 55000.00), +('Bob', 'Williams', 35, 65000.00), +('Charlie', 'Brown', 40, 70000.00); + +INSERT INTO unique_emails (email) VALUES +('john.doe@example.com'), +('jane.smith@example.com'), +('alice.johnson@example.com'), +('bob.williams@example.com'), +('charlie.brown@example.com'); + +INSERT INTO unique_emails_and_usernames (email, username) VALUES +('john.doe@example.com', 'johndoe'), +('jane.smith@example.com', 'janesmith'), +('alice.johnson@example.com', 'alicejohnson'), +('bob.williams@example.com', 'bobwilliams'), +('charlie.brown@example.com', 'charliebrown'); + +INSERT INTO t1 (b) VALUES (NULL), (1), (2), (3), (4); + +INSERT INTO t2 (b) VALUES (NULL), (1), (2), (3), (4); + +INSERT INTO t3 (b) VALUES (NULL), (1), (2), (3), (4); + +INSERT INTO parent1 (id) VALUES +('550e8400-e29b-41d4-a716-446655440000'), +('550e8400-e29b-41d4-a716-446655440001'), +('550e8400-e29b-41d4-a716-446655440002'), +('550e8400-e29b-41d4-a716-446655440003'), +('550e8400-e29b-41d4-a716-446655440004'); + +INSERT INTO child1 (parent_id) VALUES +(NULL), +('550e8400-e29b-41d4-a716-446655440000'), +('550e8400-e29b-41d4-a716-446655440001'), +('550e8400-e29b-41d4-a716-446655440002'), +('550e8400-e29b-41d4-a716-446655440003'); + +INSERT INTO t4 (a, b, c) VALUES +(1, 1, 100), (2, 2, 200), (3, 3, 300), (4, 4, 400), (5, 5, 500); + +INSERT INTO t5 (x, y, z) VALUES +(1, 1, 10), (2, 2, 20), (3, 3, 30), (4, 4, 40), (5, 5, 50); + +INSERT INTO employee_log (employee_id, action) VALUES +(NULL, 'INSERT'), (NULL, 'UPDATE'), (NULL, 'DELETE'), (NULL, 'INSERT'), (NULL, 'UPDATE'); + +INSERT INTO custom_table (name, data, status) VALUES +('Alpha', '{}', 'Low'), ('Beta', '{}', 'Medium'), ('Gamma', '{}', 'High'), ('Delta', '{}', 'Low'), ('Epsilon', '{}', 'Medium'); + +INSERT INTO tablewithcount (id) VALUES +('1'), ('2'), ('3'), ('4'), ('5'); + +-- Re-enable foreign key checks +SET foreign_key_checks = 1; diff --git a/internal/testutil/testdata/mysql/edgecases/job-mappings.go b/internal/testutil/testdata/mysql/edgecases/job-mappings.go new file mode 100644 index 0000000000..39e1009153 --- /dev/null +++ b/internal/testutil/testdata/mysql/edgecases/job-mappings.go @@ -0,0 +1,535 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package mysql_edgecases + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "child1", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "child1", + Column: "parent_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "container", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "container", + Column: "code", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "container", + Column: "container_status_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "container_status", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "custom_table", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "custom_table", + Column: "name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "custom_table", + Column: "data", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "custom_table", + Column: "status", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "custom_table", + Column: "created_at", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employee_log", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employee_log", + Column: "employee_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employee_log", + Column: "action", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employee_log", + Column: "change_time", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "parent1", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t1", + Column: "a", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t1", + Column: "b", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t2", + Column: "a", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t2", + Column: "b", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t3", + Column: "a", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t3", + Column: "b", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t4", + Column: "a", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t4", + Column: "b", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t4", + Column: "c", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t5", + Column: "x", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t5", + Column: "y", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "t5", + Column: "z", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "tablewithcount", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "unique_emails", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "unique_emails", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "unique_emails_and_usernames", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "unique_emails_and_usernames", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "unique_emails_and_usernames", + Column: "username", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "fullname", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_GenerateDefaultConfig{ + GenerateDefaultConfig: &mgmtv1alpha1.GenerateDefault{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "age", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "current_salary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/internal/testutil/testdata/mysql/humanresources/job-mappings.go b/internal/testutil/testdata/mysql/humanresources/job-mappings.go new file mode 100644 index 0000000000..1e39fb8080 --- /dev/null +++ b/internal/testutil/testdata/mysql/humanresources/job-mappings.go @@ -0,0 +1,522 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package mysql_humanresources + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "countries", + Column: "country_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "countries", + Column: "country_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "countries", + Column: "region_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "departments", + Column: "department_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "departments", + Column: "department_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "departments", + Column: "location_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "dependent_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "relationship", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "employee_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "employee_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "phone_number", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "hire_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "job_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "salary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "manager_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "department_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "generated_table", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "generated_table", + Column: "price", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "generated_table", + Column: "quantity", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "generated_table", + Column: "discount_percent", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "generated_table", + Column: "total_value", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "generated_table", + Column: "discounted_price", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "job_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "job_title", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "min_salary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "max_salary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "location_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "street_address", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "postal_code", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "city", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "state_province", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "country_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "regions", + Column: "region_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "regions", + Column: "region_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/internal/testutil/testdata/mysql/humanresources/job_mappings.go b/internal/testutil/testdata/mysql/humanresources/job_mappings.go deleted file mode 100644 index cf821ff31f..0000000000 --- a/internal/testutil/testdata/mysql/humanresources/job_mappings.go +++ /dev/null @@ -1,327 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create-tables.sql - -package mysql_humanresources - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: schema, - Table: "departments", - Column: "department_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "departments", - Column: "department_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "departments", - Column: "location_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "employee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "phone_number", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "hire_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "job_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "manager_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "department_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "dependents", - Column: "dependent_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "dependents", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "dependents", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "dependents", - Column: "relationship", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "dependents", - Column: "employee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "generated_table", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "generated_table", - Column: "price", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "generated_table", - Column: "quantity", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "generated_table", - Column: "discount_percent", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "generated_table", - Column: "total_value", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "generated_table", - Column: "discounted_price", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "regions", - Column: "region_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "regions", - Column: "region_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "countries", - Column: "country_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "countries", - Column: "country_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "countries", - Column: "region_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "location_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "street_address", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "postal_code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "city", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "state_province", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "country_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "jobs", - Column: "job_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "jobs", - Column: "job_title", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "jobs", - Column: "min_salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "jobs", - Column: "max_salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/internal/testutil/testdata/postgres/alltypes/create-tables.sql b/internal/testutil/testdata/postgres/alltypes/create-tables.sql index 2f8d7fd44e..763fd8864f 100644 --- a/internal/testutil/testdata/postgres/alltypes/create-tables.sql +++ b/internal/testutil/testdata/postgres/alltypes/create-tables.sql @@ -134,7 +134,7 @@ INSERT INTO all_data_types ( DEFAULT, 32767, -- smallint_col 2147483647, -- integer_col - 922337203685477580, -- bigint_col + 922337203685477632, -- bigint_col 1234.56, -- decimal_col 99999999.99, -- numeric_col 12345.67, -- real_col @@ -145,7 +145,7 @@ INSERT INTO all_data_types ( 'A', -- char_col 'DEFAULT', -- varchar_col 'default', -- text_col - decode('DEADBEEF', 'hex'), -- bytea_col + 'NEOSYNC'::bytea, -- bytea_col '2024-01-01 12:34:56', -- timestamp_col '2024-01-01 12:34:56+00', -- timestamptz_col '2024-01-01', -- date_col @@ -208,23 +208,19 @@ VALUES ( INSERT INTO time_time ( timestamp_col, - timestamptz_col, date_col ) VALUES ( '0001-01-01 00:00:00 BC', - '0001-01-01 00:00:00+00 BC', '0001-01-01 BC' ); INSERT INTO time_time ( timestamp_col, - timestamptz_col, date_col ) VALUES ( '0002-01-01 00:00:00 BC', - '0002-01-01 00:00:00+00 BC', '0002-01-01 BC' ); @@ -258,11 +254,12 @@ CREATE TABLE IF NOT EXISTS array_types ( "uuid_array" _uuid, "json_array" _json, "jsonb_array" _jsonb, - -- "bit_array" _bit, - -- "varbit_array" _varbit, + "bit_array" _bit, + "varbit_array" _varbit, "numeric_array" _numeric, "money_array" _money, - "xml_array" _xml + "xml_array" _xml, + "bytea_array" _bytea -- "int_double_array" _int4 ); @@ -290,10 +287,12 @@ INSERT INTO array_types ( -- path_array, polygon_array, circle_array, uuid_array, json_array, jsonb_array, - -- bit_array, varbit_array, + bit_array, + varbit_array, numeric_array, money_array, - xml_array + xml_array, + bytea_array -- int_double_array ) VALUES ( 1, @@ -323,11 +322,12 @@ INSERT INTO array_types ( ARRAY['a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, 'b0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid], ARRAY['{"key": "value1"}'::json, '{"key": "value2"}'::json], ARRAY['{"key": "value1"}'::jsonb, '{"key": "value2"}'::jsonb], - -- ARRAY['101'::bit(3), '110'::bit(3)], - -- ARRAY['10101'::bit varying(5), '01010'::bit varying(5)], + ARRAY['101'::bit(3), '110'::bit(3)], + ARRAY['10101'::bit varying(5), '01010'::bit varying(5)], ARRAY[1.23::numeric, 4.56::numeric], ARRAY[10.00::money, 20.00::money], - ARRAY['value1'::xml, 'value2'::xml] + ARRAY['value1'::xml, 'value2'::xml], + ARRAY['NEOSYNC'::bytea, 'CNYSOEN'::bytea] -- ARRAY[[1, 2], [3, 4]] ); @@ -343,7 +343,7 @@ INSERT INTO json_data (data) VALUES ('42'); INSERT INTO json_data (data) VALUES ('3.14'); INSERT INTO json_data (data) VALUES ('true'); INSERT INTO json_data (data) VALUES ('false'); -INSERT INTO json_data (data) VALUES ('null'); +INSERT INTO json_data (data) VALUES (NULL); INSERT INTO json_data (data) VALUES ('{"name": "John", "age": 30}'); INSERT INTO json_data (data) VALUES ('{"coords": {"x": 10, "y": 20}}'); @@ -373,3 +373,24 @@ INSERT INTO json_data (data) VALUES ( } }' ); + + +-- Table with generated columns +CREATE TABLE generated_table ( + -- Identity column + id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, + + amount DECIMAL(10,2) NOT NULL, + status text NOT NULL DEFAULT 'pending', + + -- Generated stored column + amount_with_tax DECIMAL(10,2) GENERATED ALWAYS AS (amount * 1.2) STORED +); + + +INSERT INTO generated_table (amount, status) +VALUES + (199.99, 'pending'), + (299.50, 'processing'), + (499.99, 'completed'), + (150.00, 'cancelled'); diff --git a/internal/testutil/testdata/postgres/alltypes/job-mappings.go b/internal/testutil/testdata/postgres/alltypes/job-mappings.go new file mode 100644 index 0000000000..bd423da257 --- /dev/null +++ b/internal/testutil/testdata/postgres/alltypes/job-mappings.go @@ -0,0 +1,1068 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package postgres_alltypes + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "all_data_types", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "smallint_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "integer_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "bigint_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "decimal_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "numeric_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "real_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "double_precision_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "serial_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "bigserial_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "money_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "char_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "varchar_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "text_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "bytea_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "timestamp_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "timestamptz_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "date_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "time_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "timetz_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "interval_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "boolean_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "uuid_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "inet_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "cidr_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "macaddr_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "bit_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "varbit_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "point_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "line_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "lseg_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "box_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "path_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "polygon_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "circle_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "json_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "jsonb_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "int4range_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "int8range_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "numrange_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "tsrange_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "tstzrange_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "daterange_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "integer_array_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "text_array_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "xml_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "tsvector_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "all_data_types", + Column: "oid_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "time_time", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "time_time", + Column: "timestamp_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "time_time", + Column: "timestamptz_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "time_time", + Column: "date_col", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "int_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "smallint_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "bigint_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "real_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "double_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "text_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "varchar_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "char_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "boolean_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "date_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "timestamp_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "timestamptz_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "interval_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "uuid_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "json_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "jsonb_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "bit_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "varbit_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "numeric_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "money_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "xml_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "array_types", + Column: "bytea_array", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "json_data", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "json_data", + Column: "data", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "generated_table", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "generated_table", + Column: "amount", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "generated_table", + Column: "status", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "generated_table", + Column: "amount_with_tax", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_GenerateDefaultConfig{ + GenerateDefaultConfig: &mgmtv1alpha1.GenerateDefault{}, + }, + }, + }, + }, + } +} + diff --git a/internal/testutil/testdata/postgres/alltypes/job_mappings.go b/internal/testutil/testdata/postgres/alltypes/job_mappings.go deleted file mode 100644 index 08f933ff49..0000000000 --- a/internal/testutil/testdata/postgres/alltypes/job_mappings.go +++ /dev/null @@ -1,415 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create-tables.sql - -package postgres_alltypes - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: schema, - Table: "all_data_types", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "smallint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "integer_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "bigint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "decimal_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "numeric_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "real_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "double_precision_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "serial_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "bigserial_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "money_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "char_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "varchar_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "text_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "bytea_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "timestamp_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "timestamptz_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "date_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "interval_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "boolean_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "uuid_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "inet_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "cidr_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "macaddr_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "bit_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "varbit_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "point_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "line_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "lseg_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "box_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "path_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "polygon_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "circle_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "json_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "jsonb_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "int4range_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "int8range_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "numrange_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "tsrange_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "tstzrange_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "daterange_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "integer_array_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "text_array_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "xml_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "tsvector_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "all_data_types", - Column: "oid_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "array_types", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "array_types", - Column: "interval_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "json_data", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "json_data", - Column: "data", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/internal/testutil/testdata/postgres/edgecases/create-tables.sql b/internal/testutil/testdata/postgres/edgecases/create-tables.sql new file mode 100644 index 0000000000..5231665b90 --- /dev/null +++ b/internal/testutil/testdata/postgres/edgecases/create-tables.sql @@ -0,0 +1,193 @@ + +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; +CREATE TABLE IF NOT EXISTS "BadName" ( + "ID" BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, + "NAME" text UNIQUE +); + +INSERT INTO "BadName" ("NAME") +VALUES + ('Xk7pQ9nM3v'), + ('Rt5wLjH2yB'), + ('Zc8fAe4dN6'), + ('Ym9gKu3sW5'), + ('Vb4nPx7tJ2'); + +CREATE TABLE "Bad Name 123!@#" ( + "ID" SERIAL PRIMARY KEY, + "NAME" text REFERENCES "BadName" ("NAME") +); + + +INSERT INTO "Bad Name 123!@#" ("NAME") +VALUES + ('Xk7pQ9nM3v'), + ('Rt5wLjH2yB'), + ('Zc8fAe4dN6'), + ('Ym9gKu3sW5'), + ('Vb4nPx7tJ2'); + + +-- Table addresses depends on Table orders +CREATE TABLE addresses( + id UUID PRIMARY KEY, + order_id UUID NULL +); + +-- Table customers depends on Table addresses +CREATE TABLE customers( + id UUID PRIMARY KEY, + address_id UUID, + CONSTRAINT fk_address + FOREIGN KEY (address_id) + REFERENCES addresses (id) + +); + +-- Table orders depends on Table customers +CREATE TABLE orders ( + id UUID PRIMARY KEY, + customer_id UUID, + CONSTRAINT fk_customer + FOREIGN KEY (customer_id) + REFERENCES customers (id) +); + +-- Inserts for the addresses table +INSERT INTO addresses (id, order_id) VALUES ('ec3cbe4f-217e-49e0-bc7d-d0c334cc7d3b', 'f216a6f8-3bcd-46d8-8b99-e3b31dd5e6f3'); +INSERT INTO addresses (id, order_id) VALUES ('f6c7d5b6-9140-4dcb-bc34-648fcb2c8d1f', 'd5e95c33-08c5-4098-8b69-4b1a8e4c6a96'); +INSERT INTO addresses (id, order_id) VALUES ('cfba342e-46e5-45d7-8437-7fd7c22dfe0c', '7eaa7688-3730-4a55-8741-d6ae58a1b843'); +INSERT INTO addresses (id, order_id) VALUES ('a29487f8-ec77-4f84-bb1d-4f526457baba', '47873236-95b4-4c0f-ae45-7b19d9de4abf'); +INSERT INTO addresses (id, order_id) VALUES ('5c0f798e-8d4a-4f26-9b5d-1181f1b4d7a5', '9a2a85d2-1554-420b-b4e2-c769c674dbb1'); +INSERT INTO addresses (id, order_id) VALUES ('e295f80d-2f60-41a0-9945-7dbff521b193', 'b63f0e2c-f6d2-472f-b41c-9d5e64b48c3c'); +INSERT INTO addresses (id, order_id) VALUES ('f1a3c6e8-dccf-46c8-a0f3-79b93f3d2b0b', '6a1c1a7e-3e5c-4828-8228-91ff0b8d03e3'); +INSERT INTO addresses (id, order_id) VALUES ('36f594af-6d53-4a48-a9b7-b889e2df349e', 'ec5f8a5f-7352-4e4c-9d3f-08e4dbf98df5'); + + +-- Inserts for the customers table +INSERT INTO customers (id, address_id) VALUES ('e1a65af8-b0c2-42a0-99c4-7a91a0b2a80d', 'ec3cbe4f-217e-49e0-bc7d-d0c334cc7d3b'); +INSERT INTO customers (id, address_id) VALUES ('a0e78f88-6b48-4d97-8a8a-212bece329b7', 'f6c7d5b6-9140-4dcb-bc34-648fcb2c8d1f'); +INSERT INTO customers (id, address_id) VALUES ('b5c6f69e-13da-4f60-9b8d-dae2fa526b1f', 'cfba342e-46e5-45d7-8437-7fd7c22dfe0c'); +INSERT INTO customers (id, address_id) VALUES ('d82c4a97-00ef-4e0b-8d3a-1b6a4e587524', 'a29487f8-ec77-4f84-bb1d-4f526457baba'); +INSERT INTO customers (id, address_id) VALUES ('4b60d61b-fd6b-4d8e-8978-63c2edb9a274', '5c0f798e-8d4a-4f26-9b5d-1181f1b4d7a5'); +INSERT INTO customers (id, address_id) VALUES ('76b2f70b-ade3-4d57-8b3b-fd1ccf9a5c3a', 'e295f80d-2f60-41a0-9945-7dbff521b193'); +INSERT INTO customers (id, address_id) VALUES ('b83f99cc-8655-4639-9b0f-0d0c60f3a8c3', 'f1a3c6e8-dccf-46c8-a0f3-79b93f3d2b0b'); +INSERT INTO customers (id, address_id) VALUES ('cf769742-74fa-4f2f-8580-df47cc927ba1', '36f594af-6d53-4a48-a9b7-b889e2df349e'); +INSERT INTO customers (id, address_id) VALUES ('dd1b75e6-062d-4fbb-963d-973b612a20c1', 'a29487f8-ec77-4f84-bb1d-4f526457baba'); +INSERT INTO customers (id, address_id) VALUES ('6f4587e5-4dfd-4e8d-8d98-c9c0e1b9ef2e', 'e295f80d-2f60-41a0-9945-7dbff521b193'); + +-- Inserts for the orders table +INSERT INTO orders (id, customer_id) VALUES ('f216a6f8-3bcd-46d8-8b99-e3b31dd5e6f3', 'e1a65af8-b0c2-42a0-99c4-7a91a0b2a80d'); +INSERT INTO orders (id, customer_id) VALUES ('d5e95c33-08c5-4098-8b69-4b1a8e4c6a96', 'a0e78f88-6b48-4d97-8a8a-212bece329b7'); +INSERT INTO orders (id, customer_id) VALUES ('7eaa7688-3730-4a55-8741-d6ae58a1b843', 'b5c6f69e-13da-4f60-9b8d-dae2fa526b1f'); +INSERT INTO orders (id, customer_id) VALUES ('47873236-95b4-4c0f-ae45-7b19d9de4abf', 'd82c4a97-00ef-4e0b-8d3a-1b6a4e587524'); +INSERT INTO orders (id, customer_id) VALUES ('9a2a85d2-1554-420b-b4e2-c769c674dbb1', '4b60d61b-fd6b-4d8e-8978-63c2edb9a274'); +INSERT INTO orders (id, customer_id) VALUES ('b63f0e2c-f6d2-472f-b41c-9d5e64b48c3c', '76b2f70b-ade3-4d57-8b3b-fd1ccf9a5c3a'); +INSERT INTO orders (id, customer_id) VALUES ('6a1c1a7e-3e5c-4828-8228-91ff0b8d03e3', 'b83f99cc-8655-4639-9b0f-0d0c60f3a8c3'); +INSERT INTO orders (id, customer_id) VALUES ('ec5f8a5f-7352-4e4c-9d3f-08e4dbf98df5', 'cf769742-74fa-4f2f-8580-df47cc927ba1'); +INSERT INTO orders (id, customer_id) VALUES ('58dca9d5-8500-4f8b-a3f3-75b6390e3c1a', 'dd1b75e6-062d-4fbb-963d-973b612a20c1'); +INSERT INTO orders (id, customer_id) VALUES ('762b3bb2-3723-4e3b-8b53-b2e8057896ab', '6f4587e5-4dfd-4e8d-8d98-c9c0e1b9ef2e'); + + + +-- Adding the foreign key constraints to create the circular dependency +ALTER TABLE addresses +ADD CONSTRAINT fk_order +FOREIGN KEY (order_id) +REFERENCES orders (id); + + +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; +CREATE TABLE + IF NOT EXISTS "company" ( + "id" BIGSERIAL NOT NULL, + "name" text NOT NULL, + "url" text NULL, + "employee_count" integer NULL, + "uuid" uuid NOT NULL DEFAULT uuid_generate_v4 (), + CONSTRAINT company_pkey PRIMARY KEY (id), + CONSTRAINT company_uuid_key UNIQUE (uuid) + ); +CREATE TABLE + IF NOT EXISTS "department" ( + "id" BIGSERIAL NOT NULL, + "name" text NOT NULL, + "url" text NULL, + "company_id" bigint NOT NULL, -- to be fk + "user_id" bigint NULL, + "uuid" uuid NOT NULL DEFAULT uuid_generate_v4 (), + CONSTRAINT department_pkey PRIMARY KEY (id), + CONSTRAINT department_uuid_key UNIQUE (uuid), + CONSTRAINT department_company_id_fkey FOREIGN KEY (company_id) REFERENCES company (id) ON DELETE CASCADE + ); +-- market +CREATE TABLE IF NOT EXISTS transaction ( + id bigint NOT NULL, + amount double precision NOT NULL, + created timestamp without time zone, + updated timestamp without time zone, + department_id bigint, -- to be fk + date date, + currency text NOT NULL, + settings json DEFAULT '{ + "historicalCount": 0, + "vacation": false, + "conference": true, + "travel": true + }'::json NOT NULL, + description text, + timezone text DEFAULT 'America/New_York'::text NOT NULL, + uuid uuid DEFAULT uuid_generate_v4() NOT NULL, + CONSTRAINT transaction_pkey PRIMARY KEY (id), + CONSTRAINT transaction_department_id_fkey FOREIGN KEY (department_id) REFERENCES department (ID) ON DELETE CASCADE +); +CREATE TABLE IF NOT EXISTS expense_report ( + id bigint NOT NULL, + invoice_id text, + date date NOT NULL, + amount numeric(15,2), + department_source_id bigint, -- fk + department_destination_id bigint, --fk + created timestamp without time zone, + updated timestamp without time zone, + currency character varying(5), + transaction_type integer NOT NULL, + paid boolean DEFAULT false, + transaction_id bigint, -- fk + adjustment_amount numeric(15,2), + CONSTRAINT transaction_type_valid_values CHECK ((transaction_type = ANY (ARRAY[1, 2]))), + CONSTRAINT expense_report_pkey PRIMARY KEY (id), + CONSTRAINT expense_report_dept_source_fkey FOREIGN KEY (department_source_id) REFERENCES department (ID) ON DELETE CASCADE, + CONSTRAINT expense_report_dept_destination_fkey FOREIGN KEY (department_destination_id) REFERENCES department (ID) ON DELETE CASCADE, + CONSTRAINT expense_report_transaction_fkey FOREIGN KEY (transaction_id) REFERENCES transaction (ID) ON DELETE CASCADE +); + + +-- COMPANY DATA +INSERT INTO company (name, url, employee_count, uuid) +VALUES + ('Acme Corporation', 'www.acme.com', 500, uuid_generate_v4()), + ('Global Enterprises', 'globalenterprises.net', 1200, uuid_generate_v4()), + ('Tech Innovations', 'www.techinnovations.io', 250, uuid_generate_v4()); + +-- DEPARTMENT DATA +INSERT INTO department (name, url, company_id, uuid) +VALUES + ('Marketing', 'marketing.acme.com', 1, uuid_generate_v4()), -- Acme Corporation + ('Sales', 'sales.acme.com', 1, uuid_generate_v4()), + ('Finance', null, 2, uuid_generate_v4()), -- Global Enterprises + ('R&D', 'rnd.techinnovations.io', 3, uuid_generate_v4()); -- Tech Innovations + +-- TRANSACTION DATA +INSERT INTO transaction (id, amount, created, updated, department_id, date, currency, description, uuid) +VALUES + (1, 250.50, now() - interval '2 weeks', now(), 1, '2024-05-01', 'USD', 'Office Supplies', uuid_generate_v4()), + (2, 1250.00, now() - interval '5 days', now(), 2, '2024-05-06', 'GBP', 'Travel Expenses', uuid_generate_v4()), + (3, 87.25, now() - interval '1 month', now(), 3, '2024-04-20', 'EUR', 'Lunch Meeting', uuid_generate_v4()); + -- Repeat with varied data ... + +-- EXPENSE REPORT DATA +INSERT INTO expense_report (id, invoice_id, date, amount, department_source_id, department_destination_id, created, updated, currency, transaction_type, paid, adjustment_amount, transaction_id) +VALUES + (1, 'INV-1234', '2024-05-03', 500.00, 1, 2, now() - interval '15 days', now(), 'USD', 1, true, null, 1), + (2,'INV-5678', '2024-04-28', 128.75, 3, 1, now() - interval '20 days', now() - interval '1 day', 'CAD', 2, false, 12.50, 3); diff --git a/internal/testutil/testdata/postgres/edgecases/job-mappings.go b/internal/testutil/testdata/postgres/edgecases/job-mappings.go new file mode 100644 index 0000000000..9a676c0b14 --- /dev/null +++ b/internal/testutil/testdata/postgres/edgecases/job-mappings.go @@ -0,0 +1,600 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package postgres_edgecases + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "BadName", + Column: "ID", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "BadName", + Column: "NAME", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "Bad Name 123!@#", + Column: "ID", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "Bad Name 123!@#", + Column: "NAME", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "addresses", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "addresses", + Column: "order_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "customers", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "customers", + Column: "address_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "orders", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "orders", + Column: "customer_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "company", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "company", + Column: "name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "company", + Column: "url", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "company", + Column: "employee_count", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "company", + Column: "uuid", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "department", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "department", + Column: "name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "department", + Column: "url", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "department", + Column: "company_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "department", + Column: "user_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "department", + Column: "uuid", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "amount", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "created", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "updated", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "department_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "currency", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "settings", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "description", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "timezone", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transaction", + Column: "uuid", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "invoice_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "amount", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "department_source_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "department_destination_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "created", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "updated", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "currency", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "transaction_type", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "paid", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "transaction_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "expense_report", + Column: "adjustment_amount", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/source-setup.sql b/internal/testutil/testdata/postgres/foreignkey-violations/create-tables.sql similarity index 94% rename from worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/source-setup.sql rename to internal/testutil/testdata/postgres/foreignkey-violations/create-tables.sql index 31df4f81e9..c020c2f5b3 100644 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/source-setup.sql +++ b/internal/testutil/testdata/postgres/foreignkey-violations/create-tables.sql @@ -1,8 +1,4 @@ -CREATE SCHEMA IF NOT EXISTS vfk_hr; -SET search_path TO vfk_hr; - - -CREATE TABLE IF NOT EXISTS regions ( +CREATE TABLE IF NOT EXISTS regions ( region_id SERIAL PRIMARY KEY, region_name CHARACTER VARYING (25) ); @@ -10,7 +6,8 @@ CREATE TABLE IF NOT EXISTS regions ( CREATE TABLE IF NOT EXISTS countries ( country_id CHARACTER (2) PRIMARY KEY, country_name CHARACTER VARYING (40), - region_id INTEGER NOT NULL + region_id INTEGER NOT NULL, + FOREIGN KEY (region_id) REFERENCES regions (region_id) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE IF NOT EXISTS locations ( @@ -19,13 +16,15 @@ CREATE TABLE IF NOT EXISTS locations ( postal_code CHARACTER VARYING (12), city CHARACTER VARYING (30) NOT NULL, state_province CHARACTER VARYING (25), - country_id CHARACTER (2) NOT NULL + country_id CHARACTER (2) NOT NULL, + FOREIGN KEY (country_id) REFERENCES countries (country_id) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE IF NOT EXISTS departments ( department_id SERIAL PRIMARY KEY, department_name CHARACTER VARYING (30) NOT NULL, - location_id INTEGER + location_id INTEGER, + FOREIGN KEY (location_id) REFERENCES locations (location_id) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE IF NOT EXISTS jobs ( @@ -45,7 +44,10 @@ CREATE TABLE IF NOT EXISTS employees ( job_id INTEGER NOT NULL, salary NUMERIC (8, 2) NOT NULL, manager_id INTEGER, - department_id INTEGER + department_id INTEGER, + FOREIGN KEY (job_id) REFERENCES jobs (job_id) ON UPDATE CASCADE ON DELETE CASCADE, + FOREIGN KEY (department_id) REFERENCES departments (department_id) ON UPDATE CASCADE ON DELETE CASCADE, + FOREIGN KEY (manager_id) REFERENCES employees (employee_id) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE TABLE IF NOT EXISTS dependents ( @@ -53,10 +55,12 @@ CREATE TABLE IF NOT EXISTS dependents ( first_name CHARACTER VARYING (50) NOT NULL, last_name CHARACTER VARYING (50) NOT NULL, relationship CHARACTER VARYING (25) NOT NULL, - employee_id INTEGER NOT NULL + employee_id INTEGER NOT NULL, + FOREIGN KEY (employee_id) REFERENCES employees (employee_id) ON DELETE CASCADE ON UPDATE CASCADE ); + INSERT INTO regions(region_id,region_name) VALUES (1,'Europe'); INSERT INTO regions(region_id,region_name) VALUES (2,'Americas'); INSERT INTO regions(region_id,region_name) VALUES (3,'Asia'); @@ -215,3 +219,21 @@ INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_i INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (28,'Woody','Russell','Child',145); INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (29,'Alec','Partners','Child',146); INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (30,'Sandra','Taylor','Child',176); + +-- break foreign key constraints +ALTER TABLE countries +DISABLE TRIGGER ALL; + +UPDATE countries SET region_id = 6 WHERE country_id IN ('US'); + +ALTER TABLE countries +ENABLE TRIGGER ALL; + + +ALTER TABLE dependents +DISABLE TRIGGER ALL; + +UPDATE dependents SET employee_id = 1000 WHERE last_name IN ('King', 'Colmenares'); + +ALTER TABLE dependents +ENABLE TRIGGER ALL; diff --git a/internal/testutil/testdata/postgres/foreignkey-violations/job-mappings.go b/internal/testutil/testdata/postgres/foreignkey-violations/job-mappings.go new file mode 100644 index 0000000000..2153c0b37c --- /dev/null +++ b/internal/testutil/testdata/postgres/foreignkey-violations/job-mappings.go @@ -0,0 +1,444 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package postgres_foreignkeyviolations + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "regions", + Column: "region_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "regions", + Column: "region_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "countries", + Column: "country_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "countries", + Column: "country_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "countries", + Column: "region_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "location_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "street_address", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "postal_code", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "city", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "state_province", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "country_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "departments", + Column: "department_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "departments", + Column: "department_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "departments", + Column: "location_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "job_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "job_title", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "min_salary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "max_salary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "employee_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "phone_number", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "hire_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "job_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "salary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "manager_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "department_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "dependent_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "relationship", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "employee_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/internal/testutil/testdata/postgres/humanresources/create-constraints.sql b/internal/testutil/testdata/postgres/humanresources/create-constraints.sql new file mode 100644 index 0000000000..5b8e2b0834 --- /dev/null +++ b/internal/testutil/testdata/postgres/humanresources/create-constraints.sql @@ -0,0 +1,29 @@ + +ALTER TABLE countries + ADD CONSTRAINT fk_countries_region_id + FOREIGN KEY (region_id) REFERENCES regions (region_id); + +ALTER TABLE locations + ADD CONSTRAINT fk_locations_country_id + FOREIGN KEY (country_id) REFERENCES countries (country_id); + +ALTER TABLE departments + ADD CONSTRAINT fk_departments_location_id + FOREIGN KEY (location_id) REFERENCES locations (location_id); + + +ALTER TABLE employees + ADD CONSTRAINT fk_employees_job_id + FOREIGN KEY (job_id) REFERENCES jobs (job_id); + +ALTER TABLE employees + ADD CONSTRAINT fk_employees_department_id + FOREIGN KEY (department_id) REFERENCES departments (department_id); + +ALTER TABLE employees + ADD CONSTRAINT fk_employees_manager_id + FOREIGN KEY (manager_id) REFERENCES employees (employee_id); + +ALTER TABLE dependents + ADD CONSTRAINT fk_dependents_employee_id + FOREIGN KEY (employee_id) REFERENCES employees (employee_id) diff --git a/internal/testutil/testdata/postgres/humanresources/create-tables.sql b/internal/testutil/testdata/postgres/humanresources/create-tables.sql index 5ca813ab81..39e74f0e17 100644 --- a/internal/testutil/testdata/postgres/humanresources/create-tables.sql +++ b/internal/testutil/testdata/postgres/humanresources/create-tables.sql @@ -1,40 +1,37 @@ -CREATE TABLE regions ( +CREATE TABLE IF NOT EXISTS regions ( region_id SERIAL PRIMARY KEY, region_name CHARACTER VARYING (25) ); -CREATE TABLE countries ( +CREATE TABLE IF NOT EXISTS countries ( country_id CHARACTER (2) PRIMARY KEY, country_name CHARACTER VARYING (40), - region_id INTEGER NOT NULL, - FOREIGN KEY (region_id) REFERENCES regions (region_id) ON UPDATE CASCADE ON DELETE CASCADE + region_id INTEGER NOT NULL ); -CREATE TABLE locations ( +CREATE TABLE IF NOT EXISTS locations ( location_id SERIAL PRIMARY KEY, street_address CHARACTER VARYING (40), postal_code CHARACTER VARYING (12), city CHARACTER VARYING (30) NOT NULL, state_province CHARACTER VARYING (25), - country_id CHARACTER (2) NOT NULL, - FOREIGN KEY (country_id) REFERENCES countries (country_id) ON UPDATE CASCADE ON DELETE CASCADE + country_id CHARACTER (2) NOT NULL ); -CREATE TABLE departments ( +CREATE TABLE IF NOT EXISTS departments ( department_id SERIAL PRIMARY KEY, department_name CHARACTER VARYING (30) NOT NULL, - location_id INTEGER, - FOREIGN KEY (location_id) REFERENCES locations (location_id) ON UPDATE CASCADE ON DELETE CASCADE + location_id INTEGER ); -CREATE TABLE jobs ( +CREATE TABLE IF NOT EXISTS jobs ( job_id SERIAL PRIMARY KEY, job_title CHARACTER VARYING (35) NOT NULL, min_salary NUMERIC (8, 2), max_salary NUMERIC (8, 2) ); -CREATE TABLE employees ( +CREATE TABLE IF NOT EXISTS employees ( employee_id SERIAL PRIMARY KEY, first_name CHARACTER VARYING (20), last_name CHARACTER VARYING (25) NOT NULL, @@ -44,24 +41,18 @@ CREATE TABLE employees ( job_id INTEGER NOT NULL, salary NUMERIC (8, 2) NOT NULL, manager_id INTEGER, - department_id INTEGER, - FOREIGN KEY (job_id) REFERENCES jobs (job_id) ON UPDATE CASCADE ON DELETE CASCADE, - FOREIGN KEY (department_id) REFERENCES departments (department_id) ON UPDATE CASCADE ON DELETE CASCADE, - FOREIGN KEY (manager_id) REFERENCES employees (employee_id) ON UPDATE CASCADE ON DELETE CASCADE + department_id INTEGER ); -CREATE TABLE dependents ( +CREATE TABLE IF NOT EXISTS dependents ( dependent_id SERIAL PRIMARY KEY, first_name CHARACTER VARYING (50) NOT NULL, last_name CHARACTER VARYING (50) NOT NULL, relationship CHARACTER VARYING (25) NOT NULL, - employee_id INTEGER NOT NULL, - FOREIGN KEY (employee_id) REFERENCES employees (employee_id) ON DELETE CASCADE ON UPDATE CASCADE + employee_id INTEGER NOT NULL ); -/*Data for the table regions */ - INSERT INTO regions(region_id,region_name) VALUES (1,'Europe'); INSERT INTO regions(region_id,region_name) VALUES (2,'Americas'); INSERT INTO regions(region_id,region_name) VALUES (3,'Asia'); @@ -221,22 +212,4 @@ INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_i INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (29,'Alec','Partners','Child',146); INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (30,'Sandra','Taylor','Child',176); --- Table with generated columns -CREATE TABLE generated_table ( - -- Identity column - id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, - - amount DECIMAL(10,2) NOT NULL, - status text NOT NULL DEFAULT 'pending', - - -- Generated stored column - amount_with_tax DECIMAL(10,2) GENERATED ALWAYS AS (amount * 1.2) STORED -); - -INSERT INTO generated_table (amount, status) -VALUES - (199.99, 'pending'), - (299.50, 'processing'), - (499.99, 'completed'), - (150.00, 'cancelled'); diff --git a/internal/testutil/testdata/postgres/humanresources/job-mappings.go b/internal/testutil/testdata/postgres/humanresources/job-mappings.go new file mode 100644 index 0000000000..7afda032d0 --- /dev/null +++ b/internal/testutil/testdata/postgres/humanresources/job-mappings.go @@ -0,0 +1,444 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package postgres_humanresources + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "regions", + Column: "region_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "regions", + Column: "region_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "countries", + Column: "country_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "countries", + Column: "country_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "countries", + Column: "region_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "location_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "street_address", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "postal_code", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "city", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "state_province", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "locations", + Column: "country_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "departments", + Column: "department_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "departments", + Column: "department_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "departments", + Column: "location_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "job_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "job_title", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "min_salary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "jobs", + Column: "max_salary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "employee_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "phone_number", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "hire_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "job_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "salary", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "manager_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "department_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "dependent_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "relationship", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "dependents", + Column: "employee_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/internal/testutil/testdata/postgres/humanresources/job_mappings.go b/internal/testutil/testdata/postgres/humanresources/job_mappings.go deleted file mode 100644 index cbbd894aa0..0000000000 --- a/internal/testutil/testdata/postgres/humanresources/job_mappings.go +++ /dev/null @@ -1,311 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create-tables.sql - -package postgres_humanresources - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: schema, - Table: "regions", - Column: "region_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "regions", - Column: "region_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "countries", - Column: "country_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "countries", - Column: "country_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "countries", - Column: "region_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "location_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "street_address", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "postal_code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "city", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "state_province", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "locations", - Column: "country_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "departments", - Column: "department_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "departments", - Column: "department_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "departments", - Column: "location_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "jobs", - Column: "job_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "jobs", - Column: "job_title", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "jobs", - Column: "min_salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "jobs", - Column: "max_salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "employee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "phone_number", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "hire_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "job_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "manager_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "employees", - Column: "department_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "dependents", - Column: "dependent_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "dependents", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "dependents", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "dependents", - Column: "relationship", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "dependents", - Column: "employee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "generated_table", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "generated_table", - Column: "amount", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "generated_table", - Column: "status", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: schema, - Table: "generated_table", - Column: "amount_with_tax", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/internal/testutil/testdata/postgres/humanresources/virtual-foreign-keys.go b/internal/testutil/testdata/postgres/humanresources/virtual-foreign-keys.go new file mode 100644 index 0000000000..edc178972c --- /dev/null +++ b/internal/testutil/testdata/postgres/humanresources/virtual-foreign-keys.go @@ -0,0 +1,78 @@ +package postgres_humanresources + +import mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + +func GetVirtualForeignKeys(schema string) []*mgmtv1alpha1.VirtualForeignConstraint { + return []*mgmtv1alpha1.VirtualForeignConstraint{ + { + Schema: schema, + Table: "countries", + Columns: []string{"region_id"}, + ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ + Schema: schema, + Table: "regions", + Columns: []string{"region_id"}, + }, + }, + { + Schema: schema, + Table: "departments", + Columns: []string{"location_id"}, + ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ + Schema: schema, + Table: "locations", + Columns: []string{"location_id"}, + }, + }, + { + Schema: schema, + Table: "dependents", + Columns: []string{"employee_id"}, + ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ + Schema: schema, + Table: "employees", + Columns: []string{"employee_id"}, + }, + }, + { + Schema: schema, + Table: "employees", + Columns: []string{"manager_id"}, + ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ + Schema: schema, + Table: "employees", + Columns: []string{"employee_id"}, + }, + }, + { + Schema: schema, + Table: "employees", + Columns: []string{"department_id"}, + ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ + Schema: schema, + Table: "departments", + Columns: []string{"department_id"}, + }, + }, + { + Schema: schema, + Table: "employees", + Columns: []string{"job_id"}, + ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ + Schema: schema, + Table: "jobs", + Columns: []string{"job_id"}, + }, + }, + { + Schema: schema, + Table: "locations", + Columns: []string{"country_id"}, + ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ + Schema: schema, + Table: "countries", + Columns: []string{"country_id"}, + }, + }, + } +} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/setup.sql b/internal/testutil/testdata/postgres/subsetting/create-tables.sql similarity index 83% rename from worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/setup.sql rename to internal/testutil/testdata/postgres/subsetting/create-tables.sql index e0a4348981..1ca6e6c159 100644 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/setup.sql +++ b/internal/testutil/testdata/postgres/subsetting/create-tables.sql @@ -1,7 +1,3 @@ -CREATE SCHEMA IF NOT EXISTS subsetting; - -SET search_path TO subsetting; - -- Test_BuildQueryMap_DoubleRootSubset CREATE TABLE test_2_x ( id BIGINT NOT NULL PRIMARY KEY, @@ -516,115 +512,3 @@ INSERT INTO attachments (file_name, file_path, uploaded_by, task_id, initiative_ ('ui_designs.sketch', '/files/designs/ui_designs.sketch', 10, 8, 8, 15), ('smart_contracts.sol', '/files/blockchain/smart_contracts.sol', 1, 9, 9, 17), ('sensor_specs.pdf', '/files/iot/sensor_specs.pdf', 2, 10, 10, 19); - - - -CREATE TABLE IF NOT EXISTS accounts ( - id SERIAL PRIMARY KEY, - name VARCHAR(100) NOT NULL, - email VARCHAR(255) NOT NULL UNIQUE, - blueprint_id INTEGER NULL, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP -); - -CREATE TABLE IF NOT EXISTS blueprints ( - id SERIAL PRIMARY KEY, - name VARCHAR(100) NOT NULL, - description TEXT, - account_id INTEGER NOT NULL, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP -); - -INSERT INTO accounts (name, email, blueprint_id) -VALUES - ('John Doe', 'john@example.com', 5), - ('Jane Smith', 'jane@example.com', NULL), - ('Bob Wilson', 'bob@example.com', 2), - ('Alice Brown', 'alice@example.com', 3), - ('Charlie Davis', 'charlie@example.com', 4) -RETURNING id; - --- Then insert blueprints with account_id references -INSERT INTO blueprints (name, description, account_id) -VALUES - ('Basic blueprint', 'A simple starter blueprint', 1), - ('Pro blueprint', 'Advanced features blueprint', 2), - ('Team blueprint', 'Collaborative workspace blueprint', 3), - ('Enterprise blueprint', 'Full-featured business blueprint', 4), - ('Custom blueprint', 'Customizable blueprint', 5) -RETURNING id; - -ALTER TABLE accounts -ADD CONSTRAINT fk_accounts_blueprints -FOREIGN KEY (blueprint_id) -REFERENCES blueprints(id); - -ALTER TABLE blueprints -ADD CONSTRAINT fk_blueprints_accounts -FOREIGN KEY (account_id) -REFERENCES accounts(id); - - -CREATE TABLE IF NOT EXISTS clients ( - id SERIAL PRIMARY KEY -); - -CREATE TABLE IF NOT EXISTS titles ( - id SERIAL PRIMARY KEY, - account_id INTEGER NOT NULL, - FOREIGN KEY (account_id) REFERENCES accounts (id) -); - -CREATE TABLE IF NOT EXISTS client_account_titles ( - id SERIAL PRIMARY KEY, - account_id INTEGER NOT NULL, - title_id INTEGER NULL, - client_id INTEGER NOT NULL, - FOREIGN KEY (account_id) REFERENCES accounts(id), - FOREIGN KEY (title_id) REFERENCES titles(id), - FOREIGN KEY (client_id) REFERENCES clients(id) -); - -INSERT INTO clients (id) -VALUES - (1), - (2), - (3), - (4), - (5), - (6), - (7), - (8), - (9); - --- Insert titles with references to existing accounts -INSERT INTO titles (id, account_id) -VALUES - (1, 1), -- Title for John Doe's account - (2, 1), -- Another title for John Doe's account - (3, 2), -- Title for Jane Smith's account - (4, 3), -- Title for Bob Wilson's account - (5, 4), -- Title for Alice Brown's account - (6, 5); -- Title for Charlie Davis's account - --- Insert client_account_titles relationships -INSERT INTO client_account_titles (account_id, title_id, client_id) -VALUES - -- John Doe's account relationships - (1, 1, 1), -- First client with first title - (1, 2, 2), -- Second client with second title - (1, null, 9), -- Third client with null title - - -- Jane Smith's account relationships - (2, 3, 3), -- Third client - - -- Bob Wilson's account relationships - (3, 4, 4), -- Fourth client - - -- Alice Brown's account relationships - (4, 5, 5), -- Fifth client - - -- Charlie Davis's account relationships - (5, 6, 6), -- Sixth client - (5, 6, 7), -- Seventh client sharing same title as sixth client - (5, null, 8); diff --git a/internal/testutil/testdata/postgres/subsetting/job-mappings.go b/internal/testutil/testdata/postgres/subsetting/job-mappings.go new file mode 100644 index 0000000000..45b8608c2f --- /dev/null +++ b/internal/testutil/testdata/postgres/subsetting/job-mappings.go @@ -0,0 +1,1289 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package postgres_subsetting + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "test_2_x", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_x", + Column: "name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_x", + Column: "created", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_b", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_b", + Column: "name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_b", + Column: "created", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_a", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_a", + Column: "x_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_c", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_c", + Column: "name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_c", + Column: "created", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_c", + Column: "a_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_c", + Column: "b_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_d", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_d", + Column: "c_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_e", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_2_e", + Column: "c_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_a", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_b", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_b", + Column: "a_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_c", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_c", + Column: "b_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_d", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_d", + Column: "c_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_e", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_e", + Column: "d_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_f", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_g", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_g", + Column: "f_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_h", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_h", + Column: "g_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_i", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "test_3_i", + Column: "h_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "addresses", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "addresses", + Column: "order_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "customers", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "customers", + Column: "address_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "orders", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "orders", + Column: "customer_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "payments", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "payments", + Column: "customer_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "division", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "division", + Column: "division_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "division", + Column: "location", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "division_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "employees", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "projects", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "projects", + Column: "project_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "projects", + Column: "start_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "projects", + Column: "end_date", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "projects", + Column: "responsible_employee_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "projects", + Column: "responsible_division_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "bosses", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "bosses", + Column: "manager_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "bosses", + Column: "big_boss_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "minions", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "minions", + Column: "boss_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "user_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "manager_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "users", + Column: "mentor_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "initiatives", + Column: "initiative_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "initiatives", + Column: "name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "initiatives", + Column: "description", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "initiatives", + Column: "lead_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "initiatives", + Column: "client_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "tasks", + Column: "task_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "tasks", + Column: "title", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "tasks", + Column: "description", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "tasks", + Column: "status", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "tasks", + Column: "initiative_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "tasks", + Column: "assignee_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "tasks", + Column: "reviewer_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "skills", + Column: "skill_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "skills", + Column: "name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "skills", + Column: "category", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "user_skills", + Column: "user_skill_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "user_skills", + Column: "user_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "user_skills", + Column: "skill_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "user_skills", + Column: "proficiency_level", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "comments", + Column: "comment_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "comments", + Column: "content", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "comments", + Column: "created_at", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "comments", + Column: "user_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "comments", + Column: "task_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "comments", + Column: "initiative_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "comments", + Column: "parent_comment_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "attachments", + Column: "attachment_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "attachments", + Column: "file_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "attachments", + Column: "file_path", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "attachments", + Column: "uploaded_by", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "attachments", + Column: "task_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "attachments", + Column: "initiative_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "attachments", + Column: "comment_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/insert.sql b/internal/testutil/testdata/postgres/transformers/create-tables.sql similarity index 86% rename from worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/insert.sql rename to internal/testutil/testdata/postgres/transformers/create-tables.sql index b823a23b99..3e53d427a0 100644 --- a/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/insert.sql +++ b/internal/testutil/testdata/postgres/transformers/create-tables.sql @@ -1,4 +1,35 @@ -SET search_path TO javascript; +CREATE TABLE transformers ( + id SERIAL PRIMARY KEY, + e164_phone_number VARCHAR(20), + email VARCHAR(255), + measurement FLOAT, + int64 BIGINT, + int64_phone_number BIGINT, + string_phone_number VARCHAR(20), + first_name VARCHAR(255), + last_name VARCHAR(255), + full_name VARCHAR(255), + str VARCHAR (255), + character_scramble VARCHAR (255), + bool BOOLEAN, + card_number BIGINT, + categorical VARCHAR(255), + city VARCHAR(255), + full_address VARCHAR(255), + gender VARCHAR(255), + international_phone VARCHAR(255), + sha256 VARCHAR(255), + ssn VARCHAR(255), + state VARCHAR(255), + street_address VARCHAR(255), + unix_time BIGINT, + username VARCHAR(255), + utc_timestamp TIMESTAMPTZ, + uuid VARCHAR(255), + zipcode BIGINT +); + + INSERT INTO transformers ( e164_phone_number, email, measurement, int64, int64_phone_number, string_phone_number, first_name, last_name, full_name, str, character_scramble, bool, card_number, categorical, diff --git a/internal/testutil/testdata/postgres/transformers/job-mappings.go b/internal/testutil/testdata/postgres/transformers/job-mappings.go new file mode 100644 index 0000000000..dd79170312 --- /dev/null +++ b/internal/testutil/testdata/postgres/transformers/job-mappings.go @@ -0,0 +1,379 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package postgres_transformers + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "transformers", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "e164_phone_number", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "email", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "measurement", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "int64", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "int64_phone_number", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "string_phone_number", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "first_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "last_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "full_name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "str", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "character_scramble", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "bool", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "card_number", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "categorical", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "city", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "full_address", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "gender", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "international_phone", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "sha256", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "ssn", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "state", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "street_address", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "unix_time", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "username", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "utc_timestamp", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "uuid", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "transformers", + Column: "zipcode", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/insert.sql b/internal/testutil/testdata/postgres/uuids/create-tables.sql similarity index 60% rename from worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/insert.sql rename to internal/testutil/testdata/postgres/uuids/create-tables.sql index 713626d908..58c2104ce1 100644 --- a/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/insert.sql +++ b/internal/testutil/testdata/postgres/uuids/create-tables.sql @@ -1,4 +1,41 @@ -INSERT INTO "primary_$key".store_notifications (id) VALUES +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; + +CREATE TABLE IF NOT EXISTS store_notifications ( + id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid() +); + +CREATE TABLE IF NOT EXISTS stores ( + id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid (), + notifications_id uuid UNIQUE NOT NULL +); + +CREATE TABLE IF NOT EXISTS store_customers ( + id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid (), + store_id uuid NOT NULL, + referred_by_code uuid NULL +); + +CREATE TABLE IF NOT EXISTS referral_codes ( + id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid (), + customer_id uuid NOT NULL +); + +ALTER TABLE store_customers ADD FOREIGN KEY (store_id) REFERENCES stores (id); + + +ALTER TABLE store_customers ADD FOREIGN KEY (referred_by_code) REFERENCES referral_codes (id); + + +ALTER TABLE stores ADD FOREIGN KEY (notifications_id) REFERENCES store_notifications (id); + + +ALTER TABLE referral_codes ADD FOREIGN KEY (customer_id) REFERENCES store_customers (id); + + + + +INSERT INTO store_notifications (id) VALUES + ('c0e8db5a-1b71-4e5b-8d7b-6f5a1a4d0736'), ('d37fa1b8-4a36-42a6-8786-3a5f5641c302'), ('f8d7a2b0-9d73-47b2-91f8-8e10c37c2e74'), ('a7e4b9f9-9c6c-4b48-9f98-3e1a4b7d2c1f'), ('b6c3d7a4-5e6a-4a0d-8f72-9e3b1a7c9d4f'), ('e4d7a6b8-7e5c-4a3b-9f6d-5e2a1c3b7a4d'), ('f3a7d9b2-8d6b-4a1d-9e5b-6a3f1d7c2e0a'), ('d4b8c3e1-6e7a-4b9f-8a7c-5e3d2c1b9a0f'), ('e7c3a4d5-1f8b-4a2d-9e3f-7b6a4d2c9e1f'), @@ -8,7 +45,8 @@ INSERT INTO "primary_$key".store_notifications (id) VALUES ('d6b7e4a9-7f5d-4a2b-9c6e-3f2a1e8d5b9c'), ('e1a8c3d4-2f6b-4a5e-9d8c-7b3d1f2a6e5d'); -INSERT INTO "primary_$key".stores (id, notifications_id) VALUES +INSERT INTO stores (id, notifications_id) VALUES + ('a1b2c3d4-e5f6-47a8-9b0c-d1e2f3a4b5c6', 'c0e8db5a-1b71-4e5b-8d7b-6f5a1a4d0736'), ('b2c3d4e5-f6a7-48b9-0c1d-e2f3a4b5c6d7', 'd37fa1b8-4a36-42a6-8786-3a5f5641c302'), ('c3d4e5f6-a7b8-49c0-1d2e-f3a4b5c6d7e8', 'f8d7a2b0-9d73-47b2-91f8-8e10c37c2e74'), @@ -31,7 +69,8 @@ INSERT INTO "primary_$key".stores (id, notifications_id) VALUES ('b0c1d2e3-f4a5-46b7-8c9d-e1f2a3b4c5d6', 'e1a8c3d4-2f6b-4a5e-9d8c-7b3d1f2a6e5d'); -INSERT INTO "primary_$key".store_customers (id, store_id, referred_by_code) VALUES +INSERT INTO store_customers (id, store_id, referred_by_code) VALUES + ('c1d2e3f4-a5b6-47c8-9d0e-f1a2b3c4d5e6', 'a1b2c3d4-e5f6-47a8-9b0c-d1e2f3a4b5c6', NULL), ('d2e3f4a5-b6c7-48d9-0e1f-a2b3c4d5e6f7', 'b2c3d4e5-f6a7-48b9-0c1d-e2f3a4b5c6d7', NULL), ('e3f4a5b6-c7d8-49e0-1f2a-b3c4d5e6f7a8', 'c3d4e5f6-a7b8-49c0-1d2e-f3a4b5c6d7e8', NULL), @@ -54,7 +93,8 @@ INSERT INTO "primary_$key".store_customers (id, store_id, referred_by_code) VALU ('d0e1f2a3-b4c5-46d7-8e9f-a1b2c3d4e5f6', 'b0c1d2e3-f4a5-46b7-8c9d-e1f2a3b4c5d6', NULL); -INSERT INTO "primary_$key".referral_codes (id, customer_id) VALUES +INSERT INTO referral_codes (id, customer_id) VALUES + ('e2f3a4b5-c6d7-48e9-0a1b-f1a2b3c4d5e6', 'c1d2e3f4-a5b6-47c8-9d0e-f1a2b3c4d5e6'), ('f3a4b5c6-d7e8-49f0-1b2c-a2b3c4d5e6f7', 'd2e3f4a5-b6c7-48d9-0e1f-a2b3c4d5e6f7'), ('a4b5c6d7-e8f9-40a1-2b3c-b3c4d5e6f7a8', 'e3f4a5b6-c7d8-49e0-1f2a-b3c4d5e6f7a8'), @@ -77,23 +117,43 @@ INSERT INTO "primary_$key".referral_codes (id, customer_id) VALUES ('f1a2b3c4-d5e6-47f8-9a0b-a1b2c3d4e5f6', 'd0e1f2a3-b4c5-46d7-8e9f-a1b2c3d4e5f6'); -UPDATE "primary_$key".store_customers SET referred_by_code = 'e2f3a4b5-c6d7-48e9-0a1b-f1a2b3c4d5e6' WHERE id = 'c1d2e3f4-a5b6-47c8-9d0e-f1a2b3c4d5e6'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'f3a4b5c6-d7e8-49f0-1b2c-a2b3c4d5e6f7' WHERE id = 'd2e3f4a5-b6c7-48d9-0e1f-a2b3c4d5e6f7'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'a4b5c6d7-e8f9-40a1-2b3c-b3c4d5e6f7a8' WHERE id = 'e3f4a5b6-c7d8-49e0-1f2a-b3c4d5e6f7a8'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'b5c6d7e8-f9a0-41b2-3c4d-c4d5e6f7a8b9' WHERE id = 'f4a5b6c7-d8e9-40f1-2a3b-c4d5e6f7a8b9'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'c6d7e8f9-a0b1-42c3-4d5e-d5e6f7a8b9c0' WHERE id = 'a5b6c7d8-e9f0-41a2-3b4c-d5e6f7a8b9c0'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'd7e8f9a0-b1c2-43d4-5e6f-e6f7a8b9c0d1' WHERE id = 'b6c7d8e9-f0a1-42b3-4c5d-e6f7a8b9c0d1'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'e8f9a0b1-c2d3-44e5-6f7a-f7a8b9c0d1e2' WHERE id = 'c7d8e9f0-a1b2-43c4-5d6e-f7a8b9c0d1e2'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'f9a0b1c2-d3e4-45f6-7a8b-a8b9c0d1e2f3' WHERE id = 'd8e9f0a1-b2c3-44d5-6e7f-a8b9c0d1e2f3'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'a0b1c2d3-e4f5-46a7-8b9c-b9c0d1e2f3a4' WHERE id = 'e9f0a1b2-c3d4-45e6-7f8a-b9c0d1e2f3a4'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'b1c2d3e4-f5a6-47b8-9c0d-c0d1e2f3a4b5' WHERE id = 'f0a1b2c3-d4e5-46f7-8a9b-c0d1e2f3a4b5'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'c2d3e4f5-a6b7-48c9-0d1e-d1e2f3a4b5c6' WHERE id = 'a1b2c3d4-e5f6-47a8-9b0c-d1e2f3a4b5c6'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'd3e4f5a6-b7c8-49d0-1e2f-e2f3a4b5c6d7' WHERE id = 'b2c3d4e5-f6a7-48b9-0c1d-e2f3a4b5c6d7'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'e4f5a6b7-c8d9-40e1-2f3a-f3a4b5c6d7e8' WHERE id = 'c3d4e5f6-a7b8-49c0-1d2e-f3a4b5c6d7e8'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'f5a6b7c8-d9e0-41f2-3a4b-a4b5c6d7e8f9' WHERE id = 'd4e5f6a7-b8c9-40d1-2e3f-a4b5c6d7e8f9'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'a6b7c8d9-e0f1-42a3-4b5c-b5c6d7e8f9a0' WHERE id = 'e5f6a7b8-c9d0-41e2-3f4a-b5c6d7e8f9a1'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'b7c8d9e0-f1a2-43b4-5c6d-c6d7e8f9a1b2' WHERE id = 'f6a7b8c9-d0e1-42f3-4a5b-c6d7e8f9a1b2'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'c8d9e0f1-a2b3-44c5-6d7e-d7e8f9a1b2c3' WHERE id = 'a7b8c9d0-e1f2-43a4-5b6c-d7e8f9a1b2c3'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'd9e0f1a2-b3c4-45d6-7e8f-e8f9a1b2c3d4' WHERE id = 'b8c9d0e1-f2a3-44b5-6c7d-e8f9a1b2c3d4'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'e0f1a2b3-c4d5-46e7-8f9a-f9a1b2c3d4e5' WHERE id = 'c9d0e1f2-a3b4-45c6-7d8e-f9a1b2c3d4e5'; -UPDATE "primary_$key".store_customers SET referred_by_code = 'f1a2b3c4-d5e6-47f8-9a0b-a1b2c3d4e5f6' WHERE id = 'd0e1f2a3-b4c5-46d7-8e9f-a1b2c3d4e5f6'; +UPDATE store_customers SET referred_by_code = 'e2f3a4b5-c6d7-48e9-0a1b-f1a2b3c4d5e6' WHERE id = 'c1d2e3f4-a5b6-47c8-9d0e-f1a2b3c4d5e6'; + +UPDATE store_customers SET referred_by_code = 'f3a4b5c6-d7e8-49f0-1b2c-a2b3c4d5e6f7' WHERE id = 'd2e3f4a5-b6c7-48d9-0e1f-a2b3c4d5e6f7'; + +UPDATE store_customers SET referred_by_code = 'a4b5c6d7-e8f9-40a1-2b3c-b3c4d5e6f7a8' WHERE id = 'e3f4a5b6-c7d8-49e0-1f2a-b3c4d5e6f7a8'; + +UPDATE store_customers SET referred_by_code = 'b5c6d7e8-f9a0-41b2-3c4d-c4d5e6f7a8b9' WHERE id = 'f4a5b6c7-d8e9-40f1-2a3b-c4d5e6f7a8b9'; + +UPDATE store_customers SET referred_by_code = 'c6d7e8f9-a0b1-42c3-4d5e-d5e6f7a8b9c0' WHERE id = 'a5b6c7d8-e9f0-41a2-3b4c-d5e6f7a8b9c0'; + +UPDATE store_customers SET referred_by_code = 'd7e8f9a0-b1c2-43d4-5e6f-e6f7a8b9c0d1' WHERE id = 'b6c7d8e9-f0a1-42b3-4c5d-e6f7a8b9c0d1'; + +UPDATE store_customers SET referred_by_code = 'e8f9a0b1-c2d3-44e5-6f7a-f7a8b9c0d1e2' WHERE id = 'c7d8e9f0-a1b2-43c4-5d6e-f7a8b9c0d1e2'; + +UPDATE store_customers SET referred_by_code = 'f9a0b1c2-d3e4-45f6-7a8b-a8b9c0d1e2f3' WHERE id = 'd8e9f0a1-b2c3-44d5-6e7f-a8b9c0d1e2f3'; + +UPDATE store_customers SET referred_by_code = 'a0b1c2d3-e4f5-46a7-8b9c-b9c0d1e2f3a4' WHERE id = 'e9f0a1b2-c3d4-45e6-7f8a-b9c0d1e2f3a4'; + +UPDATE store_customers SET referred_by_code = 'b1c2d3e4-f5a6-47b8-9c0d-c0d1e2f3a4b5' WHERE id = 'f0a1b2c3-d4e5-46f7-8a9b-c0d1e2f3a4b5'; + +UPDATE store_customers SET referred_by_code = 'c2d3e4f5-a6b7-48c9-0d1e-d1e2f3a4b5c6' WHERE id = 'a1b2c3d4-e5f6-47a8-9b0c-d1e2f3a4b5c6'; + +UPDATE store_customers SET referred_by_code = 'd3e4f5a6-b7c8-49d0-1e2f-e2f3a4b5c6d7' WHERE id = 'b2c3d4e5-f6a7-48b9-0c1d-e2f3a4b5c6d7'; + +UPDATE store_customers SET referred_by_code = 'e4f5a6b7-c8d9-40e1-2f3a-f3a4b5c6d7e8' WHERE id = 'c3d4e5f6-a7b8-49c0-1d2e-f3a4b5c6d7e8'; + +UPDATE store_customers SET referred_by_code = 'f5a6b7c8-d9e0-41f2-3a4b-a4b5c6d7e8f9' WHERE id = 'd4e5f6a7-b8c9-40d1-2e3f-a4b5c6d7e8f9'; + +UPDATE store_customers SET referred_by_code = 'a6b7c8d9-e0f1-42a3-4b5c-b5c6d7e8f9a0' WHERE id = 'e5f6a7b8-c9d0-41e2-3f4a-b5c6d7e8f9a1'; + +UPDATE store_customers SET referred_by_code = 'b7c8d9e0-f1a2-43b4-5c6d-c6d7e8f9a1b2' WHERE id = 'f6a7b8c9-d0e1-42f3-4a5b-c6d7e8f9a1b2'; + +UPDATE store_customers SET referred_by_code = 'c8d9e0f1-a2b3-44c5-6d7e-d7e8f9a1b2c3' WHERE id = 'a7b8c9d0-e1f2-43a4-5b6c-d7e8f9a1b2c3'; + +UPDATE store_customers SET referred_by_code = 'd9e0f1a2-b3c4-45d6-7e8f-e8f9a1b2c3d4' WHERE id = 'b8c9d0e1-f2a3-44b5-6c7d-e8f9a1b2c3d4'; + +UPDATE store_customers SET referred_by_code = 'e0f1a2b3-c4d5-46e7-8f9a-f9a1b2c3d4e5' WHERE id = 'c9d0e1f2-a3b4-45c6-7d8e-f9a1b2c3d4e5'; + +UPDATE store_customers SET referred_by_code = 'f1a2b3c4-d5e6-47f8-9a0b-a1b2c3d4e5f6' WHERE id = 'd0e1f2a3-b4c5-46d7-8e9f-a1b2c3d4e5f6'; + diff --git a/internal/testutil/testdata/postgres/uuids/job-mappings.go b/internal/testutil/testdata/postgres/uuids/job-mappings.go new file mode 100644 index 0000000000..5d1e381cc8 --- /dev/null +++ b/internal/testutil/testdata/postgres/uuids/job-mappings.go @@ -0,0 +1,119 @@ + +// Code generated by Neosync jobmapping_generator. DO NOT EDIT. +// source: create-tables.sql + +package postgres_uuids + +import ( + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" +) + +func GetDefaultSyncJobMappings(schema string)[]*mgmtv1alpha1.JobMapping { + return []*mgmtv1alpha1.JobMapping{ + { + Schema: schema, + Table: "store_notifications", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "stores", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "stores", + Column: "notifications_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "store_customers", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "store_customers", + Column: "store_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "store_customers", + Column: "referred_by_code", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "referral_codes", + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + { + Schema: schema, + Table: "referral_codes", + Column: "customer_id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: + &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{ + PassthroughConfig: &mgmtv1alpha1.Passthrough{}, + }, + }, + }, + }, + } +} + diff --git a/internal/testutil/testdata/verify.go b/internal/testutil/testdata/verify.go new file mode 100644 index 0000000000..5bd5d7e24d --- /dev/null +++ b/internal/testutil/testdata/verify.go @@ -0,0 +1,180 @@ +package testutil_testdata + +import ( + "context" + "database/sql" + "encoding/json" + "fmt" + "strings" + "testing" + "time" + + "github.com/doug-martin/goqu/v9" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func FormatTimeForComparison(t time.Time) string { + // Ensure we're working with UTC + t = t.UTC() + year := t.Year() + + // Handle BC dates (negative years and year 0) + if year <= 0 { + // Convert to PostgreSQL's BC format + // PostgreSQL BC years start from 1, so we need to adjust + bcYear := -year + 1 + return fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d+00 BC", + bcYear, + t.Month(), + t.Day(), + t.Hour(), + t.Minute(), + t.Second()) + } + + // Handle AD dates (positive years) + return fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d+00", + year, + t.Month(), + t.Day(), + t.Hour(), + t.Minute(), + t.Second()) +} + +func fetchSQLRows(ctx context.Context, db *sql.DB, schema, table, driver, idCol string) (map[string]map[string]any, error) { + query := goqu.Dialect(driver).From(goqu.S(schema).Table(table)).Order(goqu.C(idCol).Asc()) + sql, _, err := query.ToSQL() + if err != nil { + return nil, err + } + + rows, err := db.QueryContext(ctx, sql) + if err != nil { + return nil, err + } + defer rows.Close() + + data := make(map[string]map[string]any) + columns, err := rows.Columns() + if err != nil { + return nil, err + } + + for rows.Next() { + values := make([]any, len(columns)) + valuePtrs := make([]any, len(columns)) + for i := range values { + valuePtrs[i] = &values[i] + } + + if err := rows.Scan(valuePtrs...); err != nil { + return nil, err + } + + rowMap := make(map[string]any) + var uniqueKey string + + for i, col := range columns { + val := valuePtrs[i].(*any) + rowMap[col] = *val + if col == idCol { + uniqueKey = fmt.Sprintf("%v", *val) + } + } + + data[uniqueKey] = rowMap + } + + return data, nil +} + +func VerifySQLTableColumnValues( + t *testing.T, + ctx context.Context, + source *sql.DB, + target *sql.DB, + schema, table, driver, + idCol string, +) { + // Fetch rows from both databases + sourceRows, err := fetchSQLRows(ctx, source, schema, table, driver, idCol) + require.NoErrorf(t, err, "Error fetching source rows from table %s", table) + + targetRows, err := fetchSQLRows(ctx, target, schema, table, driver, idCol) + require.NoErrorf(t, err, "Error fetching target rows from table %s", table) + + query := goqu.Dialect(driver).From(goqu.S(schema).Table(table)).Limit(0) + sql, _, err := query.ToSQL() + require.NoErrorf(t, err, "Error building query for table %s", table) + + rows, err := target.QueryContext(ctx, sql) + require.NoErrorf(t, err, "Error querying table %s", table) + columns, err := rows.Columns() + require.NoErrorf(t, err, "Error getting columns for table %s", table) + colTypes, err := rows.ColumnTypes() + require.NoErrorf(t, err, "Error getting column types for table %s", table) + + colTypesMap := make(map[string]string) + for i, col := range columns { + colTypesMap[col] = colTypes[i].DatabaseTypeName() + } + + // Compare rows + for key, sourceRow := range sourceRows { + targetRow, exists := targetRows[key] + assert.Truef(t, exists, "Row %s exists in source but not in target for table %s", key, table) + + if !exists { + continue + } + + for col, sourceValue := range sourceRow { + targetValue := targetRow[col] + colType := colTypesMap[col] + if isJsonType(colType) && sourceValue != nil && targetValue != nil { + // Parse JSON values for comparison + var sourceJson, destJson any + err := json.Unmarshal(sourceValue.([]byte), &sourceJson) + assert.NoErrorf(t, err, "Error unmarshaling source JSON in table %s", table) + err = json.Unmarshal(targetValue.([]byte), &destJson) + assert.NoErrorf(t, err, "Error unmarshaling target JSON in table %s", table) + assert.Equalf(t, sourceJson, destJson, "JSON difference in row %s, column %s for table %s", key, col, table) + } else if isJsonArrayType(colType) && sourceValue != nil && targetValue != nil { + // Handle Postgres array format "{{}}" and remove escaping and spaces + var sourceStr, targetStr string + switch s := sourceValue.(type) { + case []byte: + sourceStr = string(s) + case string: + sourceStr = s + } + switch t := targetValue.(type) { + case []byte: + targetStr = string(t) + case string: + targetStr = t + } + sourceStr = strings.ReplaceAll(strings.ReplaceAll(sourceStr, "\\", ""), " ", "") + targetStr = strings.ReplaceAll(strings.ReplaceAll(targetStr, "\\", ""), " ", "") + assert.Equalf(t, sourceStr, targetStr, "Array difference in row %s, column %s for table %s", key, col, table) + } else { + assert.Equalf(t, sourceValue, targetValue, "Difference in row %s, column %s for table %s: source=%v, target=%v", key, col, table, sourceValue, targetValue) + } + } + } + + for key := range targetRows { + _, exists := sourceRows[key] + assert.Truef(t, exists, "Row %s exists in target but not in source for table %s", key, table) + } +} + +func isJsonType(colType string) bool { + return strings.EqualFold(colType, "json") || strings.EqualFold(colType, "jsonb") +} + +func isJsonArrayType(colType string) bool { + return strings.EqualFold(colType, "json[]") || strings.EqualFold(colType, "jsonb[]") || strings.EqualFold(colType, "_json") || strings.EqualFold(colType, "_jsonb") +} diff --git a/internal/testutil/utils.go b/internal/testutil/utils.go index b47b715089..c93fa2bd0b 100644 --- a/internal/testutil/utils.go +++ b/internal/testutil/utils.go @@ -12,6 +12,7 @@ import ( "path/filepath" "runtime" "testing" + "time" "github.com/neilotoole/slogt" "github.com/testcontainers/testcontainers-go" @@ -86,6 +87,10 @@ func (f *FakeEELicense) IsValid() bool { return f.isValid } +func (f *FakeEELicense) ExpiresAt() time.Time { + return time.Now().Add(time.Hour * 24 * 365) +} + func GetConcurrentTestLogger(t testing.TB) *slog.Logger { if testing.Verbose() { return slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{})) diff --git a/python/src/neosync/mgmt/v1alpha1/auth_pb2.py b/python/src/neosync/mgmt/v1alpha1/auth_pb2.py index 9b68a36c15..14e48e4d08 100644 --- a/python/src/neosync/mgmt/v1alpha1/auth_pb2.py +++ b/python/src/neosync/mgmt/v1alpha1/auth_pb2.py @@ -25,7 +25,7 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18mgmt/v1alpha1/auth.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\"Z\n\x0fLoginCliRequest\x12\x1b\n\x04\x63ode\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04\x63ode\x12*\n\x0credirect_uri\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x0bredirectUri\"Q\n\x10LoginCliResponse\x12=\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\x0b\x32\x1a.mgmt.v1alpha1.AccessTokenR\x0b\x61\x63\x63\x65ssToken\"\x16\n\x14GetAuthStatusRequest\"6\n\x15GetAuthStatusResponse\x12\x1d\n\nis_enabled\x18\x01 \x01(\x08R\tisEnabled\"\xed\x01\n\x0b\x41\x63\x63\x65ssToken\x12!\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\tR\x0b\x61\x63\x63\x65ssToken\x12(\n\rrefresh_token\x18\x02 \x01(\tH\x00R\x0crefreshToken\x88\x01\x01\x12\x1d\n\nexpires_in\x18\x03 \x01(\x03R\texpiresIn\x12\x14\n\x05scope\x18\x04 \x01(\tR\x05scope\x12\x1e\n\x08id_token\x18\x05 \x01(\tH\x01R\x07idToken\x88\x01\x01\x12\x1d\n\ntoken_type\x18\x06 \x01(\tR\ttokenTypeB\x10\n\x0e_refresh_tokenB\x0b\n\t_id_token\"\x82\x01\n\x16GetAuthorizeUrlRequest\x12\x1d\n\x05state\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05state\x12*\n\x0credirect_uri\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x0bredirectUri\x12\x1d\n\x05scope\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05scope\"+\n\x17GetAuthorizeUrlResponse\x12\x10\n\x03url\x18\x01 \x01(\tR\x03url\"\x15\n\x13GetCliIssuerRequest\"Q\n\x14GetCliIssuerResponse\x12\x1d\n\nissuer_url\x18\x01 \x01(\tR\tissuerUrl\x12\x1a\n\x08\x61udience\x18\x02 \x01(\tR\x08\x61udience\"A\n\x11RefreshCliRequest\x12,\n\rrefresh_token\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x0crefreshToken\"S\n\x12RefreshCliResponse\x12=\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\x0b\x32\x1a.mgmt.v1alpha1.AccessTokenR\x0b\x61\x63\x63\x65ssToken\"\x13\n\x11\x43heckTokenRequest\"\x14\n\x12\x43heckTokenResponse2\xa3\x04\n\x0b\x41uthService\x12M\n\x08LoginCli\x12\x1e.mgmt.v1alpha1.LoginCliRequest\x1a\x1f.mgmt.v1alpha1.LoginCliResponse\"\x00\x12S\n\nRefreshCli\x12 .mgmt.v1alpha1.RefreshCliRequest\x1a!.mgmt.v1alpha1.RefreshCliResponse\"\x00\x12S\n\nCheckToken\x12 .mgmt.v1alpha1.CheckTokenRequest\x1a!.mgmt.v1alpha1.CheckTokenResponse\"\x00\x12Y\n\x0cGetCliIssuer\x12\".mgmt.v1alpha1.GetCliIssuerRequest\x1a#.mgmt.v1alpha1.GetCliIssuerResponse\"\x00\x12\x62\n\x0fGetAuthorizeUrl\x12%.mgmt.v1alpha1.GetAuthorizeUrlRequest\x1a&.mgmt.v1alpha1.GetAuthorizeUrlResponse\"\x00\x12\\\n\rGetAuthStatus\x12#.mgmt.v1alpha1.GetAuthStatusRequest\x1a$.mgmt.v1alpha1.GetAuthStatusResponse\"\x00\x42\xc5\x01\n\x11\x63om.mgmt.v1alpha1B\tAuthProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18mgmt/v1alpha1/auth.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\"Z\n\x0fLoginCliRequest\x12\x1b\n\x04\x63ode\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04\x63ode\x12*\n\x0credirect_uri\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x0bredirectUri\"Q\n\x10LoginCliResponse\x12=\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\x0b\x32\x1a.mgmt.v1alpha1.AccessTokenR\x0b\x61\x63\x63\x65ssToken\"\x16\n\x14GetAuthStatusRequest\"6\n\x15GetAuthStatusResponse\x12\x1d\n\nis_enabled\x18\x01 \x01(\x08R\tisEnabled\"\xed\x01\n\x0b\x41\x63\x63\x65ssToken\x12!\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\tR\x0b\x61\x63\x63\x65ssToken\x12(\n\rrefresh_token\x18\x02 \x01(\tH\x00R\x0crefreshToken\x88\x01\x01\x12\x1d\n\nexpires_in\x18\x03 \x01(\x03R\texpiresIn\x12\x14\n\x05scope\x18\x04 \x01(\tR\x05scope\x12\x1e\n\x08id_token\x18\x05 \x01(\tH\x01R\x07idToken\x88\x01\x01\x12\x1d\n\ntoken_type\x18\x06 \x01(\tR\ttokenTypeB\x10\n\x0e_refresh_tokenB\x0b\n\t_id_token\"\x82\x01\n\x16GetAuthorizeUrlRequest\x12\x1d\n\x05state\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05state\x12*\n\x0credirect_uri\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x0bredirectUri\x12\x1d\n\x05scope\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05scope\"+\n\x17GetAuthorizeUrlResponse\x12\x10\n\x03url\x18\x01 \x01(\tR\x03url\"A\n\x11RefreshCliRequest\x12,\n\rrefresh_token\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x0crefreshToken\"S\n\x12RefreshCliResponse\x12=\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\x0b\x32\x1a.mgmt.v1alpha1.AccessTokenR\x0b\x61\x63\x63\x65ssToken\"\x13\n\x11\x43heckTokenRequest\"\x14\n\x12\x43heckTokenResponse2\xc8\x03\n\x0b\x41uthService\x12M\n\x08LoginCli\x12\x1e.mgmt.v1alpha1.LoginCliRequest\x1a\x1f.mgmt.v1alpha1.LoginCliResponse\"\x00\x12S\n\nRefreshCli\x12 .mgmt.v1alpha1.RefreshCliRequest\x1a!.mgmt.v1alpha1.RefreshCliResponse\"\x00\x12S\n\nCheckToken\x12 .mgmt.v1alpha1.CheckTokenRequest\x1a!.mgmt.v1alpha1.CheckTokenResponse\"\x00\x12\x62\n\x0fGetAuthorizeUrl\x12%.mgmt.v1alpha1.GetAuthorizeUrlRequest\x1a&.mgmt.v1alpha1.GetAuthorizeUrlResponse\"\x00\x12\\\n\rGetAuthStatus\x12#.mgmt.v1alpha1.GetAuthStatusRequest\x1a$.mgmt.v1alpha1.GetAuthStatusResponse\"\x00\x42\xc5\x01\n\x11\x63om.mgmt.v1alpha1B\tAuthProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -59,18 +59,14 @@ _globals['_GETAUTHORIZEURLREQUEST']._serialized_end=698 _globals['_GETAUTHORIZEURLRESPONSE']._serialized_start=700 _globals['_GETAUTHORIZEURLRESPONSE']._serialized_end=743 - _globals['_GETCLIISSUERREQUEST']._serialized_start=745 - _globals['_GETCLIISSUERREQUEST']._serialized_end=766 - _globals['_GETCLIISSUERRESPONSE']._serialized_start=768 - _globals['_GETCLIISSUERRESPONSE']._serialized_end=849 - _globals['_REFRESHCLIREQUEST']._serialized_start=851 - _globals['_REFRESHCLIREQUEST']._serialized_end=916 - _globals['_REFRESHCLIRESPONSE']._serialized_start=918 - _globals['_REFRESHCLIRESPONSE']._serialized_end=1001 - _globals['_CHECKTOKENREQUEST']._serialized_start=1003 - _globals['_CHECKTOKENREQUEST']._serialized_end=1022 - _globals['_CHECKTOKENRESPONSE']._serialized_start=1024 - _globals['_CHECKTOKENRESPONSE']._serialized_end=1044 - _globals['_AUTHSERVICE']._serialized_start=1047 - _globals['_AUTHSERVICE']._serialized_end=1594 + _globals['_REFRESHCLIREQUEST']._serialized_start=745 + _globals['_REFRESHCLIREQUEST']._serialized_end=810 + _globals['_REFRESHCLIRESPONSE']._serialized_start=812 + _globals['_REFRESHCLIRESPONSE']._serialized_end=895 + _globals['_CHECKTOKENREQUEST']._serialized_start=897 + _globals['_CHECKTOKENREQUEST']._serialized_end=916 + _globals['_CHECKTOKENRESPONSE']._serialized_start=918 + _globals['_CHECKTOKENRESPONSE']._serialized_end=938 + _globals['_AUTHSERVICE']._serialized_start=941 + _globals['_AUTHSERVICE']._serialized_end=1397 # @@protoc_insertion_point(module_scope) diff --git a/python/src/neosync/mgmt/v1alpha1/auth_pb2.pyi b/python/src/neosync/mgmt/v1alpha1/auth_pb2.pyi index 4670ae3b6f..919fdad8ae 100644 --- a/python/src/neosync/mgmt/v1alpha1/auth_pb2.pyi +++ b/python/src/neosync/mgmt/v1alpha1/auth_pb2.pyi @@ -61,18 +61,6 @@ class GetAuthorizeUrlResponse(_message.Message): url: str def __init__(self, url: _Optional[str] = ...) -> None: ... -class GetCliIssuerRequest(_message.Message): - __slots__ = () - def __init__(self) -> None: ... - -class GetCliIssuerResponse(_message.Message): - __slots__ = ("issuer_url", "audience") - ISSUER_URL_FIELD_NUMBER: _ClassVar[int] - AUDIENCE_FIELD_NUMBER: _ClassVar[int] - issuer_url: str - audience: str - def __init__(self, issuer_url: _Optional[str] = ..., audience: _Optional[str] = ...) -> None: ... - class RefreshCliRequest(_message.Message): __slots__ = ("refresh_token",) REFRESH_TOKEN_FIELD_NUMBER: _ClassVar[int] diff --git a/python/src/neosync/mgmt/v1alpha1/auth_pb2_grpc.py b/python/src/neosync/mgmt/v1alpha1/auth_pb2_grpc.py index 866f727ac0..1251e3c6bb 100644 --- a/python/src/neosync/mgmt/v1alpha1/auth_pb2_grpc.py +++ b/python/src/neosync/mgmt/v1alpha1/auth_pb2_grpc.py @@ -31,11 +31,6 @@ def __init__(self, channel): request_serializer=mgmt_dot_v1alpha1_dot_auth__pb2.CheckTokenRequest.SerializeToString, response_deserializer=mgmt_dot_v1alpha1_dot_auth__pb2.CheckTokenResponse.FromString, _registered_method=True) - self.GetCliIssuer = channel.unary_unary( - '/mgmt.v1alpha1.AuthService/GetCliIssuer', - request_serializer=mgmt_dot_v1alpha1_dot_auth__pb2.GetCliIssuerRequest.SerializeToString, - response_deserializer=mgmt_dot_v1alpha1_dot_auth__pb2.GetCliIssuerResponse.FromString, - _registered_method=True) self.GetAuthorizeUrl = channel.unary_unary( '/mgmt.v1alpha1.AuthService/GetAuthorizeUrl', request_serializer=mgmt_dot_v1alpha1_dot_auth__pb2.GetAuthorizeUrlRequest.SerializeToString, @@ -75,14 +70,6 @@ def CheckToken(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def GetCliIssuer(self, request, context): - """Used by the CLI to retrieve Auth Issuer information - @deprecated - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def GetAuthorizeUrl(self, request, context): """Used by the CLI to retrieve an Authorize URL for use with OAuth login. """ @@ -116,11 +103,6 @@ def add_AuthServiceServicer_to_server(servicer, server): request_deserializer=mgmt_dot_v1alpha1_dot_auth__pb2.CheckTokenRequest.FromString, response_serializer=mgmt_dot_v1alpha1_dot_auth__pb2.CheckTokenResponse.SerializeToString, ), - 'GetCliIssuer': grpc.unary_unary_rpc_method_handler( - servicer.GetCliIssuer, - request_deserializer=mgmt_dot_v1alpha1_dot_auth__pb2.GetCliIssuerRequest.FromString, - response_serializer=mgmt_dot_v1alpha1_dot_auth__pb2.GetCliIssuerResponse.SerializeToString, - ), 'GetAuthorizeUrl': grpc.unary_unary_rpc_method_handler( servicer.GetAuthorizeUrl, request_deserializer=mgmt_dot_v1alpha1_dot_auth__pb2.GetAuthorizeUrlRequest.FromString, @@ -225,33 +207,6 @@ def CheckToken(request, metadata, _registered_method=True) - @staticmethod - def GetCliIssuer(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/mgmt.v1alpha1.AuthService/GetCliIssuer', - mgmt_dot_v1alpha1_dot_auth__pb2.GetCliIssuerRequest.SerializeToString, - mgmt_dot_v1alpha1_dot_auth__pb2.GetCliIssuerResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) - @staticmethod def GetAuthorizeUrl(request, target, diff --git a/python/src/neosync/mgmt/v1alpha1/connection_data_pb2.py b/python/src/neosync/mgmt/v1alpha1/connection_data_pb2.py index 127b220676..2223346c97 100644 --- a/python/src/neosync/mgmt/v1alpha1/connection_data_pb2.py +++ b/python/src/neosync/mgmt/v1alpha1/connection_data_pb2.py @@ -26,7 +26,7 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#mgmt/v1alpha1/connection_data.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x16\n\x14PostgresStreamConfig\"\x13\n\x11MysqlStreamConfig\"\x19\n\x17\x41wsDynamoDBStreamConfig\"e\n\x11\x41wsS3StreamConfig\x12!\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12\'\n\njob_run_id\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x08jobRunIdB\x04\n\x02id\"o\n\x1bGcpCloudStorageStreamConfig\x12!\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12\'\n\njob_run_id\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x08jobRunIdB\x04\n\x02id\"\xb5\x03\n\x16\x43onnectionStreamConfig\x12\x42\n\tpg_config\x18\x01 \x01(\x0b\x32#.mgmt.v1alpha1.PostgresStreamConfigH\x00R\x08pgConfig\x12\x46\n\raws_s3_config\x18\x02 \x01(\x0b\x32 .mgmt.v1alpha1.AwsS3StreamConfigH\x00R\x0b\x61wsS3Config\x12\x45\n\x0cmysql_config\x18\x03 \x01(\x0b\x32 .mgmt.v1alpha1.MysqlStreamConfigH\x00R\x0bmysqlConfig\x12\x64\n\x17gcp_cloudstorage_config\x18\x04 \x01(\x0b\x32*.mgmt.v1alpha1.GcpCloudStorageStreamConfigH\x00R\x15gcpCloudstorageConfig\x12Q\n\x0f\x64ynamodb_config\x18\x05 \x01(\x0b\x32&.mgmt.v1alpha1.AwsDynamoDBStreamConfigH\x00R\x0e\x64ynamodbConfigB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\xc9\x01\n\x1eGetConnectionDataStreamRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12J\n\rstream_config\x18\x02 \x01(\x0b\x32%.mgmt.v1alpha1.ConnectionStreamConfigR\x0cstreamConfig\x12\x16\n\x06schema\x18\x03 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x04 \x01(\tR\x05table\"\xa4\x01\n\x1fGetConnectionDataStreamResponse\x12I\n\x03row\x18\x01 \x03(\x0b\x32\x37.mgmt.v1alpha1.GetConnectionDataStreamResponse.RowEntryR\x03row\x1a\x36\n\x08RowEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value:\x02\x38\x01\"\x16\n\x14PostgresSchemaConfig\"\x13\n\x11MysqlSchemaConfig\"\x13\n\x11MssqlSchemaConfig\"e\n\x11\x41wsS3SchemaConfig\x12!\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12\'\n\njob_run_id\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x08jobRunIdB\x04\n\x02id\"\x13\n\x11MongoSchemaConfig\"\x16\n\x14\x44ynamoDBSchemaConfig\"o\n\x1bGcpCloudStorageSchemaConfig\x12!\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12\'\n\njob_run_id\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x08jobRunIdB\x04\n\x02id\"\xc0\x04\n\x16\x43onnectionSchemaConfig\x12\x42\n\tpg_config\x18\x01 \x01(\x0b\x32#.mgmt.v1alpha1.PostgresSchemaConfigH\x00R\x08pgConfig\x12\x46\n\raws_s3_config\x18\x02 \x01(\x0b\x32 .mgmt.v1alpha1.AwsS3SchemaConfigH\x00R\x0b\x61wsS3Config\x12\x45\n\x0cmysql_config\x18\x03 \x01(\x0b\x32 .mgmt.v1alpha1.MysqlSchemaConfigH\x00R\x0bmysqlConfig\x12\x45\n\x0cmongo_config\x18\x04 \x01(\x0b\x32 .mgmt.v1alpha1.MongoSchemaConfigH\x00R\x0bmongoConfig\x12\x64\n\x17gcp_cloudstorage_config\x18\x05 \x01(\x0b\x32*.mgmt.v1alpha1.GcpCloudStorageSchemaConfigH\x00R\x15gcpCloudstorageConfig\x12N\n\x0f\x64ynamodb_config\x18\x06 \x01(\x0b\x32#.mgmt.v1alpha1.DynamoDBSchemaConfigH\x00R\x0e\x64ynamodbConfig\x12\x45\n\x0cmssql_config\x18\x07 \x01(\x0b\x32 .mgmt.v1alpha1.MssqlSchemaConfigH\x00R\x0bmssqlConfigB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\xe0\x02\n\x0e\x44\x61tabaseColumn\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\x12\x16\n\x06\x63olumn\x18\x03 \x01(\tR\x06\x63olumn\x12\x1b\n\tdata_type\x18\x04 \x01(\tR\x08\x64\x61taType\x12\x1f\n\x0bis_nullable\x18\x05 \x01(\tR\nisNullable\x12*\n\x0e\x63olumn_default\x18\x06 \x01(\tH\x00R\rcolumnDefault\x88\x01\x01\x12*\n\x0egenerated_type\x18\x07 \x01(\tH\x01R\rgeneratedType\x88\x01\x01\x12\x34\n\x13identity_generation\x18\x08 \x01(\tH\x02R\x12identityGeneration\x88\x01\x01\x42\x11\n\x0f_column_defaultB\x11\n\x0f_generated_typeB\x16\n\x14_identity_generation\"\x97\x01\n\x1aGetConnectionSchemaRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12J\n\rschema_config\x18\x02 \x01(\x0b\x32%.mgmt.v1alpha1.ConnectionSchemaConfigR\x0cschemaConfig\"V\n\x1bGetConnectionSchemaResponse\x12\x37\n\x07schemas\x18\x01 \x03(\x0b\x32\x1d.mgmt.v1alpha1.DatabaseColumnR\x07schemas\"\x9a\x01\n\x1dGetConnectionSchemaMapRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12J\n\rschema_config\x18\x02 \x01(\x0b\x32%.mgmt.v1alpha1.ConnectionSchemaConfigR\x0cschemaConfig\"\xe7\x01\n\x1eGetConnectionSchemaMapResponse\x12[\n\nschema_map\x18\x01 \x03(\x0b\x32<.mgmt.v1alpha1.GetConnectionSchemaMapResponse.SchemaMapEntryR\tschemaMap\x1ah\n\x0eSchemaMapEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12@\n\x05value\x18\x02 \x01(\x0b\x32*.mgmt.v1alpha1.GetConnectionSchemaResponseR\x05value:\x02\x38\x01\"j\n\x1eGetConnectionSchemaMapsRequest\x12H\n\x08requests\x18\x01 \x03(\x0b\x32,.mgmt.v1alpha1.GetConnectionSchemaMapRequestR\x08requests\"\x95\x01\n\x1fGetConnectionSchemaMapsResponse\x12K\n\tresponses\x18\x01 \x03(\x0b\x32-.mgmt.v1alpha1.GetConnectionSchemaMapResponseR\tresponses\x12%\n\x0e\x63onnection_ids\x18\x02 \x03(\tR\rconnectionIds\"W\n&GetConnectionForeignConstraintsRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\"T\n\nForeignKey\x12\x14\n\x05table\x18\x01 \x01(\tR\x05table\x12\x16\n\x06\x63olumn\x18\x02 \x01(\tR\x06\x63olumn\x12\x18\n\x07\x63olumns\x18\x03 \x03(\tR\x07\x63olumns\"\xc5\x01\n\x11\x46oreignConstraint\x12\x16\n\x06\x63olumn\x18\x01 \x01(\tR\x06\x63olumn\x12\x1f\n\x0bis_nullable\x18\x02 \x01(\x08R\nisNullable\x12:\n\x0b\x66oreign_key\x18\x03 \x01(\x0b\x32\x19.mgmt.v1alpha1.ForeignKeyR\nforeignKey\x12\x18\n\x07\x63olumns\x18\x04 \x03(\tR\x07\x63olumns\x12!\n\x0cnot_nullable\x18\x05 \x03(\x08R\x0bnotNullable\"]\n\x17\x46oreignConstraintTables\x12\x42\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32 .mgmt.v1alpha1.ForeignConstraintR\x0b\x63onstraints\"\x91\x02\n\'GetConnectionForeignConstraintsResponse\x12y\n\x11table_constraints\x18\x01 \x03(\x0b\x32L.mgmt.v1alpha1.GetConnectionForeignConstraintsResponse.TableConstraintsEntryR\x10tableConstraints\x1ak\n\x15TableConstraintsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12<\n\x05value\x18\x02 \x01(\x0b\x32&.mgmt.v1alpha1.ForeignConstraintTablesR\x05value:\x02\x38\x01\"\x98\x01\n\x14InitStatementOptions\x12\x1f\n\x0binit_schema\x18\x01 \x01(\x08R\ninitSchema\x12\x34\n\x16truncate_before_insert\x18\x02 \x01(\x08R\x14truncateBeforeInsert\x12)\n\x10truncate_cascade\x18\x03 \x01(\x08R\x0ftruncateCascade\"\x92\x01\n\"GetConnectionInitStatementsRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12=\n\x07options\x18\x02 \x01(\x0b\x32#.mgmt.v1alpha1.InitStatementOptionsR\x07options\"L\n\x14SchemaInitStatements\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12\x1e\n\nstatements\x18\x02 \x03(\tR\nstatements\"\xa3\x04\n#GetConnectionInitStatementsResponse\x12\x7f\n\x15table_init_statements\x18\x01 \x03(\x0b\x32K.mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableInitStatementsEntryR\x13tableInitStatements\x12\x8b\x01\n\x19table_truncate_statements\x18\x02 \x03(\x0b\x32O.mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableTruncateStatementsEntryR\x17tableTruncateStatements\x12Y\n\x16schema_init_statements\x18\x03 \x03(\x0b\x32#.mgmt.v1alpha1.SchemaInitStatementsR\x14schemaInitStatements\x1a\x46\n\x18TableInitStatementsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aJ\n\x1cTableTruncateStatementsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"-\n\x11PrimaryConstraint\x12\x18\n\x07\x63olumns\x18\x01 \x03(\tR\x07\x63olumns\"W\n&GetConnectionPrimaryConstraintsRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\"\x8b\x02\n\'GetConnectionPrimaryConstraintsResponse\x12y\n\x11table_constraints\x18\x01 \x03(\x0b\x32L.mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse.TableConstraintsEntryR\x10tableConstraints\x1a\x65\n\x15TableConstraintsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32 .mgmt.v1alpha1.PrimaryConstraintR\x05value:\x02\x38\x01\"V\n%GetConnectionUniqueConstraintsRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\"\x88\x02\n&GetConnectionUniqueConstraintsResponse\x12x\n\x11table_constraints\x18\x01 \x03(\x0b\x32K.mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse.TableConstraintsEntryR\x10tableConstraints\x1a\x64\n\x15TableConstraintsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32\x1f.mgmt.v1alpha1.UniqueConstraintR\x05value:\x02\x38\x01\",\n\x10UniqueConstraint\x12\x18\n\x07\x63olumns\x18\x01 \x03(\tR\x07\x63olumns\"\xba\x02\n\x19GetAiGeneratedDataRequest\x12\x32\n\x10\x61i_connection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0e\x61iConnectionId\x12\x1f\n\x05\x63ount\x18\x02 \x01(\x03\x42\t\xbaH\x06\"\x04\x18\n(\x01R\x05\x63ount\x12&\n\nmodel_name\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\tmodelName\x12$\n\x0buser_prompt\x18\x04 \x01(\tH\x00R\nuserPrompt\x88\x01\x01\x12\x36\n\x12\x64\x61ta_connection_id\x18\x05 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x10\x64\x61taConnectionId\x12\x32\n\x05table\x18\x06 \x01(\x0b\x32\x1c.mgmt.v1alpha1.DatabaseTableR\x05tableB\x0e\n\x0c_user_prompt\"O\n\rDatabaseTable\x12\x1f\n\x06schema\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x06schema\x12\x1d\n\x05table\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05table\"O\n\x1aGetAiGeneratedDataResponse\x12\x31\n\x07records\x18\x01 \x03(\x0b\x32\x17.google.protobuf.StructR\x07records\"U\n$GetConnectionTableConstraintsRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\"V\n\x11UniqueConstraints\x12\x41\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32\x1f.mgmt.v1alpha1.UniqueConstraintR\x0b\x63onstraints\"\xfd\x05\n%GetConnectionTableConstraintsResponse\x12\x87\x01\n\x17\x66oreign_key_constraints\x18\x01 \x03(\x0b\x32O.mgmt.v1alpha1.GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntryR\x15\x66oreignKeyConstraints\x12\x87\x01\n\x17primary_key_constraints\x18\x02 \x03(\x0b\x32O.mgmt.v1alpha1.GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntryR\x15primaryKeyConstraints\x12z\n\x12unique_constraints\x18\x03 \x03(\x0b\x32K.mgmt.v1alpha1.GetConnectionTableConstraintsResponse.UniqueConstraintsEntryR\x11uniqueConstraints\x1ap\n\x1a\x46oreignKeyConstraintsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12<\n\x05value\x18\x02 \x01(\x0b\x32&.mgmt.v1alpha1.ForeignConstraintTablesR\x05value:\x02\x38\x01\x1aj\n\x1aPrimaryKeyConstraintsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32 .mgmt.v1alpha1.PrimaryConstraintR\x05value:\x02\x38\x01\x1a\x66\n\x16UniqueConstraintsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32 .mgmt.v1alpha1.UniqueConstraintsR\x05value:\x02\x38\x01\"\xa5\x01\n\x17GetTableRowCountRequest\x12#\n\rconnection_id\x18\x01 \x01(\tR\x0c\x63onnectionId\x12\x16\n\x06schema\x18\x02 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x03 \x01(\tR\x05table\x12&\n\x0cwhere_clause\x18\x04 \x01(\tH\x00R\x0bwhereClause\x88\x01\x01\x42\x0f\n\r_where_clause\"0\n\x18GetTableRowCountResponse\x12\x14\n\x05\x63ount\x18\x01 \x01(\x03R\x05\x63ount2\xa2\x0b\n\x15\x43onnectionDataService\x12|\n\x17GetConnectionDataStream\x12-.mgmt.v1alpha1.GetConnectionDataStreamRequest\x1a..mgmt.v1alpha1.GetConnectionDataStreamResponse\"\x00\x30\x01\x12n\n\x13GetConnectionSchema\x12).mgmt.v1alpha1.GetConnectionSchemaRequest\x1a*.mgmt.v1alpha1.GetConnectionSchemaResponse\"\x00\x12w\n\x16GetConnectionSchemaMap\x12,.mgmt.v1alpha1.GetConnectionSchemaMapRequest\x1a-.mgmt.v1alpha1.GetConnectionSchemaMapResponse\"\x00\x12z\n\x17GetConnectionSchemaMaps\x12-.mgmt.v1alpha1.GetConnectionSchemaMapsRequest\x1a..mgmt.v1alpha1.GetConnectionSchemaMapsResponse\"\x00\x12\x8c\x01\n\x1dGetConnectionTableConstraints\x12\x33.mgmt.v1alpha1.GetConnectionTableConstraintsRequest\x1a\x34.mgmt.v1alpha1.GetConnectionTableConstraintsResponse\"\x00\x12\x92\x01\n\x1fGetConnectionForeignConstraints\x12\x35.mgmt.v1alpha1.GetConnectionForeignConstraintsRequest\x1a\x36.mgmt.v1alpha1.GetConnectionForeignConstraintsResponse\"\x00\x12\x92\x01\n\x1fGetConnectionPrimaryConstraints\x12\x35.mgmt.v1alpha1.GetConnectionPrimaryConstraintsRequest\x1a\x36.mgmt.v1alpha1.GetConnectionPrimaryConstraintsResponse\"\x00\x12\x86\x01\n\x1bGetConnectionInitStatements\x12\x31.mgmt.v1alpha1.GetConnectionInitStatementsRequest\x1a\x32.mgmt.v1alpha1.GetConnectionInitStatementsResponse\"\x00\x12\x8f\x01\n\x1eGetConnectionUniqueConstraints\x12\x34.mgmt.v1alpha1.GetConnectionUniqueConstraintsRequest\x1a\x35.mgmt.v1alpha1.GetConnectionUniqueConstraintsResponse\"\x00\x12k\n\x12GetAiGeneratedData\x12(.mgmt.v1alpha1.GetAiGeneratedDataRequest\x1a).mgmt.v1alpha1.GetAiGeneratedDataResponse\"\x00\x12\x65\n\x10GetTableRowCount\x12&.mgmt.v1alpha1.GetTableRowCountRequest\x1a\'.mgmt.v1alpha1.GetTableRowCountResponse\"\x00\x42\xcf\x01\n\x11\x63om.mgmt.v1alpha1B\x13\x43onnectionDataProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#mgmt/v1alpha1/connection_data.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x16\n\x14PostgresStreamConfig\"\x13\n\x11MysqlStreamConfig\"\x19\n\x17\x41wsDynamoDBStreamConfig\"e\n\x11\x41wsS3StreamConfig\x12!\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12\'\n\njob_run_id\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x08jobRunIdB\x04\n\x02id\"o\n\x1bGcpCloudStorageStreamConfig\x12!\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12\'\n\njob_run_id\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x08jobRunIdB\x04\n\x02id\"\xb5\x03\n\x16\x43onnectionStreamConfig\x12\x42\n\tpg_config\x18\x01 \x01(\x0b\x32#.mgmt.v1alpha1.PostgresStreamConfigH\x00R\x08pgConfig\x12\x46\n\raws_s3_config\x18\x02 \x01(\x0b\x32 .mgmt.v1alpha1.AwsS3StreamConfigH\x00R\x0b\x61wsS3Config\x12\x45\n\x0cmysql_config\x18\x03 \x01(\x0b\x32 .mgmt.v1alpha1.MysqlStreamConfigH\x00R\x0bmysqlConfig\x12\x64\n\x17gcp_cloudstorage_config\x18\x04 \x01(\x0b\x32*.mgmt.v1alpha1.GcpCloudStorageStreamConfigH\x00R\x15gcpCloudstorageConfig\x12Q\n\x0f\x64ynamodb_config\x18\x05 \x01(\x0b\x32&.mgmt.v1alpha1.AwsDynamoDBStreamConfigH\x00R\x0e\x64ynamodbConfigB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\xc9\x01\n\x1eGetConnectionDataStreamRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12J\n\rstream_config\x18\x02 \x01(\x0b\x32%.mgmt.v1alpha1.ConnectionStreamConfigR\x0cstreamConfig\x12\x16\n\x06schema\x18\x03 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x04 \x01(\tR\x05table\"D\n\x1fGetConnectionDataStreamResponse\x12\x1b\n\trow_bytes\x18\x02 \x01(\x0cR\x08rowBytesJ\x04\x08\x01\x10\x02\"\x16\n\x14PostgresSchemaConfig\"\x13\n\x11MysqlSchemaConfig\"\x13\n\x11MssqlSchemaConfig\"e\n\x11\x41wsS3SchemaConfig\x12!\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12\'\n\njob_run_id\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x08jobRunIdB\x04\n\x02id\"\x13\n\x11MongoSchemaConfig\"\x16\n\x14\x44ynamoDBSchemaConfig\"o\n\x1bGcpCloudStorageSchemaConfig\x12!\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12\'\n\njob_run_id\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x08jobRunIdB\x04\n\x02id\"\xc0\x04\n\x16\x43onnectionSchemaConfig\x12\x42\n\tpg_config\x18\x01 \x01(\x0b\x32#.mgmt.v1alpha1.PostgresSchemaConfigH\x00R\x08pgConfig\x12\x46\n\raws_s3_config\x18\x02 \x01(\x0b\x32 .mgmt.v1alpha1.AwsS3SchemaConfigH\x00R\x0b\x61wsS3Config\x12\x45\n\x0cmysql_config\x18\x03 \x01(\x0b\x32 .mgmt.v1alpha1.MysqlSchemaConfigH\x00R\x0bmysqlConfig\x12\x45\n\x0cmongo_config\x18\x04 \x01(\x0b\x32 .mgmt.v1alpha1.MongoSchemaConfigH\x00R\x0bmongoConfig\x12\x64\n\x17gcp_cloudstorage_config\x18\x05 \x01(\x0b\x32*.mgmt.v1alpha1.GcpCloudStorageSchemaConfigH\x00R\x15gcpCloudstorageConfig\x12N\n\x0f\x64ynamodb_config\x18\x06 \x01(\x0b\x32#.mgmt.v1alpha1.DynamoDBSchemaConfigH\x00R\x0e\x64ynamodbConfig\x12\x45\n\x0cmssql_config\x18\x07 \x01(\x0b\x32 .mgmt.v1alpha1.MssqlSchemaConfigH\x00R\x0bmssqlConfigB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\xe0\x02\n\x0e\x44\x61tabaseColumn\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\x12\x16\n\x06\x63olumn\x18\x03 \x01(\tR\x06\x63olumn\x12\x1b\n\tdata_type\x18\x04 \x01(\tR\x08\x64\x61taType\x12\x1f\n\x0bis_nullable\x18\x05 \x01(\tR\nisNullable\x12*\n\x0e\x63olumn_default\x18\x06 \x01(\tH\x00R\rcolumnDefault\x88\x01\x01\x12*\n\x0egenerated_type\x18\x07 \x01(\tH\x01R\rgeneratedType\x88\x01\x01\x12\x34\n\x13identity_generation\x18\x08 \x01(\tH\x02R\x12identityGeneration\x88\x01\x01\x42\x11\n\x0f_column_defaultB\x11\n\x0f_generated_typeB\x16\n\x14_identity_generation\"\x97\x01\n\x1aGetConnectionSchemaRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12J\n\rschema_config\x18\x02 \x01(\x0b\x32%.mgmt.v1alpha1.ConnectionSchemaConfigR\x0cschemaConfig\"V\n\x1bGetConnectionSchemaResponse\x12\x37\n\x07schemas\x18\x01 \x03(\x0b\x32\x1d.mgmt.v1alpha1.DatabaseColumnR\x07schemas\"\x9a\x01\n\x1dGetConnectionSchemaMapRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12J\n\rschema_config\x18\x02 \x01(\x0b\x32%.mgmt.v1alpha1.ConnectionSchemaConfigR\x0cschemaConfig\"\xe7\x01\n\x1eGetConnectionSchemaMapResponse\x12[\n\nschema_map\x18\x01 \x03(\x0b\x32<.mgmt.v1alpha1.GetConnectionSchemaMapResponse.SchemaMapEntryR\tschemaMap\x1ah\n\x0eSchemaMapEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12@\n\x05value\x18\x02 \x01(\x0b\x32*.mgmt.v1alpha1.GetConnectionSchemaResponseR\x05value:\x02\x38\x01\"j\n\x1eGetConnectionSchemaMapsRequest\x12H\n\x08requests\x18\x01 \x03(\x0b\x32,.mgmt.v1alpha1.GetConnectionSchemaMapRequestR\x08requests\"\x95\x01\n\x1fGetConnectionSchemaMapsResponse\x12K\n\tresponses\x18\x01 \x03(\x0b\x32-.mgmt.v1alpha1.GetConnectionSchemaMapResponseR\tresponses\x12%\n\x0e\x63onnection_ids\x18\x02 \x03(\tR\rconnectionIds\"B\n\nForeignKey\x12\x14\n\x05table\x18\x01 \x01(\tR\x05table\x12\x18\n\x07\x63olumns\x18\x03 \x03(\tR\x07\x63olumnsJ\x04\x08\x02\x10\x03\"\x98\x01\n\x11\x46oreignConstraint\x12:\n\x0b\x66oreign_key\x18\x03 \x01(\x0b\x32\x19.mgmt.v1alpha1.ForeignKeyR\nforeignKey\x12\x18\n\x07\x63olumns\x18\x04 \x03(\tR\x07\x63olumns\x12!\n\x0cnot_nullable\x18\x05 \x03(\x08R\x0bnotNullableJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03\"]\n\x17\x46oreignConstraintTables\x12\x42\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32 .mgmt.v1alpha1.ForeignConstraintR\x0b\x63onstraints\"\x98\x01\n\x14InitStatementOptions\x12\x1f\n\x0binit_schema\x18\x01 \x01(\x08R\ninitSchema\x12\x34\n\x16truncate_before_insert\x18\x02 \x01(\x08R\x14truncateBeforeInsert\x12)\n\x10truncate_cascade\x18\x03 \x01(\x08R\x0ftruncateCascade\"\x92\x01\n\"GetConnectionInitStatementsRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12=\n\x07options\x18\x02 \x01(\x0b\x32#.mgmt.v1alpha1.InitStatementOptionsR\x07options\"L\n\x14SchemaInitStatements\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12\x1e\n\nstatements\x18\x02 \x03(\tR\nstatements\"\xa3\x04\n#GetConnectionInitStatementsResponse\x12\x7f\n\x15table_init_statements\x18\x01 \x03(\x0b\x32K.mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableInitStatementsEntryR\x13tableInitStatements\x12\x8b\x01\n\x19table_truncate_statements\x18\x02 \x03(\x0b\x32O.mgmt.v1alpha1.GetConnectionInitStatementsResponse.TableTruncateStatementsEntryR\x17tableTruncateStatements\x12Y\n\x16schema_init_statements\x18\x03 \x03(\x0b\x32#.mgmt.v1alpha1.SchemaInitStatementsR\x14schemaInitStatements\x1a\x46\n\x18TableInitStatementsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aJ\n\x1cTableTruncateStatementsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"-\n\x11PrimaryConstraint\x12\x18\n\x07\x63olumns\x18\x01 \x03(\tR\x07\x63olumns\",\n\x10UniqueConstraint\x12\x18\n\x07\x63olumns\x18\x01 \x03(\tR\x07\x63olumns\"\xba\x02\n\x19GetAiGeneratedDataRequest\x12\x32\n\x10\x61i_connection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0e\x61iConnectionId\x12\x1f\n\x05\x63ount\x18\x02 \x01(\x03\x42\t\xbaH\x06\"\x04\x18\n(\x01R\x05\x63ount\x12&\n\nmodel_name\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\tmodelName\x12$\n\x0buser_prompt\x18\x04 \x01(\tH\x00R\nuserPrompt\x88\x01\x01\x12\x36\n\x12\x64\x61ta_connection_id\x18\x05 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x10\x64\x61taConnectionId\x12\x32\n\x05table\x18\x06 \x01(\x0b\x32\x1c.mgmt.v1alpha1.DatabaseTableR\x05tableB\x0e\n\x0c_user_prompt\"O\n\rDatabaseTable\x12\x1f\n\x06schema\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x06schema\x12\x1d\n\x05table\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05table\"O\n\x1aGetAiGeneratedDataResponse\x12\x31\n\x07records\x18\x01 \x03(\x0b\x32\x17.google.protobuf.StructR\x07records\"U\n$GetConnectionTableConstraintsRequest\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\"V\n\x11UniqueConstraints\x12\x41\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32\x1f.mgmt.v1alpha1.UniqueConstraintR\x0b\x63onstraints\"\xfd\x05\n%GetConnectionTableConstraintsResponse\x12\x87\x01\n\x17\x66oreign_key_constraints\x18\x01 \x03(\x0b\x32O.mgmt.v1alpha1.GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntryR\x15\x66oreignKeyConstraints\x12\x87\x01\n\x17primary_key_constraints\x18\x02 \x03(\x0b\x32O.mgmt.v1alpha1.GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntryR\x15primaryKeyConstraints\x12z\n\x12unique_constraints\x18\x03 \x03(\x0b\x32K.mgmt.v1alpha1.GetConnectionTableConstraintsResponse.UniqueConstraintsEntryR\x11uniqueConstraints\x1ap\n\x1a\x46oreignKeyConstraintsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12<\n\x05value\x18\x02 \x01(\x0b\x32&.mgmt.v1alpha1.ForeignConstraintTablesR\x05value:\x02\x38\x01\x1aj\n\x1aPrimaryKeyConstraintsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32 .mgmt.v1alpha1.PrimaryConstraintR\x05value:\x02\x38\x01\x1a\x66\n\x16UniqueConstraintsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32 .mgmt.v1alpha1.UniqueConstraintsR\x05value:\x02\x38\x01\"\xa5\x01\n\x17GetTableRowCountRequest\x12#\n\rconnection_id\x18\x01 \x01(\tR\x0c\x63onnectionId\x12\x16\n\x06schema\x18\x02 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x03 \x01(\tR\x05table\x12&\n\x0cwhere_clause\x18\x04 \x01(\tH\x00R\x0bwhereClause\x88\x01\x01\x42\x0f\n\r_where_clause\"0\n\x18GetTableRowCountResponse\x12\x14\n\x05\x63ount\x18\x01 \x01(\x03R\x05\x63ount2\xe6\x07\n\x15\x43onnectionDataService\x12|\n\x17GetConnectionDataStream\x12-.mgmt.v1alpha1.GetConnectionDataStreamRequest\x1a..mgmt.v1alpha1.GetConnectionDataStreamResponse\"\x00\x30\x01\x12n\n\x13GetConnectionSchema\x12).mgmt.v1alpha1.GetConnectionSchemaRequest\x1a*.mgmt.v1alpha1.GetConnectionSchemaResponse\"\x00\x12w\n\x16GetConnectionSchemaMap\x12,.mgmt.v1alpha1.GetConnectionSchemaMapRequest\x1a-.mgmt.v1alpha1.GetConnectionSchemaMapResponse\"\x00\x12z\n\x17GetConnectionSchemaMaps\x12-.mgmt.v1alpha1.GetConnectionSchemaMapsRequest\x1a..mgmt.v1alpha1.GetConnectionSchemaMapsResponse\"\x00\x12\x8c\x01\n\x1dGetConnectionTableConstraints\x12\x33.mgmt.v1alpha1.GetConnectionTableConstraintsRequest\x1a\x34.mgmt.v1alpha1.GetConnectionTableConstraintsResponse\"\x00\x12\x86\x01\n\x1bGetConnectionInitStatements\x12\x31.mgmt.v1alpha1.GetConnectionInitStatementsRequest\x1a\x32.mgmt.v1alpha1.GetConnectionInitStatementsResponse\"\x00\x12k\n\x12GetAiGeneratedData\x12(.mgmt.v1alpha1.GetAiGeneratedDataRequest\x1a).mgmt.v1alpha1.GetAiGeneratedDataResponse\"\x00\x12\x65\n\x10GetTableRowCount\x12&.mgmt.v1alpha1.GetTableRowCountRequest\x1a\'.mgmt.v1alpha1.GetTableRowCountResponse\"\x00\x42\xcf\x01\n\x11\x63om.mgmt.v1alpha1B\x13\x43onnectionDataProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -46,8 +46,6 @@ _globals['_CONNECTIONSTREAMCONFIG'].oneofs_by_name['config']._serialized_options = b'\272H\002\010\001' _globals['_GETCONNECTIONDATASTREAMREQUEST'].fields_by_name['connection_id']._loaded_options = None _globals['_GETCONNECTIONDATASTREAMREQUEST'].fields_by_name['connection_id']._serialized_options = b'\272H\005r\003\260\001\001' - _globals['_GETCONNECTIONDATASTREAMRESPONSE_ROWENTRY']._loaded_options = None - _globals['_GETCONNECTIONDATASTREAMRESPONSE_ROWENTRY']._serialized_options = b'8\001' _globals['_AWSS3SCHEMACONFIG'].fields_by_name['job_id']._loaded_options = None _globals['_AWSS3SCHEMACONFIG'].fields_by_name['job_id']._serialized_options = b'\272H\005r\003\260\001\001' _globals['_AWSS3SCHEMACONFIG'].fields_by_name['job_run_id']._loaded_options = None @@ -64,24 +62,12 @@ _globals['_GETCONNECTIONSCHEMAMAPREQUEST'].fields_by_name['connection_id']._serialized_options = b'\272H\005r\003\260\001\001' _globals['_GETCONNECTIONSCHEMAMAPRESPONSE_SCHEMAMAPENTRY']._loaded_options = None _globals['_GETCONNECTIONSCHEMAMAPRESPONSE_SCHEMAMAPENTRY']._serialized_options = b'8\001' - _globals['_GETCONNECTIONFOREIGNCONSTRAINTSREQUEST'].fields_by_name['connection_id']._loaded_options = None - _globals['_GETCONNECTIONFOREIGNCONSTRAINTSREQUEST'].fields_by_name['connection_id']._serialized_options = b'\272H\005r\003\260\001\001' - _globals['_GETCONNECTIONFOREIGNCONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._loaded_options = None - _globals['_GETCONNECTIONFOREIGNCONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._serialized_options = b'8\001' _globals['_GETCONNECTIONINITSTATEMENTSREQUEST'].fields_by_name['connection_id']._loaded_options = None _globals['_GETCONNECTIONINITSTATEMENTSREQUEST'].fields_by_name['connection_id']._serialized_options = b'\272H\005r\003\260\001\001' _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLEINITSTATEMENTSENTRY']._loaded_options = None _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLEINITSTATEMENTSENTRY']._serialized_options = b'8\001' _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLETRUNCATESTATEMENTSENTRY']._loaded_options = None _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLETRUNCATESTATEMENTSENTRY']._serialized_options = b'8\001' - _globals['_GETCONNECTIONPRIMARYCONSTRAINTSREQUEST'].fields_by_name['connection_id']._loaded_options = None - _globals['_GETCONNECTIONPRIMARYCONSTRAINTSREQUEST'].fields_by_name['connection_id']._serialized_options = b'\272H\005r\003\260\001\001' - _globals['_GETCONNECTIONPRIMARYCONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._loaded_options = None - _globals['_GETCONNECTIONPRIMARYCONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._serialized_options = b'8\001' - _globals['_GETCONNECTIONUNIQUECONSTRAINTSREQUEST'].fields_by_name['connection_id']._loaded_options = None - _globals['_GETCONNECTIONUNIQUECONSTRAINTSREQUEST'].fields_by_name['connection_id']._serialized_options = b'\272H\005r\003\260\001\001' - _globals['_GETCONNECTIONUNIQUECONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._loaded_options = None - _globals['_GETCONNECTIONUNIQUECONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._serialized_options = b'8\001' _globals['_GETAIGENERATEDDATAREQUEST'].fields_by_name['ai_connection_id']._loaded_options = None _globals['_GETAIGENERATEDDATAREQUEST'].fields_by_name['ai_connection_id']._serialized_options = b'\272H\005r\003\260\001\001' _globals['_GETAIGENERATEDDATAREQUEST'].fields_by_name['count']._loaded_options = None @@ -116,104 +102,84 @@ _globals['_CONNECTIONSTREAMCONFIG']._serialized_end=839 _globals['_GETCONNECTIONDATASTREAMREQUEST']._serialized_start=842 _globals['_GETCONNECTIONDATASTREAMREQUEST']._serialized_end=1043 - _globals['_GETCONNECTIONDATASTREAMRESPONSE']._serialized_start=1046 - _globals['_GETCONNECTIONDATASTREAMRESPONSE']._serialized_end=1210 - _globals['_GETCONNECTIONDATASTREAMRESPONSE_ROWENTRY']._serialized_start=1156 - _globals['_GETCONNECTIONDATASTREAMRESPONSE_ROWENTRY']._serialized_end=1210 - _globals['_POSTGRESSCHEMACONFIG']._serialized_start=1212 - _globals['_POSTGRESSCHEMACONFIG']._serialized_end=1234 - _globals['_MYSQLSCHEMACONFIG']._serialized_start=1236 - _globals['_MYSQLSCHEMACONFIG']._serialized_end=1255 - _globals['_MSSQLSCHEMACONFIG']._serialized_start=1257 - _globals['_MSSQLSCHEMACONFIG']._serialized_end=1276 - _globals['_AWSS3SCHEMACONFIG']._serialized_start=1278 - _globals['_AWSS3SCHEMACONFIG']._serialized_end=1379 - _globals['_MONGOSCHEMACONFIG']._serialized_start=1381 - _globals['_MONGOSCHEMACONFIG']._serialized_end=1400 - _globals['_DYNAMODBSCHEMACONFIG']._serialized_start=1402 - _globals['_DYNAMODBSCHEMACONFIG']._serialized_end=1424 - _globals['_GCPCLOUDSTORAGESCHEMACONFIG']._serialized_start=1426 - _globals['_GCPCLOUDSTORAGESCHEMACONFIG']._serialized_end=1537 - _globals['_CONNECTIONSCHEMACONFIG']._serialized_start=1540 - _globals['_CONNECTIONSCHEMACONFIG']._serialized_end=2116 - _globals['_DATABASECOLUMN']._serialized_start=2119 - _globals['_DATABASECOLUMN']._serialized_end=2471 - _globals['_GETCONNECTIONSCHEMAREQUEST']._serialized_start=2474 - _globals['_GETCONNECTIONSCHEMAREQUEST']._serialized_end=2625 - _globals['_GETCONNECTIONSCHEMARESPONSE']._serialized_start=2627 - _globals['_GETCONNECTIONSCHEMARESPONSE']._serialized_end=2713 - _globals['_GETCONNECTIONSCHEMAMAPREQUEST']._serialized_start=2716 - _globals['_GETCONNECTIONSCHEMAMAPREQUEST']._serialized_end=2870 - _globals['_GETCONNECTIONSCHEMAMAPRESPONSE']._serialized_start=2873 - _globals['_GETCONNECTIONSCHEMAMAPRESPONSE']._serialized_end=3104 - _globals['_GETCONNECTIONSCHEMAMAPRESPONSE_SCHEMAMAPENTRY']._serialized_start=3000 - _globals['_GETCONNECTIONSCHEMAMAPRESPONSE_SCHEMAMAPENTRY']._serialized_end=3104 - _globals['_GETCONNECTIONSCHEMAMAPSREQUEST']._serialized_start=3106 - _globals['_GETCONNECTIONSCHEMAMAPSREQUEST']._serialized_end=3212 - _globals['_GETCONNECTIONSCHEMAMAPSRESPONSE']._serialized_start=3215 - _globals['_GETCONNECTIONSCHEMAMAPSRESPONSE']._serialized_end=3364 - _globals['_GETCONNECTIONFOREIGNCONSTRAINTSREQUEST']._serialized_start=3366 - _globals['_GETCONNECTIONFOREIGNCONSTRAINTSREQUEST']._serialized_end=3453 - _globals['_FOREIGNKEY']._serialized_start=3455 - _globals['_FOREIGNKEY']._serialized_end=3539 - _globals['_FOREIGNCONSTRAINT']._serialized_start=3542 - _globals['_FOREIGNCONSTRAINT']._serialized_end=3739 - _globals['_FOREIGNCONSTRAINTTABLES']._serialized_start=3741 - _globals['_FOREIGNCONSTRAINTTABLES']._serialized_end=3834 - _globals['_GETCONNECTIONFOREIGNCONSTRAINTSRESPONSE']._serialized_start=3837 - _globals['_GETCONNECTIONFOREIGNCONSTRAINTSRESPONSE']._serialized_end=4110 - _globals['_GETCONNECTIONFOREIGNCONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._serialized_start=4003 - _globals['_GETCONNECTIONFOREIGNCONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._serialized_end=4110 - _globals['_INITSTATEMENTOPTIONS']._serialized_start=4113 - _globals['_INITSTATEMENTOPTIONS']._serialized_end=4265 - _globals['_GETCONNECTIONINITSTATEMENTSREQUEST']._serialized_start=4268 - _globals['_GETCONNECTIONINITSTATEMENTSREQUEST']._serialized_end=4414 - _globals['_SCHEMAINITSTATEMENTS']._serialized_start=4416 - _globals['_SCHEMAINITSTATEMENTS']._serialized_end=4492 - _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE']._serialized_start=4495 - _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE']._serialized_end=5042 - _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLEINITSTATEMENTSENTRY']._serialized_start=4896 - _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLEINITSTATEMENTSENTRY']._serialized_end=4966 - _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLETRUNCATESTATEMENTSENTRY']._serialized_start=4968 - _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLETRUNCATESTATEMENTSENTRY']._serialized_end=5042 - _globals['_PRIMARYCONSTRAINT']._serialized_start=5044 - _globals['_PRIMARYCONSTRAINT']._serialized_end=5089 - _globals['_GETCONNECTIONPRIMARYCONSTRAINTSREQUEST']._serialized_start=5091 - _globals['_GETCONNECTIONPRIMARYCONSTRAINTSREQUEST']._serialized_end=5178 - _globals['_GETCONNECTIONPRIMARYCONSTRAINTSRESPONSE']._serialized_start=5181 - _globals['_GETCONNECTIONPRIMARYCONSTRAINTSRESPONSE']._serialized_end=5448 - _globals['_GETCONNECTIONPRIMARYCONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._serialized_start=5347 - _globals['_GETCONNECTIONPRIMARYCONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._serialized_end=5448 - _globals['_GETCONNECTIONUNIQUECONSTRAINTSREQUEST']._serialized_start=5450 - _globals['_GETCONNECTIONUNIQUECONSTRAINTSREQUEST']._serialized_end=5536 - _globals['_GETCONNECTIONUNIQUECONSTRAINTSRESPONSE']._serialized_start=5539 - _globals['_GETCONNECTIONUNIQUECONSTRAINTSRESPONSE']._serialized_end=5803 - _globals['_GETCONNECTIONUNIQUECONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._serialized_start=5703 - _globals['_GETCONNECTIONUNIQUECONSTRAINTSRESPONSE_TABLECONSTRAINTSENTRY']._serialized_end=5803 - _globals['_UNIQUECONSTRAINT']._serialized_start=5805 - _globals['_UNIQUECONSTRAINT']._serialized_end=5849 - _globals['_GETAIGENERATEDDATAREQUEST']._serialized_start=5852 - _globals['_GETAIGENERATEDDATAREQUEST']._serialized_end=6166 - _globals['_DATABASETABLE']._serialized_start=6168 - _globals['_DATABASETABLE']._serialized_end=6247 - _globals['_GETAIGENERATEDDATARESPONSE']._serialized_start=6249 - _globals['_GETAIGENERATEDDATARESPONSE']._serialized_end=6328 - _globals['_GETCONNECTIONTABLECONSTRAINTSREQUEST']._serialized_start=6330 - _globals['_GETCONNECTIONTABLECONSTRAINTSREQUEST']._serialized_end=6415 - _globals['_UNIQUECONSTRAINTS']._serialized_start=6417 - _globals['_UNIQUECONSTRAINTS']._serialized_end=6503 - _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE']._serialized_start=6506 - _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE']._serialized_end=7271 - _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_FOREIGNKEYCONSTRAINTSENTRY']._serialized_start=6947 - _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_FOREIGNKEYCONSTRAINTSENTRY']._serialized_end=7059 - _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_PRIMARYKEYCONSTRAINTSENTRY']._serialized_start=7061 - _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_PRIMARYKEYCONSTRAINTSENTRY']._serialized_end=7167 - _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_UNIQUECONSTRAINTSENTRY']._serialized_start=7169 - _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_UNIQUECONSTRAINTSENTRY']._serialized_end=7271 - _globals['_GETTABLEROWCOUNTREQUEST']._serialized_start=7274 - _globals['_GETTABLEROWCOUNTREQUEST']._serialized_end=7439 - _globals['_GETTABLEROWCOUNTRESPONSE']._serialized_start=7441 - _globals['_GETTABLEROWCOUNTRESPONSE']._serialized_end=7489 - _globals['_CONNECTIONDATASERVICE']._serialized_start=7492 - _globals['_CONNECTIONDATASERVICE']._serialized_end=8934 + _globals['_GETCONNECTIONDATASTREAMRESPONSE']._serialized_start=1045 + _globals['_GETCONNECTIONDATASTREAMRESPONSE']._serialized_end=1113 + _globals['_POSTGRESSCHEMACONFIG']._serialized_start=1115 + _globals['_POSTGRESSCHEMACONFIG']._serialized_end=1137 + _globals['_MYSQLSCHEMACONFIG']._serialized_start=1139 + _globals['_MYSQLSCHEMACONFIG']._serialized_end=1158 + _globals['_MSSQLSCHEMACONFIG']._serialized_start=1160 + _globals['_MSSQLSCHEMACONFIG']._serialized_end=1179 + _globals['_AWSS3SCHEMACONFIG']._serialized_start=1181 + _globals['_AWSS3SCHEMACONFIG']._serialized_end=1282 + _globals['_MONGOSCHEMACONFIG']._serialized_start=1284 + _globals['_MONGOSCHEMACONFIG']._serialized_end=1303 + _globals['_DYNAMODBSCHEMACONFIG']._serialized_start=1305 + _globals['_DYNAMODBSCHEMACONFIG']._serialized_end=1327 + _globals['_GCPCLOUDSTORAGESCHEMACONFIG']._serialized_start=1329 + _globals['_GCPCLOUDSTORAGESCHEMACONFIG']._serialized_end=1440 + _globals['_CONNECTIONSCHEMACONFIG']._serialized_start=1443 + _globals['_CONNECTIONSCHEMACONFIG']._serialized_end=2019 + _globals['_DATABASECOLUMN']._serialized_start=2022 + _globals['_DATABASECOLUMN']._serialized_end=2374 + _globals['_GETCONNECTIONSCHEMAREQUEST']._serialized_start=2377 + _globals['_GETCONNECTIONSCHEMAREQUEST']._serialized_end=2528 + _globals['_GETCONNECTIONSCHEMARESPONSE']._serialized_start=2530 + _globals['_GETCONNECTIONSCHEMARESPONSE']._serialized_end=2616 + _globals['_GETCONNECTIONSCHEMAMAPREQUEST']._serialized_start=2619 + _globals['_GETCONNECTIONSCHEMAMAPREQUEST']._serialized_end=2773 + _globals['_GETCONNECTIONSCHEMAMAPRESPONSE']._serialized_start=2776 + _globals['_GETCONNECTIONSCHEMAMAPRESPONSE']._serialized_end=3007 + _globals['_GETCONNECTIONSCHEMAMAPRESPONSE_SCHEMAMAPENTRY']._serialized_start=2903 + _globals['_GETCONNECTIONSCHEMAMAPRESPONSE_SCHEMAMAPENTRY']._serialized_end=3007 + _globals['_GETCONNECTIONSCHEMAMAPSREQUEST']._serialized_start=3009 + _globals['_GETCONNECTIONSCHEMAMAPSREQUEST']._serialized_end=3115 + _globals['_GETCONNECTIONSCHEMAMAPSRESPONSE']._serialized_start=3118 + _globals['_GETCONNECTIONSCHEMAMAPSRESPONSE']._serialized_end=3267 + _globals['_FOREIGNKEY']._serialized_start=3269 + _globals['_FOREIGNKEY']._serialized_end=3335 + _globals['_FOREIGNCONSTRAINT']._serialized_start=3338 + _globals['_FOREIGNCONSTRAINT']._serialized_end=3490 + _globals['_FOREIGNCONSTRAINTTABLES']._serialized_start=3492 + _globals['_FOREIGNCONSTRAINTTABLES']._serialized_end=3585 + _globals['_INITSTATEMENTOPTIONS']._serialized_start=3588 + _globals['_INITSTATEMENTOPTIONS']._serialized_end=3740 + _globals['_GETCONNECTIONINITSTATEMENTSREQUEST']._serialized_start=3743 + _globals['_GETCONNECTIONINITSTATEMENTSREQUEST']._serialized_end=3889 + _globals['_SCHEMAINITSTATEMENTS']._serialized_start=3891 + _globals['_SCHEMAINITSTATEMENTS']._serialized_end=3967 + _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE']._serialized_start=3970 + _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE']._serialized_end=4517 + _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLEINITSTATEMENTSENTRY']._serialized_start=4371 + _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLEINITSTATEMENTSENTRY']._serialized_end=4441 + _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLETRUNCATESTATEMENTSENTRY']._serialized_start=4443 + _globals['_GETCONNECTIONINITSTATEMENTSRESPONSE_TABLETRUNCATESTATEMENTSENTRY']._serialized_end=4517 + _globals['_PRIMARYCONSTRAINT']._serialized_start=4519 + _globals['_PRIMARYCONSTRAINT']._serialized_end=4564 + _globals['_UNIQUECONSTRAINT']._serialized_start=4566 + _globals['_UNIQUECONSTRAINT']._serialized_end=4610 + _globals['_GETAIGENERATEDDATAREQUEST']._serialized_start=4613 + _globals['_GETAIGENERATEDDATAREQUEST']._serialized_end=4927 + _globals['_DATABASETABLE']._serialized_start=4929 + _globals['_DATABASETABLE']._serialized_end=5008 + _globals['_GETAIGENERATEDDATARESPONSE']._serialized_start=5010 + _globals['_GETAIGENERATEDDATARESPONSE']._serialized_end=5089 + _globals['_GETCONNECTIONTABLECONSTRAINTSREQUEST']._serialized_start=5091 + _globals['_GETCONNECTIONTABLECONSTRAINTSREQUEST']._serialized_end=5176 + _globals['_UNIQUECONSTRAINTS']._serialized_start=5178 + _globals['_UNIQUECONSTRAINTS']._serialized_end=5264 + _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE']._serialized_start=5267 + _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE']._serialized_end=6032 + _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_FOREIGNKEYCONSTRAINTSENTRY']._serialized_start=5708 + _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_FOREIGNKEYCONSTRAINTSENTRY']._serialized_end=5820 + _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_PRIMARYKEYCONSTRAINTSENTRY']._serialized_start=5822 + _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_PRIMARYKEYCONSTRAINTSENTRY']._serialized_end=5928 + _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_UNIQUECONSTRAINTSENTRY']._serialized_start=5930 + _globals['_GETCONNECTIONTABLECONSTRAINTSRESPONSE_UNIQUECONSTRAINTSENTRY']._serialized_end=6032 + _globals['_GETTABLEROWCOUNTREQUEST']._serialized_start=6035 + _globals['_GETTABLEROWCOUNTREQUEST']._serialized_end=6200 + _globals['_GETTABLEROWCOUNTRESPONSE']._serialized_start=6202 + _globals['_GETTABLEROWCOUNTRESPONSE']._serialized_end=6250 + _globals['_CONNECTIONDATASERVICE']._serialized_start=6253 + _globals['_CONNECTIONDATASERVICE']._serialized_end=7251 # @@protoc_insertion_point(module_scope) diff --git a/python/src/neosync/mgmt/v1alpha1/connection_data_pb2.pyi b/python/src/neosync/mgmt/v1alpha1/connection_data_pb2.pyi index 4c0e4ee94e..39ce7c822d 100644 --- a/python/src/neosync/mgmt/v1alpha1/connection_data_pb2.pyi +++ b/python/src/neosync/mgmt/v1alpha1/connection_data_pb2.pyi @@ -62,17 +62,10 @@ class GetConnectionDataStreamRequest(_message.Message): def __init__(self, connection_id: _Optional[str] = ..., stream_config: _Optional[_Union[ConnectionStreamConfig, _Mapping]] = ..., schema: _Optional[str] = ..., table: _Optional[str] = ...) -> None: ... class GetConnectionDataStreamResponse(_message.Message): - __slots__ = ("row",) - class RowEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: bytes - def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ...) -> None: ... - ROW_FIELD_NUMBER: _ClassVar[int] - row: _containers.ScalarMap[str, bytes] - def __init__(self, row: _Optional[_Mapping[str, bytes]] = ...) -> None: ... + __slots__ = ("row_bytes",) + ROW_BYTES_FIELD_NUMBER: _ClassVar[int] + row_bytes: bytes + def __init__(self, row_bytes: _Optional[bytes] = ...) -> None: ... class PostgresSchemaConfig(_message.Message): __slots__ = () @@ -197,35 +190,23 @@ class GetConnectionSchemaMapsResponse(_message.Message): connection_ids: _containers.RepeatedScalarFieldContainer[str] def __init__(self, responses: _Optional[_Iterable[_Union[GetConnectionSchemaMapResponse, _Mapping]]] = ..., connection_ids: _Optional[_Iterable[str]] = ...) -> None: ... -class GetConnectionForeignConstraintsRequest(_message.Message): - __slots__ = ("connection_id",) - CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] - connection_id: str - def __init__(self, connection_id: _Optional[str] = ...) -> None: ... - class ForeignKey(_message.Message): - __slots__ = ("table", "column", "columns") + __slots__ = ("table", "columns") TABLE_FIELD_NUMBER: _ClassVar[int] - COLUMN_FIELD_NUMBER: _ClassVar[int] COLUMNS_FIELD_NUMBER: _ClassVar[int] table: str - column: str columns: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, table: _Optional[str] = ..., column: _Optional[str] = ..., columns: _Optional[_Iterable[str]] = ...) -> None: ... + def __init__(self, table: _Optional[str] = ..., columns: _Optional[_Iterable[str]] = ...) -> None: ... class ForeignConstraint(_message.Message): - __slots__ = ("column", "is_nullable", "foreign_key", "columns", "not_nullable") - COLUMN_FIELD_NUMBER: _ClassVar[int] - IS_NULLABLE_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("foreign_key", "columns", "not_nullable") FOREIGN_KEY_FIELD_NUMBER: _ClassVar[int] COLUMNS_FIELD_NUMBER: _ClassVar[int] NOT_NULLABLE_FIELD_NUMBER: _ClassVar[int] - column: str - is_nullable: bool foreign_key: ForeignKey columns: _containers.RepeatedScalarFieldContainer[str] not_nullable: _containers.RepeatedScalarFieldContainer[bool] - def __init__(self, column: _Optional[str] = ..., is_nullable: bool = ..., foreign_key: _Optional[_Union[ForeignKey, _Mapping]] = ..., columns: _Optional[_Iterable[str]] = ..., not_nullable: _Optional[_Iterable[bool]] = ...) -> None: ... + def __init__(self, foreign_key: _Optional[_Union[ForeignKey, _Mapping]] = ..., columns: _Optional[_Iterable[str]] = ..., not_nullable: _Optional[_Iterable[bool]] = ...) -> None: ... class ForeignConstraintTables(_message.Message): __slots__ = ("constraints",) @@ -233,19 +214,6 @@ class ForeignConstraintTables(_message.Message): constraints: _containers.RepeatedCompositeFieldContainer[ForeignConstraint] def __init__(self, constraints: _Optional[_Iterable[_Union[ForeignConstraint, _Mapping]]] = ...) -> None: ... -class GetConnectionForeignConstraintsResponse(_message.Message): - __slots__ = ("table_constraints",) - class TableConstraintsEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: ForeignConstraintTables - def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[ForeignConstraintTables, _Mapping]] = ...) -> None: ... - TABLE_CONSTRAINTS_FIELD_NUMBER: _ClassVar[int] - table_constraints: _containers.MessageMap[str, ForeignConstraintTables] - def __init__(self, table_constraints: _Optional[_Mapping[str, ForeignConstraintTables]] = ...) -> None: ... - class InitStatementOptions(_message.Message): __slots__ = ("init_schema", "truncate_before_insert", "truncate_cascade") INIT_SCHEMA_FIELD_NUMBER: _ClassVar[int] @@ -302,44 +270,6 @@ class PrimaryConstraint(_message.Message): columns: _containers.RepeatedScalarFieldContainer[str] def __init__(self, columns: _Optional[_Iterable[str]] = ...) -> None: ... -class GetConnectionPrimaryConstraintsRequest(_message.Message): - __slots__ = ("connection_id",) - CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] - connection_id: str - def __init__(self, connection_id: _Optional[str] = ...) -> None: ... - -class GetConnectionPrimaryConstraintsResponse(_message.Message): - __slots__ = ("table_constraints",) - class TableConstraintsEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: PrimaryConstraint - def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[PrimaryConstraint, _Mapping]] = ...) -> None: ... - TABLE_CONSTRAINTS_FIELD_NUMBER: _ClassVar[int] - table_constraints: _containers.MessageMap[str, PrimaryConstraint] - def __init__(self, table_constraints: _Optional[_Mapping[str, PrimaryConstraint]] = ...) -> None: ... - -class GetConnectionUniqueConstraintsRequest(_message.Message): - __slots__ = ("connection_id",) - CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] - connection_id: str - def __init__(self, connection_id: _Optional[str] = ...) -> None: ... - -class GetConnectionUniqueConstraintsResponse(_message.Message): - __slots__ = ("table_constraints",) - class TableConstraintsEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: UniqueConstraint - def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[UniqueConstraint, _Mapping]] = ...) -> None: ... - TABLE_CONSTRAINTS_FIELD_NUMBER: _ClassVar[int] - table_constraints: _containers.MessageMap[str, UniqueConstraint] - def __init__(self, table_constraints: _Optional[_Mapping[str, UniqueConstraint]] = ...) -> None: ... - class UniqueConstraint(_message.Message): __slots__ = ("columns",) COLUMNS_FIELD_NUMBER: _ClassVar[int] diff --git a/python/src/neosync/mgmt/v1alpha1/connection_data_pb2_grpc.py b/python/src/neosync/mgmt/v1alpha1/connection_data_pb2_grpc.py index 5c96e77740..57d92f94fc 100644 --- a/python/src/neosync/mgmt/v1alpha1/connection_data_pb2_grpc.py +++ b/python/src/neosync/mgmt/v1alpha1/connection_data_pb2_grpc.py @@ -41,26 +41,11 @@ def __init__(self, channel): request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionTableConstraintsRequest.SerializeToString, response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionTableConstraintsResponse.FromString, _registered_method=True) - self.GetConnectionForeignConstraints = channel.unary_unary( - '/mgmt.v1alpha1.ConnectionDataService/GetConnectionForeignConstraints', - request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionForeignConstraintsRequest.SerializeToString, - response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionForeignConstraintsResponse.FromString, - _registered_method=True) - self.GetConnectionPrimaryConstraints = channel.unary_unary( - '/mgmt.v1alpha1.ConnectionDataService/GetConnectionPrimaryConstraints', - request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionPrimaryConstraintsRequest.SerializeToString, - response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionPrimaryConstraintsResponse.FromString, - _registered_method=True) self.GetConnectionInitStatements = channel.unary_unary( '/mgmt.v1alpha1.ConnectionDataService/GetConnectionInitStatements', request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionInitStatementsRequest.SerializeToString, response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionInitStatementsResponse.FromString, _registered_method=True) - self.GetConnectionUniqueConstraints = channel.unary_unary( - '/mgmt.v1alpha1.ConnectionDataService/GetConnectionUniqueConstraints', - request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionUniqueConstraintsRequest.SerializeToString, - response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionUniqueConstraintsResponse.FromString, - _registered_method=True) self.GetAiGeneratedData = channel.unary_unary( '/mgmt.v1alpha1.ConnectionDataService/GetAiGeneratedData', request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAiGeneratedDataRequest.SerializeToString, @@ -114,22 +99,6 @@ def GetConnectionTableConstraints(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def GetConnectionForeignConstraints(self, request, context): - """For a specific connection, returns the foreign key constraints. Mostly useful for SQL-based Connections. - Used primarily by the CLI sync command to determine stream order. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetConnectionPrimaryConstraints(self, request, context): - """For a specific connection, returns the primary key constraints. Mostly useful for SQL-based Connections. - Used primarily by the CLI sync command to determine stream order. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def GetConnectionInitStatements(self, request, context): """For a specific connection, returns the init table statements. Mostly useful for SQL-based Connections. Used primarily by the CLI sync command to create table schema init statement. @@ -138,13 +107,6 @@ def GetConnectionInitStatements(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def GetConnectionUniqueConstraints(self, request, context): - """For a specific connection, returns the unique constraints. Mostly useful for SQL-based connections. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def GetAiGeneratedData(self, request, context): """Query an AI connection by providing the necessary values. Typically used for generating preview data """ @@ -187,26 +149,11 @@ def add_ConnectionDataServiceServicer_to_server(servicer, server): request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionTableConstraintsRequest.FromString, response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionTableConstraintsResponse.SerializeToString, ), - 'GetConnectionForeignConstraints': grpc.unary_unary_rpc_method_handler( - servicer.GetConnectionForeignConstraints, - request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionForeignConstraintsRequest.FromString, - response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionForeignConstraintsResponse.SerializeToString, - ), - 'GetConnectionPrimaryConstraints': grpc.unary_unary_rpc_method_handler( - servicer.GetConnectionPrimaryConstraints, - request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionPrimaryConstraintsRequest.FromString, - response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionPrimaryConstraintsResponse.SerializeToString, - ), 'GetConnectionInitStatements': grpc.unary_unary_rpc_method_handler( servicer.GetConnectionInitStatements, request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionInitStatementsRequest.FromString, response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionInitStatementsResponse.SerializeToString, ), - 'GetConnectionUniqueConstraints': grpc.unary_unary_rpc_method_handler( - servicer.GetConnectionUniqueConstraints, - request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionUniqueConstraintsRequest.FromString, - response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionUniqueConstraintsResponse.SerializeToString, - ), 'GetAiGeneratedData': grpc.unary_unary_rpc_method_handler( servicer.GetAiGeneratedData, request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAiGeneratedDataRequest.FromString, @@ -365,60 +312,6 @@ def GetConnectionTableConstraints(request, metadata, _registered_method=True) - @staticmethod - def GetConnectionForeignConstraints(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/mgmt.v1alpha1.ConnectionDataService/GetConnectionForeignConstraints', - mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionForeignConstraintsRequest.SerializeToString, - mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionForeignConstraintsResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) - - @staticmethod - def GetConnectionPrimaryConstraints(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/mgmt.v1alpha1.ConnectionDataService/GetConnectionPrimaryConstraints', - mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionPrimaryConstraintsRequest.SerializeToString, - mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionPrimaryConstraintsResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) - @staticmethod def GetConnectionInitStatements(request, target, @@ -446,33 +339,6 @@ def GetConnectionInitStatements(request, metadata, _registered_method=True) - @staticmethod - def GetConnectionUniqueConstraints(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/mgmt.v1alpha1.ConnectionDataService/GetConnectionUniqueConstraints', - mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionUniqueConstraintsRequest.SerializeToString, - mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionUniqueConstraintsResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) - @staticmethod def GetAiGeneratedData(request, target, diff --git a/python/src/neosync/mgmt/v1alpha1/connection_pb2.py b/python/src/neosync/mgmt/v1alpha1/connection_pb2.py index b15e6213b7..7f09d331b8 100644 --- a/python/src/neosync/mgmt/v1alpha1/connection_pb2.py +++ b/python/src/neosync/mgmt/v1alpha1/connection_pb2.py @@ -26,7 +26,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emgmt/v1alpha1/connection.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"@\n\x15GetConnectionsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"U\n\x16GetConnectionsResponse\x12;\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32\x19.mgmt.v1alpha1.ConnectionR\x0b\x63onnections\"0\n\x14GetConnectionRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"R\n\x15GetConnectionResponse\x12\x39\n\nconnection\x18\x01 \x01(\x0b\x32\x19.mgmt.v1alpha1.ConnectionR\nconnection\"\xbf\x01\n\x17\x43reateConnectionRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12-\n\x04name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12L\n\x11\x63onnection_config\x18\x03 \x01(\x0b\x32\x1f.mgmt.v1alpha1.ConnectionConfigR\x10\x63onnectionConfig\"U\n\x18\x43reateConnectionResponse\x12\x39\n\nconnection\x18\x01 \x01(\x0b\x32\x19.mgmt.v1alpha1.ConnectionR\nconnection\"\xb0\x01\n\x17UpdateConnectionRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12-\n\x04name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12L\n\x11\x63onnection_config\x18\x03 \x01(\x0b\x32\x1f.mgmt.v1alpha1.ConnectionConfigR\x10\x63onnectionConfig\"U\n\x18UpdateConnectionResponse\x12\x39\n\nconnection\x18\x01 \x01(\x0b\x32\x19.mgmt.v1alpha1.ConnectionR\nconnection\"3\n\x17\x44\x65leteConnectionRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"\x1a\n\x18\x44\x65leteConnectionResponse\"l\n\x1c\x43heckConnectionConfigRequest\x12L\n\x11\x63onnection_config\x18\x01 \x01(\x0b\x32\x1f.mgmt.v1alpha1.ConnectionConfigR\x10\x63onnectionConfig\"<\n CheckConnectionConfigByIdRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"\xd3\x01\n!CheckConnectionConfigByIdResponse\x12!\n\x0cis_connected\x18\x01 \x01(\x08R\x0bisConnected\x12.\n\x10\x63onnection_error\x18\x02 \x01(\tH\x00R\x0f\x63onnectionError\x88\x01\x01\x12\x46\n\nprivileges\x18\x03 \x03(\x0b\x32&.mgmt.v1alpha1.ConnectionRolePrivilegeR\nprivilegesB\x13\n\x11_connection_error\"\xcf\x01\n\x1d\x43heckConnectionConfigResponse\x12!\n\x0cis_connected\x18\x01 \x01(\x08R\x0bisConnected\x12.\n\x10\x63onnection_error\x18\x02 \x01(\tH\x00R\x0f\x63onnectionError\x88\x01\x01\x12\x46\n\nprivileges\x18\x03 \x03(\x0b\x32&.mgmt.v1alpha1.ConnectionRolePrivilegeR\nprivilegesB\x13\n\x11_connection_error\"\x88\x01\n\x17\x43onnectionRolePrivilege\x12\x18\n\x07grantee\x18\x01 \x01(\tR\x07grantee\x12\x16\n\x06schema\x18\x02 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x03 \x01(\tR\x05table\x12%\n\x0eprivilege_type\x18\x04 \x03(\tR\rprivilegeType\"\xed\x02\n\nConnection\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12L\n\x11\x63onnection_config\x18\x03 \x01(\x0b\x32\x1f.mgmt.v1alpha1.ConnectionConfigR\x10\x63onnectionConfig\x12+\n\x12\x63reated_by_user_id\x18\x04 \x01(\tR\x0f\x63reatedByUserId\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12+\n\x12updated_by_user_id\x18\x06 \x01(\tR\x0fupdatedByUserId\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x1d\n\naccount_id\x18\x08 \x01(\tR\taccountId\"\xff\x05\n\x10\x43onnectionConfig\x12\x46\n\tpg_config\x18\x01 \x01(\x0b\x32\'.mgmt.v1alpha1.PostgresConnectionConfigH\x00R\x08pgConfig\x12J\n\raws_s3_config\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.AwsS3ConnectionConfigH\x00R\x0b\x61wsS3Config\x12I\n\x0cmysql_config\x18\x03 \x01(\x0b\x32$.mgmt.v1alpha1.MysqlConnectionConfigH\x00R\x0bmysqlConfig\x12Y\n\x10local_dir_config\x18\x04 \x01(\x0b\x32-.mgmt.v1alpha1.LocalDirectoryConnectionConfigH\x00R\x0elocalDirConfig\x12L\n\ropenai_config\x18\x05 \x01(\x0b\x32%.mgmt.v1alpha1.OpenAiConnectionConfigH\x00R\x0copenaiConfig\x12I\n\x0cmongo_config\x18\x06 \x01(\x0b\x32$.mgmt.v1alpha1.MongoConnectionConfigH\x00R\x0bmongoConfig\x12h\n\x17gcp_cloudstorage_config\x18\x07 \x01(\x0b\x32..mgmt.v1alpha1.GcpCloudStorageConnectionConfigH\x00R\x15gcpCloudstorageConfig\x12R\n\x0f\x64ynamodb_config\x18\x08 \x01(\x0b\x32\'.mgmt.v1alpha1.DynamoDBConnectionConfigH\x00R\x0e\x64ynamodbConfig\x12I\n\x0cmssql_config\x18\t \x01(\x0b\x32$.mgmt.v1alpha1.MssqlConnectionConfigH\x00R\x0bmssqlConfigB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\x8c\x02\n\x15MssqlConnectionConfig\x12\x12\n\x03url\x18\x01 \x01(\tH\x00R\x03url\x12R\n\x12\x63onnection_options\x18\x02 \x01(\x0b\x32#.mgmt.v1alpha1.SqlConnectionOptionsR\x11\x63onnectionOptions\x12\x30\n\x06tunnel\x18\x03 \x01(\x0b\x32\x18.mgmt.v1alpha1.SSHTunnelR\x06tunnel\x12=\n\nclient_tls\x18\x04 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ClientTlsConfigR\tclientTlsB\x1a\n\x11\x63onnection_config\x12\x05\xbaH\x02\x08\x01\"\xc8\x01\n\x18\x44ynamoDBConnectionConfig\x12\x46\n\x0b\x63redentials\x18\x01 \x01(\x0b\x32\x1f.mgmt.v1alpha1.AwsS3CredentialsH\x00R\x0b\x63redentials\x88\x01\x01\x12\x1b\n\x06region\x18\x02 \x01(\tH\x01R\x06region\x88\x01\x01\x12\x1f\n\x08\x65ndpoint\x18\x03 \x01(\tH\x02R\x08\x65ndpoint\x88\x01\x01\x42\x0e\n\x0c_credentialsB\t\n\x07_regionB\x0b\n\t_endpoint\"\xb8\x01\n\x15MongoConnectionConfig\x12\x12\n\x03url\x18\x01 \x01(\tH\x00R\x03url\x12\x30\n\x06tunnel\x18\x02 \x01(\x0b\x32\x18.mgmt.v1alpha1.SSHTunnelR\x06tunnel\x12=\n\nclient_tls\x18\x03 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ClientTlsConfigR\tclientTlsB\x1a\n\x11\x63onnection_config\x12\x05\xbaH\x02\x08\x01\"J\n\x16OpenAiConnectionConfig\x12\x17\n\x07\x61pi_key\x18\x01 \x01(\tR\x06\x61piKey\x12\x17\n\x07\x61pi_url\x18\x02 \x01(\tR\x06\x61piUrl\"=\n\x1eLocalDirectoryConnectionConfig\x12\x1b\n\x04path\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04path\"\xd4\x02\n\x18PostgresConnectionConfig\x12\x12\n\x03url\x18\x01 \x01(\tH\x00R\x03url\x12\x43\n\nconnection\x18\x02 \x01(\x0b\x32!.mgmt.v1alpha1.PostgresConnectionH\x00R\nconnection\x12\x30\n\x06tunnel\x18\x03 \x01(\x0b\x32\x18.mgmt.v1alpha1.SSHTunnelR\x06tunnel\x12R\n\x12\x63onnection_options\x18\x04 \x01(\x0b\x32#.mgmt.v1alpha1.SqlConnectionOptionsR\x11\x63onnectionOptions\x12=\n\nclient_tls\x18\x05 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ClientTlsConfigR\tclientTlsB\x1a\n\x11\x63onnection_config\x12\x05\xbaH\x02\x08\x01\"\xe0\x01\n\x0f\x43lientTlsConfig\x12 \n\troot_cert\x18\x01 \x01(\tH\x00R\x08rootCert\x88\x01\x01\x12$\n\x0b\x63lient_cert\x18\x02 \x01(\tH\x01R\nclientCert\x88\x01\x01\x12\"\n\nclient_key\x18\x03 \x01(\tH\x02R\tclientKey\x88\x01\x01\x12$\n\x0bserver_name\x18\x04 \x01(\tH\x03R\nserverName\x88\x01\x01\x42\x0c\n\n_root_certB\x0e\n\x0c_client_certB\r\n\x0b_client_keyB\x0e\n\x0c_server_name\"\xc4\x02\n\x14SqlConnectionOptions\x12\x35\n\x14max_connection_limit\x18\x01 \x01(\x05H\x00R\x12maxConnectionLimit\x88\x01\x01\x12\x35\n\x14max_idle_connections\x18\x02 \x01(\x05H\x01R\x12maxIdleConnections\x88\x01\x01\x12/\n\x11max_idle_duration\x18\x03 \x01(\tH\x02R\x0fmaxIdleDuration\x88\x01\x01\x12/\n\x11max_open_duration\x18\x04 \x01(\tH\x03R\x0fmaxOpenDuration\x88\x01\x01\x42\x17\n\x15_max_connection_limitB\x17\n\x15_max_idle_connectionsB\x14\n\x12_max_idle_durationB\x14\n\x12_max_open_duration\"\x87\x02\n\tSSHTunnel\x12\x1b\n\x04host\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04host\x12\x1b\n\x04port\x18\x02 \x01(\x05\x42\x07\xbaH\x04\x1a\x02(\x00R\x04port\x12\x1b\n\x04user\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04user\x12?\n\x15known_host_public_key\x18\x04 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x12knownHostPublicKey\x88\x01\x01\x12H\n\x0e\x61uthentication\x18\x05 \x01(\x0b\x32 .mgmt.v1alpha1.SSHAuthenticationR\x0e\x61uthenticationB\x18\n\x16_known_host_public_key\"\xaa\x01\n\x11SSHAuthentication\x12>\n\npassphrase\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.SSHPassphraseH\x00R\npassphrase\x12?\n\x0bprivate_key\x18\x02 \x01(\x0b\x32\x1c.mgmt.v1alpha1.SSHPrivateKeyH\x00R\nprivateKeyB\x14\n\x0b\x61uth_config\x12\x05\xbaH\x02\x08\x01\".\n\rSSHPassphrase\x12\x1d\n\x05value\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05value\"b\n\rSSHPrivateKey\x12\x1d\n\x05value\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05value\x12#\n\npassphrase\x18\x02 \x01(\tH\x00R\npassphrase\x88\x01\x01\x42\r\n\x0b_passphrase\"\xa5\x01\n\x12PostgresConnection\x12\x12\n\x04host\x18\x01 \x01(\tR\x04host\x12\x12\n\x04port\x18\x02 \x01(\x05R\x04port\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x12\n\x04user\x18\x04 \x01(\tR\x04user\x12\x12\n\x04pass\x18\x05 \x01(\tR\x04pass\x12\x1e\n\x08ssl_mode\x18\x06 \x01(\tH\x00R\x07sslMode\x88\x01\x01\x42\x0b\n\t_ssl_mode\"\x91\x01\n\x0fMysqlConnection\x12\x12\n\x04user\x18\x01 \x01(\tR\x04user\x12\x12\n\x04pass\x18\x02 \x01(\tR\x04pass\x12\x1a\n\x08protocol\x18\x03 \x01(\tR\x08protocol\x12\x12\n\x04host\x18\x04 \x01(\tR\x04host\x12\x12\n\x04port\x18\x05 \x01(\x05R\x04port\x12\x12\n\x04name\x18\x06 \x01(\tR\x04name\"\xce\x02\n\x15MysqlConnectionConfig\x12\x12\n\x03url\x18\x01 \x01(\tH\x00R\x03url\x12@\n\nconnection\x18\x02 \x01(\x0b\x32\x1e.mgmt.v1alpha1.MysqlConnectionH\x00R\nconnection\x12\x30\n\x06tunnel\x18\x03 \x01(\x0b\x32\x18.mgmt.v1alpha1.SSHTunnelR\x06tunnel\x12R\n\x12\x63onnection_options\x18\x04 \x01(\x0b\x32#.mgmt.v1alpha1.SqlConnectionOptionsR\x11\x63onnectionOptions\x12=\n\nclient_tls\x18\x05 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ClientTlsConfigR\tclientTlsB\x1a\n\x11\x63onnection_config\x12\x05\xbaH\x02\x08\x01\"\xbf\x02\n\x15\x41wsS3ConnectionConfig\x12!\n\nbucket_arn\x18\x01 \x01(\tB\x02\x18\x01R\tbucketArn\x12$\n\x0bpath_prefix\x18\x02 \x01(\tH\x00R\npathPrefix\x88\x01\x01\x12\x46\n\x0b\x63redentials\x18\x03 \x01(\x0b\x32\x1f.mgmt.v1alpha1.AwsS3CredentialsH\x01R\x0b\x63redentials\x88\x01\x01\x12\x1b\n\x06region\x18\x04 \x01(\tH\x02R\x06region\x88\x01\x01\x12\x1f\n\x08\x65ndpoint\x18\x05 \x01(\tH\x03R\x08\x65ndpoint\x88\x01\x01\x12\x1f\n\x06\x62ucket\x18\x06 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x06\x62ucketB\x0e\n\x0c_path_prefixB\x0e\n\x0c_credentialsB\t\n\x07_regionB\x0b\n\t_endpoint\"\xa7\x03\n\x10\x41wsS3Credentials\x12\x1d\n\x07profile\x18\x01 \x01(\tH\x00R\x07profile\x88\x01\x01\x12\'\n\raccess_key_id\x18\x02 \x01(\tH\x01R\x0b\x61\x63\x63\x65ssKeyId\x88\x01\x01\x12/\n\x11secret_access_key\x18\x03 \x01(\tH\x02R\x0fsecretAccessKey\x88\x01\x01\x12(\n\rsession_token\x18\x04 \x01(\tH\x03R\x0csessionToken\x88\x01\x01\x12\'\n\rfrom_ec2_role\x18\x05 \x01(\x08H\x04R\x0b\x66romEc2Role\x88\x01\x01\x12\x1e\n\x08role_arn\x18\x06 \x01(\tH\x05R\x07roleArn\x88\x01\x01\x12-\n\x10role_external_id\x18\x07 \x01(\tH\x06R\x0eroleExternalId\x88\x01\x01\x42\n\n\x08_profileB\x10\n\x0e_access_key_idB\x14\n\x12_secret_access_keyB\x10\n\x0e_session_tokenB\x10\n\x0e_from_ec2_roleB\x0b\n\t_role_arnB\x13\n\x11_role_external_id\"\xdd\x01\n\x1fGcpCloudStorageConnectionConfig\x12\x1f\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x06\x62ucket\x12$\n\x0bpath_prefix\x18\x02 \x01(\tH\x00R\npathPrefix\x88\x01\x01\x12\x43\n\x1bservice_account_credentials\x18\x03 \x01(\tH\x01R\x19serviceAccountCredentials\x88\x01\x01\x42\x0e\n\x0c_path_prefixB\x1e\n\x1c_service_account_credentials\"\x8f\x01\n IsConnectionNameAvailableRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x42\n\x0f\x63onnection_name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x0e\x63onnectionName\"F\n!IsConnectionNameAvailableResponse\x12!\n\x0cis_available\x18\x01 \x01(\x08R\x0bisAvailable\"O\n\x14\x43heckSqlQueryRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x1d\n\x05query\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05query\"n\n\x15\x43heckSqlQueryResponse\x12\x19\n\x08is_valid\x18\x01 \x01(\x08R\x07isValid\x12(\n\rerorr_message\x18\x02 \x01(\tH\x00R\x0c\x65rorrMessage\x88\x01\x01\x42\x10\n\x0e_erorr_message2\xe1\x07\n\x11\x43onnectionService\x12_\n\x0eGetConnections\x12$.mgmt.v1alpha1.GetConnectionsRequest\x1a%.mgmt.v1alpha1.GetConnectionsResponse\"\x00\x12\\\n\rGetConnection\x12#.mgmt.v1alpha1.GetConnectionRequest\x1a$.mgmt.v1alpha1.GetConnectionResponse\"\x00\x12\x65\n\x10\x43reateConnection\x12&.mgmt.v1alpha1.CreateConnectionRequest\x1a\'.mgmt.v1alpha1.CreateConnectionResponse\"\x00\x12\x65\n\x10UpdateConnection\x12&.mgmt.v1alpha1.UpdateConnectionRequest\x1a\'.mgmt.v1alpha1.UpdateConnectionResponse\"\x00\x12\x65\n\x10\x44\x65leteConnection\x12&.mgmt.v1alpha1.DeleteConnectionRequest\x1a\'.mgmt.v1alpha1.DeleteConnectionResponse\"\x00\x12\x80\x01\n\x19IsConnectionNameAvailable\x12/.mgmt.v1alpha1.IsConnectionNameAvailableRequest\x1a\x30.mgmt.v1alpha1.IsConnectionNameAvailableResponse\"\x00\x12t\n\x15\x43heckConnectionConfig\x12+.mgmt.v1alpha1.CheckConnectionConfigRequest\x1a,.mgmt.v1alpha1.CheckConnectionConfigResponse\"\x00\x12\x80\x01\n\x19\x43heckConnectionConfigById\x12/.mgmt.v1alpha1.CheckConnectionConfigByIdRequest\x1a\x30.mgmt.v1alpha1.CheckConnectionConfigByIdResponse\"\x00\x12\\\n\rCheckSqlQuery\x12#.mgmt.v1alpha1.CheckSqlQueryRequest\x1a$.mgmt.v1alpha1.CheckSqlQueryResponse\"\x00\x42\xcb\x01\n\x11\x63om.mgmt.v1alpha1B\x0f\x43onnectionProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emgmt/v1alpha1/connection.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"@\n\x15GetConnectionsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"U\n\x16GetConnectionsResponse\x12;\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32\x19.mgmt.v1alpha1.ConnectionR\x0b\x63onnections\"0\n\x14GetConnectionRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"R\n\x15GetConnectionResponse\x12\x39\n\nconnection\x18\x01 \x01(\x0b\x32\x19.mgmt.v1alpha1.ConnectionR\nconnection\"\xbf\x01\n\x17\x43reateConnectionRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12-\n\x04name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12L\n\x11\x63onnection_config\x18\x03 \x01(\x0b\x32\x1f.mgmt.v1alpha1.ConnectionConfigR\x10\x63onnectionConfig\"U\n\x18\x43reateConnectionResponse\x12\x39\n\nconnection\x18\x01 \x01(\x0b\x32\x19.mgmt.v1alpha1.ConnectionR\nconnection\"\xb0\x01\n\x17UpdateConnectionRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12-\n\x04name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12L\n\x11\x63onnection_config\x18\x03 \x01(\x0b\x32\x1f.mgmt.v1alpha1.ConnectionConfigR\x10\x63onnectionConfig\"U\n\x18UpdateConnectionResponse\x12\x39\n\nconnection\x18\x01 \x01(\x0b\x32\x19.mgmt.v1alpha1.ConnectionR\nconnection\"3\n\x17\x44\x65leteConnectionRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"\x1a\n\x18\x44\x65leteConnectionResponse\"l\n\x1c\x43heckConnectionConfigRequest\x12L\n\x11\x63onnection_config\x18\x01 \x01(\x0b\x32\x1f.mgmt.v1alpha1.ConnectionConfigR\x10\x63onnectionConfig\"<\n CheckConnectionConfigByIdRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"\xd3\x01\n!CheckConnectionConfigByIdResponse\x12!\n\x0cis_connected\x18\x01 \x01(\x08R\x0bisConnected\x12.\n\x10\x63onnection_error\x18\x02 \x01(\tH\x00R\x0f\x63onnectionError\x88\x01\x01\x12\x46\n\nprivileges\x18\x03 \x03(\x0b\x32&.mgmt.v1alpha1.ConnectionRolePrivilegeR\nprivilegesB\x13\n\x11_connection_error\"\xcf\x01\n\x1d\x43heckConnectionConfigResponse\x12!\n\x0cis_connected\x18\x01 \x01(\x08R\x0bisConnected\x12.\n\x10\x63onnection_error\x18\x02 \x01(\tH\x00R\x0f\x63onnectionError\x88\x01\x01\x12\x46\n\nprivileges\x18\x03 \x03(\x0b\x32&.mgmt.v1alpha1.ConnectionRolePrivilegeR\nprivilegesB\x13\n\x11_connection_error\"\x88\x01\n\x17\x43onnectionRolePrivilege\x12\x18\n\x07grantee\x18\x01 \x01(\tR\x07grantee\x12\x16\n\x06schema\x18\x02 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x03 \x01(\tR\x05table\x12%\n\x0eprivilege_type\x18\x04 \x03(\tR\rprivilegeType\"\xed\x02\n\nConnection\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12L\n\x11\x63onnection_config\x18\x03 \x01(\x0b\x32\x1f.mgmt.v1alpha1.ConnectionConfigR\x10\x63onnectionConfig\x12+\n\x12\x63reated_by_user_id\x18\x04 \x01(\tR\x0f\x63reatedByUserId\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12+\n\x12updated_by_user_id\x18\x06 \x01(\tR\x0fupdatedByUserId\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x1d\n\naccount_id\x18\x08 \x01(\tR\taccountId\"\xff\x05\n\x10\x43onnectionConfig\x12\x46\n\tpg_config\x18\x01 \x01(\x0b\x32\'.mgmt.v1alpha1.PostgresConnectionConfigH\x00R\x08pgConfig\x12J\n\raws_s3_config\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.AwsS3ConnectionConfigH\x00R\x0b\x61wsS3Config\x12I\n\x0cmysql_config\x18\x03 \x01(\x0b\x32$.mgmt.v1alpha1.MysqlConnectionConfigH\x00R\x0bmysqlConfig\x12Y\n\x10local_dir_config\x18\x04 \x01(\x0b\x32-.mgmt.v1alpha1.LocalDirectoryConnectionConfigH\x00R\x0elocalDirConfig\x12L\n\ropenai_config\x18\x05 \x01(\x0b\x32%.mgmt.v1alpha1.OpenAiConnectionConfigH\x00R\x0copenaiConfig\x12I\n\x0cmongo_config\x18\x06 \x01(\x0b\x32$.mgmt.v1alpha1.MongoConnectionConfigH\x00R\x0bmongoConfig\x12h\n\x17gcp_cloudstorage_config\x18\x07 \x01(\x0b\x32..mgmt.v1alpha1.GcpCloudStorageConnectionConfigH\x00R\x15gcpCloudstorageConfig\x12R\n\x0f\x64ynamodb_config\x18\x08 \x01(\x0b\x32\'.mgmt.v1alpha1.DynamoDBConnectionConfigH\x00R\x0e\x64ynamodbConfig\x12I\n\x0cmssql_config\x18\t \x01(\x0b\x32$.mgmt.v1alpha1.MssqlConnectionConfigH\x00R\x0bmssqlConfigB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\x8c\x02\n\x15MssqlConnectionConfig\x12\x12\n\x03url\x18\x01 \x01(\tH\x00R\x03url\x12R\n\x12\x63onnection_options\x18\x02 \x01(\x0b\x32#.mgmt.v1alpha1.SqlConnectionOptionsR\x11\x63onnectionOptions\x12\x30\n\x06tunnel\x18\x03 \x01(\x0b\x32\x18.mgmt.v1alpha1.SSHTunnelR\x06tunnel\x12=\n\nclient_tls\x18\x04 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ClientTlsConfigR\tclientTlsB\x1a\n\x11\x63onnection_config\x12\x05\xbaH\x02\x08\x01\"\xc8\x01\n\x18\x44ynamoDBConnectionConfig\x12\x46\n\x0b\x63redentials\x18\x01 \x01(\x0b\x32\x1f.mgmt.v1alpha1.AwsS3CredentialsH\x00R\x0b\x63redentials\x88\x01\x01\x12\x1b\n\x06region\x18\x02 \x01(\tH\x01R\x06region\x88\x01\x01\x12\x1f\n\x08\x65ndpoint\x18\x03 \x01(\tH\x02R\x08\x65ndpoint\x88\x01\x01\x42\x0e\n\x0c_credentialsB\t\n\x07_regionB\x0b\n\t_endpoint\"\xb8\x01\n\x15MongoConnectionConfig\x12\x12\n\x03url\x18\x01 \x01(\tH\x00R\x03url\x12\x30\n\x06tunnel\x18\x02 \x01(\x0b\x32\x18.mgmt.v1alpha1.SSHTunnelR\x06tunnel\x12=\n\nclient_tls\x18\x03 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ClientTlsConfigR\tclientTlsB\x1a\n\x11\x63onnection_config\x12\x05\xbaH\x02\x08\x01\"J\n\x16OpenAiConnectionConfig\x12\x17\n\x07\x61pi_key\x18\x01 \x01(\tR\x06\x61piKey\x12\x17\n\x07\x61pi_url\x18\x02 \x01(\tR\x06\x61piUrl\"=\n\x1eLocalDirectoryConnectionConfig\x12\x1b\n\x04path\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04path\"\xd4\x02\n\x18PostgresConnectionConfig\x12\x12\n\x03url\x18\x01 \x01(\tH\x00R\x03url\x12\x43\n\nconnection\x18\x02 \x01(\x0b\x32!.mgmt.v1alpha1.PostgresConnectionH\x00R\nconnection\x12\x30\n\x06tunnel\x18\x03 \x01(\x0b\x32\x18.mgmt.v1alpha1.SSHTunnelR\x06tunnel\x12R\n\x12\x63onnection_options\x18\x04 \x01(\x0b\x32#.mgmt.v1alpha1.SqlConnectionOptionsR\x11\x63onnectionOptions\x12=\n\nclient_tls\x18\x05 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ClientTlsConfigR\tclientTlsB\x1a\n\x11\x63onnection_config\x12\x05\xbaH\x02\x08\x01\"\xe0\x01\n\x0f\x43lientTlsConfig\x12 \n\troot_cert\x18\x01 \x01(\tH\x00R\x08rootCert\x88\x01\x01\x12$\n\x0b\x63lient_cert\x18\x02 \x01(\tH\x01R\nclientCert\x88\x01\x01\x12\"\n\nclient_key\x18\x03 \x01(\tH\x02R\tclientKey\x88\x01\x01\x12$\n\x0bserver_name\x18\x04 \x01(\tH\x03R\nserverName\x88\x01\x01\x42\x0c\n\n_root_certB\x0e\n\x0c_client_certB\r\n\x0b_client_keyB\x0e\n\x0c_server_name\"\xc4\x02\n\x14SqlConnectionOptions\x12\x35\n\x14max_connection_limit\x18\x01 \x01(\x05H\x00R\x12maxConnectionLimit\x88\x01\x01\x12\x35\n\x14max_idle_connections\x18\x02 \x01(\x05H\x01R\x12maxIdleConnections\x88\x01\x01\x12/\n\x11max_idle_duration\x18\x03 \x01(\tH\x02R\x0fmaxIdleDuration\x88\x01\x01\x12/\n\x11max_open_duration\x18\x04 \x01(\tH\x03R\x0fmaxOpenDuration\x88\x01\x01\x42\x17\n\x15_max_connection_limitB\x17\n\x15_max_idle_connectionsB\x14\n\x12_max_idle_durationB\x14\n\x12_max_open_duration\"\x87\x02\n\tSSHTunnel\x12\x1b\n\x04host\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04host\x12\x1b\n\x04port\x18\x02 \x01(\x05\x42\x07\xbaH\x04\x1a\x02(\x00R\x04port\x12\x1b\n\x04user\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04user\x12?\n\x15known_host_public_key\x18\x04 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x12knownHostPublicKey\x88\x01\x01\x12H\n\x0e\x61uthentication\x18\x05 \x01(\x0b\x32 .mgmt.v1alpha1.SSHAuthenticationR\x0e\x61uthenticationB\x18\n\x16_known_host_public_key\"\xaa\x01\n\x11SSHAuthentication\x12>\n\npassphrase\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.SSHPassphraseH\x00R\npassphrase\x12?\n\x0bprivate_key\x18\x02 \x01(\x0b\x32\x1c.mgmt.v1alpha1.SSHPrivateKeyH\x00R\nprivateKeyB\x14\n\x0b\x61uth_config\x12\x05\xbaH\x02\x08\x01\".\n\rSSHPassphrase\x12\x1d\n\x05value\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05value\"b\n\rSSHPrivateKey\x12\x1d\n\x05value\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05value\x12#\n\npassphrase\x18\x02 \x01(\tH\x00R\npassphrase\x88\x01\x01\x42\r\n\x0b_passphrase\"\xa5\x01\n\x12PostgresConnection\x12\x12\n\x04host\x18\x01 \x01(\tR\x04host\x12\x12\n\x04port\x18\x02 \x01(\x05R\x04port\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x12\n\x04user\x18\x04 \x01(\tR\x04user\x12\x12\n\x04pass\x18\x05 \x01(\tR\x04pass\x12\x1e\n\x08ssl_mode\x18\x06 \x01(\tH\x00R\x07sslMode\x88\x01\x01\x42\x0b\n\t_ssl_mode\"\x91\x01\n\x0fMysqlConnection\x12\x12\n\x04user\x18\x01 \x01(\tR\x04user\x12\x12\n\x04pass\x18\x02 \x01(\tR\x04pass\x12\x1a\n\x08protocol\x18\x03 \x01(\tR\x08protocol\x12\x12\n\x04host\x18\x04 \x01(\tR\x04host\x12\x12\n\x04port\x18\x05 \x01(\x05R\x04port\x12\x12\n\x04name\x18\x06 \x01(\tR\x04name\"\xce\x02\n\x15MysqlConnectionConfig\x12\x12\n\x03url\x18\x01 \x01(\tH\x00R\x03url\x12@\n\nconnection\x18\x02 \x01(\x0b\x32\x1e.mgmt.v1alpha1.MysqlConnectionH\x00R\nconnection\x12\x30\n\x06tunnel\x18\x03 \x01(\x0b\x32\x18.mgmt.v1alpha1.SSHTunnelR\x06tunnel\x12R\n\x12\x63onnection_options\x18\x04 \x01(\x0b\x32#.mgmt.v1alpha1.SqlConnectionOptionsR\x11\x63onnectionOptions\x12=\n\nclient_tls\x18\x05 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ClientTlsConfigR\tclientTlsB\x1a\n\x11\x63onnection_config\x12\x05\xbaH\x02\x08\x01\"\xa2\x02\n\x15\x41wsS3ConnectionConfig\x12$\n\x0bpath_prefix\x18\x02 \x01(\tH\x00R\npathPrefix\x88\x01\x01\x12\x46\n\x0b\x63redentials\x18\x03 \x01(\x0b\x32\x1f.mgmt.v1alpha1.AwsS3CredentialsH\x01R\x0b\x63redentials\x88\x01\x01\x12\x1b\n\x06region\x18\x04 \x01(\tH\x02R\x06region\x88\x01\x01\x12\x1f\n\x08\x65ndpoint\x18\x05 \x01(\tH\x03R\x08\x65ndpoint\x88\x01\x01\x12\x1f\n\x06\x62ucket\x18\x06 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x06\x62ucketB\x0e\n\x0c_path_prefixB\x0e\n\x0c_credentialsB\t\n\x07_regionB\x0b\n\t_endpointJ\x04\x08\x01\x10\x02\"\xa7\x03\n\x10\x41wsS3Credentials\x12\x1d\n\x07profile\x18\x01 \x01(\tH\x00R\x07profile\x88\x01\x01\x12\'\n\raccess_key_id\x18\x02 \x01(\tH\x01R\x0b\x61\x63\x63\x65ssKeyId\x88\x01\x01\x12/\n\x11secret_access_key\x18\x03 \x01(\tH\x02R\x0fsecretAccessKey\x88\x01\x01\x12(\n\rsession_token\x18\x04 \x01(\tH\x03R\x0csessionToken\x88\x01\x01\x12\'\n\rfrom_ec2_role\x18\x05 \x01(\x08H\x04R\x0b\x66romEc2Role\x88\x01\x01\x12\x1e\n\x08role_arn\x18\x06 \x01(\tH\x05R\x07roleArn\x88\x01\x01\x12-\n\x10role_external_id\x18\x07 \x01(\tH\x06R\x0eroleExternalId\x88\x01\x01\x42\n\n\x08_profileB\x10\n\x0e_access_key_idB\x14\n\x12_secret_access_keyB\x10\n\x0e_session_tokenB\x10\n\x0e_from_ec2_roleB\x0b\n\t_role_arnB\x13\n\x11_role_external_id\"\xdd\x01\n\x1fGcpCloudStorageConnectionConfig\x12\x1f\n\x06\x62ucket\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x06\x62ucket\x12$\n\x0bpath_prefix\x18\x02 \x01(\tH\x00R\npathPrefix\x88\x01\x01\x12\x43\n\x1bservice_account_credentials\x18\x03 \x01(\tH\x01R\x19serviceAccountCredentials\x88\x01\x01\x42\x0e\n\x0c_path_prefixB\x1e\n\x1c_service_account_credentials\"\x8f\x01\n IsConnectionNameAvailableRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x42\n\x0f\x63onnection_name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x0e\x63onnectionName\"F\n!IsConnectionNameAvailableResponse\x12!\n\x0cis_available\x18\x01 \x01(\x08R\x0bisAvailable\"O\n\x14\x43heckSqlQueryRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x1d\n\x05query\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05query\"n\n\x15\x43heckSqlQueryResponse\x12\x19\n\x08is_valid\x18\x01 \x01(\x08R\x07isValid\x12(\n\rerorr_message\x18\x02 \x01(\tH\x00R\x0c\x65rorrMessage\x88\x01\x01\x42\x10\n\x0e_erorr_message2\xe1\x07\n\x11\x43onnectionService\x12_\n\x0eGetConnections\x12$.mgmt.v1alpha1.GetConnectionsRequest\x1a%.mgmt.v1alpha1.GetConnectionsResponse\"\x00\x12\\\n\rGetConnection\x12#.mgmt.v1alpha1.GetConnectionRequest\x1a$.mgmt.v1alpha1.GetConnectionResponse\"\x00\x12\x65\n\x10\x43reateConnection\x12&.mgmt.v1alpha1.CreateConnectionRequest\x1a\'.mgmt.v1alpha1.CreateConnectionResponse\"\x00\x12\x65\n\x10UpdateConnection\x12&.mgmt.v1alpha1.UpdateConnectionRequest\x1a\'.mgmt.v1alpha1.UpdateConnectionResponse\"\x00\x12\x65\n\x10\x44\x65leteConnection\x12&.mgmt.v1alpha1.DeleteConnectionRequest\x1a\'.mgmt.v1alpha1.DeleteConnectionResponse\"\x00\x12\x80\x01\n\x19IsConnectionNameAvailable\x12/.mgmt.v1alpha1.IsConnectionNameAvailableRequest\x1a\x30.mgmt.v1alpha1.IsConnectionNameAvailableResponse\"\x00\x12t\n\x15\x43heckConnectionConfig\x12+.mgmt.v1alpha1.CheckConnectionConfigRequest\x1a,.mgmt.v1alpha1.CheckConnectionConfigResponse\"\x00\x12\x80\x01\n\x19\x43heckConnectionConfigById\x12/.mgmt.v1alpha1.CheckConnectionConfigByIdRequest\x1a\x30.mgmt.v1alpha1.CheckConnectionConfigByIdResponse\"\x00\x12\\\n\rCheckSqlQuery\x12#.mgmt.v1alpha1.CheckSqlQueryRequest\x1a$.mgmt.v1alpha1.CheckSqlQueryResponse\"\x00\x42\xcb\x01\n\x11\x63om.mgmt.v1alpha1B\x0f\x43onnectionProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -76,8 +76,6 @@ _globals['_SSHPRIVATEKEY'].fields_by_name['value']._serialized_options = b'\272H\004r\002\020\001' _globals['_MYSQLCONNECTIONCONFIG'].oneofs_by_name['connection_config']._loaded_options = None _globals['_MYSQLCONNECTIONCONFIG'].oneofs_by_name['connection_config']._serialized_options = b'\272H\002\010\001' - _globals['_AWSS3CONNECTIONCONFIG'].fields_by_name['bucket_arn']._loaded_options = None - _globals['_AWSS3CONNECTIONCONFIG'].fields_by_name['bucket_arn']._serialized_options = b'\030\001' _globals['_AWSS3CONNECTIONCONFIG'].fields_by_name['bucket']._loaded_options = None _globals['_AWSS3CONNECTIONCONFIG'].fields_by_name['bucket']._serialized_options = b'\272H\004r\002\020\001' _globals['_GCPCLOUDSTORAGECONNECTIONCONFIG'].fields_by_name['bucket']._loaded_options = None @@ -155,19 +153,19 @@ _globals['_MYSQLCONNECTIONCONFIG']._serialized_start=5500 _globals['_MYSQLCONNECTIONCONFIG']._serialized_end=5834 _globals['_AWSS3CONNECTIONCONFIG']._serialized_start=5837 - _globals['_AWSS3CONNECTIONCONFIG']._serialized_end=6156 - _globals['_AWSS3CREDENTIALS']._serialized_start=6159 - _globals['_AWSS3CREDENTIALS']._serialized_end=6582 - _globals['_GCPCLOUDSTORAGECONNECTIONCONFIG']._serialized_start=6585 - _globals['_GCPCLOUDSTORAGECONNECTIONCONFIG']._serialized_end=6806 - _globals['_ISCONNECTIONNAMEAVAILABLEREQUEST']._serialized_start=6809 - _globals['_ISCONNECTIONNAMEAVAILABLEREQUEST']._serialized_end=6952 - _globals['_ISCONNECTIONNAMEAVAILABLERESPONSE']._serialized_start=6954 - _globals['_ISCONNECTIONNAMEAVAILABLERESPONSE']._serialized_end=7024 - _globals['_CHECKSQLQUERYREQUEST']._serialized_start=7026 - _globals['_CHECKSQLQUERYREQUEST']._serialized_end=7105 - _globals['_CHECKSQLQUERYRESPONSE']._serialized_start=7107 - _globals['_CHECKSQLQUERYRESPONSE']._serialized_end=7217 - _globals['_CONNECTIONSERVICE']._serialized_start=7220 - _globals['_CONNECTIONSERVICE']._serialized_end=8213 + _globals['_AWSS3CONNECTIONCONFIG']._serialized_end=6127 + _globals['_AWSS3CREDENTIALS']._serialized_start=6130 + _globals['_AWSS3CREDENTIALS']._serialized_end=6553 + _globals['_GCPCLOUDSTORAGECONNECTIONCONFIG']._serialized_start=6556 + _globals['_GCPCLOUDSTORAGECONNECTIONCONFIG']._serialized_end=6777 + _globals['_ISCONNECTIONNAMEAVAILABLEREQUEST']._serialized_start=6780 + _globals['_ISCONNECTIONNAMEAVAILABLEREQUEST']._serialized_end=6923 + _globals['_ISCONNECTIONNAMEAVAILABLERESPONSE']._serialized_start=6925 + _globals['_ISCONNECTIONNAMEAVAILABLERESPONSE']._serialized_end=6995 + _globals['_CHECKSQLQUERYREQUEST']._serialized_start=6997 + _globals['_CHECKSQLQUERYREQUEST']._serialized_end=7076 + _globals['_CHECKSQLQUERYRESPONSE']._serialized_start=7078 + _globals['_CHECKSQLQUERYRESPONSE']._serialized_end=7188 + _globals['_CONNECTIONSERVICE']._serialized_start=7191 + _globals['_CONNECTIONSERVICE']._serialized_end=8184 # @@protoc_insertion_point(module_scope) diff --git a/python/src/neosync/mgmt/v1alpha1/connection_pb2.pyi b/python/src/neosync/mgmt/v1alpha1/connection_pb2.pyi index 141bb16e84..dc5d1e415d 100644 --- a/python/src/neosync/mgmt/v1alpha1/connection_pb2.pyi +++ b/python/src/neosync/mgmt/v1alpha1/connection_pb2.pyi @@ -324,20 +324,18 @@ class MysqlConnectionConfig(_message.Message): def __init__(self, url: _Optional[str] = ..., connection: _Optional[_Union[MysqlConnection, _Mapping]] = ..., tunnel: _Optional[_Union[SSHTunnel, _Mapping]] = ..., connection_options: _Optional[_Union[SqlConnectionOptions, _Mapping]] = ..., client_tls: _Optional[_Union[ClientTlsConfig, _Mapping]] = ...) -> None: ... class AwsS3ConnectionConfig(_message.Message): - __slots__ = ("bucket_arn", "path_prefix", "credentials", "region", "endpoint", "bucket") - BUCKET_ARN_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("path_prefix", "credentials", "region", "endpoint", "bucket") PATH_PREFIX_FIELD_NUMBER: _ClassVar[int] CREDENTIALS_FIELD_NUMBER: _ClassVar[int] REGION_FIELD_NUMBER: _ClassVar[int] ENDPOINT_FIELD_NUMBER: _ClassVar[int] BUCKET_FIELD_NUMBER: _ClassVar[int] - bucket_arn: str path_prefix: str credentials: AwsS3Credentials region: str endpoint: str bucket: str - def __init__(self, bucket_arn: _Optional[str] = ..., path_prefix: _Optional[str] = ..., credentials: _Optional[_Union[AwsS3Credentials, _Mapping]] = ..., region: _Optional[str] = ..., endpoint: _Optional[str] = ..., bucket: _Optional[str] = ...) -> None: ... + def __init__(self, path_prefix: _Optional[str] = ..., credentials: _Optional[_Union[AwsS3Credentials, _Mapping]] = ..., region: _Optional[str] = ..., endpoint: _Optional[str] = ..., bucket: _Optional[str] = ...) -> None: ... class AwsS3Credentials(_message.Message): __slots__ = ("profile", "access_key_id", "secret_access_key", "session_token", "from_ec2_role", "role_arn", "role_external_id") diff --git a/python/src/neosync/mgmt/v1alpha1/job_pb2.py b/python/src/neosync/mgmt/v1alpha1/job_pb2.py index 0e5f6176ee..ac9c7411ab 100644 --- a/python/src/neosync/mgmt/v1alpha1/job_pb2.py +++ b/python/src/neosync/mgmt/v1alpha1/job_pb2.py @@ -27,7 +27,7 @@ from mgmt.v1alpha1 import transformer_pb2 as mgmt_dot_v1alpha1_dot_transformer__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17mgmt/v1alpha1/job.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1fmgmt/v1alpha1/transformer.proto\"9\n\x0eGetJobsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"9\n\x0fGetJobsResponse\x12&\n\x04jobs\x18\x01 \x03(\x0b\x32\x12.mgmt.v1alpha1.JobR\x04jobs\"N\n\tJobSource\x12\x41\n\x07options\x18\x01 \x01(\x0b\x32\x1f.mgmt.v1alpha1.JobSourceOptionsB\x06\xbaH\x03\xc8\x01\x01R\x07options\"\xe9\x04\n\x10JobSourceOptions\x12L\n\x08postgres\x18\x01 \x01(\x0b\x32..mgmt.v1alpha1.PostgresSourceConnectionOptionsH\x00R\x08postgres\x12\x44\n\x06\x61ws_s3\x18\x02 \x01(\x0b\x32+.mgmt.v1alpha1.AwsS3SourceConnectionOptionsH\x00R\x05\x61wsS3\x12\x43\n\x05mysql\x18\x03 \x01(\x0b\x32+.mgmt.v1alpha1.MysqlSourceConnectionOptionsH\x00R\x05mysql\x12\x42\n\x08generate\x18\x04 \x01(\x0b\x32$.mgmt.v1alpha1.GenerateSourceOptionsH\x00R\x08generate\x12I\n\x0b\x61i_generate\x18\x05 \x01(\x0b\x32&.mgmt.v1alpha1.AiGenerateSourceOptionsH\x00R\naiGenerate\x12I\n\x07mongodb\x18\x06 \x01(\x0b\x32-.mgmt.v1alpha1.MongoDBSourceConnectionOptionsH\x00R\x07mongodb\x12L\n\x08\x64ynamodb\x18\x07 \x01(\x0b\x32..mgmt.v1alpha1.DynamoDBSourceConnectionOptionsH\x00R\x08\x64ynamodb\x12\x43\n\x05mssql\x18\x08 \x01(\x0b\x32+.mgmt.v1alpha1.MssqlSourceConnectionOptionsH\x00R\x05mssqlB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\x85\x01\n\x14\x43reateJobDestination\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12>\n\x07options\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.JobDestinationOptionsR\x07options\"\x85\x01\n\x0eJobDestination\x12#\n\rconnection_id\x18\x01 \x01(\tR\x0c\x63onnectionId\x12>\n\x07options\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.JobDestinationOptionsR\x07options\x12\x0e\n\x02id\x18\x03 \x01(\tR\x02id\"\xb6\x03\n\x17\x41iGenerateSourceOptions\x12\x32\n\x10\x61i_connection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0e\x61iConnectionId\x12O\n\x07schemas\x18\x02 \x03(\x0b\x32+.mgmt.v1alpha1.AiGenerateSourceSchemaOptionB\x08\xbaH\x05\x92\x01\x02\x08\x01R\x07schemas\x12\x44\n\x17\x66k_source_connection_id\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x14\x66kSourceConnectionId\x88\x01\x01\x12&\n\nmodel_name\x18\x04 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\tmodelName\x12$\n\x0buser_prompt\x18\x05 \x01(\tH\x01R\nuserPrompt\x88\x01\x01\x12>\n\x13generate_batch_size\x18\x06 \x01(\x03\x42\t\xbaH\x06\"\x04\x18\x64(\x01H\x02R\x11generateBatchSize\x88\x01\x01\x42\x1a\n\x18_fk_source_connection_idB\x0e\n\x0c_user_promptB\x16\n\x14_generate_batch_size\"\x8d\x01\n\x1c\x41iGenerateSourceSchemaOption\x12\x1f\n\x06schema\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x06schema\x12L\n\x06tables\x18\x02 \x03(\x0b\x32*.mgmt.v1alpha1.AiGenerateSourceTableOptionB\x08\xbaH\x05\x92\x01\x02\x08\x01R\x06tables\"e\n\x1b\x41iGenerateSourceTableOption\x12\x1d\n\x05table\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05table\x12\'\n\trow_count\x18\x02 \x01(\x03\x42\n\xbaH\x07\"\x05\x18\xe8\x07(\x01R\x08rowCount\"\xc8\x01\n\x15GenerateSourceOptions\x12M\n\x07schemas\x18\x01 \x03(\x0b\x32).mgmt.v1alpha1.GenerateSourceSchemaOptionB\x08\xbaH\x05\x92\x01\x02\x08\x01R\x07schemas\x12\x44\n\x17\x66k_source_connection_id\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x14\x66kSourceConnectionId\x88\x01\x01\x42\x1a\n\x18_fk_source_connection_id\"\x89\x01\n\x1aGenerateSourceSchemaOption\x12\x1f\n\x06schema\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x06schema\x12J\n\x06tables\x18\x02 \x03(\x0b\x32(.mgmt.v1alpha1.GenerateSourceTableOptionB\x08\xbaH\x05\x92\x01\x02\x08\x01R\x06tables\"`\n\x19GenerateSourceTableOption\x12\x1d\n\x05table\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05table\x12$\n\trow_count\x18\x02 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x01R\x08rowCount\"O\n\x1eMongoDBSourceConnectionOptions\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\"\xaf\x02\n\x1f\x44ynamoDBSourceConnectionOptions\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12@\n\x06tables\x18\x02 \x03(\x0b\x32(.mgmt.v1alpha1.DynamoDBSourceTableOptionR\x06tables\x12\x65\n\x13unmapped_transforms\x18\x03 \x01(\x0b\x32\x34.mgmt.v1alpha1.DynamoDBSourceUnmappedTransformConfigR\x12unmappedTransforms\x12\x34\n\x16\x65nable_consistent_read\x18\x04 \x01(\x08R\x14\x65nableConsistentRead\"\x83\x02\n%DynamoDBSourceUnmappedTransformConfig\x12\x32\n\x01\x62\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.JobMappingTransformerR\x01\x62\x12>\n\x07\x62oolean\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.JobMappingTransformerR\x07\x62oolean\x12\x32\n\x01n\x18\x04 \x01(\x0b\x32$.mgmt.v1alpha1.JobMappingTransformerR\x01n\x12\x32\n\x01s\x18\x06 \x01(\x0b\x32$.mgmt.v1alpha1.JobMappingTransformerR\x01s\"s\n\x19\x44ynamoDBSourceTableOption\x12\x1d\n\x05table\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05table\x12&\n\x0cwhere_clause\x18\x02 \x01(\tH\x00R\x0bwhereClause\x88\x01\x01\x42\x0f\n\r_where_clause\"\xec\x05\n\x1fPostgresSourceConnectionOptions\x12\x41\n\x1bhalt_on_new_column_addition\x18\x01 \x01(\x08H\x00R\x17haltOnNewColumnAddition\x88\x01\x01\x12\x43\n\x07schemas\x18\x02 \x03(\x0b\x32).mgmt.v1alpha1.PostgresSourceSchemaOptionR\x07schemas\x12-\n\rconnection_id\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12H\n!subset_by_foreign_key_constraints\x18\x04 \x01(\x08R\x1dsubsetByForeignKeyConstraints\x12\x89\x01\n\x1cnew_column_addition_strategy\x18\x05 \x01(\x0b\x32H.mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategyR\x19newColumnAdditionStrategy\x1a\x9b\x02\n\x19NewColumnAdditionStrategy\x12m\n\x08halt_job\x18\x01 \x01(\x0b\x32P.mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJobH\x00R\x07haltJob\x12m\n\x08\x61uto_map\x18\x02 \x01(\x0b\x32P.mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMapH\x00R\x07\x61utoMap\x1a\t\n\x07HaltJob\x1a\t\n\x07\x41utoMapB\n\n\x08strategyB\x1e\n\x1c_halt_on_new_column_addition\"v\n\x1aPostgresSourceSchemaOption\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12@\n\x06tables\x18\x02 \x03(\x0b\x32(.mgmt.v1alpha1.PostgresSourceTableOptionR\x06tables\"j\n\x19PostgresSourceTableOption\x12\x14\n\x05table\x18\x01 \x01(\tR\x05table\x12&\n\x0cwhere_clause\x18\x02 \x01(\tH\x00R\x0bwhereClause\x88\x01\x01\x42\x0f\n\r_where_clause\"\x97\x02\n\x1cMysqlSourceConnectionOptions\x12<\n\x1bhalt_on_new_column_addition\x18\x01 \x01(\x08R\x17haltOnNewColumnAddition\x12@\n\x07schemas\x18\x02 \x03(\x0b\x32&.mgmt.v1alpha1.MysqlSourceSchemaOptionR\x07schemas\x12-\n\rconnection_id\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12H\n!subset_by_foreign_key_constraints\x18\x04 \x01(\x08R\x1dsubsetByForeignKeyConstraints\"p\n\x17MysqlSourceSchemaOption\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12=\n\x06tables\x18\x02 \x03(\x0b\x32%.mgmt.v1alpha1.MysqlSourceTableOptionR\x06tables\"g\n\x16MysqlSourceTableOption\x12\x14\n\x05table\x18\x01 \x01(\tR\x05table\x12&\n\x0cwhere_clause\x18\x02 \x01(\tH\x00R\x0bwhereClause\x88\x01\x01\x42\x0f\n\r_where_clause\"\x97\x02\n\x1cMssqlSourceConnectionOptions\x12<\n\x1bhalt_on_new_column_addition\x18\x01 \x01(\x08R\x17haltOnNewColumnAddition\x12@\n\x07schemas\x18\x02 \x03(\x0b\x32&.mgmt.v1alpha1.MssqlSourceSchemaOptionR\x07schemas\x12-\n\rconnection_id\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12H\n!subset_by_foreign_key_constraints\x18\x04 \x01(\x08R\x1dsubsetByForeignKeyConstraints\"p\n\x17MssqlSourceSchemaOption\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12=\n\x06tables\x18\x02 \x03(\x0b\x32%.mgmt.v1alpha1.MssqlSourceTableOptionR\x06tables\"g\n\x16MssqlSourceTableOption\x12\x14\n\x05table\x18\x01 \x01(\tR\x05table\x12&\n\x0cwhere_clause\x18\x02 \x01(\tH\x00R\x0bwhereClause\x88\x01\x01\x42\x0f\n\r_where_clause\"M\n\x1c\x41wsS3SourceConnectionOptions\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\"\xcf\x05\n\x15JobDestinationOptions\x12`\n\x10postgres_options\x18\x01 \x01(\x0b\x32\x33.mgmt.v1alpha1.PostgresDestinationConnectionOptionsH\x00R\x0fpostgresOptions\x12X\n\x0e\x61ws_s3_options\x18\x02 \x01(\x0b\x32\x30.mgmt.v1alpha1.AwsS3DestinationConnectionOptionsH\x00R\x0c\x61wsS3Options\x12W\n\rmysql_options\x18\x03 \x01(\x0b\x32\x30.mgmt.v1alpha1.MysqlDestinationConnectionOptionsH\x00R\x0cmysqlOptions\x12]\n\x0fmongodb_options\x18\x04 \x01(\x0b\x32\x32.mgmt.v1alpha1.MongoDBDestinationConnectionOptionsH\x00R\x0emongodbOptions\x12v\n\x18gcp_cloudstorage_options\x18\x05 \x01(\x0b\x32:.mgmt.v1alpha1.GcpCloudStorageDestinationConnectionOptionsH\x00R\x16gcpCloudstorageOptions\x12`\n\x10\x64ynamodb_options\x18\x06 \x01(\x0b\x32\x33.mgmt.v1alpha1.DynamoDBDestinationConnectionOptionsH\x00R\x0f\x64ynamodbOptions\x12W\n\rmssql_options\x18\x07 \x01(\x0b\x32\x30.mgmt.v1alpha1.MssqlDestinationConnectionOptionsH\x00R\x0cmssqlOptionsB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"%\n#MongoDBDestinationConnectionOptions\"-\n+GcpCloudStorageDestinationConnectionOptions\"}\n$DynamoDBDestinationConnectionOptions\x12U\n\x0etable_mappings\x18\x01 \x03(\x0b\x32..mgmt.v1alpha1.DynamoDBDestinationTableMappingR\rtableMappings\"q\n\x1f\x44ynamoDBDestinationTableMapping\x12!\n\x0csource_table\x18\x01 \x01(\tR\x0bsourceTable\x12+\n\x11\x64\x65stination_table\x18\x02 \x01(\tR\x10\x64\x65stinationTable\"\xa4\x03\n$PostgresDestinationConnectionOptions\x12Q\n\x0etruncate_table\x18\x01 \x01(\x0b\x32*.mgmt.v1alpha1.PostgresTruncateTableConfigR\rtruncateTable\x12*\n\x11init_table_schema\x18\x02 \x01(\x08R\x0finitTableSchema\x12H\n\x0bon_conflict\x18\x03 \x01(\x0b\x32\'.mgmt.v1alpha1.PostgresOnConflictConfigR\nonConflict\x12=\n\x1bskip_foreign_key_violations\x18\x04 \x01(\x08R\x18skipForeignKeyViolations\x12\x30\n\x05\x62\x61tch\x18\x05 \x01(\x0b\x32\x1a.mgmt.v1alpha1.BatchConfigR\x05\x62\x61tch\x12\x30\n\rmax_in_flight\x18\x06 \x01(\rB\x07\xbaH\x04*\x02(\x01H\x00R\x0bmaxInFlight\x88\x01\x01\x42\x10\n\x0e_max_in_flight\"9\n\x18PostgresOnConflictConfig\x12\x1d\n\ndo_nothing\x18\x01 \x01(\x08R\tdoNothing\"m\n\x1bPostgresTruncateTableConfig\x12\x34\n\x16truncate_before_insert\x18\x01 \x01(\x08R\x14truncateBeforeInsert\x12\x18\n\x07\x63\x61scade\x18\x02 \x01(\x08R\x07\x63\x61scade\"\x9b\x03\n!MysqlDestinationConnectionOptions\x12N\n\x0etruncate_table\x18\x01 \x01(\x0b\x32\'.mgmt.v1alpha1.MysqlTruncateTableConfigR\rtruncateTable\x12*\n\x11init_table_schema\x18\x02 \x01(\x08R\x0finitTableSchema\x12\x45\n\x0bon_conflict\x18\x03 \x01(\x0b\x32$.mgmt.v1alpha1.MysqlOnConflictConfigR\nonConflict\x12=\n\x1bskip_foreign_key_violations\x18\x04 \x01(\x08R\x18skipForeignKeyViolations\x12\x30\n\x05\x62\x61tch\x18\x05 \x01(\x0b\x32\x1a.mgmt.v1alpha1.BatchConfigR\x05\x62\x61tch\x12\x30\n\rmax_in_flight\x18\x06 \x01(\rB\x07\xbaH\x04*\x02(\x01H\x00R\x0bmaxInFlight\x88\x01\x01\x42\x10\n\x0e_max_in_flight\"P\n\x18MysqlTruncateTableConfig\x12\x34\n\x16truncate_before_insert\x18\x01 \x01(\x08R\x14truncateBeforeInsert\"6\n\x15MysqlOnConflictConfig\x12\x1d\n\ndo_nothing\x18\x01 \x01(\x08R\tdoNothing\"\x9b\x03\n!MssqlDestinationConnectionOptions\x12N\n\x0etruncate_table\x18\x01 \x01(\x0b\x32\'.mgmt.v1alpha1.MssqlTruncateTableConfigR\rtruncateTable\x12*\n\x11init_table_schema\x18\x02 \x01(\x08R\x0finitTableSchema\x12\x45\n\x0bon_conflict\x18\x03 \x01(\x0b\x32$.mgmt.v1alpha1.MssqlOnConflictConfigR\nonConflict\x12=\n\x1bskip_foreign_key_violations\x18\x04 \x01(\x08R\x18skipForeignKeyViolations\x12\x30\n\x05\x62\x61tch\x18\x05 \x01(\x0b\x32\x1a.mgmt.v1alpha1.BatchConfigR\x05\x62\x61tch\x12\x30\n\rmax_in_flight\x18\x06 \x01(\rB\x07\xbaH\x04*\x02(\x01H\x00R\x0bmaxInFlight\x88\x01\x01\x42\x10\n\x0e_max_in_flight\"P\n\x18MssqlTruncateTableConfig\x12\x34\n\x16truncate_before_insert\x18\x01 \x01(\x08R\x14truncateBeforeInsert\"6\n\x15MssqlOnConflictConfig\x12\x1d\n\ndo_nothing\x18\x01 \x01(\x08R\tdoNothing\"\xb9\x04\n!AwsS3DestinationConnectionOptions\x12\x62\n\rstorage_class\x18\x01 \x01(\x0e\x32=.mgmt.v1alpha1.AwsS3DestinationConnectionOptions.StorageClassR\x0cstorageClass\x12\x30\n\rmax_in_flight\x18\x02 \x01(\rB\x07\xbaH\x04*\x02(\x01H\x00R\x0bmaxInFlight\x88\x01\x01\x12\x1d\n\x07timeout\x18\x03 \x01(\tH\x01R\x07timeout\x88\x01\x01\x12\x30\n\x05\x62\x61tch\x18\x04 \x01(\x0b\x32\x1a.mgmt.v1alpha1.BatchConfigR\x05\x62\x61tch\"\x8e\x02\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x1a\n\x16STORAGE_CLASS_STANDARD\x10\x01\x12$\n STORAGE_CLASS_REDUCED_REDUNDANCY\x10\x02\x12\x19\n\x15STORAGE_CLASS_GLACIER\x10\x03\x12\x1d\n\x19STORAGE_CLASS_STANDARD_IA\x10\x04\x12\x1c\n\x18STORAGE_CLASS_ONEZONE_IA\x10\x05\x12%\n!STORAGE_CLASS_INTELLIGENT_TIERING\x10\x06\x12\x1e\n\x1aSTORAGE_CLASS_DEEP_ARCHIVE\x10\x07\x42\x10\n\x0e_max_in_flightB\n\n\x08_timeout\"Z\n\x0b\x42\x61tchConfig\x12\x19\n\x05\x63ount\x18\x01 \x01(\rH\x00R\x05\x63ount\x88\x01\x01\x12\x1b\n\x06period\x18\x02 \x01(\tH\x01R\x06period\x88\x01\x01\x42\x08\n\x06_countB\t\n\x07_period\"\xf2\x04\n\x10\x43reateJobRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x34\n\x08job_name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x07jobName\x12(\n\rcron_schedule\x18\x03 \x01(\tH\x00R\x0c\x63ronSchedule\x88\x01\x01\x12\x35\n\x08mappings\x18\x04 \x03(\x0b\x32\x19.mgmt.v1alpha1.JobMappingR\x08mappings\x12\x30\n\x06source\x18\x05 \x01(\x0b\x32\x18.mgmt.v1alpha1.JobSourceR\x06source\x12G\n\x0c\x64\x65stinations\x18\x06 \x03(\x0b\x32#.mgmt.v1alpha1.CreateJobDestinationR\x0c\x64\x65stinations\x12(\n\x10initiate_job_run\x18\x07 \x01(\x08R\x0einitiateJobRun\x12I\n\x10workflow_options\x18\x08 \x01(\x0b\x32\x1e.mgmt.v1alpha1.WorkflowOptionsR\x0fworkflowOptions\x12\x41\n\x0csync_options\x18\t \x01(\x0b\x32\x1e.mgmt.v1alpha1.ActivityOptionsR\x0bsyncOptions\x12Y\n\x14virtual_foreign_keys\x18\n \x03(\x0b\x32\'.mgmt.v1alpha1.VirtualForeignConstraintR\x12virtualForeignKeysB\x10\n\x0e_cron_schedule\"G\n\x0fWorkflowOptions\x12$\n\x0brun_timeout\x18\x08 \x01(\x03H\x00R\nrunTimeout\x88\x01\x01\x42\x0e\n\x0c_run_timeout\"\x95\x02\n\x0f\x41\x63tivityOptions\x12G\n\x19schedule_to_close_timeout\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x01H\x00R\x16scheduleToCloseTimeout\x88\x01\x01\x12\x41\n\x16start_to_close_timeout\x18\x02 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x01H\x01R\x13startToCloseTimeout\x88\x01\x01\x12=\n\x0cretry_policy\x18\x03 \x01(\x0b\x32\x1a.mgmt.v1alpha1.RetryPolicyR\x0bretryPolicyB\x1c\n\x1a_schedule_to_close_timeoutB\x19\n\x17_start_to_close_timeout\"[\n\x0bRetryPolicy\x12\x37\n\x10maximum_attempts\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02(\x00H\x00R\x0fmaximumAttempts\x88\x01\x01\x42\x13\n\x11_maximum_attempts\"9\n\x11\x43reateJobResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"\x8b\x01\n\x15JobMappingTransformer\x12\x38\n\x06source\x18\x01 \x01(\x0e\x32 .mgmt.v1alpha1.TransformerSourceR\x06source\x12\x38\n\x06\x63onfig\x18\x03 \x01(\x0b\x32 .mgmt.v1alpha1.TransformerConfigR\x06\x63onfig\"\x9a\x01\n\nJobMapping\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\x12\x16\n\x06\x63olumn\x18\x03 \x01(\tR\x06\x63olumn\x12\x46\n\x0btransformer\x18\x05 \x01(\x0b\x32$.mgmt.v1alpha1.JobMappingTransformerR\x0btransformer\")\n\rGetJobRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"6\n\x0eGetJobResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"p\n\x18UpdateJobScheduleRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12(\n\rcron_schedule\x18\x02 \x01(\tH\x00R\x0c\x63ronSchedule\x88\x01\x01\x42\x10\n\x0e_cron_schedule\"A\n\x19UpdateJobScheduleResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"c\n\x0fPauseJobRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x14\n\x05pause\x18\x02 \x01(\x08R\x05pause\x12\x17\n\x04note\x18\x03 \x01(\tH\x00R\x04note\x88\x01\x01\x42\x07\n\x05_note\"8\n\x10PauseJobResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"\x80\x02\n UpdateJobSourceConnectionRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x30\n\x06source\x18\x02 \x01(\x0b\x32\x18.mgmt.v1alpha1.JobSourceR\x06source\x12\x35\n\x08mappings\x18\x03 \x03(\x0b\x32\x19.mgmt.v1alpha1.JobMappingR\x08mappings\x12Y\n\x14virtual_foreign_keys\x18\x04 \x03(\x0b\x32\'.mgmt.v1alpha1.VirtualForeignConstraintR\x12virtualForeignKeys\"I\n!UpdateJobSourceConnectionResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"r\n\x1aPostgresSourceSchemaSubset\x12T\n\x10postgres_schemas\x18\x01 \x03(\x0b\x32).mgmt.v1alpha1.PostgresSourceSchemaOptionR\x0fpostgresSchemas\"f\n\x17MysqlSourceSchemaSubset\x12K\n\rmysql_schemas\x18\x01 \x03(\x0b\x32&.mgmt.v1alpha1.MysqlSourceSchemaOptionR\x0cmysqlSchemas\"^\n\x1a\x44ynamoDBSourceSchemaSubset\x12@\n\x06tables\x18\x01 \x03(\x0b\x32(.mgmt.v1alpha1.DynamoDBSourceTableOptionR\x06tables\"f\n\x17MssqlSourceSchemaSubset\x12K\n\rmssql_schemas\x18\x01 \x03(\x0b\x32&.mgmt.v1alpha1.MssqlSourceSchemaOptionR\x0cmssqlSchemas\"\xf2\x02\n\x18JobSourceSqlSubetSchemas\x12T\n\x0fpostgres_subset\x18\x02 \x01(\x0b\x32).mgmt.v1alpha1.PostgresSourceSchemaSubsetH\x00R\x0epostgresSubset\x12K\n\x0cmysql_subset\x18\x03 \x01(\x0b\x32&.mgmt.v1alpha1.MysqlSourceSchemaSubsetH\x00R\x0bmysqlSubset\x12T\n\x0f\x64ynamodb_subset\x18\x04 \x01(\x0b\x32).mgmt.v1alpha1.DynamoDBSourceSchemaSubsetH\x00R\x0e\x64ynamodbSubset\x12K\n\x0cmssql_subset\x18\x05 \x01(\x0b\x32&.mgmt.v1alpha1.MssqlSourceSchemaSubsetH\x00R\x0bmssqlSubsetB\x10\n\x07schemas\x12\x05\xbaH\x02\x08\x01\"\xd0\x01\n\'SetJobSourceSqlConnectionSubsetsRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x41\n\x07schemas\x18\x02 \x01(\x0b\x32\'.mgmt.v1alpha1.JobSourceSqlSubetSchemasR\x07schemas\x12H\n!subset_by_foreign_key_constraints\x18\x03 \x01(\x08R\x1dsubsetByForeignKeyConstraints\"P\n(SetJobSourceSqlConnectionSubsetsResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"\xde\x01\n%UpdateJobDestinationConnectionRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\x12-\n\rconnection_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12>\n\x07options\x18\x03 \x01(\x0b\x32$.mgmt.v1alpha1.JobDestinationOptionsR\x07options\x12%\n\x0e\x64\x65stination_id\x18\x04 \x01(\tR\rdestinationId\"N\n&UpdateJobDestinationConnectionResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"X\n%DeleteJobDestinationConnectionRequest\x12/\n\x0e\x64\x65stination_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\rdestinationId\"(\n&DeleteJobDestinationConnectionResponse\"\x92\x01\n&CreateJobDestinationConnectionsRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\x12G\n\x0c\x64\x65stinations\x18\x02 \x03(\x0b\x32#.mgmt.v1alpha1.CreateJobDestinationR\x0c\x64\x65stinations\"O\n\'CreateJobDestinationConnectionsResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\",\n\x10\x44\x65leteJobRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"\x13\n\x11\x44\x65leteJobResponse\"s\n\x19IsJobNameAvailableRequest\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"?\n\x1aIsJobNameAvailableResponse\x12!\n\x0cis_available\x18\x01 \x01(\x08R\x0bisAvailable\"g\n\x11GetJobRunsRequest\x12!\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12)\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\taccountIdB\x04\n\x02id\"F\n\x12GetJobRunsResponse\x12\x30\n\x08job_runs\x18\x01 \x03(\x0b\x32\x15.mgmt.v1alpha1.JobRunR\x07jobRuns\"Y\n\x10GetJobRunRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"C\n\x11GetJobRunResponse\x12.\n\x07job_run\x18\x01 \x01(\x0b\x32\x15.mgmt.v1alpha1.JobRunR\x06jobRun\"6\n\x13\x43reateJobRunRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\"\x16\n\x14\x43reateJobRunResponse\"\\\n\x13\x43\x61ncelJobRunRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\x16\n\x14\x43\x61ncelJobRunResponse\"\xe9\x05\n\x03Job\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12+\n\x12\x63reated_by_user_id\x18\x02 \x01(\tR\x0f\x63reatedByUserId\x12\x39\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12+\n\x12updated_by_user_id\x18\x04 \x01(\tR\x0fupdatedByUserId\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x12\n\x04name\x18\x06 \x01(\tR\x04name\x12\x30\n\x06source\x18\x07 \x01(\x0b\x32\x18.mgmt.v1alpha1.JobSourceR\x06source\x12\x41\n\x0c\x64\x65stinations\x18\x08 \x03(\x0b\x32\x1d.mgmt.v1alpha1.JobDestinationR\x0c\x64\x65stinations\x12\x35\n\x08mappings\x18\t \x03(\x0b\x32\x19.mgmt.v1alpha1.JobMappingR\x08mappings\x12(\n\rcron_schedule\x18\n \x01(\tH\x00R\x0c\x63ronSchedule\x88\x01\x01\x12\x1d\n\naccount_id\x18\x0b \x01(\tR\taccountId\x12\x41\n\x0csync_options\x18\x0c \x01(\x0b\x32\x1e.mgmt.v1alpha1.ActivityOptionsR\x0bsyncOptions\x12I\n\x10workflow_options\x18\r \x01(\x0b\x32\x1e.mgmt.v1alpha1.WorkflowOptionsR\x0fworkflowOptions\x12Y\n\x14virtual_foreign_keys\x18\x0e \x03(\x0b\x32\'.mgmt.v1alpha1.VirtualForeignConstraintR\x12virtualForeignKeysB\x10\n\x0e_cron_schedule\"g\n\x0cJobRecentRun\x12\x39\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x1c\n\njob_run_id\x18\x02 \x01(\tR\x08jobRunId\":\n\x17GetJobRecentRunsRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\"X\n\x18GetJobRecentRunsResponse\x12<\n\x0brecent_runs\x18\x01 \x03(\x0b\x32\x1b.mgmt.v1alpha1.JobRecentRunR\nrecentRuns\"O\n\x0bJobNextRuns\x12@\n\x0enext_run_times\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.TimestampR\x0cnextRunTimes\".\n\x15GetJobNextRunsRequest\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\"Q\n\x16GetJobNextRunsResponse\x12\x37\n\tnext_runs\x18\x01 \x01(\x0b\x32\x1a.mgmt.v1alpha1.JobNextRunsR\x08nextRuns\",\n\x13GetJobStatusRequest\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\"H\n\x14GetJobStatusResponse\x12\x30\n\x06status\x18\x01 \x01(\x0e\x32\x18.mgmt.v1alpha1.JobStatusR\x06status\"Z\n\x0fJobStatusRecord\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\x12\x30\n\x06status\x18\x02 \x01(\x0e\x32\x18.mgmt.v1alpha1.JobStatusR\x06status\"@\n\x15GetJobStatusesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"T\n\x16GetJobStatusesResponse\x12:\n\x08statuses\x18\x01 \x03(\x0b\x32\x1e.mgmt.v1alpha1.JobStatusRecordR\x08statuses\"+\n\x0f\x41\x63tivityFailure\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\"\xc6\x01\n\x0fPendingActivity\x12\x35\n\x06status\x18\x01 \x01(\x0e\x32\x1d.mgmt.v1alpha1.ActivityStatusR\x06status\x12#\n\ractivity_name\x18\x02 \x01(\tR\x0c\x61\x63tivityName\x12\x46\n\x0clast_failure\x18\x03 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ActivityFailureH\x00R\x0blastFailure\x88\x01\x01\x42\x0f\n\r_last_failure\"\xd7\x02\n\x06JobRun\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06job_id\x18\x02 \x01(\tR\x05jobId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x33\n\x06status\x18\x04 \x01(\x0e\x32\x1b.mgmt.v1alpha1.JobRunStatusR\x06status\x12\x39\n\nstarted_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartedAt\x12\x42\n\x0c\x63ompleted_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\x0b\x63ompletedAt\x88\x01\x01\x12M\n\x12pending_activities\x18\x08 \x03(\x0b\x32\x1e.mgmt.v1alpha1.PendingActivityR\x11pendingActivitiesB\x0f\n\r_completed_at\"Q\n\x14JobRunEventTaskError\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\x12\x1f\n\x0bretry_state\x18\x02 \x01(\tR\nretryState\"\xab\x01\n\x0fJobRunEventTask\x12\x0e\n\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n\x04type\x18\x02 \x01(\tR\x04type\x12\x39\n\nevent_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\teventTime\x12\x39\n\x05\x65rror\x18\x04 \x01(\x0b\x32#.mgmt.v1alpha1.JobRunEventTaskErrorR\x05\x65rror\"B\n\x12JobRunSyncMetadata\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\"r\n\x13JobRunEventMetadata\x12H\n\rsync_metadata\x18\x01 \x01(\x0b\x32!.mgmt.v1alpha1.JobRunSyncMetadataH\x00R\x0csyncMetadataB\x11\n\x08metadata\x12\x05\xbaH\x02\x08\x01\"\x9d\x02\n\x0bJobRunEvent\x12\x0e\n\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n\x04type\x18\x02 \x01(\tR\x04type\x12\x39\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x39\n\nclose_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcloseTime\x12>\n\x08metadata\x18\x05 \x01(\x0b\x32\".mgmt.v1alpha1.JobRunEventMetadataR\x08metadata\x12\x34\n\x05tasks\x18\x06 \x03(\x0b\x32\x1e.mgmt.v1alpha1.JobRunEventTaskR\x05tasks\"_\n\x16GetJobRunEventsRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"u\n\x17GetJobRunEventsResponse\x12\x32\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.JobRunEventR\x06\x65vents\x12&\n\x0fis_run_complete\x18\x02 \x01(\x08R\risRunComplete\"\\\n\x13\x44\x65leteJobRunRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\x16\n\x14\x44\x65leteJobRunResponse\"_\n\x16TerminateJobRunRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\x19\n\x17TerminateJobRunResponse\"\xb2\x02\n\x1aGetJobRunLogsStreamRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x30\n\x06window\x18\x03 \x01(\x0e\x32\x18.mgmt.v1alpha1.LogWindowR\x06window\x12\x1f\n\x0bshould_tail\x18\x04 \x01(\x08R\nshouldTail\x12\x30\n\rmax_log_lines\x18\x05 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x01H\x00R\x0bmaxLogLines\x88\x01\x01\x12\x36\n\nlog_levels\x18\x06 \x03(\x0e\x32\x17.mgmt.v1alpha1.LogLevelR\tlogLevelsB\x10\n\x0e_max_log_lines\"\x85\x01\n\x1bGetJobRunLogsStreamResponse\x12\x19\n\x08log_line\x18\x01 \x01(\tR\x07logLine\x12=\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\ttimestamp\x88\x01\x01\x42\x0c\n\n_timestamp\"\x83\x01\n\x1cSetJobWorkflowOptionsRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12I\n\x10worfklow_options\x18\x02 \x01(\x0b\x32\x1e.mgmt.v1alpha1.WorkflowOptionsR\x0fworfklowOptions\"E\n\x1dSetJobWorkflowOptionsResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"w\n\x18SetJobSyncOptionsRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x41\n\x0csync_options\x18\x02 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ActivityOptionsR\x0bsyncOptions\"A\n\x19SetJobSyncOptionsResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"\xfc\x01\n\x1aValidateJobMappingsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x35\n\x08mappings\x18\x02 \x03(\x0b\x32\x19.mgmt.v1alpha1.JobMappingR\x08mappings\x12#\n\rconnection_id\x18\x03 \x01(\tR\x0c\x63onnectionId\x12Y\n\x14virtual_foreign_keys\x18\x04 \x03(\x0b\x32\'.mgmt.v1alpha1.VirtualForeignConstraintR\x12virtualForeignKeys\"k\n\x0b\x43olumnError\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\x12\x16\n\x06\x63olumn\x18\x03 \x01(\tR\x06\x63olumn\x12\x16\n\x06\x65rrors\x18\x04 \x03(\tR\x06\x65rrors\"\'\n\rDatabaseError\x12\x16\n\x06\x65rrors\x18\x01 \x03(\tR\x06\x65rrors\"\xa5\x01\n\x1bValidateJobMappingsResponse\x12?\n\rcolumn_errors\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.ColumnErrorR\x0c\x63olumnErrors\x12\x45\n\x0f\x64\x61tabase_errors\x18\x02 \x01(\x0b\x32\x1c.mgmt.v1alpha1.DatabaseErrorR\x0e\x64\x61tabaseErrors\"[\n\x11VirtualForeignKey\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\x12\x18\n\x07\x63olumns\x18\x03 \x03(\tR\x07\x63olumns\"\xa5\x01\n\x18VirtualForeignConstraint\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\x12\x18\n\x07\x63olumns\x18\x03 \x03(\tR\x07\x63olumns\x12\x41\n\x0b\x66oreign_key\x18\x04 \x01(\x0b\x32 .mgmt.v1alpha1.VirtualForeignKeyR\nforeignKey\"\x88\x01\n\rRunContextKey\x12%\n\njob_run_id\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x08jobRunId\x12(\n\x0b\x65xternal_id\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\nexternalId\x12&\n\naccount_id\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\taccountId\"D\n\x14GetRunContextRequest\x12,\n\x02id\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.RunContextKeyR\x02id\"-\n\x15GetRunContextResponse\x12\x14\n\x05value\x18\x01 \x01(\x0cR\x05value\"Z\n\x14SetRunContextRequest\x12,\n\x02id\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.RunContextKeyR\x02id\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value\"\x17\n\x15SetRunContextResponse\"[\n\x15SetRunContextsRequest\x12,\n\x02id\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.RunContextKeyR\x02id\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value\"\x18\n\x16SetRunContextsResponse\"\xad\x03\n\x07JobHook\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x15\n\x06job_id\x18\x04 \x01(\tR\x05jobId\x12\x34\n\x06\x63onfig\x18\x05 \x01(\x0b\x32\x1c.mgmt.v1alpha1.JobHookConfigR\x06\x63onfig\x12+\n\x12\x63reated_by_user_id\x18\x06 \x01(\tR\x0f\x63reatedByUserId\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12+\n\x12updated_by_user_id\x18\x08 \x01(\tR\x0fupdatedByUserId\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x18\n\x07\x65nabled\x18\n \x01(\x08R\x07\x65nabled\x12%\n\x08priority\x18\x0b \x01(\rB\t\xbaH\x06*\x04\x18\x64(\x00R\x08priority\"\xdd\x01\n\nNewJobHook\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12)\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x0b\x64\x65scription\x12\x34\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x1c.mgmt.v1alpha1.JobHookConfigR\x06\x63onfig\x12\x18\n\x07\x65nabled\x18\x04 \x01(\x08R\x07\x65nabled\x12%\n\x08priority\x18\x05 \x01(\rB\t\xbaH\x06*\x04\x18\x64(\x00R\x08priority\"\xa5\x03\n\rJobHookConfig\x12;\n\x03sql\x18\x05 \x01(\x0b\x32\'.mgmt.v1alpha1.JobHookConfig.JobSqlHookH\x00R\x03sql\x1a\xc5\x02\n\nJobSqlHook\x12\x1d\n\x05query\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05query\x12-\n\rconnection_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12\x46\n\x06timing\x18\x03 \x01(\x0b\x32..mgmt.v1alpha1.JobHookConfig.JobSqlHook.TimingR\x06timing\x1a\xa0\x01\n\x06Timing\x12@\n\x08pre_sync\x18\x03 \x01(\x0b\x32#.mgmt.v1alpha1.JobHookTimingPreSyncH\x00R\x07preSync\x12\x43\n\tpost_sync\x18\x04 \x01(\x0b\x32$.mgmt.v1alpha1.JobHookTimingPostSyncH\x00R\x08postSyncB\x0f\n\x06timing\x12\x05\xbaH\x02\x08\x01\x42\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\x16\n\x14JobHookTimingPreSync\"\x17\n\x15JobHookTimingPostSync\"5\n\x12GetJobHooksRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\"C\n\x13GetJobHooksResponse\x12,\n\x05hooks\x18\x01 \x03(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x05hooks\"-\n\x11GetJobHookRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"@\n\x12GetJobHookResponse\x12*\n\x04hook\x18\x01 \x01(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x04hook\"\\\n\x14\x43reateJobHookRequest\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\x12-\n\x04hook\x18\x02 \x01(\x0b\x32\x19.mgmt.v1alpha1.NewJobHookR\x04hook\"C\n\x15\x43reateJobHookResponse\x12*\n\x04hook\x18\x01 \x01(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x04hook\"0\n\x14\x44\x65leteJobHookRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"\x17\n\x15\x44\x65leteJobHookResponse\"J\n\x1dIsJobHookNameAvailableRequest\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"C\n\x1eIsJobHookNameAvailableResponse\x12!\n\x0cis_available\x18\x01 \x01(\x08R\x0bisAvailable\"\x81\x02\n\x14UpdateJobHookRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12-\n\x04name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12)\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x0b\x64\x65scription\x12\x34\n\x06\x63onfig\x18\x04 \x01(\x0b\x32\x1c.mgmt.v1alpha1.JobHookConfigR\x06\x63onfig\x12\x18\n\x07\x65nabled\x18\x05 \x01(\x08R\x07\x65nabled\x12%\n\x08priority\x18\x06 \x01(\rB\t\xbaH\x06*\x04\x18\x64(\x00R\x08priority\"C\n\x15UpdateJobHookResponse\x12*\n\x04hook\x18\x01 \x01(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x04hook\"N\n\x18SetJobHookEnabledRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x18\n\x07\x65nabled\x18\x02 \x01(\x08R\x07\x65nabled\"G\n\x19SetJobHookEnabledResponse\x12*\n\x04hook\x18\x01 \x01(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x04hook\"\xde\x01\n GetActiveJobHooksByTimingRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\x12N\n\x06timing\x18\x02 \x01(\x0e\x32\x36.mgmt.v1alpha1.GetActiveJobHooksByTimingRequest.TimingR\x06timing\"I\n\x06Timing\x12\x16\n\x12TIMING_UNSPECIFIED\x10\x00\x12\x12\n\x0eTIMING_PRESYNC\x10\x01\x12\x13\n\x0fTIMING_POSTSYNC\x10\x02\"Q\n!GetActiveJobHooksByTimingResponse\x12,\n\x05hooks\x18\x01 \x03(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x05hooks*o\n\tJobStatus\x12\x1a\n\x16JOB_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12JOB_STATUS_ENABLED\x10\x01\x12\x15\n\x11JOB_STATUS_PAUSED\x10\x03\x12\x17\n\x13JOB_STATUS_DISABLED\x10\x04*\xa7\x01\n\x0e\x41\x63tivityStatus\x12\x1f\n\x1b\x41\x43TIVITY_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x43TIVITY_STATUS_SCHEDULED\x10\x01\x12\x1b\n\x17\x41\x43TIVITY_STATUS_STARTED\x10\x02\x12\x1c\n\x18\x41\x43TIVITY_STATUS_CANCELED\x10\x03\x12\x1a\n\x16\x41\x43TIVITY_STATUS_FAILED\x10\x04*\x92\x02\n\x0cJobRunStatus\x12\x1e\n\x1aJOB_RUN_STATUS_UNSPECIFIED\x10\x00\x12\x1a\n\x16JOB_RUN_STATUS_PENDING\x10\x01\x12\x1a\n\x16JOB_RUN_STATUS_RUNNING\x10\x02\x12\x1b\n\x17JOB_RUN_STATUS_COMPLETE\x10\x03\x12\x18\n\x14JOB_RUN_STATUS_ERROR\x10\x04\x12\x1b\n\x17JOB_RUN_STATUS_CANCELED\x10\x05\x12\x1d\n\x19JOB_RUN_STATUS_TERMINATED\x10\x06\x12\x19\n\x15JOB_RUN_STATUS_FAILED\x10\x07\x12\x1c\n\x18JOB_RUN_STATUS_TIMED_OUT\x10\x08*|\n\tLogWindow\x12\"\n\x1eLOG_WINDOW_NO_TIME_UNSPECIFIED\x10\x00\x12\x1a\n\x16LOG_WINDOW_FIFTEEN_MIN\x10\x01\x12\x17\n\x13LOG_WINDOW_ONE_HOUR\x10\x02\x12\x16\n\x12LOG_WINDOW_ONE_DAY\x10\x03*w\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\x13\n\x0fLOG_LEVEL_DEBUG\x10\x01\x12\x12\n\x0eLOG_LEVEL_INFO\x10\x02\x12\x12\n\x0eLOG_LEVEL_WARN\x10\x03\x12\x13\n\x0fLOG_LEVEL_ERROR\x10\x04\x32\xd1\x1e\n\nJobService\x12J\n\x07GetJobs\x12\x1d.mgmt.v1alpha1.GetJobsRequest\x1a\x1e.mgmt.v1alpha1.GetJobsResponse\"\x00\x12G\n\x06GetJob\x12\x1c.mgmt.v1alpha1.GetJobRequest\x1a\x1d.mgmt.v1alpha1.GetJobResponse\"\x00\x12P\n\tCreateJob\x12\x1f.mgmt.v1alpha1.CreateJobRequest\x1a .mgmt.v1alpha1.CreateJobResponse\"\x00\x12P\n\tDeleteJob\x12\x1f.mgmt.v1alpha1.DeleteJobRequest\x1a .mgmt.v1alpha1.DeleteJobResponse\"\x00\x12k\n\x12IsJobNameAvailable\x12(.mgmt.v1alpha1.IsJobNameAvailableRequest\x1a).mgmt.v1alpha1.IsJobNameAvailableResponse\"\x00\x12h\n\x11UpdateJobSchedule\x12\'.mgmt.v1alpha1.UpdateJobScheduleRequest\x1a(.mgmt.v1alpha1.UpdateJobScheduleResponse\"\x00\x12\x80\x01\n\x19UpdateJobSourceConnection\x12/.mgmt.v1alpha1.UpdateJobSourceConnectionRequest\x1a\x30.mgmt.v1alpha1.UpdateJobSourceConnectionResponse\"\x00\x12\x95\x01\n SetJobSourceSqlConnectionSubsets\x12\x36.mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest\x1a\x37.mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse\"\x00\x12\x8f\x01\n\x1eUpdateJobDestinationConnection\x12\x34.mgmt.v1alpha1.UpdateJobDestinationConnectionRequest\x1a\x35.mgmt.v1alpha1.UpdateJobDestinationConnectionResponse\"\x00\x12\x8f\x01\n\x1e\x44\x65leteJobDestinationConnection\x12\x34.mgmt.v1alpha1.DeleteJobDestinationConnectionRequest\x1a\x35.mgmt.v1alpha1.DeleteJobDestinationConnectionResponse\"\x00\x12\x92\x01\n\x1f\x43reateJobDestinationConnections\x12\x35.mgmt.v1alpha1.CreateJobDestinationConnectionsRequest\x1a\x36.mgmt.v1alpha1.CreateJobDestinationConnectionsResponse\"\x00\x12M\n\x08PauseJob\x12\x1e.mgmt.v1alpha1.PauseJobRequest\x1a\x1f.mgmt.v1alpha1.PauseJobResponse\"\x00\x12\x65\n\x10GetJobRecentRuns\x12&.mgmt.v1alpha1.GetJobRecentRunsRequest\x1a\'.mgmt.v1alpha1.GetJobRecentRunsResponse\"\x00\x12_\n\x0eGetJobNextRuns\x12$.mgmt.v1alpha1.GetJobNextRunsRequest\x1a%.mgmt.v1alpha1.GetJobNextRunsResponse\"\x00\x12Y\n\x0cGetJobStatus\x12\".mgmt.v1alpha1.GetJobStatusRequest\x1a#.mgmt.v1alpha1.GetJobStatusResponse\"\x00\x12_\n\x0eGetJobStatuses\x12$.mgmt.v1alpha1.GetJobStatusesRequest\x1a%.mgmt.v1alpha1.GetJobStatusesResponse\"\x00\x12S\n\nGetJobRuns\x12 .mgmt.v1alpha1.GetJobRunsRequest\x1a!.mgmt.v1alpha1.GetJobRunsResponse\"\x00\x12\x62\n\x0fGetJobRunEvents\x12%.mgmt.v1alpha1.GetJobRunEventsRequest\x1a&.mgmt.v1alpha1.GetJobRunEventsResponse\"\x00\x12P\n\tGetJobRun\x12\x1f.mgmt.v1alpha1.GetJobRunRequest\x1a .mgmt.v1alpha1.GetJobRunResponse\"\x00\x12Y\n\x0c\x44\x65leteJobRun\x12\".mgmt.v1alpha1.DeleteJobRunRequest\x1a#.mgmt.v1alpha1.DeleteJobRunResponse\"\x00\x12Y\n\x0c\x43reateJobRun\x12\".mgmt.v1alpha1.CreateJobRunRequest\x1a#.mgmt.v1alpha1.CreateJobRunResponse\"\x00\x12Y\n\x0c\x43\x61ncelJobRun\x12\".mgmt.v1alpha1.CancelJobRunRequest\x1a#.mgmt.v1alpha1.CancelJobRunResponse\"\x00\x12\x62\n\x0fTerminateJobRun\x12%.mgmt.v1alpha1.TerminateJobRunRequest\x1a&.mgmt.v1alpha1.TerminateJobRunResponse\"\x00\x12p\n\x13GetJobRunLogsStream\x12).mgmt.v1alpha1.GetJobRunLogsStreamRequest\x1a*.mgmt.v1alpha1.GetJobRunLogsStreamResponse\"\x00\x30\x01\x12t\n\x15SetJobWorkflowOptions\x12+.mgmt.v1alpha1.SetJobWorkflowOptionsRequest\x1a,.mgmt.v1alpha1.SetJobWorkflowOptionsResponse\"\x00\x12h\n\x11SetJobSyncOptions\x12\'.mgmt.v1alpha1.SetJobSyncOptionsRequest\x1a(.mgmt.v1alpha1.SetJobSyncOptionsResponse\"\x00\x12n\n\x13ValidateJobMappings\x12).mgmt.v1alpha1.ValidateJobMappingsRequest\x1a*.mgmt.v1alpha1.ValidateJobMappingsResponse\"\x00\x12\\\n\rGetRunContext\x12#.mgmt.v1alpha1.GetRunContextRequest\x1a$.mgmt.v1alpha1.GetRunContextResponse\"\x00\x12\\\n\rSetRunContext\x12#.mgmt.v1alpha1.SetRunContextRequest\x1a$.mgmt.v1alpha1.SetRunContextResponse\"\x00\x12\x61\n\x0eSetRunContexts\x12$.mgmt.v1alpha1.SetRunContextsRequest\x1a%.mgmt.v1alpha1.SetRunContextsResponse\"\x00(\x01\x12V\n\x0bGetJobHooks\x12!.mgmt.v1alpha1.GetJobHooksRequest\x1a\".mgmt.v1alpha1.GetJobHooksResponse\"\x00\x12S\n\nGetJobHook\x12 .mgmt.v1alpha1.GetJobHookRequest\x1a!.mgmt.v1alpha1.GetJobHookResponse\"\x00\x12\\\n\rCreateJobHook\x12#.mgmt.v1alpha1.CreateJobHookRequest\x1a$.mgmt.v1alpha1.CreateJobHookResponse\"\x00\x12\\\n\rDeleteJobHook\x12#.mgmt.v1alpha1.DeleteJobHookRequest\x1a$.mgmt.v1alpha1.DeleteJobHookResponse\"\x00\x12w\n\x16IsJobHookNameAvailable\x12,.mgmt.v1alpha1.IsJobHookNameAvailableRequest\x1a-.mgmt.v1alpha1.IsJobHookNameAvailableResponse\"\x00\x12\\\n\rUpdateJobHook\x12#.mgmt.v1alpha1.UpdateJobHookRequest\x1a$.mgmt.v1alpha1.UpdateJobHookResponse\"\x00\x12h\n\x11SetJobHookEnabled\x12\'.mgmt.v1alpha1.SetJobHookEnabledRequest\x1a(.mgmt.v1alpha1.SetJobHookEnabledResponse\"\x00\x12\x80\x01\n\x19GetActiveJobHooksByTiming\x12/.mgmt.v1alpha1.GetActiveJobHooksByTimingRequest\x1a\x30.mgmt.v1alpha1.GetActiveJobHooksByTimingResponse\"\x00\x42\xc4\x01\n\x11\x63om.mgmt.v1alpha1B\x08JobProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17mgmt/v1alpha1/job.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1fmgmt/v1alpha1/transformer.proto\"9\n\x0eGetJobsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"9\n\x0fGetJobsResponse\x12&\n\x04jobs\x18\x01 \x03(\x0b\x32\x12.mgmt.v1alpha1.JobR\x04jobs\"N\n\tJobSource\x12\x41\n\x07options\x18\x01 \x01(\x0b\x32\x1f.mgmt.v1alpha1.JobSourceOptionsB\x06\xbaH\x03\xc8\x01\x01R\x07options\"\xe9\x04\n\x10JobSourceOptions\x12L\n\x08postgres\x18\x01 \x01(\x0b\x32..mgmt.v1alpha1.PostgresSourceConnectionOptionsH\x00R\x08postgres\x12\x44\n\x06\x61ws_s3\x18\x02 \x01(\x0b\x32+.mgmt.v1alpha1.AwsS3SourceConnectionOptionsH\x00R\x05\x61wsS3\x12\x43\n\x05mysql\x18\x03 \x01(\x0b\x32+.mgmt.v1alpha1.MysqlSourceConnectionOptionsH\x00R\x05mysql\x12\x42\n\x08generate\x18\x04 \x01(\x0b\x32$.mgmt.v1alpha1.GenerateSourceOptionsH\x00R\x08generate\x12I\n\x0b\x61i_generate\x18\x05 \x01(\x0b\x32&.mgmt.v1alpha1.AiGenerateSourceOptionsH\x00R\naiGenerate\x12I\n\x07mongodb\x18\x06 \x01(\x0b\x32-.mgmt.v1alpha1.MongoDBSourceConnectionOptionsH\x00R\x07mongodb\x12L\n\x08\x64ynamodb\x18\x07 \x01(\x0b\x32..mgmt.v1alpha1.DynamoDBSourceConnectionOptionsH\x00R\x08\x64ynamodb\x12\x43\n\x05mssql\x18\x08 \x01(\x0b\x32+.mgmt.v1alpha1.MssqlSourceConnectionOptionsH\x00R\x05mssqlB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\x85\x01\n\x14\x43reateJobDestination\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12>\n\x07options\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.JobDestinationOptionsR\x07options\"\x85\x01\n\x0eJobDestination\x12#\n\rconnection_id\x18\x01 \x01(\tR\x0c\x63onnectionId\x12>\n\x07options\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.JobDestinationOptionsR\x07options\x12\x0e\n\x02id\x18\x03 \x01(\tR\x02id\"\xb6\x03\n\x17\x41iGenerateSourceOptions\x12\x32\n\x10\x61i_connection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0e\x61iConnectionId\x12O\n\x07schemas\x18\x02 \x03(\x0b\x32+.mgmt.v1alpha1.AiGenerateSourceSchemaOptionB\x08\xbaH\x05\x92\x01\x02\x08\x01R\x07schemas\x12\x44\n\x17\x66k_source_connection_id\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x14\x66kSourceConnectionId\x88\x01\x01\x12&\n\nmodel_name\x18\x04 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\tmodelName\x12$\n\x0buser_prompt\x18\x05 \x01(\tH\x01R\nuserPrompt\x88\x01\x01\x12>\n\x13generate_batch_size\x18\x06 \x01(\x03\x42\t\xbaH\x06\"\x04\x18\x64(\x01H\x02R\x11generateBatchSize\x88\x01\x01\x42\x1a\n\x18_fk_source_connection_idB\x0e\n\x0c_user_promptB\x16\n\x14_generate_batch_size\"\x8d\x01\n\x1c\x41iGenerateSourceSchemaOption\x12\x1f\n\x06schema\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x06schema\x12L\n\x06tables\x18\x02 \x03(\x0b\x32*.mgmt.v1alpha1.AiGenerateSourceTableOptionB\x08\xbaH\x05\x92\x01\x02\x08\x01R\x06tables\"e\n\x1b\x41iGenerateSourceTableOption\x12\x1d\n\x05table\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05table\x12\'\n\trow_count\x18\x02 \x01(\x03\x42\n\xbaH\x07\"\x05\x18\xe8\x07(\x01R\x08rowCount\"\xc8\x01\n\x15GenerateSourceOptions\x12M\n\x07schemas\x18\x01 \x03(\x0b\x32).mgmt.v1alpha1.GenerateSourceSchemaOptionB\x08\xbaH\x05\x92\x01\x02\x08\x01R\x07schemas\x12\x44\n\x17\x66k_source_connection_id\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x14\x66kSourceConnectionId\x88\x01\x01\x42\x1a\n\x18_fk_source_connection_id\"\x89\x01\n\x1aGenerateSourceSchemaOption\x12\x1f\n\x06schema\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x06schema\x12J\n\x06tables\x18\x02 \x03(\x0b\x32(.mgmt.v1alpha1.GenerateSourceTableOptionB\x08\xbaH\x05\x92\x01\x02\x08\x01R\x06tables\"`\n\x19GenerateSourceTableOption\x12\x1d\n\x05table\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05table\x12$\n\trow_count\x18\x02 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x01R\x08rowCount\"O\n\x1eMongoDBSourceConnectionOptions\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\"\xaf\x02\n\x1f\x44ynamoDBSourceConnectionOptions\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12@\n\x06tables\x18\x02 \x03(\x0b\x32(.mgmt.v1alpha1.DynamoDBSourceTableOptionR\x06tables\x12\x65\n\x13unmapped_transforms\x18\x03 \x01(\x0b\x32\x34.mgmt.v1alpha1.DynamoDBSourceUnmappedTransformConfigR\x12unmappedTransforms\x12\x34\n\x16\x65nable_consistent_read\x18\x04 \x01(\x08R\x14\x65nableConsistentRead\"\x83\x02\n%DynamoDBSourceUnmappedTransformConfig\x12\x32\n\x01\x62\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.JobMappingTransformerR\x01\x62\x12>\n\x07\x62oolean\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.JobMappingTransformerR\x07\x62oolean\x12\x32\n\x01n\x18\x04 \x01(\x0b\x32$.mgmt.v1alpha1.JobMappingTransformerR\x01n\x12\x32\n\x01s\x18\x06 \x01(\x0b\x32$.mgmt.v1alpha1.JobMappingTransformerR\x01s\"s\n\x19\x44ynamoDBSourceTableOption\x12\x1d\n\x05table\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05table\x12&\n\x0cwhere_clause\x18\x02 \x01(\tH\x00R\x0bwhereClause\x88\x01\x01\x42\x0f\n\r_where_clause\"\x8f\x05\n\x1fPostgresSourceConnectionOptions\x12\x43\n\x07schemas\x18\x02 \x03(\x0b\x32).mgmt.v1alpha1.PostgresSourceSchemaOptionR\x07schemas\x12-\n\rconnection_id\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12H\n!subset_by_foreign_key_constraints\x18\x04 \x01(\x08R\x1dsubsetByForeignKeyConstraints\x12\x89\x01\n\x1cnew_column_addition_strategy\x18\x05 \x01(\x0b\x32H.mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategyR\x19newColumnAdditionStrategy\x1a\x9b\x02\n\x19NewColumnAdditionStrategy\x12m\n\x08halt_job\x18\x01 \x01(\x0b\x32P.mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJobH\x00R\x07haltJob\x12m\n\x08\x61uto_map\x18\x02 \x01(\x0b\x32P.mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMapH\x00R\x07\x61utoMap\x1a\t\n\x07HaltJob\x1a\t\n\x07\x41utoMapB\n\n\x08strategyJ\x04\x08\x01\x10\x02\"v\n\x1aPostgresSourceSchemaOption\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12@\n\x06tables\x18\x02 \x03(\x0b\x32(.mgmt.v1alpha1.PostgresSourceTableOptionR\x06tables\"j\n\x19PostgresSourceTableOption\x12\x14\n\x05table\x18\x01 \x01(\tR\x05table\x12&\n\x0cwhere_clause\x18\x02 \x01(\tH\x00R\x0bwhereClause\x88\x01\x01\x42\x0f\n\r_where_clause\"\x97\x02\n\x1cMysqlSourceConnectionOptions\x12<\n\x1bhalt_on_new_column_addition\x18\x01 \x01(\x08R\x17haltOnNewColumnAddition\x12@\n\x07schemas\x18\x02 \x03(\x0b\x32&.mgmt.v1alpha1.MysqlSourceSchemaOptionR\x07schemas\x12-\n\rconnection_id\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12H\n!subset_by_foreign_key_constraints\x18\x04 \x01(\x08R\x1dsubsetByForeignKeyConstraints\"p\n\x17MysqlSourceSchemaOption\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12=\n\x06tables\x18\x02 \x03(\x0b\x32%.mgmt.v1alpha1.MysqlSourceTableOptionR\x06tables\"g\n\x16MysqlSourceTableOption\x12\x14\n\x05table\x18\x01 \x01(\tR\x05table\x12&\n\x0cwhere_clause\x18\x02 \x01(\tH\x00R\x0bwhereClause\x88\x01\x01\x42\x0f\n\r_where_clause\"\x97\x02\n\x1cMssqlSourceConnectionOptions\x12<\n\x1bhalt_on_new_column_addition\x18\x01 \x01(\x08R\x17haltOnNewColumnAddition\x12@\n\x07schemas\x18\x02 \x03(\x0b\x32&.mgmt.v1alpha1.MssqlSourceSchemaOptionR\x07schemas\x12-\n\rconnection_id\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12H\n!subset_by_foreign_key_constraints\x18\x04 \x01(\x08R\x1dsubsetByForeignKeyConstraints\"p\n\x17MssqlSourceSchemaOption\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12=\n\x06tables\x18\x02 \x03(\x0b\x32%.mgmt.v1alpha1.MssqlSourceTableOptionR\x06tables\"g\n\x16MssqlSourceTableOption\x12\x14\n\x05table\x18\x01 \x01(\tR\x05table\x12&\n\x0cwhere_clause\x18\x02 \x01(\tH\x00R\x0bwhereClause\x88\x01\x01\x42\x0f\n\r_where_clause\"M\n\x1c\x41wsS3SourceConnectionOptions\x12-\n\rconnection_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\"\xcf\x05\n\x15JobDestinationOptions\x12`\n\x10postgres_options\x18\x01 \x01(\x0b\x32\x33.mgmt.v1alpha1.PostgresDestinationConnectionOptionsH\x00R\x0fpostgresOptions\x12X\n\x0e\x61ws_s3_options\x18\x02 \x01(\x0b\x32\x30.mgmt.v1alpha1.AwsS3DestinationConnectionOptionsH\x00R\x0c\x61wsS3Options\x12W\n\rmysql_options\x18\x03 \x01(\x0b\x32\x30.mgmt.v1alpha1.MysqlDestinationConnectionOptionsH\x00R\x0cmysqlOptions\x12]\n\x0fmongodb_options\x18\x04 \x01(\x0b\x32\x32.mgmt.v1alpha1.MongoDBDestinationConnectionOptionsH\x00R\x0emongodbOptions\x12v\n\x18gcp_cloudstorage_options\x18\x05 \x01(\x0b\x32:.mgmt.v1alpha1.GcpCloudStorageDestinationConnectionOptionsH\x00R\x16gcpCloudstorageOptions\x12`\n\x10\x64ynamodb_options\x18\x06 \x01(\x0b\x32\x33.mgmt.v1alpha1.DynamoDBDestinationConnectionOptionsH\x00R\x0f\x64ynamodbOptions\x12W\n\rmssql_options\x18\x07 \x01(\x0b\x32\x30.mgmt.v1alpha1.MssqlDestinationConnectionOptionsH\x00R\x0cmssqlOptionsB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"%\n#MongoDBDestinationConnectionOptions\"-\n+GcpCloudStorageDestinationConnectionOptions\"}\n$DynamoDBDestinationConnectionOptions\x12U\n\x0etable_mappings\x18\x01 \x03(\x0b\x32..mgmt.v1alpha1.DynamoDBDestinationTableMappingR\rtableMappings\"q\n\x1f\x44ynamoDBDestinationTableMapping\x12!\n\x0csource_table\x18\x01 \x01(\tR\x0bsourceTable\x12+\n\x11\x64\x65stination_table\x18\x02 \x01(\tR\x10\x64\x65stinationTable\"\xa4\x03\n$PostgresDestinationConnectionOptions\x12Q\n\x0etruncate_table\x18\x01 \x01(\x0b\x32*.mgmt.v1alpha1.PostgresTruncateTableConfigR\rtruncateTable\x12*\n\x11init_table_schema\x18\x02 \x01(\x08R\x0finitTableSchema\x12H\n\x0bon_conflict\x18\x03 \x01(\x0b\x32\'.mgmt.v1alpha1.PostgresOnConflictConfigR\nonConflict\x12=\n\x1bskip_foreign_key_violations\x18\x04 \x01(\x08R\x18skipForeignKeyViolations\x12\x30\n\x05\x62\x61tch\x18\x05 \x01(\x0b\x32\x1a.mgmt.v1alpha1.BatchConfigR\x05\x62\x61tch\x12\x30\n\rmax_in_flight\x18\x06 \x01(\rB\x07\xbaH\x04*\x02(\x01H\x00R\x0bmaxInFlight\x88\x01\x01\x42\x10\n\x0e_max_in_flight\"9\n\x18PostgresOnConflictConfig\x12\x1d\n\ndo_nothing\x18\x01 \x01(\x08R\tdoNothing\"m\n\x1bPostgresTruncateTableConfig\x12\x34\n\x16truncate_before_insert\x18\x01 \x01(\x08R\x14truncateBeforeInsert\x12\x18\n\x07\x63\x61scade\x18\x02 \x01(\x08R\x07\x63\x61scade\"\x9b\x03\n!MysqlDestinationConnectionOptions\x12N\n\x0etruncate_table\x18\x01 \x01(\x0b\x32\'.mgmt.v1alpha1.MysqlTruncateTableConfigR\rtruncateTable\x12*\n\x11init_table_schema\x18\x02 \x01(\x08R\x0finitTableSchema\x12\x45\n\x0bon_conflict\x18\x03 \x01(\x0b\x32$.mgmt.v1alpha1.MysqlOnConflictConfigR\nonConflict\x12=\n\x1bskip_foreign_key_violations\x18\x04 \x01(\x08R\x18skipForeignKeyViolations\x12\x30\n\x05\x62\x61tch\x18\x05 \x01(\x0b\x32\x1a.mgmt.v1alpha1.BatchConfigR\x05\x62\x61tch\x12\x30\n\rmax_in_flight\x18\x06 \x01(\rB\x07\xbaH\x04*\x02(\x01H\x00R\x0bmaxInFlight\x88\x01\x01\x42\x10\n\x0e_max_in_flight\"P\n\x18MysqlTruncateTableConfig\x12\x34\n\x16truncate_before_insert\x18\x01 \x01(\x08R\x14truncateBeforeInsert\"6\n\x15MysqlOnConflictConfig\x12\x1d\n\ndo_nothing\x18\x01 \x01(\x08R\tdoNothing\"\x9b\x03\n!MssqlDestinationConnectionOptions\x12N\n\x0etruncate_table\x18\x01 \x01(\x0b\x32\'.mgmt.v1alpha1.MssqlTruncateTableConfigR\rtruncateTable\x12*\n\x11init_table_schema\x18\x02 \x01(\x08R\x0finitTableSchema\x12\x45\n\x0bon_conflict\x18\x03 \x01(\x0b\x32$.mgmt.v1alpha1.MssqlOnConflictConfigR\nonConflict\x12=\n\x1bskip_foreign_key_violations\x18\x04 \x01(\x08R\x18skipForeignKeyViolations\x12\x30\n\x05\x62\x61tch\x18\x05 \x01(\x0b\x32\x1a.mgmt.v1alpha1.BatchConfigR\x05\x62\x61tch\x12\x30\n\rmax_in_flight\x18\x06 \x01(\rB\x07\xbaH\x04*\x02(\x01H\x00R\x0bmaxInFlight\x88\x01\x01\x42\x10\n\x0e_max_in_flight\"P\n\x18MssqlTruncateTableConfig\x12\x34\n\x16truncate_before_insert\x18\x01 \x01(\x08R\x14truncateBeforeInsert\"6\n\x15MssqlOnConflictConfig\x12\x1d\n\ndo_nothing\x18\x01 \x01(\x08R\tdoNothing\"\xb9\x04\n!AwsS3DestinationConnectionOptions\x12\x62\n\rstorage_class\x18\x01 \x01(\x0e\x32=.mgmt.v1alpha1.AwsS3DestinationConnectionOptions.StorageClassR\x0cstorageClass\x12\x30\n\rmax_in_flight\x18\x02 \x01(\rB\x07\xbaH\x04*\x02(\x01H\x00R\x0bmaxInFlight\x88\x01\x01\x12\x1d\n\x07timeout\x18\x03 \x01(\tH\x01R\x07timeout\x88\x01\x01\x12\x30\n\x05\x62\x61tch\x18\x04 \x01(\x0b\x32\x1a.mgmt.v1alpha1.BatchConfigR\x05\x62\x61tch\"\x8e\x02\n\x0cStorageClass\x12\x1d\n\x19STORAGE_CLASS_UNSPECIFIED\x10\x00\x12\x1a\n\x16STORAGE_CLASS_STANDARD\x10\x01\x12$\n STORAGE_CLASS_REDUCED_REDUNDANCY\x10\x02\x12\x19\n\x15STORAGE_CLASS_GLACIER\x10\x03\x12\x1d\n\x19STORAGE_CLASS_STANDARD_IA\x10\x04\x12\x1c\n\x18STORAGE_CLASS_ONEZONE_IA\x10\x05\x12%\n!STORAGE_CLASS_INTELLIGENT_TIERING\x10\x06\x12\x1e\n\x1aSTORAGE_CLASS_DEEP_ARCHIVE\x10\x07\x42\x10\n\x0e_max_in_flightB\n\n\x08_timeout\"Z\n\x0b\x42\x61tchConfig\x12\x19\n\x05\x63ount\x18\x01 \x01(\rH\x00R\x05\x63ount\x88\x01\x01\x12\x1b\n\x06period\x18\x02 \x01(\tH\x01R\x06period\x88\x01\x01\x42\x08\n\x06_countB\t\n\x07_period\"\xf2\x04\n\x10\x43reateJobRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x34\n\x08job_name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x07jobName\x12(\n\rcron_schedule\x18\x03 \x01(\tH\x00R\x0c\x63ronSchedule\x88\x01\x01\x12\x35\n\x08mappings\x18\x04 \x03(\x0b\x32\x19.mgmt.v1alpha1.JobMappingR\x08mappings\x12\x30\n\x06source\x18\x05 \x01(\x0b\x32\x18.mgmt.v1alpha1.JobSourceR\x06source\x12G\n\x0c\x64\x65stinations\x18\x06 \x03(\x0b\x32#.mgmt.v1alpha1.CreateJobDestinationR\x0c\x64\x65stinations\x12(\n\x10initiate_job_run\x18\x07 \x01(\x08R\x0einitiateJobRun\x12I\n\x10workflow_options\x18\x08 \x01(\x0b\x32\x1e.mgmt.v1alpha1.WorkflowOptionsR\x0fworkflowOptions\x12\x41\n\x0csync_options\x18\t \x01(\x0b\x32\x1e.mgmt.v1alpha1.ActivityOptionsR\x0bsyncOptions\x12Y\n\x14virtual_foreign_keys\x18\n \x03(\x0b\x32\'.mgmt.v1alpha1.VirtualForeignConstraintR\x12virtualForeignKeysB\x10\n\x0e_cron_schedule\"G\n\x0fWorkflowOptions\x12$\n\x0brun_timeout\x18\x08 \x01(\x03H\x00R\nrunTimeout\x88\x01\x01\x42\x0e\n\x0c_run_timeout\"\x95\x02\n\x0f\x41\x63tivityOptions\x12G\n\x19schedule_to_close_timeout\x18\x01 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x01H\x00R\x16scheduleToCloseTimeout\x88\x01\x01\x12\x41\n\x16start_to_close_timeout\x18\x02 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x01H\x01R\x13startToCloseTimeout\x88\x01\x01\x12=\n\x0cretry_policy\x18\x03 \x01(\x0b\x32\x1a.mgmt.v1alpha1.RetryPolicyR\x0bretryPolicyB\x1c\n\x1a_schedule_to_close_timeoutB\x19\n\x17_start_to_close_timeout\"[\n\x0bRetryPolicy\x12\x37\n\x10maximum_attempts\x18\x01 \x01(\x05\x42\x07\xbaH\x04\x1a\x02(\x00H\x00R\x0fmaximumAttempts\x88\x01\x01\x42\x13\n\x11_maximum_attempts\"9\n\x11\x43reateJobResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"W\n\x15JobMappingTransformer\x12\x38\n\x06\x63onfig\x18\x03 \x01(\x0b\x32 .mgmt.v1alpha1.TransformerConfigR\x06\x63onfigJ\x04\x08\x01\x10\x02\"\x9a\x01\n\nJobMapping\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\x12\x16\n\x06\x63olumn\x18\x03 \x01(\tR\x06\x63olumn\x12\x46\n\x0btransformer\x18\x05 \x01(\x0b\x32$.mgmt.v1alpha1.JobMappingTransformerR\x0btransformer\")\n\rGetJobRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"6\n\x0eGetJobResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"p\n\x18UpdateJobScheduleRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12(\n\rcron_schedule\x18\x02 \x01(\tH\x00R\x0c\x63ronSchedule\x88\x01\x01\x42\x10\n\x0e_cron_schedule\"A\n\x19UpdateJobScheduleResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"c\n\x0fPauseJobRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x14\n\x05pause\x18\x02 \x01(\x08R\x05pause\x12\x17\n\x04note\x18\x03 \x01(\tH\x00R\x04note\x88\x01\x01\x42\x07\n\x05_note\"8\n\x10PauseJobResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"\x80\x02\n UpdateJobSourceConnectionRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x30\n\x06source\x18\x02 \x01(\x0b\x32\x18.mgmt.v1alpha1.JobSourceR\x06source\x12\x35\n\x08mappings\x18\x03 \x03(\x0b\x32\x19.mgmt.v1alpha1.JobMappingR\x08mappings\x12Y\n\x14virtual_foreign_keys\x18\x04 \x03(\x0b\x32\'.mgmt.v1alpha1.VirtualForeignConstraintR\x12virtualForeignKeys\"I\n!UpdateJobSourceConnectionResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"r\n\x1aPostgresSourceSchemaSubset\x12T\n\x10postgres_schemas\x18\x01 \x03(\x0b\x32).mgmt.v1alpha1.PostgresSourceSchemaOptionR\x0fpostgresSchemas\"f\n\x17MysqlSourceSchemaSubset\x12K\n\rmysql_schemas\x18\x01 \x03(\x0b\x32&.mgmt.v1alpha1.MysqlSourceSchemaOptionR\x0cmysqlSchemas\"^\n\x1a\x44ynamoDBSourceSchemaSubset\x12@\n\x06tables\x18\x01 \x03(\x0b\x32(.mgmt.v1alpha1.DynamoDBSourceTableOptionR\x06tables\"f\n\x17MssqlSourceSchemaSubset\x12K\n\rmssql_schemas\x18\x01 \x03(\x0b\x32&.mgmt.v1alpha1.MssqlSourceSchemaOptionR\x0cmssqlSchemas\"\xf2\x02\n\x18JobSourceSqlSubetSchemas\x12T\n\x0fpostgres_subset\x18\x02 \x01(\x0b\x32).mgmt.v1alpha1.PostgresSourceSchemaSubsetH\x00R\x0epostgresSubset\x12K\n\x0cmysql_subset\x18\x03 \x01(\x0b\x32&.mgmt.v1alpha1.MysqlSourceSchemaSubsetH\x00R\x0bmysqlSubset\x12T\n\x0f\x64ynamodb_subset\x18\x04 \x01(\x0b\x32).mgmt.v1alpha1.DynamoDBSourceSchemaSubsetH\x00R\x0e\x64ynamodbSubset\x12K\n\x0cmssql_subset\x18\x05 \x01(\x0b\x32&.mgmt.v1alpha1.MssqlSourceSchemaSubsetH\x00R\x0bmssqlSubsetB\x10\n\x07schemas\x12\x05\xbaH\x02\x08\x01\"\xd0\x01\n\'SetJobSourceSqlConnectionSubsetsRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x41\n\x07schemas\x18\x02 \x01(\x0b\x32\'.mgmt.v1alpha1.JobSourceSqlSubetSchemasR\x07schemas\x12H\n!subset_by_foreign_key_constraints\x18\x03 \x01(\x08R\x1dsubsetByForeignKeyConstraints\"P\n(SetJobSourceSqlConnectionSubsetsResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"\xde\x01\n%UpdateJobDestinationConnectionRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\x12-\n\rconnection_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12>\n\x07options\x18\x03 \x01(\x0b\x32$.mgmt.v1alpha1.JobDestinationOptionsR\x07options\x12%\n\x0e\x64\x65stination_id\x18\x04 \x01(\tR\rdestinationId\"N\n&UpdateJobDestinationConnectionResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"X\n%DeleteJobDestinationConnectionRequest\x12/\n\x0e\x64\x65stination_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\rdestinationId\"(\n&DeleteJobDestinationConnectionResponse\"\x92\x01\n&CreateJobDestinationConnectionsRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\x12G\n\x0c\x64\x65stinations\x18\x02 \x03(\x0b\x32#.mgmt.v1alpha1.CreateJobDestinationR\x0c\x64\x65stinations\"O\n\'CreateJobDestinationConnectionsResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\",\n\x10\x44\x65leteJobRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"\x13\n\x11\x44\x65leteJobResponse\"s\n\x19IsJobNameAvailableRequest\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"?\n\x1aIsJobNameAvailableResponse\x12!\n\x0cis_available\x18\x01 \x01(\x08R\x0bisAvailable\"g\n\x11GetJobRunsRequest\x12!\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12)\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\taccountIdB\x04\n\x02id\"F\n\x12GetJobRunsResponse\x12\x30\n\x08job_runs\x18\x01 \x03(\x0b\x32\x15.mgmt.v1alpha1.JobRunR\x07jobRuns\"Y\n\x10GetJobRunRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"C\n\x11GetJobRunResponse\x12.\n\x07job_run\x18\x01 \x01(\x0b\x32\x15.mgmt.v1alpha1.JobRunR\x06jobRun\"6\n\x13\x43reateJobRunRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\"\x16\n\x14\x43reateJobRunResponse\"\\\n\x13\x43\x61ncelJobRunRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\x16\n\x14\x43\x61ncelJobRunResponse\"\xe9\x05\n\x03Job\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12+\n\x12\x63reated_by_user_id\x18\x02 \x01(\tR\x0f\x63reatedByUserId\x12\x39\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12+\n\x12updated_by_user_id\x18\x04 \x01(\tR\x0fupdatedByUserId\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x12\n\x04name\x18\x06 \x01(\tR\x04name\x12\x30\n\x06source\x18\x07 \x01(\x0b\x32\x18.mgmt.v1alpha1.JobSourceR\x06source\x12\x41\n\x0c\x64\x65stinations\x18\x08 \x03(\x0b\x32\x1d.mgmt.v1alpha1.JobDestinationR\x0c\x64\x65stinations\x12\x35\n\x08mappings\x18\t \x03(\x0b\x32\x19.mgmt.v1alpha1.JobMappingR\x08mappings\x12(\n\rcron_schedule\x18\n \x01(\tH\x00R\x0c\x63ronSchedule\x88\x01\x01\x12\x1d\n\naccount_id\x18\x0b \x01(\tR\taccountId\x12\x41\n\x0csync_options\x18\x0c \x01(\x0b\x32\x1e.mgmt.v1alpha1.ActivityOptionsR\x0bsyncOptions\x12I\n\x10workflow_options\x18\r \x01(\x0b\x32\x1e.mgmt.v1alpha1.WorkflowOptionsR\x0fworkflowOptions\x12Y\n\x14virtual_foreign_keys\x18\x0e \x03(\x0b\x32\'.mgmt.v1alpha1.VirtualForeignConstraintR\x12virtualForeignKeysB\x10\n\x0e_cron_schedule\"g\n\x0cJobRecentRun\x12\x39\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x1c\n\njob_run_id\x18\x02 \x01(\tR\x08jobRunId\":\n\x17GetJobRecentRunsRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\"X\n\x18GetJobRecentRunsResponse\x12<\n\x0brecent_runs\x18\x01 \x03(\x0b\x32\x1b.mgmt.v1alpha1.JobRecentRunR\nrecentRuns\"O\n\x0bJobNextRuns\x12@\n\x0enext_run_times\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.TimestampR\x0cnextRunTimes\".\n\x15GetJobNextRunsRequest\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\"Q\n\x16GetJobNextRunsResponse\x12\x37\n\tnext_runs\x18\x01 \x01(\x0b\x32\x1a.mgmt.v1alpha1.JobNextRunsR\x08nextRuns\",\n\x13GetJobStatusRequest\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\"H\n\x14GetJobStatusResponse\x12\x30\n\x06status\x18\x01 \x01(\x0e\x32\x18.mgmt.v1alpha1.JobStatusR\x06status\"Z\n\x0fJobStatusRecord\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\x12\x30\n\x06status\x18\x02 \x01(\x0e\x32\x18.mgmt.v1alpha1.JobStatusR\x06status\"@\n\x15GetJobStatusesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"T\n\x16GetJobStatusesResponse\x12:\n\x08statuses\x18\x01 \x03(\x0b\x32\x1e.mgmt.v1alpha1.JobStatusRecordR\x08statuses\"+\n\x0f\x41\x63tivityFailure\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\"\xc6\x01\n\x0fPendingActivity\x12\x35\n\x06status\x18\x01 \x01(\x0e\x32\x1d.mgmt.v1alpha1.ActivityStatusR\x06status\x12#\n\ractivity_name\x18\x02 \x01(\tR\x0c\x61\x63tivityName\x12\x46\n\x0clast_failure\x18\x03 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ActivityFailureH\x00R\x0blastFailure\x88\x01\x01\x42\x0f\n\r_last_failure\"\xd7\x02\n\x06JobRun\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06job_id\x18\x02 \x01(\tR\x05jobId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x33\n\x06status\x18\x04 \x01(\x0e\x32\x1b.mgmt.v1alpha1.JobRunStatusR\x06status\x12\x39\n\nstarted_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartedAt\x12\x42\n\x0c\x63ompleted_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\x0b\x63ompletedAt\x88\x01\x01\x12M\n\x12pending_activities\x18\x08 \x03(\x0b\x32\x1e.mgmt.v1alpha1.PendingActivityR\x11pendingActivitiesB\x0f\n\r_completed_at\"Q\n\x14JobRunEventTaskError\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\x12\x1f\n\x0bretry_state\x18\x02 \x01(\tR\nretryState\"\xab\x01\n\x0fJobRunEventTask\x12\x0e\n\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n\x04type\x18\x02 \x01(\tR\x04type\x12\x39\n\nevent_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\teventTime\x12\x39\n\x05\x65rror\x18\x04 \x01(\x0b\x32#.mgmt.v1alpha1.JobRunEventTaskErrorR\x05\x65rror\"B\n\x12JobRunSyncMetadata\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\"r\n\x13JobRunEventMetadata\x12H\n\rsync_metadata\x18\x01 \x01(\x0b\x32!.mgmt.v1alpha1.JobRunSyncMetadataH\x00R\x0csyncMetadataB\x11\n\x08metadata\x12\x05\xbaH\x02\x08\x01\"\x9d\x02\n\x0bJobRunEvent\x12\x0e\n\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n\x04type\x18\x02 \x01(\tR\x04type\x12\x39\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x39\n\nclose_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcloseTime\x12>\n\x08metadata\x18\x05 \x01(\x0b\x32\".mgmt.v1alpha1.JobRunEventMetadataR\x08metadata\x12\x34\n\x05tasks\x18\x06 \x03(\x0b\x32\x1e.mgmt.v1alpha1.JobRunEventTaskR\x05tasks\"_\n\x16GetJobRunEventsRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"u\n\x17GetJobRunEventsResponse\x12\x32\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.JobRunEventR\x06\x65vents\x12&\n\x0fis_run_complete\x18\x02 \x01(\x08R\risRunComplete\"\\\n\x13\x44\x65leteJobRunRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\x16\n\x14\x44\x65leteJobRunResponse\"_\n\x16TerminateJobRunRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\x19\n\x17TerminateJobRunResponse\"\xb2\x02\n\x1aGetJobRunLogsStreamRequest\x12\x1c\n\njob_run_id\x18\x01 \x01(\tR\x08jobRunId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x30\n\x06window\x18\x03 \x01(\x0e\x32\x18.mgmt.v1alpha1.LogWindowR\x06window\x12\x1f\n\x0bshould_tail\x18\x04 \x01(\x08R\nshouldTail\x12\x30\n\rmax_log_lines\x18\x05 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x01H\x00R\x0bmaxLogLines\x88\x01\x01\x12\x36\n\nlog_levels\x18\x06 \x03(\x0e\x32\x17.mgmt.v1alpha1.LogLevelR\tlogLevelsB\x10\n\x0e_max_log_lines\"\x85\x01\n\x1bGetJobRunLogsStreamResponse\x12\x19\n\x08log_line\x18\x01 \x01(\tR\x07logLine\x12=\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\ttimestamp\x88\x01\x01\x42\x0c\n\n_timestamp\"\x83\x01\n\x1cSetJobWorkflowOptionsRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12I\n\x10worfklow_options\x18\x02 \x01(\x0b\x32\x1e.mgmt.v1alpha1.WorkflowOptionsR\x0fworfklowOptions\"E\n\x1dSetJobWorkflowOptionsResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"w\n\x18SetJobSyncOptionsRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x41\n\x0csync_options\x18\x02 \x01(\x0b\x32\x1e.mgmt.v1alpha1.ActivityOptionsR\x0bsyncOptions\"A\n\x19SetJobSyncOptionsResponse\x12$\n\x03job\x18\x01 \x01(\x0b\x32\x12.mgmt.v1alpha1.JobR\x03job\"\xfc\x01\n\x1aValidateJobMappingsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x35\n\x08mappings\x18\x02 \x03(\x0b\x32\x19.mgmt.v1alpha1.JobMappingR\x08mappings\x12#\n\rconnection_id\x18\x03 \x01(\tR\x0c\x63onnectionId\x12Y\n\x14virtual_foreign_keys\x18\x04 \x03(\x0b\x32\'.mgmt.v1alpha1.VirtualForeignConstraintR\x12virtualForeignKeys\"k\n\x0b\x43olumnError\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\x12\x16\n\x06\x63olumn\x18\x03 \x01(\tR\x06\x63olumn\x12\x16\n\x06\x65rrors\x18\x04 \x03(\tR\x06\x65rrors\"\'\n\rDatabaseError\x12\x16\n\x06\x65rrors\x18\x01 \x03(\tR\x06\x65rrors\"\xa5\x01\n\x1bValidateJobMappingsResponse\x12?\n\rcolumn_errors\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.ColumnErrorR\x0c\x63olumnErrors\x12\x45\n\x0f\x64\x61tabase_errors\x18\x02 \x01(\x0b\x32\x1c.mgmt.v1alpha1.DatabaseErrorR\x0e\x64\x61tabaseErrors\"[\n\x11VirtualForeignKey\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\x12\x18\n\x07\x63olumns\x18\x03 \x03(\tR\x07\x63olumns\"\xa5\x01\n\x18VirtualForeignConstraint\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x14\n\x05table\x18\x02 \x01(\tR\x05table\x12\x18\n\x07\x63olumns\x18\x03 \x03(\tR\x07\x63olumns\x12\x41\n\x0b\x66oreign_key\x18\x04 \x01(\x0b\x32 .mgmt.v1alpha1.VirtualForeignKeyR\nforeignKey\"\x88\x01\n\rRunContextKey\x12%\n\njob_run_id\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x08jobRunId\x12(\n\x0b\x65xternal_id\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\nexternalId\x12&\n\naccount_id\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\taccountId\"D\n\x14GetRunContextRequest\x12,\n\x02id\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.RunContextKeyR\x02id\"-\n\x15GetRunContextResponse\x12\x14\n\x05value\x18\x01 \x01(\x0cR\x05value\"Z\n\x14SetRunContextRequest\x12,\n\x02id\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.RunContextKeyR\x02id\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value\"\x17\n\x15SetRunContextResponse\"[\n\x15SetRunContextsRequest\x12,\n\x02id\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.RunContextKeyR\x02id\x12\x14\n\x05value\x18\x02 \x01(\x0cR\x05value\"\x18\n\x16SetRunContextsResponse\"\xad\x03\n\x07JobHook\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x15\n\x06job_id\x18\x04 \x01(\tR\x05jobId\x12\x34\n\x06\x63onfig\x18\x05 \x01(\x0b\x32\x1c.mgmt.v1alpha1.JobHookConfigR\x06\x63onfig\x12+\n\x12\x63reated_by_user_id\x18\x06 \x01(\tR\x0f\x63reatedByUserId\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12+\n\x12updated_by_user_id\x18\x08 \x01(\tR\x0fupdatedByUserId\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x18\n\x07\x65nabled\x18\n \x01(\x08R\x07\x65nabled\x12%\n\x08priority\x18\x0b \x01(\rB\t\xbaH\x06*\x04\x18\x64(\x00R\x08priority\"\xdd\x01\n\nNewJobHook\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12)\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x0b\x64\x65scription\x12\x34\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x1c.mgmt.v1alpha1.JobHookConfigR\x06\x63onfig\x12\x18\n\x07\x65nabled\x18\x04 \x01(\x08R\x07\x65nabled\x12%\n\x08priority\x18\x05 \x01(\rB\t\xbaH\x06*\x04\x18\x64(\x00R\x08priority\"\xa5\x03\n\rJobHookConfig\x12;\n\x03sql\x18\x05 \x01(\x0b\x32\'.mgmt.v1alpha1.JobHookConfig.JobSqlHookH\x00R\x03sql\x1a\xc5\x02\n\nJobSqlHook\x12\x1d\n\x05query\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05query\x12-\n\rconnection_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0c\x63onnectionId\x12\x46\n\x06timing\x18\x03 \x01(\x0b\x32..mgmt.v1alpha1.JobHookConfig.JobSqlHook.TimingR\x06timing\x1a\xa0\x01\n\x06Timing\x12@\n\x08pre_sync\x18\x03 \x01(\x0b\x32#.mgmt.v1alpha1.JobHookTimingPreSyncH\x00R\x07preSync\x12\x43\n\tpost_sync\x18\x04 \x01(\x0b\x32$.mgmt.v1alpha1.JobHookTimingPostSyncH\x00R\x08postSyncB\x0f\n\x06timing\x12\x05\xbaH\x02\x08\x01\x42\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\x16\n\x14JobHookTimingPreSync\"\x17\n\x15JobHookTimingPostSync\"5\n\x12GetJobHooksRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\"C\n\x13GetJobHooksResponse\x12,\n\x05hooks\x18\x01 \x03(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x05hooks\"-\n\x11GetJobHookRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"@\n\x12GetJobHookResponse\x12*\n\x04hook\x18\x01 \x01(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x04hook\"\\\n\x14\x43reateJobHookRequest\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\x12-\n\x04hook\x18\x02 \x01(\x0b\x32\x19.mgmt.v1alpha1.NewJobHookR\x04hook\"C\n\x15\x43reateJobHookResponse\x12*\n\x04hook\x18\x01 \x01(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x04hook\"0\n\x14\x44\x65leteJobHookRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"\x17\n\x15\x44\x65leteJobHookResponse\"J\n\x1dIsJobHookNameAvailableRequest\x12\x15\n\x06job_id\x18\x01 \x01(\tR\x05jobId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"C\n\x1eIsJobHookNameAvailableResponse\x12!\n\x0cis_available\x18\x01 \x01(\x08R\x0bisAvailable\"\x81\x02\n\x14UpdateJobHookRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12-\n\x04name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12)\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x0b\x64\x65scription\x12\x34\n\x06\x63onfig\x18\x04 \x01(\x0b\x32\x1c.mgmt.v1alpha1.JobHookConfigR\x06\x63onfig\x12\x18\n\x07\x65nabled\x18\x05 \x01(\x08R\x07\x65nabled\x12%\n\x08priority\x18\x06 \x01(\rB\t\xbaH\x06*\x04\x18\x64(\x00R\x08priority\"C\n\x15UpdateJobHookResponse\x12*\n\x04hook\x18\x01 \x01(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x04hook\"N\n\x18SetJobHookEnabledRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x18\n\x07\x65nabled\x18\x02 \x01(\x08R\x07\x65nabled\"G\n\x19SetJobHookEnabledResponse\x12*\n\x04hook\x18\x01 \x01(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x04hook\"\xde\x01\n GetActiveJobHooksByTimingRequest\x12\x1f\n\x06job_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\x12N\n\x06timing\x18\x02 \x01(\x0e\x32\x36.mgmt.v1alpha1.GetActiveJobHooksByTimingRequest.TimingR\x06timing\"I\n\x06Timing\x12\x16\n\x12TIMING_UNSPECIFIED\x10\x00\x12\x12\n\x0eTIMING_PRESYNC\x10\x01\x12\x13\n\x0fTIMING_POSTSYNC\x10\x02\"Q\n!GetActiveJobHooksByTimingResponse\x12,\n\x05hooks\x18\x01 \x03(\x0b\x32\x16.mgmt.v1alpha1.JobHookR\x05hooks*o\n\tJobStatus\x12\x1a\n\x16JOB_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12JOB_STATUS_ENABLED\x10\x01\x12\x15\n\x11JOB_STATUS_PAUSED\x10\x03\x12\x17\n\x13JOB_STATUS_DISABLED\x10\x04*\xa7\x01\n\x0e\x41\x63tivityStatus\x12\x1f\n\x1b\x41\x43TIVITY_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x43TIVITY_STATUS_SCHEDULED\x10\x01\x12\x1b\n\x17\x41\x43TIVITY_STATUS_STARTED\x10\x02\x12\x1c\n\x18\x41\x43TIVITY_STATUS_CANCELED\x10\x03\x12\x1a\n\x16\x41\x43TIVITY_STATUS_FAILED\x10\x04*\x92\x02\n\x0cJobRunStatus\x12\x1e\n\x1aJOB_RUN_STATUS_UNSPECIFIED\x10\x00\x12\x1a\n\x16JOB_RUN_STATUS_PENDING\x10\x01\x12\x1a\n\x16JOB_RUN_STATUS_RUNNING\x10\x02\x12\x1b\n\x17JOB_RUN_STATUS_COMPLETE\x10\x03\x12\x18\n\x14JOB_RUN_STATUS_ERROR\x10\x04\x12\x1b\n\x17JOB_RUN_STATUS_CANCELED\x10\x05\x12\x1d\n\x19JOB_RUN_STATUS_TERMINATED\x10\x06\x12\x19\n\x15JOB_RUN_STATUS_FAILED\x10\x07\x12\x1c\n\x18JOB_RUN_STATUS_TIMED_OUT\x10\x08*|\n\tLogWindow\x12\"\n\x1eLOG_WINDOW_NO_TIME_UNSPECIFIED\x10\x00\x12\x1a\n\x16LOG_WINDOW_FIFTEEN_MIN\x10\x01\x12\x17\n\x13LOG_WINDOW_ONE_HOUR\x10\x02\x12\x16\n\x12LOG_WINDOW_ONE_DAY\x10\x03*w\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\x13\n\x0fLOG_LEVEL_DEBUG\x10\x01\x12\x12\n\x0eLOG_LEVEL_INFO\x10\x02\x12\x12\n\x0eLOG_LEVEL_WARN\x10\x03\x12\x13\n\x0fLOG_LEVEL_ERROR\x10\x04\x32\xd1\x1e\n\nJobService\x12J\n\x07GetJobs\x12\x1d.mgmt.v1alpha1.GetJobsRequest\x1a\x1e.mgmt.v1alpha1.GetJobsResponse\"\x00\x12G\n\x06GetJob\x12\x1c.mgmt.v1alpha1.GetJobRequest\x1a\x1d.mgmt.v1alpha1.GetJobResponse\"\x00\x12P\n\tCreateJob\x12\x1f.mgmt.v1alpha1.CreateJobRequest\x1a .mgmt.v1alpha1.CreateJobResponse\"\x00\x12P\n\tDeleteJob\x12\x1f.mgmt.v1alpha1.DeleteJobRequest\x1a .mgmt.v1alpha1.DeleteJobResponse\"\x00\x12k\n\x12IsJobNameAvailable\x12(.mgmt.v1alpha1.IsJobNameAvailableRequest\x1a).mgmt.v1alpha1.IsJobNameAvailableResponse\"\x00\x12h\n\x11UpdateJobSchedule\x12\'.mgmt.v1alpha1.UpdateJobScheduleRequest\x1a(.mgmt.v1alpha1.UpdateJobScheduleResponse\"\x00\x12\x80\x01\n\x19UpdateJobSourceConnection\x12/.mgmt.v1alpha1.UpdateJobSourceConnectionRequest\x1a\x30.mgmt.v1alpha1.UpdateJobSourceConnectionResponse\"\x00\x12\x95\x01\n SetJobSourceSqlConnectionSubsets\x12\x36.mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsRequest\x1a\x37.mgmt.v1alpha1.SetJobSourceSqlConnectionSubsetsResponse\"\x00\x12\x8f\x01\n\x1eUpdateJobDestinationConnection\x12\x34.mgmt.v1alpha1.UpdateJobDestinationConnectionRequest\x1a\x35.mgmt.v1alpha1.UpdateJobDestinationConnectionResponse\"\x00\x12\x8f\x01\n\x1e\x44\x65leteJobDestinationConnection\x12\x34.mgmt.v1alpha1.DeleteJobDestinationConnectionRequest\x1a\x35.mgmt.v1alpha1.DeleteJobDestinationConnectionResponse\"\x00\x12\x92\x01\n\x1f\x43reateJobDestinationConnections\x12\x35.mgmt.v1alpha1.CreateJobDestinationConnectionsRequest\x1a\x36.mgmt.v1alpha1.CreateJobDestinationConnectionsResponse\"\x00\x12M\n\x08PauseJob\x12\x1e.mgmt.v1alpha1.PauseJobRequest\x1a\x1f.mgmt.v1alpha1.PauseJobResponse\"\x00\x12\x65\n\x10GetJobRecentRuns\x12&.mgmt.v1alpha1.GetJobRecentRunsRequest\x1a\'.mgmt.v1alpha1.GetJobRecentRunsResponse\"\x00\x12_\n\x0eGetJobNextRuns\x12$.mgmt.v1alpha1.GetJobNextRunsRequest\x1a%.mgmt.v1alpha1.GetJobNextRunsResponse\"\x00\x12Y\n\x0cGetJobStatus\x12\".mgmt.v1alpha1.GetJobStatusRequest\x1a#.mgmt.v1alpha1.GetJobStatusResponse\"\x00\x12_\n\x0eGetJobStatuses\x12$.mgmt.v1alpha1.GetJobStatusesRequest\x1a%.mgmt.v1alpha1.GetJobStatusesResponse\"\x00\x12S\n\nGetJobRuns\x12 .mgmt.v1alpha1.GetJobRunsRequest\x1a!.mgmt.v1alpha1.GetJobRunsResponse\"\x00\x12\x62\n\x0fGetJobRunEvents\x12%.mgmt.v1alpha1.GetJobRunEventsRequest\x1a&.mgmt.v1alpha1.GetJobRunEventsResponse\"\x00\x12P\n\tGetJobRun\x12\x1f.mgmt.v1alpha1.GetJobRunRequest\x1a .mgmt.v1alpha1.GetJobRunResponse\"\x00\x12Y\n\x0c\x44\x65leteJobRun\x12\".mgmt.v1alpha1.DeleteJobRunRequest\x1a#.mgmt.v1alpha1.DeleteJobRunResponse\"\x00\x12Y\n\x0c\x43reateJobRun\x12\".mgmt.v1alpha1.CreateJobRunRequest\x1a#.mgmt.v1alpha1.CreateJobRunResponse\"\x00\x12Y\n\x0c\x43\x61ncelJobRun\x12\".mgmt.v1alpha1.CancelJobRunRequest\x1a#.mgmt.v1alpha1.CancelJobRunResponse\"\x00\x12\x62\n\x0fTerminateJobRun\x12%.mgmt.v1alpha1.TerminateJobRunRequest\x1a&.mgmt.v1alpha1.TerminateJobRunResponse\"\x00\x12p\n\x13GetJobRunLogsStream\x12).mgmt.v1alpha1.GetJobRunLogsStreamRequest\x1a*.mgmt.v1alpha1.GetJobRunLogsStreamResponse\"\x00\x30\x01\x12t\n\x15SetJobWorkflowOptions\x12+.mgmt.v1alpha1.SetJobWorkflowOptionsRequest\x1a,.mgmt.v1alpha1.SetJobWorkflowOptionsResponse\"\x00\x12h\n\x11SetJobSyncOptions\x12\'.mgmt.v1alpha1.SetJobSyncOptionsRequest\x1a(.mgmt.v1alpha1.SetJobSyncOptionsResponse\"\x00\x12n\n\x13ValidateJobMappings\x12).mgmt.v1alpha1.ValidateJobMappingsRequest\x1a*.mgmt.v1alpha1.ValidateJobMappingsResponse\"\x00\x12\\\n\rGetRunContext\x12#.mgmt.v1alpha1.GetRunContextRequest\x1a$.mgmt.v1alpha1.GetRunContextResponse\"\x00\x12\\\n\rSetRunContext\x12#.mgmt.v1alpha1.SetRunContextRequest\x1a$.mgmt.v1alpha1.SetRunContextResponse\"\x00\x12\x61\n\x0eSetRunContexts\x12$.mgmt.v1alpha1.SetRunContextsRequest\x1a%.mgmt.v1alpha1.SetRunContextsResponse\"\x00(\x01\x12V\n\x0bGetJobHooks\x12!.mgmt.v1alpha1.GetJobHooksRequest\x1a\".mgmt.v1alpha1.GetJobHooksResponse\"\x00\x12S\n\nGetJobHook\x12 .mgmt.v1alpha1.GetJobHookRequest\x1a!.mgmt.v1alpha1.GetJobHookResponse\"\x00\x12\\\n\rCreateJobHook\x12#.mgmt.v1alpha1.CreateJobHookRequest\x1a$.mgmt.v1alpha1.CreateJobHookResponse\"\x00\x12\\\n\rDeleteJobHook\x12#.mgmt.v1alpha1.DeleteJobHookRequest\x1a$.mgmt.v1alpha1.DeleteJobHookResponse\"\x00\x12w\n\x16IsJobHookNameAvailable\x12,.mgmt.v1alpha1.IsJobHookNameAvailableRequest\x1a-.mgmt.v1alpha1.IsJobHookNameAvailableResponse\"\x00\x12\\\n\rUpdateJobHook\x12#.mgmt.v1alpha1.UpdateJobHookRequest\x1a$.mgmt.v1alpha1.UpdateJobHookResponse\"\x00\x12h\n\x11SetJobHookEnabled\x12\'.mgmt.v1alpha1.SetJobHookEnabledRequest\x1a(.mgmt.v1alpha1.SetJobHookEnabledResponse\"\x00\x12\x80\x01\n\x19GetActiveJobHooksByTiming\x12/.mgmt.v1alpha1.GetActiveJobHooksByTimingRequest\x1a\x30.mgmt.v1alpha1.GetActiveJobHooksByTimingResponse\"\x00\x42\xc4\x01\n\x11\x63om.mgmt.v1alpha1B\x08JobProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -205,16 +205,16 @@ _globals['_SETJOBHOOKENABLEDREQUEST'].fields_by_name['id']._serialized_options = b'\272H\005r\003\260\001\001' _globals['_GETACTIVEJOBHOOKSBYTIMINGREQUEST'].fields_by_name['job_id']._loaded_options = None _globals['_GETACTIVEJOBHOOKSBYTIMINGREQUEST'].fields_by_name['job_id']._serialized_options = b'\272H\005r\003\260\001\001' - _globals['_JOBSTATUS']._serialized_start=21397 - _globals['_JOBSTATUS']._serialized_end=21508 - _globals['_ACTIVITYSTATUS']._serialized_start=21511 - _globals['_ACTIVITYSTATUS']._serialized_end=21678 - _globals['_JOBRUNSTATUS']._serialized_start=21681 - _globals['_JOBRUNSTATUS']._serialized_end=21955 - _globals['_LOGWINDOW']._serialized_start=21957 - _globals['_LOGWINDOW']._serialized_end=22081 - _globals['_LOGLEVEL']._serialized_start=22083 - _globals['_LOGLEVEL']._serialized_end=22202 + _globals['_JOBSTATUS']._serialized_start=21251 + _globals['_JOBSTATUS']._serialized_end=21362 + _globals['_ACTIVITYSTATUS']._serialized_start=21365 + _globals['_ACTIVITYSTATUS']._serialized_end=21532 + _globals['_JOBRUNSTATUS']._serialized_start=21535 + _globals['_JOBRUNSTATUS']._serialized_end=21809 + _globals['_LOGWINDOW']._serialized_start=21811 + _globals['_LOGWINDOW']._serialized_end=21935 + _globals['_LOGLEVEL']._serialized_start=21937 + _globals['_LOGLEVEL']._serialized_end=22056 _globals['_GETJOBSREQUEST']._serialized_start=137 _globals['_GETJOBSREQUEST']._serialized_end=194 _globals['_GETJOBSRESPONSE']._serialized_start=196 @@ -248,283 +248,283 @@ _globals['_DYNAMODBSOURCETABLEOPTION']._serialized_start=3005 _globals['_DYNAMODBSOURCETABLEOPTION']._serialized_end=3120 _globals['_POSTGRESSOURCECONNECTIONOPTIONS']._serialized_start=3123 - _globals['_POSTGRESSOURCECONNECTIONOPTIONS']._serialized_end=3871 - _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY']._serialized_start=3556 - _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY']._serialized_end=3839 - _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY_HALTJOB']._serialized_start=3807 - _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY_HALTJOB']._serialized_end=3816 - _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY_AUTOMAP']._serialized_start=3818 - _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY_AUTOMAP']._serialized_end=3827 - _globals['_POSTGRESSOURCESCHEMAOPTION']._serialized_start=3873 - _globals['_POSTGRESSOURCESCHEMAOPTION']._serialized_end=3991 - _globals['_POSTGRESSOURCETABLEOPTION']._serialized_start=3993 - _globals['_POSTGRESSOURCETABLEOPTION']._serialized_end=4099 - _globals['_MYSQLSOURCECONNECTIONOPTIONS']._serialized_start=4102 - _globals['_MYSQLSOURCECONNECTIONOPTIONS']._serialized_end=4381 - _globals['_MYSQLSOURCESCHEMAOPTION']._serialized_start=4383 - _globals['_MYSQLSOURCESCHEMAOPTION']._serialized_end=4495 - _globals['_MYSQLSOURCETABLEOPTION']._serialized_start=4497 - _globals['_MYSQLSOURCETABLEOPTION']._serialized_end=4600 - _globals['_MSSQLSOURCECONNECTIONOPTIONS']._serialized_start=4603 - _globals['_MSSQLSOURCECONNECTIONOPTIONS']._serialized_end=4882 - _globals['_MSSQLSOURCESCHEMAOPTION']._serialized_start=4884 - _globals['_MSSQLSOURCESCHEMAOPTION']._serialized_end=4996 - _globals['_MSSQLSOURCETABLEOPTION']._serialized_start=4998 - _globals['_MSSQLSOURCETABLEOPTION']._serialized_end=5101 - _globals['_AWSS3SOURCECONNECTIONOPTIONS']._serialized_start=5103 - _globals['_AWSS3SOURCECONNECTIONOPTIONS']._serialized_end=5180 - _globals['_JOBDESTINATIONOPTIONS']._serialized_start=5183 - _globals['_JOBDESTINATIONOPTIONS']._serialized_end=5902 - _globals['_MONGODBDESTINATIONCONNECTIONOPTIONS']._serialized_start=5904 - _globals['_MONGODBDESTINATIONCONNECTIONOPTIONS']._serialized_end=5941 - _globals['_GCPCLOUDSTORAGEDESTINATIONCONNECTIONOPTIONS']._serialized_start=5943 - _globals['_GCPCLOUDSTORAGEDESTINATIONCONNECTIONOPTIONS']._serialized_end=5988 - _globals['_DYNAMODBDESTINATIONCONNECTIONOPTIONS']._serialized_start=5990 - _globals['_DYNAMODBDESTINATIONCONNECTIONOPTIONS']._serialized_end=6115 - _globals['_DYNAMODBDESTINATIONTABLEMAPPING']._serialized_start=6117 - _globals['_DYNAMODBDESTINATIONTABLEMAPPING']._serialized_end=6230 - _globals['_POSTGRESDESTINATIONCONNECTIONOPTIONS']._serialized_start=6233 - _globals['_POSTGRESDESTINATIONCONNECTIONOPTIONS']._serialized_end=6653 - _globals['_POSTGRESONCONFLICTCONFIG']._serialized_start=6655 - _globals['_POSTGRESONCONFLICTCONFIG']._serialized_end=6712 - _globals['_POSTGRESTRUNCATETABLECONFIG']._serialized_start=6714 - _globals['_POSTGRESTRUNCATETABLECONFIG']._serialized_end=6823 - _globals['_MYSQLDESTINATIONCONNECTIONOPTIONS']._serialized_start=6826 - _globals['_MYSQLDESTINATIONCONNECTIONOPTIONS']._serialized_end=7237 - _globals['_MYSQLTRUNCATETABLECONFIG']._serialized_start=7239 - _globals['_MYSQLTRUNCATETABLECONFIG']._serialized_end=7319 - _globals['_MYSQLONCONFLICTCONFIG']._serialized_start=7321 - _globals['_MYSQLONCONFLICTCONFIG']._serialized_end=7375 - _globals['_MSSQLDESTINATIONCONNECTIONOPTIONS']._serialized_start=7378 - _globals['_MSSQLDESTINATIONCONNECTIONOPTIONS']._serialized_end=7789 - _globals['_MSSQLTRUNCATETABLECONFIG']._serialized_start=7791 - _globals['_MSSQLTRUNCATETABLECONFIG']._serialized_end=7871 - _globals['_MSSQLONCONFLICTCONFIG']._serialized_start=7873 - _globals['_MSSQLONCONFLICTCONFIG']._serialized_end=7927 - _globals['_AWSS3DESTINATIONCONNECTIONOPTIONS']._serialized_start=7930 - _globals['_AWSS3DESTINATIONCONNECTIONOPTIONS']._serialized_end=8499 - _globals['_AWSS3DESTINATIONCONNECTIONOPTIONS_STORAGECLASS']._serialized_start=8199 - _globals['_AWSS3DESTINATIONCONNECTIONOPTIONS_STORAGECLASS']._serialized_end=8469 - _globals['_BATCHCONFIG']._serialized_start=8501 - _globals['_BATCHCONFIG']._serialized_end=8591 - _globals['_CREATEJOBREQUEST']._serialized_start=8594 - _globals['_CREATEJOBREQUEST']._serialized_end=9220 - _globals['_WORKFLOWOPTIONS']._serialized_start=9222 - _globals['_WORKFLOWOPTIONS']._serialized_end=9293 - _globals['_ACTIVITYOPTIONS']._serialized_start=9296 - _globals['_ACTIVITYOPTIONS']._serialized_end=9573 - _globals['_RETRYPOLICY']._serialized_start=9575 - _globals['_RETRYPOLICY']._serialized_end=9666 - _globals['_CREATEJOBRESPONSE']._serialized_start=9668 - _globals['_CREATEJOBRESPONSE']._serialized_end=9725 - _globals['_JOBMAPPINGTRANSFORMER']._serialized_start=9728 - _globals['_JOBMAPPINGTRANSFORMER']._serialized_end=9867 - _globals['_JOBMAPPING']._serialized_start=9870 - _globals['_JOBMAPPING']._serialized_end=10024 - _globals['_GETJOBREQUEST']._serialized_start=10026 - _globals['_GETJOBREQUEST']._serialized_end=10067 - _globals['_GETJOBRESPONSE']._serialized_start=10069 - _globals['_GETJOBRESPONSE']._serialized_end=10123 - _globals['_UPDATEJOBSCHEDULEREQUEST']._serialized_start=10125 - _globals['_UPDATEJOBSCHEDULEREQUEST']._serialized_end=10237 - _globals['_UPDATEJOBSCHEDULERESPONSE']._serialized_start=10239 - _globals['_UPDATEJOBSCHEDULERESPONSE']._serialized_end=10304 - _globals['_PAUSEJOBREQUEST']._serialized_start=10306 - _globals['_PAUSEJOBREQUEST']._serialized_end=10405 - _globals['_PAUSEJOBRESPONSE']._serialized_start=10407 - _globals['_PAUSEJOBRESPONSE']._serialized_end=10463 - _globals['_UPDATEJOBSOURCECONNECTIONREQUEST']._serialized_start=10466 - _globals['_UPDATEJOBSOURCECONNECTIONREQUEST']._serialized_end=10722 - _globals['_UPDATEJOBSOURCECONNECTIONRESPONSE']._serialized_start=10724 - _globals['_UPDATEJOBSOURCECONNECTIONRESPONSE']._serialized_end=10797 - _globals['_POSTGRESSOURCESCHEMASUBSET']._serialized_start=10799 - _globals['_POSTGRESSOURCESCHEMASUBSET']._serialized_end=10913 - _globals['_MYSQLSOURCESCHEMASUBSET']._serialized_start=10915 - _globals['_MYSQLSOURCESCHEMASUBSET']._serialized_end=11017 - _globals['_DYNAMODBSOURCESCHEMASUBSET']._serialized_start=11019 - _globals['_DYNAMODBSOURCESCHEMASUBSET']._serialized_end=11113 - _globals['_MSSQLSOURCESCHEMASUBSET']._serialized_start=11115 - _globals['_MSSQLSOURCESCHEMASUBSET']._serialized_end=11217 - _globals['_JOBSOURCESQLSUBETSCHEMAS']._serialized_start=11220 - _globals['_JOBSOURCESQLSUBETSCHEMAS']._serialized_end=11590 - _globals['_SETJOBSOURCESQLCONNECTIONSUBSETSREQUEST']._serialized_start=11593 - _globals['_SETJOBSOURCESQLCONNECTIONSUBSETSREQUEST']._serialized_end=11801 - _globals['_SETJOBSOURCESQLCONNECTIONSUBSETSRESPONSE']._serialized_start=11803 - _globals['_SETJOBSOURCESQLCONNECTIONSUBSETSRESPONSE']._serialized_end=11883 - _globals['_UPDATEJOBDESTINATIONCONNECTIONREQUEST']._serialized_start=11886 - _globals['_UPDATEJOBDESTINATIONCONNECTIONREQUEST']._serialized_end=12108 - _globals['_UPDATEJOBDESTINATIONCONNECTIONRESPONSE']._serialized_start=12110 - _globals['_UPDATEJOBDESTINATIONCONNECTIONRESPONSE']._serialized_end=12188 - _globals['_DELETEJOBDESTINATIONCONNECTIONREQUEST']._serialized_start=12190 - _globals['_DELETEJOBDESTINATIONCONNECTIONREQUEST']._serialized_end=12278 - _globals['_DELETEJOBDESTINATIONCONNECTIONRESPONSE']._serialized_start=12280 - _globals['_DELETEJOBDESTINATIONCONNECTIONRESPONSE']._serialized_end=12320 - _globals['_CREATEJOBDESTINATIONCONNECTIONSREQUEST']._serialized_start=12323 - _globals['_CREATEJOBDESTINATIONCONNECTIONSREQUEST']._serialized_end=12469 - _globals['_CREATEJOBDESTINATIONCONNECTIONSRESPONSE']._serialized_start=12471 - _globals['_CREATEJOBDESTINATIONCONNECTIONSRESPONSE']._serialized_end=12550 - _globals['_DELETEJOBREQUEST']._serialized_start=12552 - _globals['_DELETEJOBREQUEST']._serialized_end=12596 - _globals['_DELETEJOBRESPONSE']._serialized_start=12598 - _globals['_DELETEJOBRESPONSE']._serialized_end=12617 - _globals['_ISJOBNAMEAVAILABLEREQUEST']._serialized_start=12619 - _globals['_ISJOBNAMEAVAILABLEREQUEST']._serialized_end=12734 - _globals['_ISJOBNAMEAVAILABLERESPONSE']._serialized_start=12736 - _globals['_ISJOBNAMEAVAILABLERESPONSE']._serialized_end=12799 - _globals['_GETJOBRUNSREQUEST']._serialized_start=12801 - _globals['_GETJOBRUNSREQUEST']._serialized_end=12904 - _globals['_GETJOBRUNSRESPONSE']._serialized_start=12906 - _globals['_GETJOBRUNSRESPONSE']._serialized_end=12976 - _globals['_GETJOBRUNREQUEST']._serialized_start=12978 - _globals['_GETJOBRUNREQUEST']._serialized_end=13067 - _globals['_GETJOBRUNRESPONSE']._serialized_start=13069 - _globals['_GETJOBRUNRESPONSE']._serialized_end=13136 - _globals['_CREATEJOBRUNREQUEST']._serialized_start=13138 - _globals['_CREATEJOBRUNREQUEST']._serialized_end=13192 - _globals['_CREATEJOBRUNRESPONSE']._serialized_start=13194 - _globals['_CREATEJOBRUNRESPONSE']._serialized_end=13216 - _globals['_CANCELJOBRUNREQUEST']._serialized_start=13218 - _globals['_CANCELJOBRUNREQUEST']._serialized_end=13310 - _globals['_CANCELJOBRUNRESPONSE']._serialized_start=13312 - _globals['_CANCELJOBRUNRESPONSE']._serialized_end=13334 - _globals['_JOB']._serialized_start=13337 - _globals['_JOB']._serialized_end=14082 - _globals['_JOBRECENTRUN']._serialized_start=14084 - _globals['_JOBRECENTRUN']._serialized_end=14187 - _globals['_GETJOBRECENTRUNSREQUEST']._serialized_start=14189 - _globals['_GETJOBRECENTRUNSREQUEST']._serialized_end=14247 - _globals['_GETJOBRECENTRUNSRESPONSE']._serialized_start=14249 - _globals['_GETJOBRECENTRUNSRESPONSE']._serialized_end=14337 - _globals['_JOBNEXTRUNS']._serialized_start=14339 - _globals['_JOBNEXTRUNS']._serialized_end=14418 - _globals['_GETJOBNEXTRUNSREQUEST']._serialized_start=14420 - _globals['_GETJOBNEXTRUNSREQUEST']._serialized_end=14466 - _globals['_GETJOBNEXTRUNSRESPONSE']._serialized_start=14468 - _globals['_GETJOBNEXTRUNSRESPONSE']._serialized_end=14549 - _globals['_GETJOBSTATUSREQUEST']._serialized_start=14551 - _globals['_GETJOBSTATUSREQUEST']._serialized_end=14595 - _globals['_GETJOBSTATUSRESPONSE']._serialized_start=14597 - _globals['_GETJOBSTATUSRESPONSE']._serialized_end=14669 - _globals['_JOBSTATUSRECORD']._serialized_start=14671 - _globals['_JOBSTATUSRECORD']._serialized_end=14761 - _globals['_GETJOBSTATUSESREQUEST']._serialized_start=14763 - _globals['_GETJOBSTATUSESREQUEST']._serialized_end=14827 - _globals['_GETJOBSTATUSESRESPONSE']._serialized_start=14829 - _globals['_GETJOBSTATUSESRESPONSE']._serialized_end=14913 - _globals['_ACTIVITYFAILURE']._serialized_start=14915 - _globals['_ACTIVITYFAILURE']._serialized_end=14958 - _globals['_PENDINGACTIVITY']._serialized_start=14961 - _globals['_PENDINGACTIVITY']._serialized_end=15159 - _globals['_JOBRUN']._serialized_start=15162 - _globals['_JOBRUN']._serialized_end=15505 - _globals['_JOBRUNEVENTTASKERROR']._serialized_start=15507 - _globals['_JOBRUNEVENTTASKERROR']._serialized_end=15588 - _globals['_JOBRUNEVENTTASK']._serialized_start=15591 - _globals['_JOBRUNEVENTTASK']._serialized_end=15762 - _globals['_JOBRUNSYNCMETADATA']._serialized_start=15764 - _globals['_JOBRUNSYNCMETADATA']._serialized_end=15830 - _globals['_JOBRUNEVENTMETADATA']._serialized_start=15832 - _globals['_JOBRUNEVENTMETADATA']._serialized_end=15946 - _globals['_JOBRUNEVENT']._serialized_start=15949 - _globals['_JOBRUNEVENT']._serialized_end=16234 - _globals['_GETJOBRUNEVENTSREQUEST']._serialized_start=16236 - _globals['_GETJOBRUNEVENTSREQUEST']._serialized_end=16331 - _globals['_GETJOBRUNEVENTSRESPONSE']._serialized_start=16333 - _globals['_GETJOBRUNEVENTSRESPONSE']._serialized_end=16450 - _globals['_DELETEJOBRUNREQUEST']._serialized_start=16452 - _globals['_DELETEJOBRUNREQUEST']._serialized_end=16544 - _globals['_DELETEJOBRUNRESPONSE']._serialized_start=16546 - _globals['_DELETEJOBRUNRESPONSE']._serialized_end=16568 - _globals['_TERMINATEJOBRUNREQUEST']._serialized_start=16570 - _globals['_TERMINATEJOBRUNREQUEST']._serialized_end=16665 - _globals['_TERMINATEJOBRUNRESPONSE']._serialized_start=16667 - _globals['_TERMINATEJOBRUNRESPONSE']._serialized_end=16692 - _globals['_GETJOBRUNLOGSSTREAMREQUEST']._serialized_start=16695 - _globals['_GETJOBRUNLOGSSTREAMREQUEST']._serialized_end=17001 - _globals['_GETJOBRUNLOGSSTREAMRESPONSE']._serialized_start=17004 - _globals['_GETJOBRUNLOGSSTREAMRESPONSE']._serialized_end=17137 - _globals['_SETJOBWORKFLOWOPTIONSREQUEST']._serialized_start=17140 - _globals['_SETJOBWORKFLOWOPTIONSREQUEST']._serialized_end=17271 - _globals['_SETJOBWORKFLOWOPTIONSRESPONSE']._serialized_start=17273 - _globals['_SETJOBWORKFLOWOPTIONSRESPONSE']._serialized_end=17342 - _globals['_SETJOBSYNCOPTIONSREQUEST']._serialized_start=17344 - _globals['_SETJOBSYNCOPTIONSREQUEST']._serialized_end=17463 - _globals['_SETJOBSYNCOPTIONSRESPONSE']._serialized_start=17465 - _globals['_SETJOBSYNCOPTIONSRESPONSE']._serialized_end=17530 - _globals['_VALIDATEJOBMAPPINGSREQUEST']._serialized_start=17533 - _globals['_VALIDATEJOBMAPPINGSREQUEST']._serialized_end=17785 - _globals['_COLUMNERROR']._serialized_start=17787 - _globals['_COLUMNERROR']._serialized_end=17894 - _globals['_DATABASEERROR']._serialized_start=17896 - _globals['_DATABASEERROR']._serialized_end=17935 - _globals['_VALIDATEJOBMAPPINGSRESPONSE']._serialized_start=17938 - _globals['_VALIDATEJOBMAPPINGSRESPONSE']._serialized_end=18103 - _globals['_VIRTUALFOREIGNKEY']._serialized_start=18105 - _globals['_VIRTUALFOREIGNKEY']._serialized_end=18196 - _globals['_VIRTUALFOREIGNCONSTRAINT']._serialized_start=18199 - _globals['_VIRTUALFOREIGNCONSTRAINT']._serialized_end=18364 - _globals['_RUNCONTEXTKEY']._serialized_start=18367 - _globals['_RUNCONTEXTKEY']._serialized_end=18503 - _globals['_GETRUNCONTEXTREQUEST']._serialized_start=18505 - _globals['_GETRUNCONTEXTREQUEST']._serialized_end=18573 - _globals['_GETRUNCONTEXTRESPONSE']._serialized_start=18575 - _globals['_GETRUNCONTEXTRESPONSE']._serialized_end=18620 - _globals['_SETRUNCONTEXTREQUEST']._serialized_start=18622 - _globals['_SETRUNCONTEXTREQUEST']._serialized_end=18712 - _globals['_SETRUNCONTEXTRESPONSE']._serialized_start=18714 - _globals['_SETRUNCONTEXTRESPONSE']._serialized_end=18737 - _globals['_SETRUNCONTEXTSREQUEST']._serialized_start=18739 - _globals['_SETRUNCONTEXTSREQUEST']._serialized_end=18830 - _globals['_SETRUNCONTEXTSRESPONSE']._serialized_start=18832 - _globals['_SETRUNCONTEXTSRESPONSE']._serialized_end=18856 - _globals['_JOBHOOK']._serialized_start=18859 - _globals['_JOBHOOK']._serialized_end=19288 - _globals['_NEWJOBHOOK']._serialized_start=19291 - _globals['_NEWJOBHOOK']._serialized_end=19512 - _globals['_JOBHOOKCONFIG']._serialized_start=19515 - _globals['_JOBHOOKCONFIG']._serialized_end=19936 - _globals['_JOBHOOKCONFIG_JOBSQLHOOK']._serialized_start=19594 - _globals['_JOBHOOKCONFIG_JOBSQLHOOK']._serialized_end=19919 - _globals['_JOBHOOKCONFIG_JOBSQLHOOK_TIMING']._serialized_start=19759 - _globals['_JOBHOOKCONFIG_JOBSQLHOOK_TIMING']._serialized_end=19919 - _globals['_JOBHOOKTIMINGPRESYNC']._serialized_start=19938 - _globals['_JOBHOOKTIMINGPRESYNC']._serialized_end=19960 - _globals['_JOBHOOKTIMINGPOSTSYNC']._serialized_start=19962 - _globals['_JOBHOOKTIMINGPOSTSYNC']._serialized_end=19985 - _globals['_GETJOBHOOKSREQUEST']._serialized_start=19987 - _globals['_GETJOBHOOKSREQUEST']._serialized_end=20040 - _globals['_GETJOBHOOKSRESPONSE']._serialized_start=20042 - _globals['_GETJOBHOOKSRESPONSE']._serialized_end=20109 - _globals['_GETJOBHOOKREQUEST']._serialized_start=20111 - _globals['_GETJOBHOOKREQUEST']._serialized_end=20156 - _globals['_GETJOBHOOKRESPONSE']._serialized_start=20158 - _globals['_GETJOBHOOKRESPONSE']._serialized_end=20222 - _globals['_CREATEJOBHOOKREQUEST']._serialized_start=20224 - _globals['_CREATEJOBHOOKREQUEST']._serialized_end=20316 - _globals['_CREATEJOBHOOKRESPONSE']._serialized_start=20318 - _globals['_CREATEJOBHOOKRESPONSE']._serialized_end=20385 - _globals['_DELETEJOBHOOKREQUEST']._serialized_start=20387 - _globals['_DELETEJOBHOOKREQUEST']._serialized_end=20435 - _globals['_DELETEJOBHOOKRESPONSE']._serialized_start=20437 - _globals['_DELETEJOBHOOKRESPONSE']._serialized_end=20460 - _globals['_ISJOBHOOKNAMEAVAILABLEREQUEST']._serialized_start=20462 - _globals['_ISJOBHOOKNAMEAVAILABLEREQUEST']._serialized_end=20536 - _globals['_ISJOBHOOKNAMEAVAILABLERESPONSE']._serialized_start=20538 - _globals['_ISJOBHOOKNAMEAVAILABLERESPONSE']._serialized_end=20605 - _globals['_UPDATEJOBHOOKREQUEST']._serialized_start=20608 - _globals['_UPDATEJOBHOOKREQUEST']._serialized_end=20865 - _globals['_UPDATEJOBHOOKRESPONSE']._serialized_start=20867 - _globals['_UPDATEJOBHOOKRESPONSE']._serialized_end=20934 - _globals['_SETJOBHOOKENABLEDREQUEST']._serialized_start=20936 - _globals['_SETJOBHOOKENABLEDREQUEST']._serialized_end=21014 - _globals['_SETJOBHOOKENABLEDRESPONSE']._serialized_start=21016 - _globals['_SETJOBHOOKENABLEDRESPONSE']._serialized_end=21087 - _globals['_GETACTIVEJOBHOOKSBYTIMINGREQUEST']._serialized_start=21090 - _globals['_GETACTIVEJOBHOOKSBYTIMINGREQUEST']._serialized_end=21312 - _globals['_GETACTIVEJOBHOOKSBYTIMINGREQUEST_TIMING']._serialized_start=21239 - _globals['_GETACTIVEJOBHOOKSBYTIMINGREQUEST_TIMING']._serialized_end=21312 - _globals['_GETACTIVEJOBHOOKSBYTIMINGRESPONSE']._serialized_start=21314 - _globals['_GETACTIVEJOBHOOKSBYTIMINGRESPONSE']._serialized_end=21395 - _globals['_JOBSERVICE']._serialized_start=22205 - _globals['_JOBSERVICE']._serialized_end=26126 + _globals['_POSTGRESSOURCECONNECTIONOPTIONS']._serialized_end=3778 + _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY']._serialized_start=3489 + _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY']._serialized_end=3772 + _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY_HALTJOB']._serialized_start=3740 + _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY_HALTJOB']._serialized_end=3749 + _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY_AUTOMAP']._serialized_start=3751 + _globals['_POSTGRESSOURCECONNECTIONOPTIONS_NEWCOLUMNADDITIONSTRATEGY_AUTOMAP']._serialized_end=3760 + _globals['_POSTGRESSOURCESCHEMAOPTION']._serialized_start=3780 + _globals['_POSTGRESSOURCESCHEMAOPTION']._serialized_end=3898 + _globals['_POSTGRESSOURCETABLEOPTION']._serialized_start=3900 + _globals['_POSTGRESSOURCETABLEOPTION']._serialized_end=4006 + _globals['_MYSQLSOURCECONNECTIONOPTIONS']._serialized_start=4009 + _globals['_MYSQLSOURCECONNECTIONOPTIONS']._serialized_end=4288 + _globals['_MYSQLSOURCESCHEMAOPTION']._serialized_start=4290 + _globals['_MYSQLSOURCESCHEMAOPTION']._serialized_end=4402 + _globals['_MYSQLSOURCETABLEOPTION']._serialized_start=4404 + _globals['_MYSQLSOURCETABLEOPTION']._serialized_end=4507 + _globals['_MSSQLSOURCECONNECTIONOPTIONS']._serialized_start=4510 + _globals['_MSSQLSOURCECONNECTIONOPTIONS']._serialized_end=4789 + _globals['_MSSQLSOURCESCHEMAOPTION']._serialized_start=4791 + _globals['_MSSQLSOURCESCHEMAOPTION']._serialized_end=4903 + _globals['_MSSQLSOURCETABLEOPTION']._serialized_start=4905 + _globals['_MSSQLSOURCETABLEOPTION']._serialized_end=5008 + _globals['_AWSS3SOURCECONNECTIONOPTIONS']._serialized_start=5010 + _globals['_AWSS3SOURCECONNECTIONOPTIONS']._serialized_end=5087 + _globals['_JOBDESTINATIONOPTIONS']._serialized_start=5090 + _globals['_JOBDESTINATIONOPTIONS']._serialized_end=5809 + _globals['_MONGODBDESTINATIONCONNECTIONOPTIONS']._serialized_start=5811 + _globals['_MONGODBDESTINATIONCONNECTIONOPTIONS']._serialized_end=5848 + _globals['_GCPCLOUDSTORAGEDESTINATIONCONNECTIONOPTIONS']._serialized_start=5850 + _globals['_GCPCLOUDSTORAGEDESTINATIONCONNECTIONOPTIONS']._serialized_end=5895 + _globals['_DYNAMODBDESTINATIONCONNECTIONOPTIONS']._serialized_start=5897 + _globals['_DYNAMODBDESTINATIONCONNECTIONOPTIONS']._serialized_end=6022 + _globals['_DYNAMODBDESTINATIONTABLEMAPPING']._serialized_start=6024 + _globals['_DYNAMODBDESTINATIONTABLEMAPPING']._serialized_end=6137 + _globals['_POSTGRESDESTINATIONCONNECTIONOPTIONS']._serialized_start=6140 + _globals['_POSTGRESDESTINATIONCONNECTIONOPTIONS']._serialized_end=6560 + _globals['_POSTGRESONCONFLICTCONFIG']._serialized_start=6562 + _globals['_POSTGRESONCONFLICTCONFIG']._serialized_end=6619 + _globals['_POSTGRESTRUNCATETABLECONFIG']._serialized_start=6621 + _globals['_POSTGRESTRUNCATETABLECONFIG']._serialized_end=6730 + _globals['_MYSQLDESTINATIONCONNECTIONOPTIONS']._serialized_start=6733 + _globals['_MYSQLDESTINATIONCONNECTIONOPTIONS']._serialized_end=7144 + _globals['_MYSQLTRUNCATETABLECONFIG']._serialized_start=7146 + _globals['_MYSQLTRUNCATETABLECONFIG']._serialized_end=7226 + _globals['_MYSQLONCONFLICTCONFIG']._serialized_start=7228 + _globals['_MYSQLONCONFLICTCONFIG']._serialized_end=7282 + _globals['_MSSQLDESTINATIONCONNECTIONOPTIONS']._serialized_start=7285 + _globals['_MSSQLDESTINATIONCONNECTIONOPTIONS']._serialized_end=7696 + _globals['_MSSQLTRUNCATETABLECONFIG']._serialized_start=7698 + _globals['_MSSQLTRUNCATETABLECONFIG']._serialized_end=7778 + _globals['_MSSQLONCONFLICTCONFIG']._serialized_start=7780 + _globals['_MSSQLONCONFLICTCONFIG']._serialized_end=7834 + _globals['_AWSS3DESTINATIONCONNECTIONOPTIONS']._serialized_start=7837 + _globals['_AWSS3DESTINATIONCONNECTIONOPTIONS']._serialized_end=8406 + _globals['_AWSS3DESTINATIONCONNECTIONOPTIONS_STORAGECLASS']._serialized_start=8106 + _globals['_AWSS3DESTINATIONCONNECTIONOPTIONS_STORAGECLASS']._serialized_end=8376 + _globals['_BATCHCONFIG']._serialized_start=8408 + _globals['_BATCHCONFIG']._serialized_end=8498 + _globals['_CREATEJOBREQUEST']._serialized_start=8501 + _globals['_CREATEJOBREQUEST']._serialized_end=9127 + _globals['_WORKFLOWOPTIONS']._serialized_start=9129 + _globals['_WORKFLOWOPTIONS']._serialized_end=9200 + _globals['_ACTIVITYOPTIONS']._serialized_start=9203 + _globals['_ACTIVITYOPTIONS']._serialized_end=9480 + _globals['_RETRYPOLICY']._serialized_start=9482 + _globals['_RETRYPOLICY']._serialized_end=9573 + _globals['_CREATEJOBRESPONSE']._serialized_start=9575 + _globals['_CREATEJOBRESPONSE']._serialized_end=9632 + _globals['_JOBMAPPINGTRANSFORMER']._serialized_start=9634 + _globals['_JOBMAPPINGTRANSFORMER']._serialized_end=9721 + _globals['_JOBMAPPING']._serialized_start=9724 + _globals['_JOBMAPPING']._serialized_end=9878 + _globals['_GETJOBREQUEST']._serialized_start=9880 + _globals['_GETJOBREQUEST']._serialized_end=9921 + _globals['_GETJOBRESPONSE']._serialized_start=9923 + _globals['_GETJOBRESPONSE']._serialized_end=9977 + _globals['_UPDATEJOBSCHEDULEREQUEST']._serialized_start=9979 + _globals['_UPDATEJOBSCHEDULEREQUEST']._serialized_end=10091 + _globals['_UPDATEJOBSCHEDULERESPONSE']._serialized_start=10093 + _globals['_UPDATEJOBSCHEDULERESPONSE']._serialized_end=10158 + _globals['_PAUSEJOBREQUEST']._serialized_start=10160 + _globals['_PAUSEJOBREQUEST']._serialized_end=10259 + _globals['_PAUSEJOBRESPONSE']._serialized_start=10261 + _globals['_PAUSEJOBRESPONSE']._serialized_end=10317 + _globals['_UPDATEJOBSOURCECONNECTIONREQUEST']._serialized_start=10320 + _globals['_UPDATEJOBSOURCECONNECTIONREQUEST']._serialized_end=10576 + _globals['_UPDATEJOBSOURCECONNECTIONRESPONSE']._serialized_start=10578 + _globals['_UPDATEJOBSOURCECONNECTIONRESPONSE']._serialized_end=10651 + _globals['_POSTGRESSOURCESCHEMASUBSET']._serialized_start=10653 + _globals['_POSTGRESSOURCESCHEMASUBSET']._serialized_end=10767 + _globals['_MYSQLSOURCESCHEMASUBSET']._serialized_start=10769 + _globals['_MYSQLSOURCESCHEMASUBSET']._serialized_end=10871 + _globals['_DYNAMODBSOURCESCHEMASUBSET']._serialized_start=10873 + _globals['_DYNAMODBSOURCESCHEMASUBSET']._serialized_end=10967 + _globals['_MSSQLSOURCESCHEMASUBSET']._serialized_start=10969 + _globals['_MSSQLSOURCESCHEMASUBSET']._serialized_end=11071 + _globals['_JOBSOURCESQLSUBETSCHEMAS']._serialized_start=11074 + _globals['_JOBSOURCESQLSUBETSCHEMAS']._serialized_end=11444 + _globals['_SETJOBSOURCESQLCONNECTIONSUBSETSREQUEST']._serialized_start=11447 + _globals['_SETJOBSOURCESQLCONNECTIONSUBSETSREQUEST']._serialized_end=11655 + _globals['_SETJOBSOURCESQLCONNECTIONSUBSETSRESPONSE']._serialized_start=11657 + _globals['_SETJOBSOURCESQLCONNECTIONSUBSETSRESPONSE']._serialized_end=11737 + _globals['_UPDATEJOBDESTINATIONCONNECTIONREQUEST']._serialized_start=11740 + _globals['_UPDATEJOBDESTINATIONCONNECTIONREQUEST']._serialized_end=11962 + _globals['_UPDATEJOBDESTINATIONCONNECTIONRESPONSE']._serialized_start=11964 + _globals['_UPDATEJOBDESTINATIONCONNECTIONRESPONSE']._serialized_end=12042 + _globals['_DELETEJOBDESTINATIONCONNECTIONREQUEST']._serialized_start=12044 + _globals['_DELETEJOBDESTINATIONCONNECTIONREQUEST']._serialized_end=12132 + _globals['_DELETEJOBDESTINATIONCONNECTIONRESPONSE']._serialized_start=12134 + _globals['_DELETEJOBDESTINATIONCONNECTIONRESPONSE']._serialized_end=12174 + _globals['_CREATEJOBDESTINATIONCONNECTIONSREQUEST']._serialized_start=12177 + _globals['_CREATEJOBDESTINATIONCONNECTIONSREQUEST']._serialized_end=12323 + _globals['_CREATEJOBDESTINATIONCONNECTIONSRESPONSE']._serialized_start=12325 + _globals['_CREATEJOBDESTINATIONCONNECTIONSRESPONSE']._serialized_end=12404 + _globals['_DELETEJOBREQUEST']._serialized_start=12406 + _globals['_DELETEJOBREQUEST']._serialized_end=12450 + _globals['_DELETEJOBRESPONSE']._serialized_start=12452 + _globals['_DELETEJOBRESPONSE']._serialized_end=12471 + _globals['_ISJOBNAMEAVAILABLEREQUEST']._serialized_start=12473 + _globals['_ISJOBNAMEAVAILABLEREQUEST']._serialized_end=12588 + _globals['_ISJOBNAMEAVAILABLERESPONSE']._serialized_start=12590 + _globals['_ISJOBNAMEAVAILABLERESPONSE']._serialized_end=12653 + _globals['_GETJOBRUNSREQUEST']._serialized_start=12655 + _globals['_GETJOBRUNSREQUEST']._serialized_end=12758 + _globals['_GETJOBRUNSRESPONSE']._serialized_start=12760 + _globals['_GETJOBRUNSRESPONSE']._serialized_end=12830 + _globals['_GETJOBRUNREQUEST']._serialized_start=12832 + _globals['_GETJOBRUNREQUEST']._serialized_end=12921 + _globals['_GETJOBRUNRESPONSE']._serialized_start=12923 + _globals['_GETJOBRUNRESPONSE']._serialized_end=12990 + _globals['_CREATEJOBRUNREQUEST']._serialized_start=12992 + _globals['_CREATEJOBRUNREQUEST']._serialized_end=13046 + _globals['_CREATEJOBRUNRESPONSE']._serialized_start=13048 + _globals['_CREATEJOBRUNRESPONSE']._serialized_end=13070 + _globals['_CANCELJOBRUNREQUEST']._serialized_start=13072 + _globals['_CANCELJOBRUNREQUEST']._serialized_end=13164 + _globals['_CANCELJOBRUNRESPONSE']._serialized_start=13166 + _globals['_CANCELJOBRUNRESPONSE']._serialized_end=13188 + _globals['_JOB']._serialized_start=13191 + _globals['_JOB']._serialized_end=13936 + _globals['_JOBRECENTRUN']._serialized_start=13938 + _globals['_JOBRECENTRUN']._serialized_end=14041 + _globals['_GETJOBRECENTRUNSREQUEST']._serialized_start=14043 + _globals['_GETJOBRECENTRUNSREQUEST']._serialized_end=14101 + _globals['_GETJOBRECENTRUNSRESPONSE']._serialized_start=14103 + _globals['_GETJOBRECENTRUNSRESPONSE']._serialized_end=14191 + _globals['_JOBNEXTRUNS']._serialized_start=14193 + _globals['_JOBNEXTRUNS']._serialized_end=14272 + _globals['_GETJOBNEXTRUNSREQUEST']._serialized_start=14274 + _globals['_GETJOBNEXTRUNSREQUEST']._serialized_end=14320 + _globals['_GETJOBNEXTRUNSRESPONSE']._serialized_start=14322 + _globals['_GETJOBNEXTRUNSRESPONSE']._serialized_end=14403 + _globals['_GETJOBSTATUSREQUEST']._serialized_start=14405 + _globals['_GETJOBSTATUSREQUEST']._serialized_end=14449 + _globals['_GETJOBSTATUSRESPONSE']._serialized_start=14451 + _globals['_GETJOBSTATUSRESPONSE']._serialized_end=14523 + _globals['_JOBSTATUSRECORD']._serialized_start=14525 + _globals['_JOBSTATUSRECORD']._serialized_end=14615 + _globals['_GETJOBSTATUSESREQUEST']._serialized_start=14617 + _globals['_GETJOBSTATUSESREQUEST']._serialized_end=14681 + _globals['_GETJOBSTATUSESRESPONSE']._serialized_start=14683 + _globals['_GETJOBSTATUSESRESPONSE']._serialized_end=14767 + _globals['_ACTIVITYFAILURE']._serialized_start=14769 + _globals['_ACTIVITYFAILURE']._serialized_end=14812 + _globals['_PENDINGACTIVITY']._serialized_start=14815 + _globals['_PENDINGACTIVITY']._serialized_end=15013 + _globals['_JOBRUN']._serialized_start=15016 + _globals['_JOBRUN']._serialized_end=15359 + _globals['_JOBRUNEVENTTASKERROR']._serialized_start=15361 + _globals['_JOBRUNEVENTTASKERROR']._serialized_end=15442 + _globals['_JOBRUNEVENTTASK']._serialized_start=15445 + _globals['_JOBRUNEVENTTASK']._serialized_end=15616 + _globals['_JOBRUNSYNCMETADATA']._serialized_start=15618 + _globals['_JOBRUNSYNCMETADATA']._serialized_end=15684 + _globals['_JOBRUNEVENTMETADATA']._serialized_start=15686 + _globals['_JOBRUNEVENTMETADATA']._serialized_end=15800 + _globals['_JOBRUNEVENT']._serialized_start=15803 + _globals['_JOBRUNEVENT']._serialized_end=16088 + _globals['_GETJOBRUNEVENTSREQUEST']._serialized_start=16090 + _globals['_GETJOBRUNEVENTSREQUEST']._serialized_end=16185 + _globals['_GETJOBRUNEVENTSRESPONSE']._serialized_start=16187 + _globals['_GETJOBRUNEVENTSRESPONSE']._serialized_end=16304 + _globals['_DELETEJOBRUNREQUEST']._serialized_start=16306 + _globals['_DELETEJOBRUNREQUEST']._serialized_end=16398 + _globals['_DELETEJOBRUNRESPONSE']._serialized_start=16400 + _globals['_DELETEJOBRUNRESPONSE']._serialized_end=16422 + _globals['_TERMINATEJOBRUNREQUEST']._serialized_start=16424 + _globals['_TERMINATEJOBRUNREQUEST']._serialized_end=16519 + _globals['_TERMINATEJOBRUNRESPONSE']._serialized_start=16521 + _globals['_TERMINATEJOBRUNRESPONSE']._serialized_end=16546 + _globals['_GETJOBRUNLOGSSTREAMREQUEST']._serialized_start=16549 + _globals['_GETJOBRUNLOGSSTREAMREQUEST']._serialized_end=16855 + _globals['_GETJOBRUNLOGSSTREAMRESPONSE']._serialized_start=16858 + _globals['_GETJOBRUNLOGSSTREAMRESPONSE']._serialized_end=16991 + _globals['_SETJOBWORKFLOWOPTIONSREQUEST']._serialized_start=16994 + _globals['_SETJOBWORKFLOWOPTIONSREQUEST']._serialized_end=17125 + _globals['_SETJOBWORKFLOWOPTIONSRESPONSE']._serialized_start=17127 + _globals['_SETJOBWORKFLOWOPTIONSRESPONSE']._serialized_end=17196 + _globals['_SETJOBSYNCOPTIONSREQUEST']._serialized_start=17198 + _globals['_SETJOBSYNCOPTIONSREQUEST']._serialized_end=17317 + _globals['_SETJOBSYNCOPTIONSRESPONSE']._serialized_start=17319 + _globals['_SETJOBSYNCOPTIONSRESPONSE']._serialized_end=17384 + _globals['_VALIDATEJOBMAPPINGSREQUEST']._serialized_start=17387 + _globals['_VALIDATEJOBMAPPINGSREQUEST']._serialized_end=17639 + _globals['_COLUMNERROR']._serialized_start=17641 + _globals['_COLUMNERROR']._serialized_end=17748 + _globals['_DATABASEERROR']._serialized_start=17750 + _globals['_DATABASEERROR']._serialized_end=17789 + _globals['_VALIDATEJOBMAPPINGSRESPONSE']._serialized_start=17792 + _globals['_VALIDATEJOBMAPPINGSRESPONSE']._serialized_end=17957 + _globals['_VIRTUALFOREIGNKEY']._serialized_start=17959 + _globals['_VIRTUALFOREIGNKEY']._serialized_end=18050 + _globals['_VIRTUALFOREIGNCONSTRAINT']._serialized_start=18053 + _globals['_VIRTUALFOREIGNCONSTRAINT']._serialized_end=18218 + _globals['_RUNCONTEXTKEY']._serialized_start=18221 + _globals['_RUNCONTEXTKEY']._serialized_end=18357 + _globals['_GETRUNCONTEXTREQUEST']._serialized_start=18359 + _globals['_GETRUNCONTEXTREQUEST']._serialized_end=18427 + _globals['_GETRUNCONTEXTRESPONSE']._serialized_start=18429 + _globals['_GETRUNCONTEXTRESPONSE']._serialized_end=18474 + _globals['_SETRUNCONTEXTREQUEST']._serialized_start=18476 + _globals['_SETRUNCONTEXTREQUEST']._serialized_end=18566 + _globals['_SETRUNCONTEXTRESPONSE']._serialized_start=18568 + _globals['_SETRUNCONTEXTRESPONSE']._serialized_end=18591 + _globals['_SETRUNCONTEXTSREQUEST']._serialized_start=18593 + _globals['_SETRUNCONTEXTSREQUEST']._serialized_end=18684 + _globals['_SETRUNCONTEXTSRESPONSE']._serialized_start=18686 + _globals['_SETRUNCONTEXTSRESPONSE']._serialized_end=18710 + _globals['_JOBHOOK']._serialized_start=18713 + _globals['_JOBHOOK']._serialized_end=19142 + _globals['_NEWJOBHOOK']._serialized_start=19145 + _globals['_NEWJOBHOOK']._serialized_end=19366 + _globals['_JOBHOOKCONFIG']._serialized_start=19369 + _globals['_JOBHOOKCONFIG']._serialized_end=19790 + _globals['_JOBHOOKCONFIG_JOBSQLHOOK']._serialized_start=19448 + _globals['_JOBHOOKCONFIG_JOBSQLHOOK']._serialized_end=19773 + _globals['_JOBHOOKCONFIG_JOBSQLHOOK_TIMING']._serialized_start=19613 + _globals['_JOBHOOKCONFIG_JOBSQLHOOK_TIMING']._serialized_end=19773 + _globals['_JOBHOOKTIMINGPRESYNC']._serialized_start=19792 + _globals['_JOBHOOKTIMINGPRESYNC']._serialized_end=19814 + _globals['_JOBHOOKTIMINGPOSTSYNC']._serialized_start=19816 + _globals['_JOBHOOKTIMINGPOSTSYNC']._serialized_end=19839 + _globals['_GETJOBHOOKSREQUEST']._serialized_start=19841 + _globals['_GETJOBHOOKSREQUEST']._serialized_end=19894 + _globals['_GETJOBHOOKSRESPONSE']._serialized_start=19896 + _globals['_GETJOBHOOKSRESPONSE']._serialized_end=19963 + _globals['_GETJOBHOOKREQUEST']._serialized_start=19965 + _globals['_GETJOBHOOKREQUEST']._serialized_end=20010 + _globals['_GETJOBHOOKRESPONSE']._serialized_start=20012 + _globals['_GETJOBHOOKRESPONSE']._serialized_end=20076 + _globals['_CREATEJOBHOOKREQUEST']._serialized_start=20078 + _globals['_CREATEJOBHOOKREQUEST']._serialized_end=20170 + _globals['_CREATEJOBHOOKRESPONSE']._serialized_start=20172 + _globals['_CREATEJOBHOOKRESPONSE']._serialized_end=20239 + _globals['_DELETEJOBHOOKREQUEST']._serialized_start=20241 + _globals['_DELETEJOBHOOKREQUEST']._serialized_end=20289 + _globals['_DELETEJOBHOOKRESPONSE']._serialized_start=20291 + _globals['_DELETEJOBHOOKRESPONSE']._serialized_end=20314 + _globals['_ISJOBHOOKNAMEAVAILABLEREQUEST']._serialized_start=20316 + _globals['_ISJOBHOOKNAMEAVAILABLEREQUEST']._serialized_end=20390 + _globals['_ISJOBHOOKNAMEAVAILABLERESPONSE']._serialized_start=20392 + _globals['_ISJOBHOOKNAMEAVAILABLERESPONSE']._serialized_end=20459 + _globals['_UPDATEJOBHOOKREQUEST']._serialized_start=20462 + _globals['_UPDATEJOBHOOKREQUEST']._serialized_end=20719 + _globals['_UPDATEJOBHOOKRESPONSE']._serialized_start=20721 + _globals['_UPDATEJOBHOOKRESPONSE']._serialized_end=20788 + _globals['_SETJOBHOOKENABLEDREQUEST']._serialized_start=20790 + _globals['_SETJOBHOOKENABLEDREQUEST']._serialized_end=20868 + _globals['_SETJOBHOOKENABLEDRESPONSE']._serialized_start=20870 + _globals['_SETJOBHOOKENABLEDRESPONSE']._serialized_end=20941 + _globals['_GETACTIVEJOBHOOKSBYTIMINGREQUEST']._serialized_start=20944 + _globals['_GETACTIVEJOBHOOKSBYTIMINGREQUEST']._serialized_end=21166 + _globals['_GETACTIVEJOBHOOKSBYTIMINGREQUEST_TIMING']._serialized_start=21093 + _globals['_GETACTIVEJOBHOOKSBYTIMINGREQUEST_TIMING']._serialized_end=21166 + _globals['_GETACTIVEJOBHOOKSBYTIMINGRESPONSE']._serialized_start=21168 + _globals['_GETACTIVEJOBHOOKSBYTIMINGRESPONSE']._serialized_end=21249 + _globals['_JOBSERVICE']._serialized_start=22059 + _globals['_JOBSERVICE']._serialized_end=25980 # @@protoc_insertion_point(module_scope) diff --git a/python/src/neosync/mgmt/v1alpha1/job_pb2.pyi b/python/src/neosync/mgmt/v1alpha1/job_pb2.pyi index 9e9dcd0d8e..ac2c81f42c 100644 --- a/python/src/neosync/mgmt/v1alpha1/job_pb2.pyi +++ b/python/src/neosync/mgmt/v1alpha1/job_pb2.pyi @@ -229,7 +229,7 @@ class DynamoDBSourceTableOption(_message.Message): def __init__(self, table: _Optional[str] = ..., where_clause: _Optional[str] = ...) -> None: ... class PostgresSourceConnectionOptions(_message.Message): - __slots__ = ("halt_on_new_column_addition", "schemas", "connection_id", "subset_by_foreign_key_constraints", "new_column_addition_strategy") + __slots__ = ("schemas", "connection_id", "subset_by_foreign_key_constraints", "new_column_addition_strategy") class NewColumnAdditionStrategy(_message.Message): __slots__ = ("halt_job", "auto_map") class HaltJob(_message.Message): @@ -243,17 +243,15 @@ class PostgresSourceConnectionOptions(_message.Message): halt_job: PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob auto_map: PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap def __init__(self, halt_job: _Optional[_Union[PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob, _Mapping]] = ..., auto_map: _Optional[_Union[PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap, _Mapping]] = ...) -> None: ... - HALT_ON_NEW_COLUMN_ADDITION_FIELD_NUMBER: _ClassVar[int] SCHEMAS_FIELD_NUMBER: _ClassVar[int] CONNECTION_ID_FIELD_NUMBER: _ClassVar[int] SUBSET_BY_FOREIGN_KEY_CONSTRAINTS_FIELD_NUMBER: _ClassVar[int] NEW_COLUMN_ADDITION_STRATEGY_FIELD_NUMBER: _ClassVar[int] - halt_on_new_column_addition: bool schemas: _containers.RepeatedCompositeFieldContainer[PostgresSourceSchemaOption] connection_id: str subset_by_foreign_key_constraints: bool new_column_addition_strategy: PostgresSourceConnectionOptions.NewColumnAdditionStrategy - def __init__(self, halt_on_new_column_addition: bool = ..., schemas: _Optional[_Iterable[_Union[PostgresSourceSchemaOption, _Mapping]]] = ..., connection_id: _Optional[str] = ..., subset_by_foreign_key_constraints: bool = ..., new_column_addition_strategy: _Optional[_Union[PostgresSourceConnectionOptions.NewColumnAdditionStrategy, _Mapping]] = ...) -> None: ... + def __init__(self, schemas: _Optional[_Iterable[_Union[PostgresSourceSchemaOption, _Mapping]]] = ..., connection_id: _Optional[str] = ..., subset_by_foreign_key_constraints: bool = ..., new_column_addition_strategy: _Optional[_Union[PostgresSourceConnectionOptions.NewColumnAdditionStrategy, _Mapping]] = ...) -> None: ... class PostgresSourceSchemaOption(_message.Message): __slots__ = ("schema", "tables") @@ -550,12 +548,10 @@ class CreateJobResponse(_message.Message): def __init__(self, job: _Optional[_Union[Job, _Mapping]] = ...) -> None: ... class JobMappingTransformer(_message.Message): - __slots__ = ("source", "config") - SOURCE_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("config",) CONFIG_FIELD_NUMBER: _ClassVar[int] - source: _transformer_pb2.TransformerSource config: _transformer_pb2.TransformerConfig - def __init__(self, source: _Optional[_Union[_transformer_pb2.TransformerSource, str]] = ..., config: _Optional[_Union[_transformer_pb2.TransformerConfig, _Mapping]] = ...) -> None: ... + def __init__(self, config: _Optional[_Union[_transformer_pb2.TransformerConfig, _Mapping]] = ...) -> None: ... class JobMapping(_message.Message): __slots__ = ("schema", "table", "column", "transformer") diff --git a/python/src/neosync/mgmt/v1alpha1/metrics_pb2.py b/python/src/neosync/mgmt/v1alpha1/metrics_pb2.py index 338d61836d..21ea7499a6 100644 --- a/python/src/neosync/mgmt/v1alpha1/metrics_pb2.py +++ b/python/src/neosync/mgmt/v1alpha1/metrics_pb2.py @@ -23,10 +23,9 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bmgmt/v1alpha1/metrics.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"d\n\x04\x44\x61te\x12\x1e\n\x04year\x18\x01 \x01(\rB\n\xbaH\x07*\x05\x18\x8fN(\x00R\x04year\x12\x1f\n\x05month\x18\x02 \x01(\rB\t\xbaH\x06*\x04\x18\x1f(\x00R\x05month\x12\x1b\n\x03\x64\x61y\x18\x03 \x01(\rB\t\xbaH\x06*\x04\x18\x1f(\x00R\x03\x64\x61y\"\xa6\x02\n\x1aGetDailyMetricCountRequest\x12)\n\x05start\x18\x01 \x01(\x0b\x32\x13.mgmt.v1alpha1.DateR\x05start\x12%\n\x03\x65nd\x18\x02 \x01(\x0b\x32\x13.mgmt.v1alpha1.DateR\x03\x65nd\x12\x37\n\x06metric\x18\x03 \x01(\x0e\x32\x1f.mgmt.v1alpha1.RangedMetricNameR\x06metric\x12)\n\naccount_id\x18\x04 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\taccountId\x12!\n\x06job_id\x18\x05 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12!\n\x06run_id\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05runIdB\x0c\n\nidentifier\"Q\n\x1bGetDailyMetricCountResponse\x12\x32\n\x07results\x18\x01 \x03(\x0b\x32\x18.mgmt.v1alpha1.DayResultR\x07results\"J\n\tDayResult\x12\'\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x13.mgmt.v1alpha1.DateR\x04\x64\x61te\x12\x14\n\x05\x63ount\x18\x02 \x01(\x04R\x05\x63ount\"\x8f\x03\n\x15GetMetricCountRequest\x12\x30\n\x05start\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05start\x12,\n\x03\x65nd\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x03\x65nd\x12\x37\n\x06metric\x18\x03 \x01(\x0e\x32\x1f.mgmt.v1alpha1.RangedMetricNameR\x06metric\x12)\n\naccount_id\x18\x04 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\taccountId\x12!\n\x06job_id\x18\x05 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12!\n\x06run_id\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05runId\x12\x30\n\tstart_day\x18\x07 \x01(\x0b\x32\x13.mgmt.v1alpha1.DateR\x08startDay\x12,\n\x07\x65nd_day\x18\x08 \x01(\x0b\x32\x13.mgmt.v1alpha1.DateR\x06\x65ndDayB\x0c\n\nidentifier\".\n\x16GetMetricCountResponse\x12\x14\n\x05\x63ount\x18\x01 \x01(\x04R\x05\x63ount*]\n\x10RangedMetricName\x12\"\n\x1eRANGED_METRIC_NAME_UNSPECIFIED\x10\x00\x12%\n!RANGED_METRIC_NAME_INPUT_RECEIVED\x10\x01\x32\xe1\x01\n\x0eMetricsService\x12n\n\x13GetDailyMetricCount\x12).mgmt.v1alpha1.GetDailyMetricCountRequest\x1a*.mgmt.v1alpha1.GetDailyMetricCountResponse\"\x00\x12_\n\x0eGetMetricCount\x12$.mgmt.v1alpha1.GetMetricCountRequest\x1a%.mgmt.v1alpha1.GetMetricCountResponse\"\x00\x42\xc8\x01\n\x11\x63om.mgmt.v1alpha1B\x0cMetricsProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bmgmt/v1alpha1/metrics.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\"d\n\x04\x44\x61te\x12\x1e\n\x04year\x18\x01 \x01(\rB\n\xbaH\x07*\x05\x18\x8fN(\x00R\x04year\x12\x1f\n\x05month\x18\x02 \x01(\rB\t\xbaH\x06*\x04\x18\x1f(\x00R\x05month\x12\x1b\n\x03\x64\x61y\x18\x03 \x01(\rB\t\xbaH\x06*\x04\x18\x1f(\x00R\x03\x64\x61y\"\xa6\x02\n\x1aGetDailyMetricCountRequest\x12)\n\x05start\x18\x01 \x01(\x0b\x32\x13.mgmt.v1alpha1.DateR\x05start\x12%\n\x03\x65nd\x18\x02 \x01(\x0b\x32\x13.mgmt.v1alpha1.DateR\x03\x65nd\x12\x37\n\x06metric\x18\x03 \x01(\x0e\x32\x1f.mgmt.v1alpha1.RangedMetricNameR\x06metric\x12)\n\naccount_id\x18\x04 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\taccountId\x12!\n\x06job_id\x18\x05 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12!\n\x06run_id\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05runIdB\x0c\n\nidentifier\"Q\n\x1bGetDailyMetricCountResponse\x12\x32\n\x07results\x18\x01 \x03(\x0b\x32\x18.mgmt.v1alpha1.DayResultR\x07results\"J\n\tDayResult\x12\'\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x13.mgmt.v1alpha1.DateR\x04\x64\x61te\x12\x14\n\x05\x63ount\x18\x02 \x01(\x04R\x05\x63ount\"\xbb\x02\n\x15GetMetricCountRequest\x12\x37\n\x06metric\x18\x03 \x01(\x0e\x32\x1f.mgmt.v1alpha1.RangedMetricNameR\x06metric\x12)\n\naccount_id\x18\x04 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\taccountId\x12!\n\x06job_id\x18\x05 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05jobId\x12!\n\x06run_id\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x05runId\x12\x30\n\tstart_day\x18\x07 \x01(\x0b\x32\x13.mgmt.v1alpha1.DateR\x08startDay\x12,\n\x07\x65nd_day\x18\x08 \x01(\x0b\x32\x13.mgmt.v1alpha1.DateR\x06\x65ndDayB\x0c\n\nidentifierJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03\".\n\x16GetMetricCountResponse\x12\x14\n\x05\x63ount\x18\x01 \x01(\x04R\x05\x63ount*]\n\x10RangedMetricName\x12\"\n\x1eRANGED_METRIC_NAME_UNSPECIFIED\x10\x00\x12%\n!RANGED_METRIC_NAME_INPUT_RECEIVED\x10\x01\x32\xe1\x01\n\x0eMetricsService\x12n\n\x13GetDailyMetricCount\x12).mgmt.v1alpha1.GetDailyMetricCountRequest\x1a*.mgmt.v1alpha1.GetDailyMetricCountResponse\"\x00\x12_\n\x0eGetMetricCount\x12$.mgmt.v1alpha1.GetMetricCountRequest\x1a%.mgmt.v1alpha1.GetMetricCountResponse\"\x00\x42\xc8\x01\n\x11\x63om.mgmt.v1alpha1B\x0cMetricsProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -52,20 +51,20 @@ _globals['_GETMETRICCOUNTREQUEST'].fields_by_name['job_id']._serialized_options = b'\272H\005r\003\260\001\001' _globals['_GETMETRICCOUNTREQUEST'].fields_by_name['run_id']._loaded_options = None _globals['_GETMETRICCOUNTREQUEST'].fields_by_name['run_id']._serialized_options = b'\272H\005r\003\260\001\001' - _globals['_RANGEDMETRICNAME']._serialized_start=1116 - _globals['_RANGEDMETRICNAME']._serialized_end=1209 - _globals['_DATE']._serialized_start=108 - _globals['_DATE']._serialized_end=208 - _globals['_GETDAILYMETRICCOUNTREQUEST']._serialized_start=211 - _globals['_GETDAILYMETRICCOUNTREQUEST']._serialized_end=505 - _globals['_GETDAILYMETRICCOUNTRESPONSE']._serialized_start=507 - _globals['_GETDAILYMETRICCOUNTRESPONSE']._serialized_end=588 - _globals['_DAYRESULT']._serialized_start=590 - _globals['_DAYRESULT']._serialized_end=664 - _globals['_GETMETRICCOUNTREQUEST']._serialized_start=667 - _globals['_GETMETRICCOUNTREQUEST']._serialized_end=1066 - _globals['_GETMETRICCOUNTRESPONSE']._serialized_start=1068 - _globals['_GETMETRICCOUNTRESPONSE']._serialized_end=1114 - _globals['_METRICSSERVICE']._serialized_start=1212 - _globals['_METRICSSERVICE']._serialized_end=1437 + _globals['_RANGEDMETRICNAME']._serialized_start=999 + _globals['_RANGEDMETRICNAME']._serialized_end=1092 + _globals['_DATE']._serialized_start=75 + _globals['_DATE']._serialized_end=175 + _globals['_GETDAILYMETRICCOUNTREQUEST']._serialized_start=178 + _globals['_GETDAILYMETRICCOUNTREQUEST']._serialized_end=472 + _globals['_GETDAILYMETRICCOUNTRESPONSE']._serialized_start=474 + _globals['_GETDAILYMETRICCOUNTRESPONSE']._serialized_end=555 + _globals['_DAYRESULT']._serialized_start=557 + _globals['_DAYRESULT']._serialized_end=631 + _globals['_GETMETRICCOUNTREQUEST']._serialized_start=634 + _globals['_GETMETRICCOUNTREQUEST']._serialized_end=949 + _globals['_GETMETRICCOUNTRESPONSE']._serialized_start=951 + _globals['_GETMETRICCOUNTRESPONSE']._serialized_end=997 + _globals['_METRICSSERVICE']._serialized_start=1095 + _globals['_METRICSSERVICE']._serialized_end=1320 # @@protoc_insertion_point(module_scope) diff --git a/python/src/neosync/mgmt/v1alpha1/metrics_pb2.pyi b/python/src/neosync/mgmt/v1alpha1/metrics_pb2.pyi index 3b79a0f867..7ae07592d0 100644 --- a/python/src/neosync/mgmt/v1alpha1/metrics_pb2.pyi +++ b/python/src/neosync/mgmt/v1alpha1/metrics_pb2.pyi @@ -1,5 +1,4 @@ from buf.validate import validate_pb2 as _validate_pb2 -from google.protobuf import timestamp_pb2 as _timestamp_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor @@ -56,24 +55,20 @@ class DayResult(_message.Message): def __init__(self, date: _Optional[_Union[Date, _Mapping]] = ..., count: _Optional[int] = ...) -> None: ... class GetMetricCountRequest(_message.Message): - __slots__ = ("start", "end", "metric", "account_id", "job_id", "run_id", "start_day", "end_day") - START_FIELD_NUMBER: _ClassVar[int] - END_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("metric", "account_id", "job_id", "run_id", "start_day", "end_day") METRIC_FIELD_NUMBER: _ClassVar[int] ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] JOB_ID_FIELD_NUMBER: _ClassVar[int] RUN_ID_FIELD_NUMBER: _ClassVar[int] START_DAY_FIELD_NUMBER: _ClassVar[int] END_DAY_FIELD_NUMBER: _ClassVar[int] - start: _timestamp_pb2.Timestamp - end: _timestamp_pb2.Timestamp metric: RangedMetricName account_id: str job_id: str run_id: str start_day: Date end_day: Date - def __init__(self, start: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., metric: _Optional[_Union[RangedMetricName, str]] = ..., account_id: _Optional[str] = ..., job_id: _Optional[str] = ..., run_id: _Optional[str] = ..., start_day: _Optional[_Union[Date, _Mapping]] = ..., end_day: _Optional[_Union[Date, _Mapping]] = ...) -> None: ... + def __init__(self, metric: _Optional[_Union[RangedMetricName, str]] = ..., account_id: _Optional[str] = ..., job_id: _Optional[str] = ..., run_id: _Optional[str] = ..., start_day: _Optional[_Union[Date, _Mapping]] = ..., end_day: _Optional[_Union[Date, _Mapping]] = ...) -> None: ... class GetMetricCountResponse(_message.Message): __slots__ = ("count",) diff --git a/python/src/neosync/mgmt/v1alpha1/transformer_pb2.py b/python/src/neosync/mgmt/v1alpha1/transformer_pb2.py index 85ead9ddbf..4a18d5c378 100644 --- a/python/src/neosync/mgmt/v1alpha1/transformer_pb2.py +++ b/python/src/neosync/mgmt/v1alpha1/transformer_pb2.py @@ -26,7 +26,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fmgmt/v1alpha1/transformer.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x1e\n\x1cGetSystemTransformersRequest\"e\n\x1dGetSystemTransformersResponse\x12\x44\n\x0ctransformers\x18\x01 \x03(\x0b\x32 .mgmt.v1alpha1.SystemTransformerR\x0ctransformers\"_\n#GetSystemTransformerBySourceRequest\x12\x38\n\x06source\x18\x01 \x01(\x0e\x32 .mgmt.v1alpha1.TransformerSourceR\x06source\"j\n$GetSystemTransformerBySourceResponse\x12\x42\n\x0btransformer\x18\x01 \x01(\x0b\x32 .mgmt.v1alpha1.SystemTransformerR\x0btransformer\"L\n!GetUserDefinedTransformersRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"o\n\"GetUserDefinedTransformersResponse\x12I\n\x0ctransformers\x18\x01 \x03(\x0b\x32%.mgmt.v1alpha1.UserDefinedTransformerR\x0ctransformers\"W\n$GetUserDefinedTransformerByIdRequest\x12/\n\x0etransformer_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\rtransformerId\"p\n%GetUserDefinedTransformerByIdResponse\x12G\n\x0btransformer\x18\x01 \x01(\x0b\x32%.mgmt.v1alpha1.UserDefinedTransformerR\x0btransformer\"\xbe\x02\n#CreateUserDefinedTransformerRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12-\n\x04name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x12\n\x04type\x18\x04 \x01(\tR\x04type\x12\x38\n\x06source\x18\x05 \x01(\x0e\x32 .mgmt.v1alpha1.TransformerSourceR\x06source\x12O\n\x12transformer_config\x18\x06 \x01(\x0b\x32 .mgmt.v1alpha1.TransformerConfigR\x11transformerConfig\"o\n$CreateUserDefinedTransformerResponse\x12G\n\x0btransformer\x18\x01 \x01(\x0b\x32%.mgmt.v1alpha1.UserDefinedTransformerR\x0btransformer\"V\n#DeleteUserDefinedTransformerRequest\x12/\n\x0etransformer_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\rtransformerId\"&\n$DeleteUserDefinedTransformerResponse\"\xf8\x01\n#UpdateUserDefinedTransformerRequest\x12/\n\x0etransformer_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\rtransformerId\x12-\n\x04name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12O\n\x12transformer_config\x18\x04 \x01(\x0b\x32 .mgmt.v1alpha1.TransformerConfigR\x11transformerConfig\"o\n$UpdateUserDefinedTransformerResponse\x12G\n\x0btransformer\x18\x01 \x01(\x0b\x32%.mgmt.v1alpha1.UserDefinedTransformerR\x0btransformer\"\x92\x01\n!IsTransformerNameAvailableRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x44\n\x10transformer_name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x0ftransformerName\"G\n\"IsTransformerNameAvailableResponse\x12!\n\x0cis_available\x18\x01 \x01(\x08R\x0bisAvailable\"\xf5\x03\n\x16UserDefinedTransformer\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12?\n\tdata_type\x18\x05 \x01(\x0e\x32\".mgmt.v1alpha1.TransformerDataTypeR\x08\x64\x61taType\x12\x38\n\x06source\x18\x06 \x01(\x0e\x32 .mgmt.v1alpha1.TransformerSourceR\x06source\x12\x38\n\x06\x63onfig\x18\x07 \x01(\x0b\x32 .mgmt.v1alpha1.TransformerConfigR\x06\x63onfig\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x1d\n\naccount_id\x18\n \x01(\tR\taccountId\x12\x41\n\ndata_types\x18\x0b \x03(\x0e\x32\".mgmt.v1alpha1.TransformerDataTypeR\tdataTypes\"\x92\x03\n\x11SystemTransformer\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12?\n\tdata_type\x18\x03 \x01(\x0e\x32\".mgmt.v1alpha1.TransformerDataTypeR\x08\x64\x61taType\x12\x38\n\x06source\x18\x04 \x01(\x0e\x32 .mgmt.v1alpha1.TransformerSourceR\x06source\x12\x38\n\x06\x63onfig\x18\x05 \x01(\x0b\x32 .mgmt.v1alpha1.TransformerConfigR\x06\x63onfig\x12\x41\n\ndata_types\x18\x06 \x03(\x0e\x32\".mgmt.v1alpha1.TransformerDataTypeR\tdataTypes\x12O\n\x13supported_job_types\x18\x07 \x03(\x0e\x32\x1f.mgmt.v1alpha1.SupportedJobTypeR\x11supportedJobTypes\"\xfa\"\n\x11TransformerConfig\x12R\n\x15generate_email_config\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.GenerateEmailH\x00R\x13generateEmailConfig\x12U\n\x16transform_email_config\x18\x02 \x01(\x0b\x32\x1d.mgmt.v1alpha1.TransformEmailH\x00R\x14transformEmailConfig\x12O\n\x14generate_bool_config\x18\x03 \x01(\x0b\x32\x1b.mgmt.v1alpha1.GenerateBoolH\x00R\x12generateBoolConfig\x12\x62\n\x1bgenerate_card_number_config\x18\x04 \x01(\x0b\x32!.mgmt.v1alpha1.GenerateCardNumberH\x00R\x18generateCardNumberConfig\x12O\n\x14generate_city_config\x18\x05 \x01(\x0b\x32\x1b.mgmt.v1alpha1.GenerateCityH\x00R\x12generateCityConfig\x12r\n!generate_e164_phone_number_config\x18\x06 \x01(\x0b\x32&.mgmt.v1alpha1.GenerateE164PhoneNumberH\x00R\x1dgenerateE164PhoneNumberConfig\x12_\n\x1agenerate_first_name_config\x18\x07 \x01(\x0b\x32 .mgmt.v1alpha1.GenerateFirstNameH\x00R\x17generateFirstNameConfig\x12X\n\x17generate_float64_config\x18\x08 \x01(\x0b\x32\x1e.mgmt.v1alpha1.GenerateFloat64H\x00R\x15generateFloat64Config\x12\x65\n\x1cgenerate_full_address_config\x18\t \x01(\x0b\x32\".mgmt.v1alpha1.GenerateFullAddressH\x00R\x19generateFullAddressConfig\x12\\\n\x19generate_full_name_config\x18\n \x01(\x0b\x32\x1f.mgmt.v1alpha1.GenerateFullNameH\x00R\x16generateFullNameConfig\x12U\n\x16generate_gender_config\x18\x0b \x01(\x0b\x32\x1d.mgmt.v1alpha1.GenerateGenderH\x00R\x14generateGenderConfig\x12u\n\"generate_int64_phone_number_config\x18\x0c \x01(\x0b\x32\'.mgmt.v1alpha1.GenerateInt64PhoneNumberH\x00R\x1egenerateInt64PhoneNumberConfig\x12R\n\x15generate_int64_config\x18\r \x01(\x0b\x32\x1c.mgmt.v1alpha1.GenerateInt64H\x00R\x13generateInt64Config\x12\\\n\x19generate_last_name_config\x18\x0e \x01(\x0b\x32\x1f.mgmt.v1alpha1.GenerateLastNameH\x00R\x16generateLastNameConfig\x12\x61\n\x1agenerate_sha256hash_config\x18\x0f \x01(\x0b\x32!.mgmt.v1alpha1.GenerateSha256HashH\x00R\x18generateSha256hashConfig\x12L\n\x13generate_ssn_config\x18\x10 \x01(\x0b\x32\x1a.mgmt.v1alpha1.GenerateSSNH\x00R\x11generateSsnConfig\x12R\n\x15generate_state_config\x18\x11 \x01(\x0b\x32\x1c.mgmt.v1alpha1.GenerateStateH\x00R\x13generateStateConfig\x12k\n\x1egenerate_street_address_config\x18\x12 \x01(\x0b\x32$.mgmt.v1alpha1.GenerateStreetAddressH\x00R\x1bgenerateStreetAddressConfig\x12x\n#generate_string_phone_number_config\x18\x13 \x01(\x0b\x32(.mgmt.v1alpha1.GenerateStringPhoneNumberH\x00R\x1fgenerateStringPhoneNumberConfig\x12U\n\x16generate_string_config\x18\x14 \x01(\x0b\x32\x1d.mgmt.v1alpha1.GenerateStringH\x00R\x14generateStringConfig\x12j\n\x1dgenerate_unixtimestamp_config\x18\x15 \x01(\x0b\x32$.mgmt.v1alpha1.GenerateUnixTimestampH\x00R\x1bgenerateUnixtimestampConfig\x12[\n\x18generate_username_config\x18\x16 \x01(\x0b\x32\x1f.mgmt.v1alpha1.GenerateUsernameH\x00R\x16generateUsernameConfig\x12g\n\x1cgenerate_utctimestamp_config\x18\x17 \x01(\x0b\x32#.mgmt.v1alpha1.GenerateUtcTimestampH\x00R\x1agenerateUtctimestampConfig\x12O\n\x14generate_uuid_config\x18\x18 \x01(\x0b\x32\x1b.mgmt.v1alpha1.GenerateUuidH\x00R\x12generateUuidConfig\x12X\n\x17generate_zipcode_config\x18\x19 \x01(\x0b\x32\x1e.mgmt.v1alpha1.GenerateZipcodeH\x00R\x15generateZipcodeConfig\x12u\n\"transform_e164_phone_number_config\x18\x1a \x01(\x0b\x32\'.mgmt.v1alpha1.TransformE164PhoneNumberH\x00R\x1etransformE164PhoneNumberConfig\x12\x62\n\x1btransform_first_name_config\x18\x1b \x01(\x0b\x32!.mgmt.v1alpha1.TransformFirstNameH\x00R\x18transformFirstNameConfig\x12[\n\x18transform_float64_config\x18\x1c \x01(\x0b\x32\x1f.mgmt.v1alpha1.TransformFloat64H\x00R\x16transformFloat64Config\x12_\n\x1atransform_full_name_config\x18\x1d \x01(\x0b\x32 .mgmt.v1alpha1.TransformFullNameH\x00R\x17transformFullNameConfig\x12x\n#transform_int64_phone_number_config\x18\x1e \x01(\x0b\x32(.mgmt.v1alpha1.TransformInt64PhoneNumberH\x00R\x1ftransformInt64PhoneNumberConfig\x12U\n\x16transform_int64_config\x18\x1f \x01(\x0b\x32\x1d.mgmt.v1alpha1.TransformInt64H\x00R\x14transformInt64Config\x12_\n\x1atransform_last_name_config\x18 \x01(\x0b\x32 .mgmt.v1alpha1.TransformLastNameH\x00R\x17transformLastNameConfig\x12h\n\x1dtransform_phone_number_config\x18! \x01(\x0b\x32#.mgmt.v1alpha1.TransformPhoneNumberH\x00R\x1atransformPhoneNumberConfig\x12X\n\x17transform_string_config\x18\" \x01(\x0b\x32\x1e.mgmt.v1alpha1.TransformStringH\x00R\x15transformStringConfig\x12K\n\x12passthrough_config\x18# \x01(\x0b\x32\x1a.mgmt.v1alpha1.PassthroughH\x00R\x11passthroughConfig\x12\x35\n\nnullconfig\x18$ \x01(\x0b\x32\x13.mgmt.v1alpha1.NullH\x00R\nnullconfig\x12t\n\x1fuser_defined_transformer_config\x18% \x01(\x0b\x32+.mgmt.v1alpha1.UserDefinedTransformerConfigH\x00R\x1cuserDefinedTransformerConfig\x12X\n\x17generate_default_config\x18& \x01(\x0b\x32\x1e.mgmt.v1alpha1.GenerateDefaultH\x00R\x15generateDefaultConfig\x12\x64\n\x1btransform_javascript_config\x18\' \x01(\x0b\x32\".mgmt.v1alpha1.TransformJavascriptH\x00R\x19transformJavascriptConfig\x12\x64\n\x1bgenerate_categorical_config\x18( \x01(\x0b\x32\".mgmt.v1alpha1.GenerateCategoricalH\x00R\x19generateCategoricalConfig\x12z\n#transform_character_scramble_config\x18) \x01(\x0b\x32).mgmt.v1alpha1.TransformCharacterScrambleH\x00R transformCharacterScrambleConfig\x12\x61\n\x1agenerate_javascript_config\x18* \x01(\x0b\x32!.mgmt.v1alpha1.GenerateJavascriptH\x00R\x18generateJavascriptConfig\x12X\n\x17generate_country_config\x18+ \x01(\x0b\x32\x1e.mgmt.v1alpha1.GenerateCountryH\x00R\x15generateCountryConfig\x12\\\n\x19transform_pii_text_config\x18, \x01(\x0b\x32\x1f.mgmt.v1alpha1.TransformPiiTextH\x00R\x16transformPiiTextConfig\x12h\n\x1dgenerate_business_name_config\x18- \x01(\x0b\x32#.mgmt.v1alpha1.GenerateBusinessNameH\x00R\x1agenerateBusinessNameConfig\x12_\n\x1agenerate_ip_address_config\x18. \x01(\x0b\x32 .mgmt.v1alpha1.GenerateIpAddressH\x00R\x17generateIpAddressConfigB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\xf6\x02\n\x10TransformPiiText\x12\x38\n\x0fscore_threshold\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n\x1d\x00\x00\x80?-\x00\x00\x00\x00R\x0escoreThreshold\x12K\n\x12\x64\x65\x66\x61ult_anonymizer\x18\x02 \x01(\x0b\x32\x1c.mgmt.v1alpha1.PiiAnonymizerR\x11\x64\x65\x66\x61ultAnonymizer\x12K\n\x10\x64\x65ny_recognizers\x18\x03 \x03(\x0b\x32 .mgmt.v1alpha1.PiiDenyRecognizerR\x0f\x64\x65nyRecognizers\x12\x37\n\x10\x61llowed_entities\x18\x04 \x03(\tB\x0c\xbaH\t\x92\x01\x06\"\x04r\x02\x10\x01R\x0f\x61llowedEntities\x12\'\n\x0f\x61llowed_phrases\x18\x05 \x03(\tR\x0e\x61llowedPhrases\x12\x1f\n\x08language\x18\x06 \x01(\tH\x00R\x08language\x88\x01\x01\x42\x0b\n\t_language\"p\n\x11PiiDenyRecognizer\x12.\n\x04name\x18\x01 \x01(\tB\x1a\xbaH\x17r\x15\x32\x13^[a-z0-9-_]{1,100}$R\x04name\x12+\n\ndeny_words\x18\x02 \x03(\tB\x0c\xbaH\t\x92\x01\x06\"\x04r\x02\x10\x01R\tdenyWords\"\xad\x05\n\rPiiAnonymizer\x12@\n\x07replace\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.PiiAnonymizer.ReplaceH\x00R\x07replace\x12=\n\x06redact\x18\x02 \x01(\x0b\x32#.mgmt.v1alpha1.PiiAnonymizer.RedactH\x00R\x06redact\x12\x37\n\x04mask\x18\x03 \x01(\x0b\x32!.mgmt.v1alpha1.PiiAnonymizer.MaskH\x00R\x04mask\x12\x37\n\x04hash\x18\x04 \x01(\x0b\x32!.mgmt.v1alpha1.PiiAnonymizer.HashH\x00R\x04hash\x1a.\n\x07Replace\x12\x19\n\x05value\x18\x01 \x01(\tH\x00R\x05value\x88\x01\x01\x42\x08\n\x06_value\x1a\x08\n\x06Redact\x1a\xa7\x01\n\x04Mask\x12&\n\x0cmasking_char\x18\x01 \x01(\tH\x00R\x0bmaskingChar\x88\x01\x01\x12\'\n\rchars_to_mask\x18\x02 \x01(\x05H\x01R\x0b\x63harsToMask\x88\x01\x01\x12\x1e\n\x08\x66rom_end\x18\x03 \x01(\x08H\x02R\x07\x66romEnd\x88\x01\x01\x42\x0f\n\r_masking_charB\x10\n\x0e_chars_to_maskB\x0b\n\t_from_end\x1a\xba\x01\n\x04Hash\x12\x43\n\x04\x61lgo\x18\x01 \x01(\x0e\x32*.mgmt.v1alpha1.PiiAnonymizer.Hash.HashTypeH\x00R\x04\x61lgo\x88\x01\x01\"d\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rHASH_TYPE_MD5\x10\x01\x12\x14\n\x10HASH_TYPE_SHA256\x10\x02\x12\x14\n\x10HASH_TYPE_SHA512\x10\x03\x42\x07\n\x05_algoB\x08\n\x06\x63onfig\"d\n\rGenerateEmail\x12\x44\n\nemail_type\x18\x01 \x01(\x0e\x32 .mgmt.v1alpha1.GenerateEmailTypeH\x00R\temailType\x88\x01\x01\x42\r\n\x0b_email_type\"\x87\x03\n\x0eTransformEmail\x12,\n\x0fpreserve_domain\x18\x01 \x01(\x08H\x00R\x0epreserveDomain\x88\x01\x01\x12,\n\x0fpreserve_length\x18\x02 \x01(\x08H\x01R\x0epreserveLength\x88\x01\x01\x12)\n\x10\x65xcluded_domains\x18\x03 \x03(\tR\x0f\x65xcludedDomains\x12\x44\n\nemail_type\x18\x04 \x01(\x0e\x32 .mgmt.v1alpha1.GenerateEmailTypeH\x02R\temailType\x88\x01\x01\x12X\n\x14invalid_email_action\x18\x05 \x01(\x0e\x32!.mgmt.v1alpha1.InvalidEmailActionH\x03R\x12invalidEmailAction\x88\x01\x01\x42\x12\n\x10_preserve_domainB\x12\n\x10_preserve_lengthB\r\n\x0b_email_typeB\x17\n\x15_invalid_email_action\"\x0e\n\x0cGenerateBool\"G\n\x12GenerateCardNumber\x12\"\n\nvalid_luhn\x18\x01 \x01(\x08H\x00R\tvalidLuhn\x88\x01\x01\x42\r\n\x0b_valid_luhn\"\x0e\n\x0cGenerateCity\"\x11\n\x0fGenerateDefault\"W\n\x17GenerateE164PhoneNumber\x12\x15\n\x03min\x18\x01 \x01(\x03H\x00R\x03min\x88\x01\x01\x12\x15\n\x03max\x18\x02 \x01(\x03H\x01R\x03max\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"\x13\n\x11GenerateFirstName\"\xbf\x01\n\x0fGenerateFloat64\x12*\n\x0erandomize_sign\x18\x01 \x01(\x08H\x00R\rrandomizeSign\x88\x01\x01\x12\x15\n\x03min\x18\x02 \x01(\x01H\x01R\x03min\x88\x01\x01\x12\x15\n\x03max\x18\x03 \x01(\x01H\x02R\x03max\x88\x01\x01\x12!\n\tprecision\x18\x04 \x01(\x03H\x03R\tprecision\x88\x01\x01\x42\x11\n\x0f_randomize_signB\x06\n\x04_minB\x06\n\x04_maxB\x0c\n\n_precision\"\x15\n\x13GenerateFullAddress\"\x12\n\x10GenerateFullName\"D\n\x0eGenerateGender\x12#\n\nabbreviate\x18\x01 \x01(\x08H\x00R\nabbreviate\x88\x01\x01\x42\r\n\x0b_abbreviate\"\x1a\n\x18GenerateInt64PhoneNumber\"\x8c\x01\n\rGenerateInt64\x12*\n\x0erandomize_sign\x18\x01 \x01(\x08H\x00R\rrandomizeSign\x88\x01\x01\x12\x15\n\x03min\x18\x02 \x01(\x03H\x01R\x03min\x88\x01\x01\x12\x15\n\x03max\x18\x03 \x01(\x03H\x02R\x03max\x88\x01\x01\x42\x11\n\x0f_randomize_signB\x06\n\x04_minB\x06\n\x04_max\"\x12\n\x10GenerateLastName\"\x14\n\x12GenerateSha256Hash\"\r\n\x0bGenerateSSN\"Y\n\rGenerateState\x12\x31\n\x12generate_full_name\x18\x01 \x01(\x08H\x00R\x10generateFullName\x88\x01\x01\x42\x15\n\x13_generate_full_name\"\x17\n\x15GenerateStreetAddress\"Y\n\x19GenerateStringPhoneNumber\x12\x15\n\x03min\x18\x02 \x01(\x03H\x00R\x03min\x88\x01\x01\x12\x15\n\x03max\x18\x03 \x01(\x03H\x01R\x03max\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"N\n\x0eGenerateString\x12\x15\n\x03min\x18\x01 \x01(\x03H\x00R\x03min\x88\x01\x01\x12\x15\n\x03max\x18\x02 \x01(\x03H\x01R\x03max\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"\x17\n\x15GenerateUnixTimestamp\"\x12\n\x10GenerateUsername\"\x16\n\x14GenerateUtcTimestamp\"P\n\x0cGenerateUuid\x12,\n\x0finclude_hyphens\x18\x01 \x01(\x08H\x00R\x0eincludeHyphens\x88\x01\x01\x42\x12\n\x10_include_hyphens\"\x11\n\x0fGenerateZipcode\"\\\n\x18TransformE164PhoneNumber\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"V\n\x12TransformFirstName\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"\xc4\x01\n\x10TransformFloat64\x12;\n\x17randomization_range_min\x18\x01 \x01(\x01H\x00R\x15randomizationRangeMin\x88\x01\x01\x12;\n\x17randomization_range_max\x18\x02 \x01(\x01H\x01R\x15randomizationRangeMax\x88\x01\x01\x42\x1a\n\x18_randomization_range_minB\x1a\n\x18_randomization_range_max\"U\n\x11TransformFullName\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"]\n\x19TransformInt64PhoneNumber\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"\xc2\x01\n\x0eTransformInt64\x12;\n\x17randomization_range_min\x18\x01 \x01(\x03H\x00R\x15randomizationRangeMin\x88\x01\x01\x12;\n\x17randomization_range_max\x18\x02 \x01(\x03H\x01R\x15randomizationRangeMax\x88\x01\x01\x42\x1a\n\x18_randomization_range_minB\x1a\n\x18_randomization_range_max\"U\n\x11TransformLastName\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"X\n\x14TransformPhoneNumber\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"S\n\x0fTransformString\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"\r\n\x0bPassthrough\"\x06\n\x04Null\")\n\x13TransformJavascript\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\"8\n\x1cUserDefinedTransformerConfig\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"_\n!ValidateUserJavascriptCodeRequest\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\x12\x1b\n\x04\x63ode\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04\x63ode\":\n\"ValidateUserJavascriptCodeResponse\x12\x14\n\x05valid\x18\x01 \x01(\x08R\x05valid\"I\n\x13GenerateCategorical\x12#\n\ncategories\x18\x01 \x01(\tH\x00R\ncategories\x88\x01\x01\x42\r\n\x0b_categories\"i\n\x1aTransformCharacterScramble\x12\x33\n\x13user_provided_regex\x18\x01 \x01(\tH\x00R\x11userProvidedRegex\x88\x01\x01\x42\x16\n\x14_user_provided_regex\"(\n\x12GenerateJavascript\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\"m\n\x1cValidateUserRegexCodeRequest\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\x12.\n\x13user_provided_regex\x18\x02 \x01(\tR\x11userProvidedRegex\"5\n\x1dValidateUserRegexCodeResponse\x12\x14\n\x05valid\x18\x01 \x01(\x08R\x05valid\"[\n\x0fGenerateCountry\x12\x31\n\x12generate_full_name\x18\x01 \x01(\x08H\x00R\x10generateFullName\x88\x01\x01\x42\x15\n\x13_generate_full_name\"I\n\x1eGetTransformPiiEntitiesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"=\n\x1fGetTransformPiiEntitiesResponse\x12\x1a\n\x08\x65ntities\x18\x01 \x03(\tR\x08\x65ntities\"\x16\n\x14GenerateBusinessName\"c\n\x11GenerateIpAddress\x12\x42\n\x07ip_type\x18\x01 \x01(\x0e\x32$.mgmt.v1alpha1.GenerateIpAddressTypeH\x00R\x06ipType\x88\x01\x01\x42\n\n\x08_ip_type*\xe0\x10\n\x11TransformerSource\x12\"\n\x1eTRANSFORMER_SOURCE_UNSPECIFIED\x10\x00\x12\"\n\x1eTRANSFORMER_SOURCE_PASSTHROUGH\x10\x01\x12\'\n#TRANSFORMER_SOURCE_GENERATE_DEFAULT\x10\x02\x12+\n\'TRANSFORMER_SOURCE_TRANSFORM_JAVASCRIPT\x10\x03\x12%\n!TRANSFORMER_SOURCE_GENERATE_EMAIL\x10\x04\x12&\n\"TRANSFORMER_SOURCE_TRANSFORM_EMAIL\x10\x05\x12$\n TRANSFORMER_SOURCE_GENERATE_BOOL\x10\x06\x12+\n\'TRANSFORMER_SOURCE_GENERATE_CARD_NUMBER\x10\x07\x12$\n TRANSFORMER_SOURCE_GENERATE_CITY\x10\x08\x12\x31\n-TRANSFORMER_SOURCE_GENERATE_E164_PHONE_NUMBER\x10\t\x12*\n&TRANSFORMER_SOURCE_GENERATE_FIRST_NAME\x10\n\x12\'\n#TRANSFORMER_SOURCE_GENERATE_FLOAT64\x10\x0b\x12,\n(TRANSFORMER_SOURCE_GENERATE_FULL_ADDRESS\x10\x0c\x12)\n%TRANSFORMER_SOURCE_GENERATE_FULL_NAME\x10\r\x12&\n\"TRANSFORMER_SOURCE_GENERATE_GENDER\x10\x0e\x12\x32\n.TRANSFORMER_SOURCE_GENERATE_INT64_PHONE_NUMBER\x10\x0f\x12%\n!TRANSFORMER_SOURCE_GENERATE_INT64\x10\x10\x12,\n(TRANSFORMER_SOURCE_GENERATE_RANDOM_INT64\x10\x11\x12)\n%TRANSFORMER_SOURCE_GENERATE_LAST_NAME\x10\x12\x12*\n&TRANSFORMER_SOURCE_GENERATE_SHA256HASH\x10\x13\x12#\n\x1fTRANSFORMER_SOURCE_GENERATE_SSN\x10\x14\x12%\n!TRANSFORMER_SOURCE_GENERATE_STATE\x10\x15\x12.\n*TRANSFORMER_SOURCE_GENERATE_STREET_ADDRESS\x10\x16\x12\x33\n/TRANSFORMER_SOURCE_GENERATE_STRING_PHONE_NUMBER\x10\x17\x12&\n\"TRANSFORMER_SOURCE_GENERATE_STRING\x10\x18\x12-\n)TRANSFORMER_SOURCE_GENERATE_RANDOM_STRING\x10\x19\x12-\n)TRANSFORMER_SOURCE_GENERATE_UNIXTIMESTAMP\x10\x1a\x12(\n$TRANSFORMER_SOURCE_GENERATE_USERNAME\x10\x1b\x12,\n(TRANSFORMER_SOURCE_GENERATE_UTCTIMESTAMP\x10\x1c\x12$\n TRANSFORMER_SOURCE_GENERATE_UUID\x10\x1d\x12\'\n#TRANSFORMER_SOURCE_GENERATE_ZIPCODE\x10\x1e\x12\x32\n.TRANSFORMER_SOURCE_TRANSFORM_E164_PHONE_NUMBER\x10\x1f\x12+\n\'TRANSFORMER_SOURCE_TRANSFORM_FIRST_NAME\x10 \x12(\n$TRANSFORMER_SOURCE_TRANSFORM_FLOAT64\x10!\x12*\n&TRANSFORMER_SOURCE_TRANSFORM_FULL_NAME\x10\"\x12\x33\n/TRANSFORMER_SOURCE_TRANSFORM_INT64_PHONE_NUMBER\x10#\x12&\n\"TRANSFORMER_SOURCE_TRANSFORM_INT64\x10$\x12*\n&TRANSFORMER_SOURCE_TRANSFORM_LAST_NAME\x10%\x12-\n)TRANSFORMER_SOURCE_TRANSFORM_PHONE_NUMBER\x10&\x12\'\n#TRANSFORMER_SOURCE_TRANSFORM_STRING\x10\'\x12$\n TRANSFORMER_SOURCE_GENERATE_NULL\x10(\x12+\n\'TRANSFORMER_SOURCE_GENERATE_CATEGORICAL\x10*\x12\x33\n/TRANSFORMER_SOURCE_TRANSFORM_CHARACTER_SCRAMBLE\x10+\x12#\n\x1fTRANSFORMER_SOURCE_USER_DEFINED\x10,\x12*\n&TRANSFORMER_SOURCE_GENERATE_JAVASCRIPT\x10-\x12\'\n#TRANSFORMER_SOURCE_GENERATE_COUNTRY\x10.\x12)\n%TRANSFORMER_SOURCE_TRANSFORM_PII_TEXT\x10/\x12-\n)TRANSFORMER_SOURCE_GENERATE_BUSINESS_NAME\x10\x30\x12*\n&TRANSFORMER_SOURCE_GENERATE_IP_ADDRESS\x10\x31*\xc4\x02\n\x13TransformerDataType\x12%\n!TRANSFORMER_DATA_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cTRANSFORMER_DATA_TYPE_STRING\x10\x01\x12\x1f\n\x1bTRANSFORMER_DATA_TYPE_INT64\x10\x02\x12!\n\x1dTRANSFORMER_DATA_TYPE_BOOLEAN\x10\x03\x12!\n\x1dTRANSFORMER_DATA_TYPE_FLOAT64\x10\x04\x12\x1e\n\x1aTRANSFORMER_DATA_TYPE_NULL\x10\x05\x12\x1d\n\x19TRANSFORMER_DATA_TYPE_ANY\x10\x06\x12\x1e\n\x1aTRANSFORMER_DATA_TYPE_TIME\x10\x07\x12\x1e\n\x1aTRANSFORMER_DATA_TYPE_UUID\x10\x08*t\n\x10SupportedJobType\x12\"\n\x1eSUPPORTED_JOB_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17SUPPORTED_JOB_TYPE_SYNC\x10\x01\x12\x1f\n\x1bSUPPORTED_JOB_TYPE_GENERATE\x10\x02*{\n\x11GenerateEmailType\x12#\n\x1fGENERATE_EMAIL_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bGENERATE_EMAIL_TYPE_UUID_V4\x10\x01\x12 \n\x1cGENERATE_EMAIL_TYPE_FULLNAME\x10\x02*\xc3\x01\n\x12InvalidEmailAction\x12$\n INVALID_EMAIL_ACTION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bINVALID_EMAIL_ACTION_REJECT\x10\x01\x12\x1d\n\x19INVALID_EMAIL_ACTION_NULL\x10\x02\x12$\n INVALID_EMAIL_ACTION_PASSTHROUGH\x10\x03\x12!\n\x1dINVALID_EMAIL_ACTION_GENERATE\x10\x04*\x8c\x03\n\x15GenerateIpAddressType\x12(\n$GENERATE_IP_ADDRESS_TYPE_UNSPECIFIED\x10\x00\x12&\n\"GENERATE_IP_ADDRESS_TYPE_V4_PUBLIC\x10\x01\x12)\n%GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_A\x10\x02\x12)\n%GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_B\x10\x03\x12)\n%GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_C\x10\x04\x12*\n&GENERATE_IP_ADDRESS_TYPE_V4_LINK_LOCAL\x10\x05\x12)\n%GENERATE_IP_ADDRESS_TYPE_V4_MULTICAST\x10\x06\x12(\n$GENERATE_IP_ADDRESS_TYPE_V4_LOOPBACK\x10\x07\x12\x1f\n\x1bGENERATE_IP_ADDRESS_TYPE_V6\x10\x08\x32\xd1\x0b\n\x13TransformersService\x12t\n\x15GetSystemTransformers\x12+.mgmt.v1alpha1.GetSystemTransformersRequest\x1a,.mgmt.v1alpha1.GetSystemTransformersResponse\"\x00\x12\x89\x01\n\x1cGetSystemTransformerBySource\x12\x32.mgmt.v1alpha1.GetSystemTransformerBySourceRequest\x1a\x33.mgmt.v1alpha1.GetSystemTransformerBySourceResponse\"\x00\x12\x83\x01\n\x1aGetUserDefinedTransformers\x12\x30.mgmt.v1alpha1.GetUserDefinedTransformersRequest\x1a\x31.mgmt.v1alpha1.GetUserDefinedTransformersResponse\"\x00\x12\x8c\x01\n\x1dGetUserDefinedTransformerById\x12\x33.mgmt.v1alpha1.GetUserDefinedTransformerByIdRequest\x1a\x34.mgmt.v1alpha1.GetUserDefinedTransformerByIdResponse\"\x00\x12\x89\x01\n\x1c\x43reateUserDefinedTransformer\x12\x32.mgmt.v1alpha1.CreateUserDefinedTransformerRequest\x1a\x33.mgmt.v1alpha1.CreateUserDefinedTransformerResponse\"\x00\x12\x89\x01\n\x1c\x44\x65leteUserDefinedTransformer\x12\x32.mgmt.v1alpha1.DeleteUserDefinedTransformerRequest\x1a\x33.mgmt.v1alpha1.DeleteUserDefinedTransformerResponse\"\x00\x12\x89\x01\n\x1cUpdateUserDefinedTransformer\x12\x32.mgmt.v1alpha1.UpdateUserDefinedTransformerRequest\x1a\x33.mgmt.v1alpha1.UpdateUserDefinedTransformerResponse\"\x00\x12\x83\x01\n\x1aIsTransformerNameAvailable\x12\x30.mgmt.v1alpha1.IsTransformerNameAvailableRequest\x1a\x31.mgmt.v1alpha1.IsTransformerNameAvailableResponse\"\x00\x12\x83\x01\n\x1aValidateUserJavascriptCode\x12\x30.mgmt.v1alpha1.ValidateUserJavascriptCodeRequest\x1a\x31.mgmt.v1alpha1.ValidateUserJavascriptCodeResponse\"\x00\x12t\n\x15ValidateUserRegexCode\x12+.mgmt.v1alpha1.ValidateUserRegexCodeRequest\x1a,.mgmt.v1alpha1.ValidateUserRegexCodeResponse\"\x00\x12}\n\x17GetTransformPiiEntities\x12-.mgmt.v1alpha1.GetTransformPiiEntitiesRequest\x1a..mgmt.v1alpha1.GetTransformPiiEntitiesResponse\"\x03\x90\x02\x01\x42\xcc\x01\n\x11\x63om.mgmt.v1alpha1B\x10TransformerProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fmgmt/v1alpha1/transformer.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x1e\n\x1cGetSystemTransformersRequest\"e\n\x1dGetSystemTransformersResponse\x12\x44\n\x0ctransformers\x18\x01 \x03(\x0b\x32 .mgmt.v1alpha1.SystemTransformerR\x0ctransformers\"_\n#GetSystemTransformerBySourceRequest\x12\x38\n\x06source\x18\x01 \x01(\x0e\x32 .mgmt.v1alpha1.TransformerSourceR\x06source\"j\n$GetSystemTransformerBySourceResponse\x12\x42\n\x0btransformer\x18\x01 \x01(\x0b\x32 .mgmt.v1alpha1.SystemTransformerR\x0btransformer\"L\n!GetUserDefinedTransformersRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"o\n\"GetUserDefinedTransformersResponse\x12I\n\x0ctransformers\x18\x01 \x03(\x0b\x32%.mgmt.v1alpha1.UserDefinedTransformerR\x0ctransformers\"W\n$GetUserDefinedTransformerByIdRequest\x12/\n\x0etransformer_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\rtransformerId\"p\n%GetUserDefinedTransformerByIdResponse\x12G\n\x0btransformer\x18\x01 \x01(\x0b\x32%.mgmt.v1alpha1.UserDefinedTransformerR\x0btransformer\"\xb0\x02\n#CreateUserDefinedTransformerRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12-\n\x04name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x38\n\x06source\x18\x05 \x01(\x0e\x32 .mgmt.v1alpha1.TransformerSourceR\x06source\x12O\n\x12transformer_config\x18\x06 \x01(\x0b\x32 .mgmt.v1alpha1.TransformerConfigR\x11transformerConfigJ\x04\x08\x04\x10\x05\"o\n$CreateUserDefinedTransformerResponse\x12G\n\x0btransformer\x18\x01 \x01(\x0b\x32%.mgmt.v1alpha1.UserDefinedTransformerR\x0btransformer\"V\n#DeleteUserDefinedTransformerRequest\x12/\n\x0etransformer_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\rtransformerId\"&\n$DeleteUserDefinedTransformerResponse\"\xf8\x01\n#UpdateUserDefinedTransformerRequest\x12/\n\x0etransformer_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\rtransformerId\x12-\n\x04name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12O\n\x12transformer_config\x18\x04 \x01(\x0b\x32 .mgmt.v1alpha1.TransformerConfigR\x11transformerConfig\"o\n$UpdateUserDefinedTransformerResponse\x12G\n\x0btransformer\x18\x01 \x01(\x0b\x32%.mgmt.v1alpha1.UserDefinedTransformerR\x0btransformer\"\x92\x01\n!IsTransformerNameAvailableRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x44\n\x10transformer_name\x18\x02 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x0ftransformerName\"G\n\"IsTransformerNameAvailableResponse\x12!\n\x0cis_available\x18\x01 \x01(\x08R\x0bisAvailable\"\xf5\x03\n\x16UserDefinedTransformer\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12?\n\tdata_type\x18\x05 \x01(\x0e\x32\".mgmt.v1alpha1.TransformerDataTypeR\x08\x64\x61taType\x12\x38\n\x06source\x18\x06 \x01(\x0e\x32 .mgmt.v1alpha1.TransformerSourceR\x06source\x12\x38\n\x06\x63onfig\x18\x07 \x01(\x0b\x32 .mgmt.v1alpha1.TransformerConfigR\x06\x63onfig\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x1d\n\naccount_id\x18\n \x01(\tR\taccountId\x12\x41\n\ndata_types\x18\x0b \x03(\x0e\x32\".mgmt.v1alpha1.TransformerDataTypeR\tdataTypes\"\x92\x03\n\x11SystemTransformer\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12?\n\tdata_type\x18\x03 \x01(\x0e\x32\".mgmt.v1alpha1.TransformerDataTypeR\x08\x64\x61taType\x12\x38\n\x06source\x18\x04 \x01(\x0e\x32 .mgmt.v1alpha1.TransformerSourceR\x06source\x12\x38\n\x06\x63onfig\x18\x05 \x01(\x0b\x32 .mgmt.v1alpha1.TransformerConfigR\x06\x63onfig\x12\x41\n\ndata_types\x18\x06 \x03(\x0e\x32\".mgmt.v1alpha1.TransformerDataTypeR\tdataTypes\x12O\n\x13supported_job_types\x18\x07 \x03(\x0e\x32\x1f.mgmt.v1alpha1.SupportedJobTypeR\x11supportedJobTypes\"\xfa\"\n\x11TransformerConfig\x12R\n\x15generate_email_config\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.GenerateEmailH\x00R\x13generateEmailConfig\x12U\n\x16transform_email_config\x18\x02 \x01(\x0b\x32\x1d.mgmt.v1alpha1.TransformEmailH\x00R\x14transformEmailConfig\x12O\n\x14generate_bool_config\x18\x03 \x01(\x0b\x32\x1b.mgmt.v1alpha1.GenerateBoolH\x00R\x12generateBoolConfig\x12\x62\n\x1bgenerate_card_number_config\x18\x04 \x01(\x0b\x32!.mgmt.v1alpha1.GenerateCardNumberH\x00R\x18generateCardNumberConfig\x12O\n\x14generate_city_config\x18\x05 \x01(\x0b\x32\x1b.mgmt.v1alpha1.GenerateCityH\x00R\x12generateCityConfig\x12r\n!generate_e164_phone_number_config\x18\x06 \x01(\x0b\x32&.mgmt.v1alpha1.GenerateE164PhoneNumberH\x00R\x1dgenerateE164PhoneNumberConfig\x12_\n\x1agenerate_first_name_config\x18\x07 \x01(\x0b\x32 .mgmt.v1alpha1.GenerateFirstNameH\x00R\x17generateFirstNameConfig\x12X\n\x17generate_float64_config\x18\x08 \x01(\x0b\x32\x1e.mgmt.v1alpha1.GenerateFloat64H\x00R\x15generateFloat64Config\x12\x65\n\x1cgenerate_full_address_config\x18\t \x01(\x0b\x32\".mgmt.v1alpha1.GenerateFullAddressH\x00R\x19generateFullAddressConfig\x12\\\n\x19generate_full_name_config\x18\n \x01(\x0b\x32\x1f.mgmt.v1alpha1.GenerateFullNameH\x00R\x16generateFullNameConfig\x12U\n\x16generate_gender_config\x18\x0b \x01(\x0b\x32\x1d.mgmt.v1alpha1.GenerateGenderH\x00R\x14generateGenderConfig\x12u\n\"generate_int64_phone_number_config\x18\x0c \x01(\x0b\x32\'.mgmt.v1alpha1.GenerateInt64PhoneNumberH\x00R\x1egenerateInt64PhoneNumberConfig\x12R\n\x15generate_int64_config\x18\r \x01(\x0b\x32\x1c.mgmt.v1alpha1.GenerateInt64H\x00R\x13generateInt64Config\x12\\\n\x19generate_last_name_config\x18\x0e \x01(\x0b\x32\x1f.mgmt.v1alpha1.GenerateLastNameH\x00R\x16generateLastNameConfig\x12\x61\n\x1agenerate_sha256hash_config\x18\x0f \x01(\x0b\x32!.mgmt.v1alpha1.GenerateSha256HashH\x00R\x18generateSha256hashConfig\x12L\n\x13generate_ssn_config\x18\x10 \x01(\x0b\x32\x1a.mgmt.v1alpha1.GenerateSSNH\x00R\x11generateSsnConfig\x12R\n\x15generate_state_config\x18\x11 \x01(\x0b\x32\x1c.mgmt.v1alpha1.GenerateStateH\x00R\x13generateStateConfig\x12k\n\x1egenerate_street_address_config\x18\x12 \x01(\x0b\x32$.mgmt.v1alpha1.GenerateStreetAddressH\x00R\x1bgenerateStreetAddressConfig\x12x\n#generate_string_phone_number_config\x18\x13 \x01(\x0b\x32(.mgmt.v1alpha1.GenerateStringPhoneNumberH\x00R\x1fgenerateStringPhoneNumberConfig\x12U\n\x16generate_string_config\x18\x14 \x01(\x0b\x32\x1d.mgmt.v1alpha1.GenerateStringH\x00R\x14generateStringConfig\x12j\n\x1dgenerate_unixtimestamp_config\x18\x15 \x01(\x0b\x32$.mgmt.v1alpha1.GenerateUnixTimestampH\x00R\x1bgenerateUnixtimestampConfig\x12[\n\x18generate_username_config\x18\x16 \x01(\x0b\x32\x1f.mgmt.v1alpha1.GenerateUsernameH\x00R\x16generateUsernameConfig\x12g\n\x1cgenerate_utctimestamp_config\x18\x17 \x01(\x0b\x32#.mgmt.v1alpha1.GenerateUtcTimestampH\x00R\x1agenerateUtctimestampConfig\x12O\n\x14generate_uuid_config\x18\x18 \x01(\x0b\x32\x1b.mgmt.v1alpha1.GenerateUuidH\x00R\x12generateUuidConfig\x12X\n\x17generate_zipcode_config\x18\x19 \x01(\x0b\x32\x1e.mgmt.v1alpha1.GenerateZipcodeH\x00R\x15generateZipcodeConfig\x12u\n\"transform_e164_phone_number_config\x18\x1a \x01(\x0b\x32\'.mgmt.v1alpha1.TransformE164PhoneNumberH\x00R\x1etransformE164PhoneNumberConfig\x12\x62\n\x1btransform_first_name_config\x18\x1b \x01(\x0b\x32!.mgmt.v1alpha1.TransformFirstNameH\x00R\x18transformFirstNameConfig\x12[\n\x18transform_float64_config\x18\x1c \x01(\x0b\x32\x1f.mgmt.v1alpha1.TransformFloat64H\x00R\x16transformFloat64Config\x12_\n\x1atransform_full_name_config\x18\x1d \x01(\x0b\x32 .mgmt.v1alpha1.TransformFullNameH\x00R\x17transformFullNameConfig\x12x\n#transform_int64_phone_number_config\x18\x1e \x01(\x0b\x32(.mgmt.v1alpha1.TransformInt64PhoneNumberH\x00R\x1ftransformInt64PhoneNumberConfig\x12U\n\x16transform_int64_config\x18\x1f \x01(\x0b\x32\x1d.mgmt.v1alpha1.TransformInt64H\x00R\x14transformInt64Config\x12_\n\x1atransform_last_name_config\x18 \x01(\x0b\x32 .mgmt.v1alpha1.TransformLastNameH\x00R\x17transformLastNameConfig\x12h\n\x1dtransform_phone_number_config\x18! \x01(\x0b\x32#.mgmt.v1alpha1.TransformPhoneNumberH\x00R\x1atransformPhoneNumberConfig\x12X\n\x17transform_string_config\x18\" \x01(\x0b\x32\x1e.mgmt.v1alpha1.TransformStringH\x00R\x15transformStringConfig\x12K\n\x12passthrough_config\x18# \x01(\x0b\x32\x1a.mgmt.v1alpha1.PassthroughH\x00R\x11passthroughConfig\x12\x35\n\nnullconfig\x18$ \x01(\x0b\x32\x13.mgmt.v1alpha1.NullH\x00R\nnullconfig\x12t\n\x1fuser_defined_transformer_config\x18% \x01(\x0b\x32+.mgmt.v1alpha1.UserDefinedTransformerConfigH\x00R\x1cuserDefinedTransformerConfig\x12X\n\x17generate_default_config\x18& \x01(\x0b\x32\x1e.mgmt.v1alpha1.GenerateDefaultH\x00R\x15generateDefaultConfig\x12\x64\n\x1btransform_javascript_config\x18\' \x01(\x0b\x32\".mgmt.v1alpha1.TransformJavascriptH\x00R\x19transformJavascriptConfig\x12\x64\n\x1bgenerate_categorical_config\x18( \x01(\x0b\x32\".mgmt.v1alpha1.GenerateCategoricalH\x00R\x19generateCategoricalConfig\x12z\n#transform_character_scramble_config\x18) \x01(\x0b\x32).mgmt.v1alpha1.TransformCharacterScrambleH\x00R transformCharacterScrambleConfig\x12\x61\n\x1agenerate_javascript_config\x18* \x01(\x0b\x32!.mgmt.v1alpha1.GenerateJavascriptH\x00R\x18generateJavascriptConfig\x12X\n\x17generate_country_config\x18+ \x01(\x0b\x32\x1e.mgmt.v1alpha1.GenerateCountryH\x00R\x15generateCountryConfig\x12\\\n\x19transform_pii_text_config\x18, \x01(\x0b\x32\x1f.mgmt.v1alpha1.TransformPiiTextH\x00R\x16transformPiiTextConfig\x12h\n\x1dgenerate_business_name_config\x18- \x01(\x0b\x32#.mgmt.v1alpha1.GenerateBusinessNameH\x00R\x1agenerateBusinessNameConfig\x12_\n\x1agenerate_ip_address_config\x18. \x01(\x0b\x32 .mgmt.v1alpha1.GenerateIpAddressH\x00R\x17generateIpAddressConfigB\x0f\n\x06\x63onfig\x12\x05\xbaH\x02\x08\x01\"\xf6\x02\n\x10TransformPiiText\x12\x38\n\x0fscore_threshold\x18\x01 \x01(\x02\x42\x0f\xbaH\x0c\n\n\x1d\x00\x00\x80?-\x00\x00\x00\x00R\x0escoreThreshold\x12K\n\x12\x64\x65\x66\x61ult_anonymizer\x18\x02 \x01(\x0b\x32\x1c.mgmt.v1alpha1.PiiAnonymizerR\x11\x64\x65\x66\x61ultAnonymizer\x12K\n\x10\x64\x65ny_recognizers\x18\x03 \x03(\x0b\x32 .mgmt.v1alpha1.PiiDenyRecognizerR\x0f\x64\x65nyRecognizers\x12\x37\n\x10\x61llowed_entities\x18\x04 \x03(\tB\x0c\xbaH\t\x92\x01\x06\"\x04r\x02\x10\x01R\x0f\x61llowedEntities\x12\'\n\x0f\x61llowed_phrases\x18\x05 \x03(\tR\x0e\x61llowedPhrases\x12\x1f\n\x08language\x18\x06 \x01(\tH\x00R\x08language\x88\x01\x01\x42\x0b\n\t_language\"p\n\x11PiiDenyRecognizer\x12.\n\x04name\x18\x01 \x01(\tB\x1a\xbaH\x17r\x15\x32\x13^[a-z0-9-_]{1,100}$R\x04name\x12+\n\ndeny_words\x18\x02 \x03(\tB\x0c\xbaH\t\x92\x01\x06\"\x04r\x02\x10\x01R\tdenyWords\"\xad\x05\n\rPiiAnonymizer\x12@\n\x07replace\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.PiiAnonymizer.ReplaceH\x00R\x07replace\x12=\n\x06redact\x18\x02 \x01(\x0b\x32#.mgmt.v1alpha1.PiiAnonymizer.RedactH\x00R\x06redact\x12\x37\n\x04mask\x18\x03 \x01(\x0b\x32!.mgmt.v1alpha1.PiiAnonymizer.MaskH\x00R\x04mask\x12\x37\n\x04hash\x18\x04 \x01(\x0b\x32!.mgmt.v1alpha1.PiiAnonymizer.HashH\x00R\x04hash\x1a.\n\x07Replace\x12\x19\n\x05value\x18\x01 \x01(\tH\x00R\x05value\x88\x01\x01\x42\x08\n\x06_value\x1a\x08\n\x06Redact\x1a\xa7\x01\n\x04Mask\x12&\n\x0cmasking_char\x18\x01 \x01(\tH\x00R\x0bmaskingChar\x88\x01\x01\x12\'\n\rchars_to_mask\x18\x02 \x01(\x05H\x01R\x0b\x63harsToMask\x88\x01\x01\x12\x1e\n\x08\x66rom_end\x18\x03 \x01(\x08H\x02R\x07\x66romEnd\x88\x01\x01\x42\x0f\n\r_masking_charB\x10\n\x0e_chars_to_maskB\x0b\n\t_from_end\x1a\xba\x01\n\x04Hash\x12\x43\n\x04\x61lgo\x18\x01 \x01(\x0e\x32*.mgmt.v1alpha1.PiiAnonymizer.Hash.HashTypeH\x00R\x04\x61lgo\x88\x01\x01\"d\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rHASH_TYPE_MD5\x10\x01\x12\x14\n\x10HASH_TYPE_SHA256\x10\x02\x12\x14\n\x10HASH_TYPE_SHA512\x10\x03\x42\x07\n\x05_algoB\x08\n\x06\x63onfig\"d\n\rGenerateEmail\x12\x44\n\nemail_type\x18\x01 \x01(\x0e\x32 .mgmt.v1alpha1.GenerateEmailTypeH\x00R\temailType\x88\x01\x01\x42\r\n\x0b_email_type\"\x87\x03\n\x0eTransformEmail\x12,\n\x0fpreserve_domain\x18\x01 \x01(\x08H\x00R\x0epreserveDomain\x88\x01\x01\x12,\n\x0fpreserve_length\x18\x02 \x01(\x08H\x01R\x0epreserveLength\x88\x01\x01\x12)\n\x10\x65xcluded_domains\x18\x03 \x03(\tR\x0f\x65xcludedDomains\x12\x44\n\nemail_type\x18\x04 \x01(\x0e\x32 .mgmt.v1alpha1.GenerateEmailTypeH\x02R\temailType\x88\x01\x01\x12X\n\x14invalid_email_action\x18\x05 \x01(\x0e\x32!.mgmt.v1alpha1.InvalidEmailActionH\x03R\x12invalidEmailAction\x88\x01\x01\x42\x12\n\x10_preserve_domainB\x12\n\x10_preserve_lengthB\r\n\x0b_email_typeB\x17\n\x15_invalid_email_action\"\x0e\n\x0cGenerateBool\"G\n\x12GenerateCardNumber\x12\"\n\nvalid_luhn\x18\x01 \x01(\x08H\x00R\tvalidLuhn\x88\x01\x01\x42\r\n\x0b_valid_luhn\"\x0e\n\x0cGenerateCity\"\x11\n\x0fGenerateDefault\"W\n\x17GenerateE164PhoneNumber\x12\x15\n\x03min\x18\x01 \x01(\x03H\x00R\x03min\x88\x01\x01\x12\x15\n\x03max\x18\x02 \x01(\x03H\x01R\x03max\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"\x13\n\x11GenerateFirstName\"\xbf\x01\n\x0fGenerateFloat64\x12*\n\x0erandomize_sign\x18\x01 \x01(\x08H\x00R\rrandomizeSign\x88\x01\x01\x12\x15\n\x03min\x18\x02 \x01(\x01H\x01R\x03min\x88\x01\x01\x12\x15\n\x03max\x18\x03 \x01(\x01H\x02R\x03max\x88\x01\x01\x12!\n\tprecision\x18\x04 \x01(\x03H\x03R\tprecision\x88\x01\x01\x42\x11\n\x0f_randomize_signB\x06\n\x04_minB\x06\n\x04_maxB\x0c\n\n_precision\"\x15\n\x13GenerateFullAddress\"\x12\n\x10GenerateFullName\"D\n\x0eGenerateGender\x12#\n\nabbreviate\x18\x01 \x01(\x08H\x00R\nabbreviate\x88\x01\x01\x42\r\n\x0b_abbreviate\"\x1a\n\x18GenerateInt64PhoneNumber\"\x8c\x01\n\rGenerateInt64\x12*\n\x0erandomize_sign\x18\x01 \x01(\x08H\x00R\rrandomizeSign\x88\x01\x01\x12\x15\n\x03min\x18\x02 \x01(\x03H\x01R\x03min\x88\x01\x01\x12\x15\n\x03max\x18\x03 \x01(\x03H\x02R\x03max\x88\x01\x01\x42\x11\n\x0f_randomize_signB\x06\n\x04_minB\x06\n\x04_max\"\x12\n\x10GenerateLastName\"\x14\n\x12GenerateSha256Hash\"\r\n\x0bGenerateSSN\"Y\n\rGenerateState\x12\x31\n\x12generate_full_name\x18\x01 \x01(\x08H\x00R\x10generateFullName\x88\x01\x01\x42\x15\n\x13_generate_full_name\"\x17\n\x15GenerateStreetAddress\"Y\n\x19GenerateStringPhoneNumber\x12\x15\n\x03min\x18\x02 \x01(\x03H\x00R\x03min\x88\x01\x01\x12\x15\n\x03max\x18\x03 \x01(\x03H\x01R\x03max\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"N\n\x0eGenerateString\x12\x15\n\x03min\x18\x01 \x01(\x03H\x00R\x03min\x88\x01\x01\x12\x15\n\x03max\x18\x02 \x01(\x03H\x01R\x03max\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"\x17\n\x15GenerateUnixTimestamp\"\x12\n\x10GenerateUsername\"\x16\n\x14GenerateUtcTimestamp\"P\n\x0cGenerateUuid\x12,\n\x0finclude_hyphens\x18\x01 \x01(\x08H\x00R\x0eincludeHyphens\x88\x01\x01\x42\x12\n\x10_include_hyphens\"\x11\n\x0fGenerateZipcode\"\\\n\x18TransformE164PhoneNumber\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"V\n\x12TransformFirstName\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"\xc4\x01\n\x10TransformFloat64\x12;\n\x17randomization_range_min\x18\x01 \x01(\x01H\x00R\x15randomizationRangeMin\x88\x01\x01\x12;\n\x17randomization_range_max\x18\x02 \x01(\x01H\x01R\x15randomizationRangeMax\x88\x01\x01\x42\x1a\n\x18_randomization_range_minB\x1a\n\x18_randomization_range_max\"U\n\x11TransformFullName\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"]\n\x19TransformInt64PhoneNumber\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"\xc2\x01\n\x0eTransformInt64\x12;\n\x17randomization_range_min\x18\x01 \x01(\x03H\x00R\x15randomizationRangeMin\x88\x01\x01\x12;\n\x17randomization_range_max\x18\x02 \x01(\x03H\x01R\x15randomizationRangeMax\x88\x01\x01\x42\x1a\n\x18_randomization_range_minB\x1a\n\x18_randomization_range_max\"U\n\x11TransformLastName\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"X\n\x14TransformPhoneNumber\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"S\n\x0fTransformString\x12,\n\x0fpreserve_length\x18\x01 \x01(\x08H\x00R\x0epreserveLength\x88\x01\x01\x42\x12\n\x10_preserve_length\"\r\n\x0bPassthrough\"\x06\n\x04Null\")\n\x13TransformJavascript\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\"8\n\x1cUserDefinedTransformerConfig\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"F\n!ValidateUserJavascriptCodeRequest\x12\x1b\n\x04\x63ode\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04\x63odeJ\x04\x08\x01\x10\x02\":\n\"ValidateUserJavascriptCodeResponse\x12\x14\n\x05valid\x18\x01 \x01(\x08R\x05valid\"I\n\x13GenerateCategorical\x12#\n\ncategories\x18\x01 \x01(\tH\x00R\ncategories\x88\x01\x01\x42\r\n\x0b_categories\"i\n\x1aTransformCharacterScramble\x12\x33\n\x13user_provided_regex\x18\x01 \x01(\tH\x00R\x11userProvidedRegex\x88\x01\x01\x42\x16\n\x14_user_provided_regex\"(\n\x12GenerateJavascript\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\"T\n\x1cValidateUserRegexCodeRequest\x12.\n\x13user_provided_regex\x18\x02 \x01(\tR\x11userProvidedRegexJ\x04\x08\x01\x10\x02\"5\n\x1dValidateUserRegexCodeResponse\x12\x14\n\x05valid\x18\x01 \x01(\x08R\x05valid\"[\n\x0fGenerateCountry\x12\x31\n\x12generate_full_name\x18\x01 \x01(\x08H\x00R\x10generateFullName\x88\x01\x01\x42\x15\n\x13_generate_full_name\"I\n\x1eGetTransformPiiEntitiesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"=\n\x1fGetTransformPiiEntitiesResponse\x12\x1a\n\x08\x65ntities\x18\x01 \x03(\tR\x08\x65ntities\"\x16\n\x14GenerateBusinessName\"c\n\x11GenerateIpAddress\x12\x42\n\x07ip_type\x18\x01 \x01(\x0e\x32$.mgmt.v1alpha1.GenerateIpAddressTypeH\x00R\x06ipType\x88\x01\x01\x42\n\n\x08_ip_type*\xe0\x10\n\x11TransformerSource\x12\"\n\x1eTRANSFORMER_SOURCE_UNSPECIFIED\x10\x00\x12\"\n\x1eTRANSFORMER_SOURCE_PASSTHROUGH\x10\x01\x12\'\n#TRANSFORMER_SOURCE_GENERATE_DEFAULT\x10\x02\x12+\n\'TRANSFORMER_SOURCE_TRANSFORM_JAVASCRIPT\x10\x03\x12%\n!TRANSFORMER_SOURCE_GENERATE_EMAIL\x10\x04\x12&\n\"TRANSFORMER_SOURCE_TRANSFORM_EMAIL\x10\x05\x12$\n TRANSFORMER_SOURCE_GENERATE_BOOL\x10\x06\x12+\n\'TRANSFORMER_SOURCE_GENERATE_CARD_NUMBER\x10\x07\x12$\n TRANSFORMER_SOURCE_GENERATE_CITY\x10\x08\x12\x31\n-TRANSFORMER_SOURCE_GENERATE_E164_PHONE_NUMBER\x10\t\x12*\n&TRANSFORMER_SOURCE_GENERATE_FIRST_NAME\x10\n\x12\'\n#TRANSFORMER_SOURCE_GENERATE_FLOAT64\x10\x0b\x12,\n(TRANSFORMER_SOURCE_GENERATE_FULL_ADDRESS\x10\x0c\x12)\n%TRANSFORMER_SOURCE_GENERATE_FULL_NAME\x10\r\x12&\n\"TRANSFORMER_SOURCE_GENERATE_GENDER\x10\x0e\x12\x32\n.TRANSFORMER_SOURCE_GENERATE_INT64_PHONE_NUMBER\x10\x0f\x12%\n!TRANSFORMER_SOURCE_GENERATE_INT64\x10\x10\x12,\n(TRANSFORMER_SOURCE_GENERATE_RANDOM_INT64\x10\x11\x12)\n%TRANSFORMER_SOURCE_GENERATE_LAST_NAME\x10\x12\x12*\n&TRANSFORMER_SOURCE_GENERATE_SHA256HASH\x10\x13\x12#\n\x1fTRANSFORMER_SOURCE_GENERATE_SSN\x10\x14\x12%\n!TRANSFORMER_SOURCE_GENERATE_STATE\x10\x15\x12.\n*TRANSFORMER_SOURCE_GENERATE_STREET_ADDRESS\x10\x16\x12\x33\n/TRANSFORMER_SOURCE_GENERATE_STRING_PHONE_NUMBER\x10\x17\x12&\n\"TRANSFORMER_SOURCE_GENERATE_STRING\x10\x18\x12-\n)TRANSFORMER_SOURCE_GENERATE_RANDOM_STRING\x10\x19\x12-\n)TRANSFORMER_SOURCE_GENERATE_UNIXTIMESTAMP\x10\x1a\x12(\n$TRANSFORMER_SOURCE_GENERATE_USERNAME\x10\x1b\x12,\n(TRANSFORMER_SOURCE_GENERATE_UTCTIMESTAMP\x10\x1c\x12$\n TRANSFORMER_SOURCE_GENERATE_UUID\x10\x1d\x12\'\n#TRANSFORMER_SOURCE_GENERATE_ZIPCODE\x10\x1e\x12\x32\n.TRANSFORMER_SOURCE_TRANSFORM_E164_PHONE_NUMBER\x10\x1f\x12+\n\'TRANSFORMER_SOURCE_TRANSFORM_FIRST_NAME\x10 \x12(\n$TRANSFORMER_SOURCE_TRANSFORM_FLOAT64\x10!\x12*\n&TRANSFORMER_SOURCE_TRANSFORM_FULL_NAME\x10\"\x12\x33\n/TRANSFORMER_SOURCE_TRANSFORM_INT64_PHONE_NUMBER\x10#\x12&\n\"TRANSFORMER_SOURCE_TRANSFORM_INT64\x10$\x12*\n&TRANSFORMER_SOURCE_TRANSFORM_LAST_NAME\x10%\x12-\n)TRANSFORMER_SOURCE_TRANSFORM_PHONE_NUMBER\x10&\x12\'\n#TRANSFORMER_SOURCE_TRANSFORM_STRING\x10\'\x12$\n TRANSFORMER_SOURCE_GENERATE_NULL\x10(\x12+\n\'TRANSFORMER_SOURCE_GENERATE_CATEGORICAL\x10*\x12\x33\n/TRANSFORMER_SOURCE_TRANSFORM_CHARACTER_SCRAMBLE\x10+\x12#\n\x1fTRANSFORMER_SOURCE_USER_DEFINED\x10,\x12*\n&TRANSFORMER_SOURCE_GENERATE_JAVASCRIPT\x10-\x12\'\n#TRANSFORMER_SOURCE_GENERATE_COUNTRY\x10.\x12)\n%TRANSFORMER_SOURCE_TRANSFORM_PII_TEXT\x10/\x12-\n)TRANSFORMER_SOURCE_GENERATE_BUSINESS_NAME\x10\x30\x12*\n&TRANSFORMER_SOURCE_GENERATE_IP_ADDRESS\x10\x31*\xc4\x02\n\x13TransformerDataType\x12%\n!TRANSFORMER_DATA_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cTRANSFORMER_DATA_TYPE_STRING\x10\x01\x12\x1f\n\x1bTRANSFORMER_DATA_TYPE_INT64\x10\x02\x12!\n\x1dTRANSFORMER_DATA_TYPE_BOOLEAN\x10\x03\x12!\n\x1dTRANSFORMER_DATA_TYPE_FLOAT64\x10\x04\x12\x1e\n\x1aTRANSFORMER_DATA_TYPE_NULL\x10\x05\x12\x1d\n\x19TRANSFORMER_DATA_TYPE_ANY\x10\x06\x12\x1e\n\x1aTRANSFORMER_DATA_TYPE_TIME\x10\x07\x12\x1e\n\x1aTRANSFORMER_DATA_TYPE_UUID\x10\x08*t\n\x10SupportedJobType\x12\"\n\x1eSUPPORTED_JOB_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17SUPPORTED_JOB_TYPE_SYNC\x10\x01\x12\x1f\n\x1bSUPPORTED_JOB_TYPE_GENERATE\x10\x02*{\n\x11GenerateEmailType\x12#\n\x1fGENERATE_EMAIL_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bGENERATE_EMAIL_TYPE_UUID_V4\x10\x01\x12 \n\x1cGENERATE_EMAIL_TYPE_FULLNAME\x10\x02*\xc3\x01\n\x12InvalidEmailAction\x12$\n INVALID_EMAIL_ACTION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bINVALID_EMAIL_ACTION_REJECT\x10\x01\x12\x1d\n\x19INVALID_EMAIL_ACTION_NULL\x10\x02\x12$\n INVALID_EMAIL_ACTION_PASSTHROUGH\x10\x03\x12!\n\x1dINVALID_EMAIL_ACTION_GENERATE\x10\x04*\x8c\x03\n\x15GenerateIpAddressType\x12(\n$GENERATE_IP_ADDRESS_TYPE_UNSPECIFIED\x10\x00\x12&\n\"GENERATE_IP_ADDRESS_TYPE_V4_PUBLIC\x10\x01\x12)\n%GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_A\x10\x02\x12)\n%GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_B\x10\x03\x12)\n%GENERATE_IP_ADDRESS_TYPE_V4_PRIVATE_C\x10\x04\x12*\n&GENERATE_IP_ADDRESS_TYPE_V4_LINK_LOCAL\x10\x05\x12)\n%GENERATE_IP_ADDRESS_TYPE_V4_MULTICAST\x10\x06\x12(\n$GENERATE_IP_ADDRESS_TYPE_V4_LOOPBACK\x10\x07\x12\x1f\n\x1bGENERATE_IP_ADDRESS_TYPE_V6\x10\x08\x32\xd1\x0b\n\x13TransformersService\x12t\n\x15GetSystemTransformers\x12+.mgmt.v1alpha1.GetSystemTransformersRequest\x1a,.mgmt.v1alpha1.GetSystemTransformersResponse\"\x00\x12\x89\x01\n\x1cGetSystemTransformerBySource\x12\x32.mgmt.v1alpha1.GetSystemTransformerBySourceRequest\x1a\x33.mgmt.v1alpha1.GetSystemTransformerBySourceResponse\"\x00\x12\x83\x01\n\x1aGetUserDefinedTransformers\x12\x30.mgmt.v1alpha1.GetUserDefinedTransformersRequest\x1a\x31.mgmt.v1alpha1.GetUserDefinedTransformersResponse\"\x00\x12\x8c\x01\n\x1dGetUserDefinedTransformerById\x12\x33.mgmt.v1alpha1.GetUserDefinedTransformerByIdRequest\x1a\x34.mgmt.v1alpha1.GetUserDefinedTransformerByIdResponse\"\x00\x12\x89\x01\n\x1c\x43reateUserDefinedTransformer\x12\x32.mgmt.v1alpha1.CreateUserDefinedTransformerRequest\x1a\x33.mgmt.v1alpha1.CreateUserDefinedTransformerResponse\"\x00\x12\x89\x01\n\x1c\x44\x65leteUserDefinedTransformer\x12\x32.mgmt.v1alpha1.DeleteUserDefinedTransformerRequest\x1a\x33.mgmt.v1alpha1.DeleteUserDefinedTransformerResponse\"\x00\x12\x89\x01\n\x1cUpdateUserDefinedTransformer\x12\x32.mgmt.v1alpha1.UpdateUserDefinedTransformerRequest\x1a\x33.mgmt.v1alpha1.UpdateUserDefinedTransformerResponse\"\x00\x12\x83\x01\n\x1aIsTransformerNameAvailable\x12\x30.mgmt.v1alpha1.IsTransformerNameAvailableRequest\x1a\x31.mgmt.v1alpha1.IsTransformerNameAvailableResponse\"\x00\x12\x83\x01\n\x1aValidateUserJavascriptCode\x12\x30.mgmt.v1alpha1.ValidateUserJavascriptCodeRequest\x1a\x31.mgmt.v1alpha1.ValidateUserJavascriptCodeResponse\"\x00\x12t\n\x15ValidateUserRegexCode\x12+.mgmt.v1alpha1.ValidateUserRegexCodeRequest\x1a,.mgmt.v1alpha1.ValidateUserRegexCodeResponse\"\x00\x12}\n\x17GetTransformPiiEntities\x12-.mgmt.v1alpha1.GetTransformPiiEntitiesRequest\x1a..mgmt.v1alpha1.GetTransformPiiEntitiesResponse\"\x03\x90\x02\x01\x42\xcc\x01\n\x11\x63om.mgmt.v1alpha1B\x10TransformerProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -72,18 +72,18 @@ _globals['_GETTRANSFORMPIIENTITIESREQUEST'].fields_by_name['account_id']._serialized_options = b'\272H\005r\003\260\001\001' _globals['_TRANSFORMERSSERVICE'].methods_by_name['GetTransformPiiEntities']._loaded_options = None _globals['_TRANSFORMERSSERVICE'].methods_by_name['GetTransformPiiEntities']._serialized_options = b'\220\002\001' - _globals['_TRANSFORMERSOURCE']._serialized_start=12331 - _globals['_TRANSFORMERSOURCE']._serialized_end=14475 - _globals['_TRANSFORMERDATATYPE']._serialized_start=14478 - _globals['_TRANSFORMERDATATYPE']._serialized_end=14802 - _globals['_SUPPORTEDJOBTYPE']._serialized_start=14804 - _globals['_SUPPORTEDJOBTYPE']._serialized_end=14920 - _globals['_GENERATEEMAILTYPE']._serialized_start=14922 - _globals['_GENERATEEMAILTYPE']._serialized_end=15045 - _globals['_INVALIDEMAILACTION']._serialized_start=15048 - _globals['_INVALIDEMAILACTION']._serialized_end=15243 - _globals['_GENERATEIPADDRESSTYPE']._serialized_start=15246 - _globals['_GENERATEIPADDRESSTYPE']._serialized_end=15642 + _globals['_TRANSFORMERSOURCE']._serialized_start=12267 + _globals['_TRANSFORMERSOURCE']._serialized_end=14411 + _globals['_TRANSFORMERDATATYPE']._serialized_start=14414 + _globals['_TRANSFORMERDATATYPE']._serialized_end=14738 + _globals['_SUPPORTEDJOBTYPE']._serialized_start=14740 + _globals['_SUPPORTEDJOBTYPE']._serialized_end=14856 + _globals['_GENERATEEMAILTYPE']._serialized_start=14858 + _globals['_GENERATEEMAILTYPE']._serialized_end=14981 + _globals['_INVALIDEMAILACTION']._serialized_start=14984 + _globals['_INVALIDEMAILACTION']._serialized_end=15179 + _globals['_GENERATEIPADDRESSTYPE']._serialized_start=15182 + _globals['_GENERATEIPADDRESSTYPE']._serialized_end=15578 _globals['_GETSYSTEMTRANSFORMERSREQUEST']._serialized_start=112 _globals['_GETSYSTEMTRANSFORMERSREQUEST']._serialized_end=142 _globals['_GETSYSTEMTRANSFORMERSRESPONSE']._serialized_start=144 @@ -101,145 +101,145 @@ _globals['_GETUSERDEFINEDTRANSFORMERBYIDRESPONSE']._serialized_start=732 _globals['_GETUSERDEFINEDTRANSFORMERBYIDRESPONSE']._serialized_end=844 _globals['_CREATEUSERDEFINEDTRANSFORMERREQUEST']._serialized_start=847 - _globals['_CREATEUSERDEFINEDTRANSFORMERREQUEST']._serialized_end=1165 - _globals['_CREATEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_start=1167 - _globals['_CREATEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_end=1278 - _globals['_DELETEUSERDEFINEDTRANSFORMERREQUEST']._serialized_start=1280 - _globals['_DELETEUSERDEFINEDTRANSFORMERREQUEST']._serialized_end=1366 - _globals['_DELETEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_start=1368 - _globals['_DELETEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_end=1406 - _globals['_UPDATEUSERDEFINEDTRANSFORMERREQUEST']._serialized_start=1409 - _globals['_UPDATEUSERDEFINEDTRANSFORMERREQUEST']._serialized_end=1657 - _globals['_UPDATEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_start=1659 - _globals['_UPDATEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_end=1770 - _globals['_ISTRANSFORMERNAMEAVAILABLEREQUEST']._serialized_start=1773 - _globals['_ISTRANSFORMERNAMEAVAILABLEREQUEST']._serialized_end=1919 - _globals['_ISTRANSFORMERNAMEAVAILABLERESPONSE']._serialized_start=1921 - _globals['_ISTRANSFORMERNAMEAVAILABLERESPONSE']._serialized_end=1992 - _globals['_USERDEFINEDTRANSFORMER']._serialized_start=1995 - _globals['_USERDEFINEDTRANSFORMER']._serialized_end=2496 - _globals['_SYSTEMTRANSFORMER']._serialized_start=2499 - _globals['_SYSTEMTRANSFORMER']._serialized_end=2901 - _globals['_TRANSFORMERCONFIG']._serialized_start=2904 - _globals['_TRANSFORMERCONFIG']._serialized_end=7378 - _globals['_TRANSFORMPIITEXT']._serialized_start=7381 - _globals['_TRANSFORMPIITEXT']._serialized_end=7755 - _globals['_PIIDENYRECOGNIZER']._serialized_start=7757 - _globals['_PIIDENYRECOGNIZER']._serialized_end=7869 - _globals['_PIIANONYMIZER']._serialized_start=7872 - _globals['_PIIANONYMIZER']._serialized_end=8557 - _globals['_PIIANONYMIZER_REPLACE']._serialized_start=8132 - _globals['_PIIANONYMIZER_REPLACE']._serialized_end=8178 - _globals['_PIIANONYMIZER_REDACT']._serialized_start=8180 - _globals['_PIIANONYMIZER_REDACT']._serialized_end=8188 - _globals['_PIIANONYMIZER_MASK']._serialized_start=8191 - _globals['_PIIANONYMIZER_MASK']._serialized_end=8358 - _globals['_PIIANONYMIZER_HASH']._serialized_start=8361 - _globals['_PIIANONYMIZER_HASH']._serialized_end=8547 - _globals['_PIIANONYMIZER_HASH_HASHTYPE']._serialized_start=8438 - _globals['_PIIANONYMIZER_HASH_HASHTYPE']._serialized_end=8538 - _globals['_GENERATEEMAIL']._serialized_start=8559 - _globals['_GENERATEEMAIL']._serialized_end=8659 - _globals['_TRANSFORMEMAIL']._serialized_start=8662 - _globals['_TRANSFORMEMAIL']._serialized_end=9053 - _globals['_GENERATEBOOL']._serialized_start=9055 - _globals['_GENERATEBOOL']._serialized_end=9069 - _globals['_GENERATECARDNUMBER']._serialized_start=9071 - _globals['_GENERATECARDNUMBER']._serialized_end=9142 - _globals['_GENERATECITY']._serialized_start=9144 - _globals['_GENERATECITY']._serialized_end=9158 - _globals['_GENERATEDEFAULT']._serialized_start=9160 - _globals['_GENERATEDEFAULT']._serialized_end=9177 - _globals['_GENERATEE164PHONENUMBER']._serialized_start=9179 - _globals['_GENERATEE164PHONENUMBER']._serialized_end=9266 - _globals['_GENERATEFIRSTNAME']._serialized_start=9268 - _globals['_GENERATEFIRSTNAME']._serialized_end=9287 - _globals['_GENERATEFLOAT64']._serialized_start=9290 - _globals['_GENERATEFLOAT64']._serialized_end=9481 - _globals['_GENERATEFULLADDRESS']._serialized_start=9483 - _globals['_GENERATEFULLADDRESS']._serialized_end=9504 - _globals['_GENERATEFULLNAME']._serialized_start=9506 - _globals['_GENERATEFULLNAME']._serialized_end=9524 - _globals['_GENERATEGENDER']._serialized_start=9526 - _globals['_GENERATEGENDER']._serialized_end=9594 - _globals['_GENERATEINT64PHONENUMBER']._serialized_start=9596 - _globals['_GENERATEINT64PHONENUMBER']._serialized_end=9622 - _globals['_GENERATEINT64']._serialized_start=9625 - _globals['_GENERATEINT64']._serialized_end=9765 - _globals['_GENERATELASTNAME']._serialized_start=9767 - _globals['_GENERATELASTNAME']._serialized_end=9785 - _globals['_GENERATESHA256HASH']._serialized_start=9787 - _globals['_GENERATESHA256HASH']._serialized_end=9807 - _globals['_GENERATESSN']._serialized_start=9809 - _globals['_GENERATESSN']._serialized_end=9822 - _globals['_GENERATESTATE']._serialized_start=9824 - _globals['_GENERATESTATE']._serialized_end=9913 - _globals['_GENERATESTREETADDRESS']._serialized_start=9915 - _globals['_GENERATESTREETADDRESS']._serialized_end=9938 - _globals['_GENERATESTRINGPHONENUMBER']._serialized_start=9940 - _globals['_GENERATESTRINGPHONENUMBER']._serialized_end=10029 - _globals['_GENERATESTRING']._serialized_start=10031 - _globals['_GENERATESTRING']._serialized_end=10109 - _globals['_GENERATEUNIXTIMESTAMP']._serialized_start=10111 - _globals['_GENERATEUNIXTIMESTAMP']._serialized_end=10134 - _globals['_GENERATEUSERNAME']._serialized_start=10136 - _globals['_GENERATEUSERNAME']._serialized_end=10154 - _globals['_GENERATEUTCTIMESTAMP']._serialized_start=10156 - _globals['_GENERATEUTCTIMESTAMP']._serialized_end=10178 - _globals['_GENERATEUUID']._serialized_start=10180 - _globals['_GENERATEUUID']._serialized_end=10260 - _globals['_GENERATEZIPCODE']._serialized_start=10262 - _globals['_GENERATEZIPCODE']._serialized_end=10279 - _globals['_TRANSFORME164PHONENUMBER']._serialized_start=10281 - _globals['_TRANSFORME164PHONENUMBER']._serialized_end=10373 - _globals['_TRANSFORMFIRSTNAME']._serialized_start=10375 - _globals['_TRANSFORMFIRSTNAME']._serialized_end=10461 - _globals['_TRANSFORMFLOAT64']._serialized_start=10464 - _globals['_TRANSFORMFLOAT64']._serialized_end=10660 - _globals['_TRANSFORMFULLNAME']._serialized_start=10662 - _globals['_TRANSFORMFULLNAME']._serialized_end=10747 - _globals['_TRANSFORMINT64PHONENUMBER']._serialized_start=10749 - _globals['_TRANSFORMINT64PHONENUMBER']._serialized_end=10842 - _globals['_TRANSFORMINT64']._serialized_start=10845 - _globals['_TRANSFORMINT64']._serialized_end=11039 - _globals['_TRANSFORMLASTNAME']._serialized_start=11041 - _globals['_TRANSFORMLASTNAME']._serialized_end=11126 - _globals['_TRANSFORMPHONENUMBER']._serialized_start=11128 - _globals['_TRANSFORMPHONENUMBER']._serialized_end=11216 - _globals['_TRANSFORMSTRING']._serialized_start=11218 - _globals['_TRANSFORMSTRING']._serialized_end=11301 - _globals['_PASSTHROUGH']._serialized_start=11303 - _globals['_PASSTHROUGH']._serialized_end=11316 - _globals['_NULL']._serialized_start=11318 - _globals['_NULL']._serialized_end=11324 - _globals['_TRANSFORMJAVASCRIPT']._serialized_start=11326 - _globals['_TRANSFORMJAVASCRIPT']._serialized_end=11367 - _globals['_USERDEFINEDTRANSFORMERCONFIG']._serialized_start=11369 - _globals['_USERDEFINEDTRANSFORMERCONFIG']._serialized_end=11425 - _globals['_VALIDATEUSERJAVASCRIPTCODEREQUEST']._serialized_start=11427 - _globals['_VALIDATEUSERJAVASCRIPTCODEREQUEST']._serialized_end=11522 - _globals['_VALIDATEUSERJAVASCRIPTCODERESPONSE']._serialized_start=11524 - _globals['_VALIDATEUSERJAVASCRIPTCODERESPONSE']._serialized_end=11582 - _globals['_GENERATECATEGORICAL']._serialized_start=11584 - _globals['_GENERATECATEGORICAL']._serialized_end=11657 - _globals['_TRANSFORMCHARACTERSCRAMBLE']._serialized_start=11659 - _globals['_TRANSFORMCHARACTERSCRAMBLE']._serialized_end=11764 - _globals['_GENERATEJAVASCRIPT']._serialized_start=11766 - _globals['_GENERATEJAVASCRIPT']._serialized_end=11806 - _globals['_VALIDATEUSERREGEXCODEREQUEST']._serialized_start=11808 - _globals['_VALIDATEUSERREGEXCODEREQUEST']._serialized_end=11917 - _globals['_VALIDATEUSERREGEXCODERESPONSE']._serialized_start=11919 - _globals['_VALIDATEUSERREGEXCODERESPONSE']._serialized_end=11972 - _globals['_GENERATECOUNTRY']._serialized_start=11974 - _globals['_GENERATECOUNTRY']._serialized_end=12065 - _globals['_GETTRANSFORMPIIENTITIESREQUEST']._serialized_start=12067 - _globals['_GETTRANSFORMPIIENTITIESREQUEST']._serialized_end=12140 - _globals['_GETTRANSFORMPIIENTITIESRESPONSE']._serialized_start=12142 - _globals['_GETTRANSFORMPIIENTITIESRESPONSE']._serialized_end=12203 - _globals['_GENERATEBUSINESSNAME']._serialized_start=12205 - _globals['_GENERATEBUSINESSNAME']._serialized_end=12227 - _globals['_GENERATEIPADDRESS']._serialized_start=12229 - _globals['_GENERATEIPADDRESS']._serialized_end=12328 - _globals['_TRANSFORMERSSERVICE']._serialized_start=15645 - _globals['_TRANSFORMERSSERVICE']._serialized_end=17134 + _globals['_CREATEUSERDEFINEDTRANSFORMERREQUEST']._serialized_end=1151 + _globals['_CREATEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_start=1153 + _globals['_CREATEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_end=1264 + _globals['_DELETEUSERDEFINEDTRANSFORMERREQUEST']._serialized_start=1266 + _globals['_DELETEUSERDEFINEDTRANSFORMERREQUEST']._serialized_end=1352 + _globals['_DELETEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_start=1354 + _globals['_DELETEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_end=1392 + _globals['_UPDATEUSERDEFINEDTRANSFORMERREQUEST']._serialized_start=1395 + _globals['_UPDATEUSERDEFINEDTRANSFORMERREQUEST']._serialized_end=1643 + _globals['_UPDATEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_start=1645 + _globals['_UPDATEUSERDEFINEDTRANSFORMERRESPONSE']._serialized_end=1756 + _globals['_ISTRANSFORMERNAMEAVAILABLEREQUEST']._serialized_start=1759 + _globals['_ISTRANSFORMERNAMEAVAILABLEREQUEST']._serialized_end=1905 + _globals['_ISTRANSFORMERNAMEAVAILABLERESPONSE']._serialized_start=1907 + _globals['_ISTRANSFORMERNAMEAVAILABLERESPONSE']._serialized_end=1978 + _globals['_USERDEFINEDTRANSFORMER']._serialized_start=1981 + _globals['_USERDEFINEDTRANSFORMER']._serialized_end=2482 + _globals['_SYSTEMTRANSFORMER']._serialized_start=2485 + _globals['_SYSTEMTRANSFORMER']._serialized_end=2887 + _globals['_TRANSFORMERCONFIG']._serialized_start=2890 + _globals['_TRANSFORMERCONFIG']._serialized_end=7364 + _globals['_TRANSFORMPIITEXT']._serialized_start=7367 + _globals['_TRANSFORMPIITEXT']._serialized_end=7741 + _globals['_PIIDENYRECOGNIZER']._serialized_start=7743 + _globals['_PIIDENYRECOGNIZER']._serialized_end=7855 + _globals['_PIIANONYMIZER']._serialized_start=7858 + _globals['_PIIANONYMIZER']._serialized_end=8543 + _globals['_PIIANONYMIZER_REPLACE']._serialized_start=8118 + _globals['_PIIANONYMIZER_REPLACE']._serialized_end=8164 + _globals['_PIIANONYMIZER_REDACT']._serialized_start=8166 + _globals['_PIIANONYMIZER_REDACT']._serialized_end=8174 + _globals['_PIIANONYMIZER_MASK']._serialized_start=8177 + _globals['_PIIANONYMIZER_MASK']._serialized_end=8344 + _globals['_PIIANONYMIZER_HASH']._serialized_start=8347 + _globals['_PIIANONYMIZER_HASH']._serialized_end=8533 + _globals['_PIIANONYMIZER_HASH_HASHTYPE']._serialized_start=8424 + _globals['_PIIANONYMIZER_HASH_HASHTYPE']._serialized_end=8524 + _globals['_GENERATEEMAIL']._serialized_start=8545 + _globals['_GENERATEEMAIL']._serialized_end=8645 + _globals['_TRANSFORMEMAIL']._serialized_start=8648 + _globals['_TRANSFORMEMAIL']._serialized_end=9039 + _globals['_GENERATEBOOL']._serialized_start=9041 + _globals['_GENERATEBOOL']._serialized_end=9055 + _globals['_GENERATECARDNUMBER']._serialized_start=9057 + _globals['_GENERATECARDNUMBER']._serialized_end=9128 + _globals['_GENERATECITY']._serialized_start=9130 + _globals['_GENERATECITY']._serialized_end=9144 + _globals['_GENERATEDEFAULT']._serialized_start=9146 + _globals['_GENERATEDEFAULT']._serialized_end=9163 + _globals['_GENERATEE164PHONENUMBER']._serialized_start=9165 + _globals['_GENERATEE164PHONENUMBER']._serialized_end=9252 + _globals['_GENERATEFIRSTNAME']._serialized_start=9254 + _globals['_GENERATEFIRSTNAME']._serialized_end=9273 + _globals['_GENERATEFLOAT64']._serialized_start=9276 + _globals['_GENERATEFLOAT64']._serialized_end=9467 + _globals['_GENERATEFULLADDRESS']._serialized_start=9469 + _globals['_GENERATEFULLADDRESS']._serialized_end=9490 + _globals['_GENERATEFULLNAME']._serialized_start=9492 + _globals['_GENERATEFULLNAME']._serialized_end=9510 + _globals['_GENERATEGENDER']._serialized_start=9512 + _globals['_GENERATEGENDER']._serialized_end=9580 + _globals['_GENERATEINT64PHONENUMBER']._serialized_start=9582 + _globals['_GENERATEINT64PHONENUMBER']._serialized_end=9608 + _globals['_GENERATEINT64']._serialized_start=9611 + _globals['_GENERATEINT64']._serialized_end=9751 + _globals['_GENERATELASTNAME']._serialized_start=9753 + _globals['_GENERATELASTNAME']._serialized_end=9771 + _globals['_GENERATESHA256HASH']._serialized_start=9773 + _globals['_GENERATESHA256HASH']._serialized_end=9793 + _globals['_GENERATESSN']._serialized_start=9795 + _globals['_GENERATESSN']._serialized_end=9808 + _globals['_GENERATESTATE']._serialized_start=9810 + _globals['_GENERATESTATE']._serialized_end=9899 + _globals['_GENERATESTREETADDRESS']._serialized_start=9901 + _globals['_GENERATESTREETADDRESS']._serialized_end=9924 + _globals['_GENERATESTRINGPHONENUMBER']._serialized_start=9926 + _globals['_GENERATESTRINGPHONENUMBER']._serialized_end=10015 + _globals['_GENERATESTRING']._serialized_start=10017 + _globals['_GENERATESTRING']._serialized_end=10095 + _globals['_GENERATEUNIXTIMESTAMP']._serialized_start=10097 + _globals['_GENERATEUNIXTIMESTAMP']._serialized_end=10120 + _globals['_GENERATEUSERNAME']._serialized_start=10122 + _globals['_GENERATEUSERNAME']._serialized_end=10140 + _globals['_GENERATEUTCTIMESTAMP']._serialized_start=10142 + _globals['_GENERATEUTCTIMESTAMP']._serialized_end=10164 + _globals['_GENERATEUUID']._serialized_start=10166 + _globals['_GENERATEUUID']._serialized_end=10246 + _globals['_GENERATEZIPCODE']._serialized_start=10248 + _globals['_GENERATEZIPCODE']._serialized_end=10265 + _globals['_TRANSFORME164PHONENUMBER']._serialized_start=10267 + _globals['_TRANSFORME164PHONENUMBER']._serialized_end=10359 + _globals['_TRANSFORMFIRSTNAME']._serialized_start=10361 + _globals['_TRANSFORMFIRSTNAME']._serialized_end=10447 + _globals['_TRANSFORMFLOAT64']._serialized_start=10450 + _globals['_TRANSFORMFLOAT64']._serialized_end=10646 + _globals['_TRANSFORMFULLNAME']._serialized_start=10648 + _globals['_TRANSFORMFULLNAME']._serialized_end=10733 + _globals['_TRANSFORMINT64PHONENUMBER']._serialized_start=10735 + _globals['_TRANSFORMINT64PHONENUMBER']._serialized_end=10828 + _globals['_TRANSFORMINT64']._serialized_start=10831 + _globals['_TRANSFORMINT64']._serialized_end=11025 + _globals['_TRANSFORMLASTNAME']._serialized_start=11027 + _globals['_TRANSFORMLASTNAME']._serialized_end=11112 + _globals['_TRANSFORMPHONENUMBER']._serialized_start=11114 + _globals['_TRANSFORMPHONENUMBER']._serialized_end=11202 + _globals['_TRANSFORMSTRING']._serialized_start=11204 + _globals['_TRANSFORMSTRING']._serialized_end=11287 + _globals['_PASSTHROUGH']._serialized_start=11289 + _globals['_PASSTHROUGH']._serialized_end=11302 + _globals['_NULL']._serialized_start=11304 + _globals['_NULL']._serialized_end=11310 + _globals['_TRANSFORMJAVASCRIPT']._serialized_start=11312 + _globals['_TRANSFORMJAVASCRIPT']._serialized_end=11353 + _globals['_USERDEFINEDTRANSFORMERCONFIG']._serialized_start=11355 + _globals['_USERDEFINEDTRANSFORMERCONFIG']._serialized_end=11411 + _globals['_VALIDATEUSERJAVASCRIPTCODEREQUEST']._serialized_start=11413 + _globals['_VALIDATEUSERJAVASCRIPTCODEREQUEST']._serialized_end=11483 + _globals['_VALIDATEUSERJAVASCRIPTCODERESPONSE']._serialized_start=11485 + _globals['_VALIDATEUSERJAVASCRIPTCODERESPONSE']._serialized_end=11543 + _globals['_GENERATECATEGORICAL']._serialized_start=11545 + _globals['_GENERATECATEGORICAL']._serialized_end=11618 + _globals['_TRANSFORMCHARACTERSCRAMBLE']._serialized_start=11620 + _globals['_TRANSFORMCHARACTERSCRAMBLE']._serialized_end=11725 + _globals['_GENERATEJAVASCRIPT']._serialized_start=11727 + _globals['_GENERATEJAVASCRIPT']._serialized_end=11767 + _globals['_VALIDATEUSERREGEXCODEREQUEST']._serialized_start=11769 + _globals['_VALIDATEUSERREGEXCODEREQUEST']._serialized_end=11853 + _globals['_VALIDATEUSERREGEXCODERESPONSE']._serialized_start=11855 + _globals['_VALIDATEUSERREGEXCODERESPONSE']._serialized_end=11908 + _globals['_GENERATECOUNTRY']._serialized_start=11910 + _globals['_GENERATECOUNTRY']._serialized_end=12001 + _globals['_GETTRANSFORMPIIENTITIESREQUEST']._serialized_start=12003 + _globals['_GETTRANSFORMPIIENTITIESREQUEST']._serialized_end=12076 + _globals['_GETTRANSFORMPIIENTITIESRESPONSE']._serialized_start=12078 + _globals['_GETTRANSFORMPIIENTITIESRESPONSE']._serialized_end=12139 + _globals['_GENERATEBUSINESSNAME']._serialized_start=12141 + _globals['_GENERATEBUSINESSNAME']._serialized_end=12163 + _globals['_GENERATEIPADDRESS']._serialized_start=12165 + _globals['_GENERATEIPADDRESS']._serialized_end=12264 + _globals['_TRANSFORMERSSERVICE']._serialized_start=15581 + _globals['_TRANSFORMERSSERVICE']._serialized_end=17070 # @@protoc_insertion_point(module_scope) diff --git a/python/src/neosync/mgmt/v1alpha1/transformer_pb2.pyi b/python/src/neosync/mgmt/v1alpha1/transformer_pb2.pyi index 49416250b1..dcb470f380 100644 --- a/python/src/neosync/mgmt/v1alpha1/transformer_pb2.pyi +++ b/python/src/neosync/mgmt/v1alpha1/transformer_pb2.pyi @@ -229,20 +229,18 @@ class GetUserDefinedTransformerByIdResponse(_message.Message): def __init__(self, transformer: _Optional[_Union[UserDefinedTransformer, _Mapping]] = ...) -> None: ... class CreateUserDefinedTransformerRequest(_message.Message): - __slots__ = ("account_id", "name", "description", "type", "source", "transformer_config") + __slots__ = ("account_id", "name", "description", "source", "transformer_config") ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] DESCRIPTION_FIELD_NUMBER: _ClassVar[int] - TYPE_FIELD_NUMBER: _ClassVar[int] SOURCE_FIELD_NUMBER: _ClassVar[int] TRANSFORMER_CONFIG_FIELD_NUMBER: _ClassVar[int] account_id: str name: str description: str - type: str source: TransformerSource transformer_config: TransformerConfig - def __init__(self, account_id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., type: _Optional[str] = ..., source: _Optional[_Union[TransformerSource, str]] = ..., transformer_config: _Optional[_Union[TransformerConfig, _Mapping]] = ...) -> None: ... + def __init__(self, account_id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., source: _Optional[_Union[TransformerSource, str]] = ..., transformer_config: _Optional[_Union[TransformerConfig, _Mapping]] = ...) -> None: ... class CreateUserDefinedTransformerResponse(_message.Message): __slots__ = ("transformer",) @@ -727,12 +725,10 @@ class UserDefinedTransformerConfig(_message.Message): def __init__(self, id: _Optional[str] = ...) -> None: ... class ValidateUserJavascriptCodeRequest(_message.Message): - __slots__ = ("account_id", "code") - ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("code",) CODE_FIELD_NUMBER: _ClassVar[int] - account_id: str code: str - def __init__(self, account_id: _Optional[str] = ..., code: _Optional[str] = ...) -> None: ... + def __init__(self, code: _Optional[str] = ...) -> None: ... class ValidateUserJavascriptCodeResponse(_message.Message): __slots__ = ("valid",) @@ -759,12 +755,10 @@ class GenerateJavascript(_message.Message): def __init__(self, code: _Optional[str] = ...) -> None: ... class ValidateUserRegexCodeRequest(_message.Message): - __slots__ = ("account_id", "user_provided_regex") - ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("user_provided_regex",) USER_PROVIDED_REGEX_FIELD_NUMBER: _ClassVar[int] - account_id: str user_provided_regex: str - def __init__(self, account_id: _Optional[str] = ..., user_provided_regex: _Optional[str] = ...) -> None: ... + def __init__(self, user_provided_regex: _Optional[str] = ...) -> None: ... class ValidateUserRegexCodeResponse(_message.Message): __slots__ = ("valid",) diff --git a/python/src/neosync/mgmt/v1alpha1/user_account_pb2.py b/python/src/neosync/mgmt/v1alpha1/user_account_pb2.py index 0311348cf8..aba79643d5 100644 --- a/python/src/neosync/mgmt/v1alpha1/user_account_pb2.py +++ b/python/src/neosync/mgmt/v1alpha1/user_account_pb2.py @@ -26,7 +26,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n mgmt/v1alpha1/user_account.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x10\n\x0eGetUserRequest\"*\n\x0fGetUserResponse\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06userId\"\x10\n\x0eSetUserRequest\"*\n\x0fSetUserResponse\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06userId\"\x18\n\x16GetUserAccountsRequest\"Q\n\x17GetUserAccountsResponse\x12\x36\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x08\x61\x63\x63ounts\"\x9a\x01\n\x0bUserAccount\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x32\n\x04type\x18\x03 \x01(\x0e\x32\x1e.mgmt.v1alpha1.UserAccountTypeR\x04type\x12\x33\n\x16has_stripe_customer_id\x18\x04 \x01(\x08R\x13hasStripeCustomerId\"\x91\x01\n#ConvertPersonalToTeamAccountRequest\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12,\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\taccountId\x88\x01\x01\x42\r\n\x0b_account_id\"\xcc\x01\n$ConvertPersonalToTeamAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\x12\x35\n\x14\x63heckout_session_url\x18\x02 \x01(\tH\x00R\x12\x63heckoutSessionUrl\x88\x01\x01\x12\x35\n\x17new_personal_account_id\x18\x03 \x01(\tR\x14newPersonalAccountIdB\x17\n\x15_checkout_session_url\"\x1b\n\x19SetPersonalAccountRequest\";\n\x1aSetPersonalAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\"A\n\x16IsUserInAccountRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\")\n\x17IsUserInAccountResponse\x12\x0e\n\x02ok\x18\x01 \x01(\x08R\x02ok\"J\n\x1fGetAccountTemporalConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"`\n GetAccountTemporalConfigResponse\x12<\n\x06\x63onfig\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"\x88\x01\n\x1fSetAccountTemporalConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12<\n\x06\x63onfig\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"`\n SetAccountTemporalConfigResponse\x12<\n\x06\x63onfig\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"\x91\x01\n\x15\x41\x63\x63ountTemporalConfig\x12\x19\n\x03url\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x03url\x12%\n\tnamespace\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\tnamespace\x12\x36\n\x13sync_job_queue_name\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x10syncJobQueueName\"I\n\x18\x43reateTeamAccountRequest\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\"\x8a\x01\n\x19\x43reateTeamAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\x12\x35\n\x14\x63heckout_session_url\x18\x02 \x01(\tH\x00R\x12\x63heckoutSessionUrl\x88\x01\x01\x42\x17\n\x15_checkout_session_url\"\x8d\x01\n\x0b\x41\x63\x63ountUser\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n\x05image\x18\x03 \x01(\tR\x05image\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12.\n\x04role\x18\x05 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"G\n\x1cGetTeamAccountMembersRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"Q\n\x1dGetTeamAccountMembersResponse\x12\x30\n\x05users\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.AccountUserR\x05users\"l\n\x1eRemoveTeamAccountMemberRequest\x12!\n\x07user_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x06userId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"!\n\x1fRemoveTeamAccountMemberResponse\"\xa6\x01\n\x1eInviteUserToTeamAccountRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x1d\n\x05\x65mail\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05\x65mail\x12\x33\n\x04role\x18\x03 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleH\x00R\x04role\x88\x01\x01\x42\x07\n\x05_role\"\x8d\x03\n\rAccountInvite\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\naccount_id\x18\x02 \x01(\tR\taccountId\x12$\n\x0esender_user_id\x18\x03 \x01(\tR\x0csenderUserId\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12\x14\n\x05token\x18\x05 \x01(\tR\x05token\x12\x1a\n\x08\x61\x63\x63\x65pted\x18\x06 \x01(\x08R\x08\x61\x63\x63\x65pted\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x39\n\nexpires_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\x12.\n\x04role\x18\n \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"W\n\x1fInviteUserToTeamAccountResponse\x12\x34\n\x06invite\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.AccountInviteR\x06invite\"G\n\x1cGetTeamAccountInvitesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"W\n\x1dGetTeamAccountInvitesResponse\x12\x36\n\x07invites\x18\x01 \x03(\x0b\x32\x1c.mgmt.v1alpha1.AccountInviteR\x07invites\":\n\x1eRemoveTeamAccountInviteRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"!\n\x1fRemoveTeamAccountInviteResponse\"?\n\x1e\x41\x63\x63\x65ptTeamAccountInviteRequest\x12\x1d\n\x05token\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05token\"W\n\x1f\x41\x63\x63\x65ptTeamAccountInviteResponse\x12\x34\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x07\x61\x63\x63ount\"\x1d\n\x1bGetSystemInformationRequest\"\xc3\x01\n\x1cGetSystemInformationResponse\x12\x18\n\x07version\x18\x01 \x01(\tR\x07version\x12\x16\n\x06\x63ommit\x18\x02 \x01(\tR\x06\x63ommit\x12\x1a\n\x08\x63ompiler\x18\x03 \x01(\tR\x08\x63ompiler\x12\x1a\n\x08platform\x18\x04 \x01(\tR\x08platform\x12\x39\n\nbuild_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tbuildDate\"L\n!GetAccountOnboardingConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"d\n\"GetAccountOnboardingConfigResponse\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"\x8c\x01\n!SetAccountOnboardingConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12>\n\x06\x63onfig\x18\x02 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"d\n\"SetAccountOnboardingConfigResponse\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"\xbb\x02\n\x17\x41\x63\x63ountOnboardingConfig\x12\x41\n\x1dhas_created_source_connection\x18\x01 \x01(\x08R\x1ahasCreatedSourceConnection\x12K\n\"has_created_destination_connection\x18\x02 \x01(\x08R\x1fhasCreatedDestinationConnection\x12&\n\x0fhas_created_job\x18\x03 \x01(\x08R\rhasCreatedJob\x12.\n\x13has_invited_members\x18\x04 \x01(\x08R\x11hasInvitedMembers\x12\x38\n\x18has_completed_onboarding\x18\x05 \x01(\x08R\x16hasCompletedOnboarding\"B\n\x17GetAccountStatusRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\xe5\x01\n\x18GetAccountStatusResponse\x12*\n\x11used_record_count\x18\x01 \x01(\x04R\x0fusedRecordCount\x12\x35\n\x14\x61llowed_record_count\x18\x02 \x01(\x04H\x00R\x12\x61llowedRecordCount\x88\x01\x01\x12M\n\x13subscription_status\x18\x03 \x01(\x0e\x32\x1c.mgmt.v1alpha1.BillingStatusR\x12subscriptionStatusB\x17\n\x15_allowed_record_count\"\x9c\x01\n\x1bIsAccountStatusValidRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x39\n\x16requested_record_count\x18\x02 \x01(\x04H\x00R\x14requestedRecordCount\x88\x01\x01\x42\x19\n\x17_requested_record_count\"\xa3\x03\n\x1cIsAccountStatusValidResponse\x12\x19\n\x08is_valid\x18\x01 \x01(\x08R\x07isValid\x12\x1b\n\x06reason\x18\x02 \x01(\tH\x00R\x06reason\x88\x01\x01\x12\x1f\n\x0bshould_poll\x18\x03 \x01(\x08R\nshouldPoll\x12*\n\x11used_record_count\x18\x04 \x01(\x04R\x0fusedRecordCount\x12\x35\n\x14\x61llowed_record_count\x18\x05 \x01(\x04H\x01R\x12\x61llowedRecordCount\x88\x01\x01\x12\x43\n\x0e\x61\x63\x63ount_status\x18\x06 \x01(\x0e\x32\x1c.mgmt.v1alpha1.AccountStatusR\raccountStatus\x12I\n\x10trial_expires_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02R\x0etrialExpiresAt\x88\x01\x01\x42\t\n\x07_reasonB\x17\n\x15_allowed_record_countB\x13\n\x11_trial_expires_at\"R\n\'GetAccountBillingCheckoutSessionRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\\\n(GetAccountBillingCheckoutSessionResponse\x12\x30\n\x14\x63heckout_session_url\x18\x01 \x01(\tR\x12\x63heckoutSessionUrl\"P\n%GetAccountBillingPortalSessionRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"V\n&GetAccountBillingPortalSessionResponse\x12,\n\x12portal_session_url\x18\x01 \x01(\tR\x10portalSessionUrl\"<\n\x19GetBillingAccountsRequest\x12\x1f\n\x0b\x61\x63\x63ount_ids\x18\x01 \x03(\tR\naccountIds\"T\n\x1aGetBillingAccountsResponse\x12\x36\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x08\x61\x63\x63ounts\"\xe2\x01\n\x1bSetBillingMeterEventRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12&\n\nevent_name\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\teventName\x12\x1d\n\x05value\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05value\x12\"\n\x08\x65vent_id\x18\x04 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x07\x65ventId\x12!\n\ttimestamp\x18\x05 \x01(\x04H\x00R\ttimestamp\x88\x01\x01\x42\x0c\n\n_timestamp\"\x1e\n\x1cSetBillingMeterEventResponse\"\x90\x01\n\x12SetUserRoleRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12!\n\x07user_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x06userId\x12.\n\x04role\x18\x03 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"\x15\n\x13SetUserRoleResponse*\x92\x01\n\x0fUserAccountType\x12!\n\x1dUSER_ACCOUNT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aUSER_ACCOUNT_TYPE_PERSONAL\x10\x01\x12\x1a\n\x16USER_ACCOUNT_TYPE_TEAM\x10\x02\x12 \n\x1cUSER_ACCOUNT_TYPE_ENTERPRISE\x10\x03*\xa9\x01\n\rBillingStatus\x12\x1e\n\x1a\x42ILLING_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x42ILLING_STATUS_ACTIVE\x10\x01\x12\x1a\n\x16\x42ILLING_STATUS_EXPIRED\x10\x02\x12\x1f\n\x1b\x42ILLING_STATUS_TRIAL_ACTIVE\x10\x03\x12 \n\x1c\x42ILLING_STATUS_TRIAL_EXPIRED\x10\x04*\x8c\x02\n\rAccountStatus\x12%\n!ACCOUNT_STATUS_REASON_UNSPECIFIED\x10\x00\x12(\n$ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT\x10\x01\x12*\n&ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT\x10\x02\x12+\n\'ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE\x10\x03\x12\'\n#ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE\x10\x04\x12(\n$ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED\x10\x05*\x9f\x01\n\x0b\x41\x63\x63ountRole\x12\x1c\n\x18\x41\x43\x43OUNT_ROLE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41\x43\x43OUNT_ROLE_ADMIN\x10\x01\x12\x1e\n\x1a\x41\x43\x43OUNT_ROLE_JOB_DEVELOPER\x10\x02\x12\x1b\n\x17\x41\x43\x43OUNT_ROLE_JOB_VIEWER\x10\x03\x12\x1d\n\x19\x41\x43\x43OUNT_ROLE_JOB_EXECUTOR\x10\x04\x32\xf8\x16\n\x12UserAccountService\x12J\n\x07GetUser\x12\x1d.mgmt.v1alpha1.GetUserRequest\x1a\x1e.mgmt.v1alpha1.GetUserResponse\"\x00\x12J\n\x07SetUser\x12\x1d.mgmt.v1alpha1.SetUserRequest\x1a\x1e.mgmt.v1alpha1.SetUserResponse\"\x00\x12\x62\n\x0fGetUserAccounts\x12%.mgmt.v1alpha1.GetUserAccountsRequest\x1a&.mgmt.v1alpha1.GetUserAccountsResponse\"\x00\x12k\n\x12SetPersonalAccount\x12(.mgmt.v1alpha1.SetPersonalAccountRequest\x1a).mgmt.v1alpha1.SetPersonalAccountResponse\"\x00\x12\x89\x01\n\x1c\x43onvertPersonalToTeamAccount\x12\x32.mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest\x1a\x33.mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse\"\x00\x12h\n\x11\x43reateTeamAccount\x12\'.mgmt.v1alpha1.CreateTeamAccountRequest\x1a(.mgmt.v1alpha1.CreateTeamAccountResponse\"\x00\x12\x62\n\x0fIsUserInAccount\x12%.mgmt.v1alpha1.IsUserInAccountRequest\x1a&.mgmt.v1alpha1.IsUserInAccountResponse\"\x00\x12}\n\x18GetAccountTemporalConfig\x12..mgmt.v1alpha1.GetAccountTemporalConfigRequest\x1a/.mgmt.v1alpha1.GetAccountTemporalConfigResponse\"\x00\x12}\n\x18SetAccountTemporalConfig\x12..mgmt.v1alpha1.SetAccountTemporalConfigRequest\x1a/.mgmt.v1alpha1.SetAccountTemporalConfigResponse\"\x00\x12t\n\x15GetTeamAccountMembers\x12+.mgmt.v1alpha1.GetTeamAccountMembersRequest\x1a,.mgmt.v1alpha1.GetTeamAccountMembersResponse\"\x00\x12z\n\x17RemoveTeamAccountMember\x12-.mgmt.v1alpha1.RemoveTeamAccountMemberRequest\x1a..mgmt.v1alpha1.RemoveTeamAccountMemberResponse\"\x00\x12z\n\x17InviteUserToTeamAccount\x12-.mgmt.v1alpha1.InviteUserToTeamAccountRequest\x1a..mgmt.v1alpha1.InviteUserToTeamAccountResponse\"\x00\x12t\n\x15GetTeamAccountInvites\x12+.mgmt.v1alpha1.GetTeamAccountInvitesRequest\x1a,.mgmt.v1alpha1.GetTeamAccountInvitesResponse\"\x00\x12z\n\x17RemoveTeamAccountInvite\x12-.mgmt.v1alpha1.RemoveTeamAccountInviteRequest\x1a..mgmt.v1alpha1.RemoveTeamAccountInviteResponse\"\x00\x12z\n\x17\x41\x63\x63\x65ptTeamAccountInvite\x12-.mgmt.v1alpha1.AcceptTeamAccountInviteRequest\x1a..mgmt.v1alpha1.AcceptTeamAccountInviteResponse\"\x00\x12t\n\x14GetSystemInformation\x12*.mgmt.v1alpha1.GetSystemInformationRequest\x1a+.mgmt.v1alpha1.GetSystemInformationResponse\"\x03\x90\x02\x01\x12\x83\x01\n\x1aGetAccountOnboardingConfig\x12\x30.mgmt.v1alpha1.GetAccountOnboardingConfigRequest\x1a\x31.mgmt.v1alpha1.GetAccountOnboardingConfigResponse\"\x00\x12\x83\x01\n\x1aSetAccountOnboardingConfig\x12\x30.mgmt.v1alpha1.SetAccountOnboardingConfigRequest\x1a\x31.mgmt.v1alpha1.SetAccountOnboardingConfigResponse\"\x00\x12h\n\x10GetAccountStatus\x12&.mgmt.v1alpha1.GetAccountStatusRequest\x1a\'.mgmt.v1alpha1.GetAccountStatusResponse\"\x03\x90\x02\x01\x12t\n\x14IsAccountStatusValid\x12*.mgmt.v1alpha1.IsAccountStatusValidRequest\x1a+.mgmt.v1alpha1.IsAccountStatusValidResponse\"\x03\x90\x02\x01\x12\x95\x01\n GetAccountBillingCheckoutSession\x12\x36.mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest\x1a\x37.mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse\"\x00\x12\x8f\x01\n\x1eGetAccountBillingPortalSession\x12\x34.mgmt.v1alpha1.GetAccountBillingPortalSessionRequest\x1a\x35.mgmt.v1alpha1.GetAccountBillingPortalSessionResponse\"\x00\x12n\n\x12GetBillingAccounts\x12(.mgmt.v1alpha1.GetBillingAccountsRequest\x1a).mgmt.v1alpha1.GetBillingAccountsResponse\"\x03\x90\x02\x01\x12q\n\x14SetBillingMeterEvent\x12*.mgmt.v1alpha1.SetBillingMeterEventRequest\x1a+.mgmt.v1alpha1.SetBillingMeterEventResponse\"\x00\x12V\n\x0bSetUserRole\x12!.mgmt.v1alpha1.SetUserRoleRequest\x1a\".mgmt.v1alpha1.SetUserRoleResponse\"\x00\x42\xcc\x01\n\x11\x63om.mgmt.v1alpha1B\x10UserAccountProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n mgmt/v1alpha1/user_account.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x10\n\x0eGetUserRequest\"*\n\x0fGetUserResponse\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06userId\"\x10\n\x0eSetUserRequest\"*\n\x0fSetUserResponse\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06userId\"\x18\n\x16GetUserAccountsRequest\"Q\n\x17GetUserAccountsResponse\x12\x36\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x08\x61\x63\x63ounts\"\x9a\x01\n\x0bUserAccount\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x32\n\x04type\x18\x03 \x01(\x0e\x32\x1e.mgmt.v1alpha1.UserAccountTypeR\x04type\x12\x33\n\x16has_stripe_customer_id\x18\x04 \x01(\x08R\x13hasStripeCustomerId\"\x91\x01\n#ConvertPersonalToTeamAccountRequest\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12,\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\taccountId\x88\x01\x01\x42\r\n\x0b_account_id\"\xcc\x01\n$ConvertPersonalToTeamAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\x12\x35\n\x14\x63heckout_session_url\x18\x02 \x01(\tH\x00R\x12\x63heckoutSessionUrl\x88\x01\x01\x12\x35\n\x17new_personal_account_id\x18\x03 \x01(\tR\x14newPersonalAccountIdB\x17\n\x15_checkout_session_url\"\x1b\n\x19SetPersonalAccountRequest\";\n\x1aSetPersonalAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\"A\n\x16IsUserInAccountRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\")\n\x17IsUserInAccountResponse\x12\x0e\n\x02ok\x18\x01 \x01(\x08R\x02ok\"J\n\x1fGetAccountTemporalConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"`\n GetAccountTemporalConfigResponse\x12<\n\x06\x63onfig\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"\x88\x01\n\x1fSetAccountTemporalConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12<\n\x06\x63onfig\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"`\n SetAccountTemporalConfigResponse\x12<\n\x06\x63onfig\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"\x91\x01\n\x15\x41\x63\x63ountTemporalConfig\x12\x19\n\x03url\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x03url\x12%\n\tnamespace\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\tnamespace\x12\x36\n\x13sync_job_queue_name\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x10syncJobQueueName\"I\n\x18\x43reateTeamAccountRequest\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\"\x8a\x01\n\x19\x43reateTeamAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\x12\x35\n\x14\x63heckout_session_url\x18\x02 \x01(\tH\x00R\x12\x63heckoutSessionUrl\x88\x01\x01\x42\x17\n\x15_checkout_session_url\"\x8d\x01\n\x0b\x41\x63\x63ountUser\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n\x05image\x18\x03 \x01(\tR\x05image\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12.\n\x04role\x18\x05 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"G\n\x1cGetTeamAccountMembersRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"Q\n\x1dGetTeamAccountMembersResponse\x12\x30\n\x05users\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.AccountUserR\x05users\"l\n\x1eRemoveTeamAccountMemberRequest\x12!\n\x07user_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x06userId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"!\n\x1fRemoveTeamAccountMemberResponse\"\xa6\x01\n\x1eInviteUserToTeamAccountRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x1d\n\x05\x65mail\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05\x65mail\x12\x33\n\x04role\x18\x03 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleH\x00R\x04role\x88\x01\x01\x42\x07\n\x05_role\"\x8d\x03\n\rAccountInvite\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\naccount_id\x18\x02 \x01(\tR\taccountId\x12$\n\x0esender_user_id\x18\x03 \x01(\tR\x0csenderUserId\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12\x14\n\x05token\x18\x05 \x01(\tR\x05token\x12\x1a\n\x08\x61\x63\x63\x65pted\x18\x06 \x01(\x08R\x08\x61\x63\x63\x65pted\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x39\n\nexpires_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\x12.\n\x04role\x18\n \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"W\n\x1fInviteUserToTeamAccountResponse\x12\x34\n\x06invite\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.AccountInviteR\x06invite\"G\n\x1cGetTeamAccountInvitesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"W\n\x1dGetTeamAccountInvitesResponse\x12\x36\n\x07invites\x18\x01 \x03(\x0b\x32\x1c.mgmt.v1alpha1.AccountInviteR\x07invites\":\n\x1eRemoveTeamAccountInviteRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"!\n\x1fRemoveTeamAccountInviteResponse\"?\n\x1e\x41\x63\x63\x65ptTeamAccountInviteRequest\x12\x1d\n\x05token\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05token\"W\n\x1f\x41\x63\x63\x65ptTeamAccountInviteResponse\x12\x34\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x07\x61\x63\x63ount\"\x1d\n\x1bGetSystemInformationRequest\"\xfb\x01\n\x1cGetSystemInformationResponse\x12\x18\n\x07version\x18\x01 \x01(\tR\x07version\x12\x16\n\x06\x63ommit\x18\x02 \x01(\tR\x06\x63ommit\x12\x1a\n\x08\x63ompiler\x18\x03 \x01(\tR\x08\x63ompiler\x12\x1a\n\x08platform\x18\x04 \x01(\tR\x08platform\x12\x39\n\nbuild_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tbuildDate\x12\x36\n\x07license\x18\x06 \x01(\x0b\x32\x1c.mgmt.v1alpha1.SystemLicenseR\x07license\"\x8f\x01\n\rSystemLicense\x12\x19\n\x08is_valid\x18\x01 \x01(\x08R\x07isValid\x12\x39\n\nexpires_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\x12(\n\x10is_neosync_cloud\x18\x03 \x01(\x08R\x0eisNeosyncCloud\"L\n!GetAccountOnboardingConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"d\n\"GetAccountOnboardingConfigResponse\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"\x8c\x01\n!SetAccountOnboardingConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12>\n\x06\x63onfig\x18\x02 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"d\n\"SetAccountOnboardingConfigResponse\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"k\n\x17\x41\x63\x63ountOnboardingConfig\x12\x38\n\x18has_completed_onboarding\x18\x05 \x01(\x08R\x16hasCompletedOnboardingJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05\"B\n\x17GetAccountStatusRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\xe5\x01\n\x18GetAccountStatusResponse\x12*\n\x11used_record_count\x18\x01 \x01(\x04R\x0fusedRecordCount\x12\x35\n\x14\x61llowed_record_count\x18\x02 \x01(\x04H\x00R\x12\x61llowedRecordCount\x88\x01\x01\x12M\n\x13subscription_status\x18\x03 \x01(\x0e\x32\x1c.mgmt.v1alpha1.BillingStatusR\x12subscriptionStatusB\x17\n\x15_allowed_record_count\"\x9c\x01\n\x1bIsAccountStatusValidRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x39\n\x16requested_record_count\x18\x02 \x01(\x04H\x00R\x14requestedRecordCount\x88\x01\x01\x42\x19\n\x17_requested_record_count\"\xb3\x02\n\x1cIsAccountStatusValidResponse\x12\x19\n\x08is_valid\x18\x01 \x01(\x08R\x07isValid\x12\x1b\n\x06reason\x18\x02 \x01(\tH\x00R\x06reason\x88\x01\x01\x12\x1f\n\x0bshould_poll\x18\x03 \x01(\x08R\nshouldPoll\x12\x43\n\x0e\x61\x63\x63ount_status\x18\x06 \x01(\x0e\x32\x1c.mgmt.v1alpha1.AccountStatusR\raccountStatus\x12I\n\x10trial_expires_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01R\x0etrialExpiresAt\x88\x01\x01\x42\t\n\x07_reasonB\x13\n\x11_trial_expires_atJ\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06\"R\n\'GetAccountBillingCheckoutSessionRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\\\n(GetAccountBillingCheckoutSessionResponse\x12\x30\n\x14\x63heckout_session_url\x18\x01 \x01(\tR\x12\x63heckoutSessionUrl\"P\n%GetAccountBillingPortalSessionRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"V\n&GetAccountBillingPortalSessionResponse\x12,\n\x12portal_session_url\x18\x01 \x01(\tR\x10portalSessionUrl\"<\n\x19GetBillingAccountsRequest\x12\x1f\n\x0b\x61\x63\x63ount_ids\x18\x01 \x03(\tR\naccountIds\"T\n\x1aGetBillingAccountsResponse\x12\x36\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x08\x61\x63\x63ounts\"\xe2\x01\n\x1bSetBillingMeterEventRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12&\n\nevent_name\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\teventName\x12\x1d\n\x05value\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05value\x12\"\n\x08\x65vent_id\x18\x04 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x07\x65ventId\x12!\n\ttimestamp\x18\x05 \x01(\x04H\x00R\ttimestamp\x88\x01\x01\x42\x0c\n\n_timestamp\"\x1e\n\x1cSetBillingMeterEventResponse\"\x90\x01\n\x12SetUserRoleRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12!\n\x07user_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x06userId\x12.\n\x04role\x18\x03 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"\x15\n\x13SetUserRoleResponse*\x92\x01\n\x0fUserAccountType\x12!\n\x1dUSER_ACCOUNT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aUSER_ACCOUNT_TYPE_PERSONAL\x10\x01\x12\x1a\n\x16USER_ACCOUNT_TYPE_TEAM\x10\x02\x12 \n\x1cUSER_ACCOUNT_TYPE_ENTERPRISE\x10\x03*\xa9\x01\n\rBillingStatus\x12\x1e\n\x1a\x42ILLING_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x42ILLING_STATUS_ACTIVE\x10\x01\x12\x1a\n\x16\x42ILLING_STATUS_EXPIRED\x10\x02\x12\x1f\n\x1b\x42ILLING_STATUS_TRIAL_ACTIVE\x10\x03\x12 \n\x1c\x42ILLING_STATUS_TRIAL_EXPIRED\x10\x04*\x90\x02\n\rAccountStatus\x12%\n!ACCOUNT_STATUS_REASON_UNSPECIFIED\x10\x00\x12+\n\'ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE\x10\x03\x12\'\n#ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE\x10\x04\x12(\n$ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED\x10\x05\"\x04\x08\x01\x10\x01\"\x04\x08\x02\x10\x02*$ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT*&ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT*\x9f\x01\n\x0b\x41\x63\x63ountRole\x12\x1c\n\x18\x41\x43\x43OUNT_ROLE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41\x43\x43OUNT_ROLE_ADMIN\x10\x01\x12\x1e\n\x1a\x41\x43\x43OUNT_ROLE_JOB_DEVELOPER\x10\x02\x12\x1b\n\x17\x41\x43\x43OUNT_ROLE_JOB_VIEWER\x10\x03\x12\x1d\n\x19\x41\x43\x43OUNT_ROLE_JOB_EXECUTOR\x10\x04\x32\xf8\x16\n\x12UserAccountService\x12J\n\x07GetUser\x12\x1d.mgmt.v1alpha1.GetUserRequest\x1a\x1e.mgmt.v1alpha1.GetUserResponse\"\x00\x12J\n\x07SetUser\x12\x1d.mgmt.v1alpha1.SetUserRequest\x1a\x1e.mgmt.v1alpha1.SetUserResponse\"\x00\x12\x62\n\x0fGetUserAccounts\x12%.mgmt.v1alpha1.GetUserAccountsRequest\x1a&.mgmt.v1alpha1.GetUserAccountsResponse\"\x00\x12k\n\x12SetPersonalAccount\x12(.mgmt.v1alpha1.SetPersonalAccountRequest\x1a).mgmt.v1alpha1.SetPersonalAccountResponse\"\x00\x12\x89\x01\n\x1c\x43onvertPersonalToTeamAccount\x12\x32.mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest\x1a\x33.mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse\"\x00\x12h\n\x11\x43reateTeamAccount\x12\'.mgmt.v1alpha1.CreateTeamAccountRequest\x1a(.mgmt.v1alpha1.CreateTeamAccountResponse\"\x00\x12\x62\n\x0fIsUserInAccount\x12%.mgmt.v1alpha1.IsUserInAccountRequest\x1a&.mgmt.v1alpha1.IsUserInAccountResponse\"\x00\x12}\n\x18GetAccountTemporalConfig\x12..mgmt.v1alpha1.GetAccountTemporalConfigRequest\x1a/.mgmt.v1alpha1.GetAccountTemporalConfigResponse\"\x00\x12}\n\x18SetAccountTemporalConfig\x12..mgmt.v1alpha1.SetAccountTemporalConfigRequest\x1a/.mgmt.v1alpha1.SetAccountTemporalConfigResponse\"\x00\x12t\n\x15GetTeamAccountMembers\x12+.mgmt.v1alpha1.GetTeamAccountMembersRequest\x1a,.mgmt.v1alpha1.GetTeamAccountMembersResponse\"\x00\x12z\n\x17RemoveTeamAccountMember\x12-.mgmt.v1alpha1.RemoveTeamAccountMemberRequest\x1a..mgmt.v1alpha1.RemoveTeamAccountMemberResponse\"\x00\x12z\n\x17InviteUserToTeamAccount\x12-.mgmt.v1alpha1.InviteUserToTeamAccountRequest\x1a..mgmt.v1alpha1.InviteUserToTeamAccountResponse\"\x00\x12t\n\x15GetTeamAccountInvites\x12+.mgmt.v1alpha1.GetTeamAccountInvitesRequest\x1a,.mgmt.v1alpha1.GetTeamAccountInvitesResponse\"\x00\x12z\n\x17RemoveTeamAccountInvite\x12-.mgmt.v1alpha1.RemoveTeamAccountInviteRequest\x1a..mgmt.v1alpha1.RemoveTeamAccountInviteResponse\"\x00\x12z\n\x17\x41\x63\x63\x65ptTeamAccountInvite\x12-.mgmt.v1alpha1.AcceptTeamAccountInviteRequest\x1a..mgmt.v1alpha1.AcceptTeamAccountInviteResponse\"\x00\x12t\n\x14GetSystemInformation\x12*.mgmt.v1alpha1.GetSystemInformationRequest\x1a+.mgmt.v1alpha1.GetSystemInformationResponse\"\x03\x90\x02\x01\x12\x83\x01\n\x1aGetAccountOnboardingConfig\x12\x30.mgmt.v1alpha1.GetAccountOnboardingConfigRequest\x1a\x31.mgmt.v1alpha1.GetAccountOnboardingConfigResponse\"\x00\x12\x83\x01\n\x1aSetAccountOnboardingConfig\x12\x30.mgmt.v1alpha1.SetAccountOnboardingConfigRequest\x1a\x31.mgmt.v1alpha1.SetAccountOnboardingConfigResponse\"\x00\x12h\n\x10GetAccountStatus\x12&.mgmt.v1alpha1.GetAccountStatusRequest\x1a\'.mgmt.v1alpha1.GetAccountStatusResponse\"\x03\x90\x02\x01\x12t\n\x14IsAccountStatusValid\x12*.mgmt.v1alpha1.IsAccountStatusValidRequest\x1a+.mgmt.v1alpha1.IsAccountStatusValidResponse\"\x03\x90\x02\x01\x12\x95\x01\n GetAccountBillingCheckoutSession\x12\x36.mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest\x1a\x37.mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse\"\x00\x12\x8f\x01\n\x1eGetAccountBillingPortalSession\x12\x34.mgmt.v1alpha1.GetAccountBillingPortalSessionRequest\x1a\x35.mgmt.v1alpha1.GetAccountBillingPortalSessionResponse\"\x00\x12n\n\x12GetBillingAccounts\x12(.mgmt.v1alpha1.GetBillingAccountsRequest\x1a).mgmt.v1alpha1.GetBillingAccountsResponse\"\x03\x90\x02\x01\x12q\n\x14SetBillingMeterEvent\x12*.mgmt.v1alpha1.SetBillingMeterEventRequest\x1a+.mgmt.v1alpha1.SetBillingMeterEventResponse\"\x00\x12V\n\x0bSetUserRole\x12!.mgmt.v1alpha1.SetUserRoleRequest\x1a\".mgmt.v1alpha1.SetUserRoleResponse\"\x00\x42\xcc\x01\n\x11\x63om.mgmt.v1alpha1B\x10UserAccountProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -100,14 +100,14 @@ _globals['_USERACCOUNTSERVICE'].methods_by_name['IsAccountStatusValid']._serialized_options = b'\220\002\001' _globals['_USERACCOUNTSERVICE'].methods_by_name['GetBillingAccounts']._loaded_options = None _globals['_USERACCOUNTSERVICE'].methods_by_name['GetBillingAccounts']._serialized_options = b'\220\002\001' - _globals['_USERACCOUNTTYPE']._serialized_start=6128 - _globals['_USERACCOUNTTYPE']._serialized_end=6274 - _globals['_BILLINGSTATUS']._serialized_start=6277 - _globals['_BILLINGSTATUS']._serialized_end=6446 - _globals['_ACCOUNTSTATUS']._serialized_start=6449 - _globals['_ACCOUNTSTATUS']._serialized_end=6717 - _globals['_ACCOUNTROLE']._serialized_start=6720 - _globals['_ACCOUNTROLE']._serialized_end=6879 + _globals['_USERACCOUNTTYPE']._serialized_start=6009 + _globals['_USERACCOUNTTYPE']._serialized_end=6155 + _globals['_BILLINGSTATUS']._serialized_start=6158 + _globals['_BILLINGSTATUS']._serialized_end=6327 + _globals['_ACCOUNTSTATUS']._serialized_start=6330 + _globals['_ACCOUNTSTATUS']._serialized_end=6602 + _globals['_ACCOUNTROLE']._serialized_start=6605 + _globals['_ACCOUNTROLE']._serialized_end=6764 _globals['_GETUSERREQUEST']._serialized_start=113 _globals['_GETUSERREQUEST']._serialized_end=129 _globals['_GETUSERRESPONSE']._serialized_start=131 @@ -179,45 +179,47 @@ _globals['_GETSYSTEMINFORMATIONREQUEST']._serialized_start=3347 _globals['_GETSYSTEMINFORMATIONREQUEST']._serialized_end=3376 _globals['_GETSYSTEMINFORMATIONRESPONSE']._serialized_start=3379 - _globals['_GETSYSTEMINFORMATIONRESPONSE']._serialized_end=3574 - _globals['_GETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_start=3576 - _globals['_GETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_end=3652 - _globals['_GETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_start=3654 - _globals['_GETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_end=3754 - _globals['_SETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_start=3757 - _globals['_SETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_end=3897 - _globals['_SETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_start=3899 - _globals['_SETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_end=3999 - _globals['_ACCOUNTONBOARDINGCONFIG']._serialized_start=4002 - _globals['_ACCOUNTONBOARDINGCONFIG']._serialized_end=4317 - _globals['_GETACCOUNTSTATUSREQUEST']._serialized_start=4319 - _globals['_GETACCOUNTSTATUSREQUEST']._serialized_end=4385 - _globals['_GETACCOUNTSTATUSRESPONSE']._serialized_start=4388 - _globals['_GETACCOUNTSTATUSRESPONSE']._serialized_end=4617 - _globals['_ISACCOUNTSTATUSVALIDREQUEST']._serialized_start=4620 - _globals['_ISACCOUNTSTATUSVALIDREQUEST']._serialized_end=4776 - _globals['_ISACCOUNTSTATUSVALIDRESPONSE']._serialized_start=4779 - _globals['_ISACCOUNTSTATUSVALIDRESPONSE']._serialized_end=5198 - _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONREQUEST']._serialized_start=5200 - _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONREQUEST']._serialized_end=5282 - _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONRESPONSE']._serialized_start=5284 - _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONRESPONSE']._serialized_end=5376 - _globals['_GETACCOUNTBILLINGPORTALSESSIONREQUEST']._serialized_start=5378 - _globals['_GETACCOUNTBILLINGPORTALSESSIONREQUEST']._serialized_end=5458 - _globals['_GETACCOUNTBILLINGPORTALSESSIONRESPONSE']._serialized_start=5460 - _globals['_GETACCOUNTBILLINGPORTALSESSIONRESPONSE']._serialized_end=5546 - _globals['_GETBILLINGACCOUNTSREQUEST']._serialized_start=5548 - _globals['_GETBILLINGACCOUNTSREQUEST']._serialized_end=5608 - _globals['_GETBILLINGACCOUNTSRESPONSE']._serialized_start=5610 - _globals['_GETBILLINGACCOUNTSRESPONSE']._serialized_end=5694 - _globals['_SETBILLINGMETEREVENTREQUEST']._serialized_start=5697 - _globals['_SETBILLINGMETEREVENTREQUEST']._serialized_end=5923 - _globals['_SETBILLINGMETEREVENTRESPONSE']._serialized_start=5925 - _globals['_SETBILLINGMETEREVENTRESPONSE']._serialized_end=5955 - _globals['_SETUSERROLEREQUEST']._serialized_start=5958 - _globals['_SETUSERROLEREQUEST']._serialized_end=6102 - _globals['_SETUSERROLERESPONSE']._serialized_start=6104 - _globals['_SETUSERROLERESPONSE']._serialized_end=6125 - _globals['_USERACCOUNTSERVICE']._serialized_start=6882 - _globals['_USERACCOUNTSERVICE']._serialized_end=9818 + _globals['_GETSYSTEMINFORMATIONRESPONSE']._serialized_end=3630 + _globals['_SYSTEMLICENSE']._serialized_start=3633 + _globals['_SYSTEMLICENSE']._serialized_end=3776 + _globals['_GETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_start=3778 + _globals['_GETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_end=3854 + _globals['_GETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_start=3856 + _globals['_GETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_end=3956 + _globals['_SETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_start=3959 + _globals['_SETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_end=4099 + _globals['_SETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_start=4101 + _globals['_SETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_end=4201 + _globals['_ACCOUNTONBOARDINGCONFIG']._serialized_start=4203 + _globals['_ACCOUNTONBOARDINGCONFIG']._serialized_end=4310 + _globals['_GETACCOUNTSTATUSREQUEST']._serialized_start=4312 + _globals['_GETACCOUNTSTATUSREQUEST']._serialized_end=4378 + _globals['_GETACCOUNTSTATUSRESPONSE']._serialized_start=4381 + _globals['_GETACCOUNTSTATUSRESPONSE']._serialized_end=4610 + _globals['_ISACCOUNTSTATUSVALIDREQUEST']._serialized_start=4613 + _globals['_ISACCOUNTSTATUSVALIDREQUEST']._serialized_end=4769 + _globals['_ISACCOUNTSTATUSVALIDRESPONSE']._serialized_start=4772 + _globals['_ISACCOUNTSTATUSVALIDRESPONSE']._serialized_end=5079 + _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONREQUEST']._serialized_start=5081 + _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONREQUEST']._serialized_end=5163 + _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONRESPONSE']._serialized_start=5165 + _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONRESPONSE']._serialized_end=5257 + _globals['_GETACCOUNTBILLINGPORTALSESSIONREQUEST']._serialized_start=5259 + _globals['_GETACCOUNTBILLINGPORTALSESSIONREQUEST']._serialized_end=5339 + _globals['_GETACCOUNTBILLINGPORTALSESSIONRESPONSE']._serialized_start=5341 + _globals['_GETACCOUNTBILLINGPORTALSESSIONRESPONSE']._serialized_end=5427 + _globals['_GETBILLINGACCOUNTSREQUEST']._serialized_start=5429 + _globals['_GETBILLINGACCOUNTSREQUEST']._serialized_end=5489 + _globals['_GETBILLINGACCOUNTSRESPONSE']._serialized_start=5491 + _globals['_GETBILLINGACCOUNTSRESPONSE']._serialized_end=5575 + _globals['_SETBILLINGMETEREVENTREQUEST']._serialized_start=5578 + _globals['_SETBILLINGMETEREVENTREQUEST']._serialized_end=5804 + _globals['_SETBILLINGMETEREVENTRESPONSE']._serialized_start=5806 + _globals['_SETBILLINGMETEREVENTRESPONSE']._serialized_end=5836 + _globals['_SETUSERROLEREQUEST']._serialized_start=5839 + _globals['_SETUSERROLEREQUEST']._serialized_end=5983 + _globals['_SETUSERROLERESPONSE']._serialized_start=5985 + _globals['_SETUSERROLERESPONSE']._serialized_end=6006 + _globals['_USERACCOUNTSERVICE']._serialized_start=6767 + _globals['_USERACCOUNTSERVICE']._serialized_end=9703 # @@protoc_insertion_point(module_scope) diff --git a/python/src/neosync/mgmt/v1alpha1/user_account_pb2.pyi b/python/src/neosync/mgmt/v1alpha1/user_account_pb2.pyi index ca9f68dd21..f844e53776 100644 --- a/python/src/neosync/mgmt/v1alpha1/user_account_pb2.pyi +++ b/python/src/neosync/mgmt/v1alpha1/user_account_pb2.pyi @@ -26,8 +26,6 @@ class BillingStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): class AccountStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () ACCOUNT_STATUS_REASON_UNSPECIFIED: _ClassVar[AccountStatus] - ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT: _ClassVar[AccountStatus] - ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT: _ClassVar[AccountStatus] ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE: _ClassVar[AccountStatus] ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE: _ClassVar[AccountStatus] ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED: _ClassVar[AccountStatus] @@ -49,8 +47,6 @@ BILLING_STATUS_EXPIRED: BillingStatus BILLING_STATUS_TRIAL_ACTIVE: BillingStatus BILLING_STATUS_TRIAL_EXPIRED: BillingStatus ACCOUNT_STATUS_REASON_UNSPECIFIED: AccountStatus -ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT: AccountStatus -ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT: AccountStatus ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE: AccountStatus ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE: AccountStatus ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED: AccountStatus @@ -309,18 +305,30 @@ class GetSystemInformationRequest(_message.Message): def __init__(self) -> None: ... class GetSystemInformationResponse(_message.Message): - __slots__ = ("version", "commit", "compiler", "platform", "build_date") + __slots__ = ("version", "commit", "compiler", "platform", "build_date", "license") VERSION_FIELD_NUMBER: _ClassVar[int] COMMIT_FIELD_NUMBER: _ClassVar[int] COMPILER_FIELD_NUMBER: _ClassVar[int] PLATFORM_FIELD_NUMBER: _ClassVar[int] BUILD_DATE_FIELD_NUMBER: _ClassVar[int] + LICENSE_FIELD_NUMBER: _ClassVar[int] version: str commit: str compiler: str platform: str build_date: _timestamp_pb2.Timestamp - def __init__(self, version: _Optional[str] = ..., commit: _Optional[str] = ..., compiler: _Optional[str] = ..., platform: _Optional[str] = ..., build_date: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + license: SystemLicense + def __init__(self, version: _Optional[str] = ..., commit: _Optional[str] = ..., compiler: _Optional[str] = ..., platform: _Optional[str] = ..., build_date: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., license: _Optional[_Union[SystemLicense, _Mapping]] = ...) -> None: ... + +class SystemLicense(_message.Message): + __slots__ = ("is_valid", "expires_at", "is_neosync_cloud") + IS_VALID_FIELD_NUMBER: _ClassVar[int] + EXPIRES_AT_FIELD_NUMBER: _ClassVar[int] + IS_NEOSYNC_CLOUD_FIELD_NUMBER: _ClassVar[int] + is_valid: bool + expires_at: _timestamp_pb2.Timestamp + is_neosync_cloud: bool + def __init__(self, is_valid: bool = ..., expires_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., is_neosync_cloud: bool = ...) -> None: ... class GetAccountOnboardingConfigRequest(_message.Message): __slots__ = ("account_id",) @@ -349,18 +357,10 @@ class SetAccountOnboardingConfigResponse(_message.Message): def __init__(self, config: _Optional[_Union[AccountOnboardingConfig, _Mapping]] = ...) -> None: ... class AccountOnboardingConfig(_message.Message): - __slots__ = ("has_created_source_connection", "has_created_destination_connection", "has_created_job", "has_invited_members", "has_completed_onboarding") - HAS_CREATED_SOURCE_CONNECTION_FIELD_NUMBER: _ClassVar[int] - HAS_CREATED_DESTINATION_CONNECTION_FIELD_NUMBER: _ClassVar[int] - HAS_CREATED_JOB_FIELD_NUMBER: _ClassVar[int] - HAS_INVITED_MEMBERS_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("has_completed_onboarding",) HAS_COMPLETED_ONBOARDING_FIELD_NUMBER: _ClassVar[int] - has_created_source_connection: bool - has_created_destination_connection: bool - has_created_job: bool - has_invited_members: bool has_completed_onboarding: bool - def __init__(self, has_created_source_connection: bool = ..., has_created_destination_connection: bool = ..., has_created_job: bool = ..., has_invited_members: bool = ..., has_completed_onboarding: bool = ...) -> None: ... + def __init__(self, has_completed_onboarding: bool = ...) -> None: ... class GetAccountStatusRequest(_message.Message): __slots__ = ("account_id",) @@ -387,22 +387,18 @@ class IsAccountStatusValidRequest(_message.Message): def __init__(self, account_id: _Optional[str] = ..., requested_record_count: _Optional[int] = ...) -> None: ... class IsAccountStatusValidResponse(_message.Message): - __slots__ = ("is_valid", "reason", "should_poll", "used_record_count", "allowed_record_count", "account_status", "trial_expires_at") + __slots__ = ("is_valid", "reason", "should_poll", "account_status", "trial_expires_at") IS_VALID_FIELD_NUMBER: _ClassVar[int] REASON_FIELD_NUMBER: _ClassVar[int] SHOULD_POLL_FIELD_NUMBER: _ClassVar[int] - USED_RECORD_COUNT_FIELD_NUMBER: _ClassVar[int] - ALLOWED_RECORD_COUNT_FIELD_NUMBER: _ClassVar[int] ACCOUNT_STATUS_FIELD_NUMBER: _ClassVar[int] TRIAL_EXPIRES_AT_FIELD_NUMBER: _ClassVar[int] is_valid: bool reason: str should_poll: bool - used_record_count: int - allowed_record_count: int account_status: AccountStatus trial_expires_at: _timestamp_pb2.Timestamp - def __init__(self, is_valid: bool = ..., reason: _Optional[str] = ..., should_poll: bool = ..., used_record_count: _Optional[int] = ..., allowed_record_count: _Optional[int] = ..., account_status: _Optional[_Union[AccountStatus, str]] = ..., trial_expires_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, is_valid: bool = ..., reason: _Optional[str] = ..., should_poll: bool = ..., account_status: _Optional[_Union[AccountStatus, str]] = ..., trial_expires_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class GetAccountBillingCheckoutSessionRequest(_message.Message): __slots__ = ("account_id",) diff --git a/worker/pkg/benthos/json/processor_neosync_json.go b/worker/pkg/benthos/json/processor_neosync_json.go index 98547a3364..4e73f8b190 100644 --- a/worker/pkg/benthos/json/processor_neosync_json.go +++ b/worker/pkg/benthos/json/processor_neosync_json.go @@ -4,7 +4,6 @@ import ( "context" "time" - "github.com/nucleuscloud/neosync/internal/sqlscanners" "github.com/warpstreamlabs/bento/public/service" ) @@ -74,9 +73,6 @@ func transform(root any) any { return v.Format(time.RFC3339) case []uint8: return string(v) - // TODO this should be neosync bit type - case *sqlscanners.BitString: - return v.String() default: return v } diff --git a/worker/pkg/benthos/neosync_connection_data/neosync_connection_data_input.go b/worker/pkg/benthos/neosync_connection_data/neosync_connection_data_input.go index b1993ecd54..33d595dad0 100644 --- a/worker/pkg/benthos/neosync_connection_data/neosync_connection_data_input.go +++ b/worker/pkg/benthos/neosync_connection_data/neosync_connection_data_input.go @@ -1,20 +1,29 @@ package neosync_benthos_connectiondata import ( + "bytes" "context" - "encoding/json" + "encoding/gob" + "fmt" "log/slog" "sync" "connectrpc.com/connect" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + benthosbuilder_shared "github.com/nucleuscloud/neosync/internal/benthos/benthos-builder/shared" neosync_dynamodb "github.com/nucleuscloud/neosync/internal/dynamodb" - neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" neosync_metadata "github.com/nucleuscloud/neosync/worker/pkg/benthos/metadata" + + neosyncgob "github.com/nucleuscloud/neosync/internal/gob" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" "github.com/warpstreamlabs/bento/public/service" ) +func init() { + neosyncgob.RegisterGobTypes() +} + var neosyncConnectionDataConfigSpec = service.NewConfigSpec(). Summary("Streams Neosync connection data"). Field(service.NewStringField("connection_id")). @@ -121,7 +130,7 @@ type neosyncInput struct { func (g *neosyncInput) Connect(ctx context.Context) error { var streamCfg *mgmtv1alpha1.ConnectionStreamConfig - if g.connectionType == "aws-s3" { + if g.connectionType == string(benthosbuilder_shared.ConnectionTypeAwsS3) { awsS3Cfg := &mgmtv1alpha1.AwsS3StreamConfig{} if g.connectionOpts != nil { if g.connectionOpts.jobRunId != nil && *g.connectionOpts.jobRunId != "" { @@ -135,7 +144,7 @@ func (g *neosyncInput) Connect(ctx context.Context) error { AwsS3Config: awsS3Cfg, }, } - } else if g.connectionType == "gcp-cloud-storage" { + } else if g.connectionType == string(benthosbuilder_shared.ConnectionTypeGCP) { if g.connectionOpts != nil { gcpCfg := &mgmtv1alpha1.GcpCloudStorageStreamConfig{} if g.connectionOpts != nil { @@ -185,40 +194,32 @@ func (g *neosyncInput) Read(ctx context.Context) (*service.Message, service.AckF } return nil, nil, service.ErrEndOfInput } - row := g.resp.Msg().Row - - if g.connectionType == "awsDynamoDB" { - for _, val := range row { - var dynamoDBItem map[string]any - err := json.Unmarshal(val, &dynamoDBItem) - if err != nil { - return nil, nil, err - } + rowBytes := g.resp.Msg().RowBytes - resMap, keyTypeMap := neosync_dynamodb.UnmarshalDynamoDBItem(dynamoDBItem) - msg := service.NewMessage(nil) - msg.MetaSetMut(neosync_metadata.MetaTypeMapStr, keyTypeMap) - msg.SetStructuredMut(resMap) - return msg, func(ctx context.Context, err error) error { - // Nacks are retried automatically when we use service.AutoRetryNacks - return nil - }, nil + if g.connectionType == string(benthosbuilder_shared.ConnectionTypeDynamodb) { + var dynamoDBItem map[string]any + decoder := gob.NewDecoder(bytes.NewReader(rowBytes)) + err := decoder.Decode(&dynamoDBItem) + if err != nil { + return nil, nil, fmt.Errorf("error decoding data connection stream response with gob decoder: %w", err) } + + resMap, keyTypeMap := neosync_dynamodb.UnmarshalDynamoDBItem(dynamoDBItem) + msg := service.NewMessage(nil) + msg.MetaSetMut(neosync_metadata.MetaTypeMapStr, keyTypeMap) + msg.SetStructuredMut(resMap) + return msg, func(ctx context.Context, err error) error { + // Nacks are retried automatically when we use service.AutoRetryNacks + return nil + }, nil } valuesMap := map[string]any{} - for col, val := range row { - if len(val) == 0 { - valuesMap[col] = nil - } else { - newVal, err := g.neosyncTypeRegistry.Unmarshal(val) - if err != nil { - return nil, nil, err - } - valuesMap[col] = newVal - } + decoder := gob.NewDecoder(bytes.NewReader(rowBytes)) + err := decoder.Decode(&valuesMap) + if err != nil { + return nil, nil, fmt.Errorf("error decoding data connection stream response with gob decoder: %w", err) } - msg := service.NewMessage(nil) msg.SetStructuredMut(valuesMap) return msg, func(ctx context.Context, err error) error { diff --git a/worker/pkg/benthos/sql/processor_neosync_mssql.go b/worker/pkg/benthos/sql/processor_neosync_mssql.go index 1eed35c514..cef0340a7a 100644 --- a/worker/pkg/benthos/sql/processor_neosync_mssql.go +++ b/worker/pkg/benthos/sql/processor_neosync_mssql.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/nucleuscloud/neosync/internal/gotypeutil" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" neosync_benthos "github.com/nucleuscloud/neosync/worker/pkg/benthos" "github.com/warpstreamlabs/bento/public/service" ) @@ -127,13 +128,31 @@ func transformNeosyncToMssql( } func getMssqlValue(value any) (any, error) { + value, isNeosyncValue, err := getMssqlNeosyncValue(value) + if err != nil { + return nil, err + } + if isNeosyncValue { + return value, nil + } if gotypeutil.IsMap(value) { bits, err := json.Marshal(value) if err != nil { - return nil, fmt.Errorf("unable to marshal JSON: %w", err) + return nil, fmt.Errorf("unable to marshal go map to json bits: %w", err) } return bits, nil } return value, nil } + +func getMssqlNeosyncValue(root any) (value any, isNeosyncValue bool, err error) { + if valuer, ok := root.(neosynctypes.NeosyncMssqlValuer); ok { + value, err := valuer.ValueMssql() + if err != nil { + return nil, false, fmt.Errorf("unable to get MSSQL value from NeosyncMssqlValuer: %w", err) + } + return value, true, nil + } + return root, false, nil +} diff --git a/worker/pkg/benthos/sql/processor_neosync_mysql.go b/worker/pkg/benthos/sql/processor_neosync_mysql.go index fae2500670..d87b50bb88 100644 --- a/worker/pkg/benthos/sql/processor_neosync_mysql.go +++ b/worker/pkg/benthos/sql/processor_neosync_mysql.go @@ -4,10 +4,9 @@ import ( "context" "encoding/json" "fmt" - "time" "github.com/doug-martin/goqu/v9" - mysqlutil "github.com/nucleuscloud/neosync/internal/mysql" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" neosync_benthos "github.com/nucleuscloud/neosync/worker/pkg/benthos" "github.com/warpstreamlabs/bento/public/service" ) @@ -129,53 +128,44 @@ func getMysqlValue(value any, colDefaults *neosync_benthos.ColumnDefaultProperti return goqu.Default(), nil } - switch v := value.(type) { - case nil: - return v, nil - case []byte: - value, err := handleMysqlByteSlice(v, datatype) - if err != nil { - return nil, fmt.Errorf("unable to handle byte slice: %w", err) - } + if value == nil { + return nil, nil + } + + value, isNeosyncValue, err := getMysqlNeosyncValue(value) + if err != nil { + return nil, err + } + if isNeosyncValue { return value, nil - default: - if mysqlutil.IsJsonDataType(datatype) { - bits, err := json.Marshal(value) - if err != nil { - return nil, fmt.Errorf("unable to marshal JSON: %w", err) - } - return bits, nil - } - return v, nil } -} -func handleMysqlByteSlice(v []byte, datatype string) (any, error) { switch datatype { - case "bit": - bit, err := convertStringToBit(string(v)) - if err != nil { - return nil, fmt.Errorf("unable to convert bit string to SQL bit []byte: %w", err) - } - return bit, nil case "json": - validJson, err := getValidJson(v) - if err != nil { - return nil, fmt.Errorf("unable to get valid json: %w", err) + if v, ok := value.([]byte); ok { + validJson, err := getValidJson(v) + if err != nil { + return nil, fmt.Errorf("unable to get valid json: %w", err) + } + return validJson, nil } - return validJson, nil - case "date": - t, err := convertBitsToTime(v) + bits, err := json.Marshal(value) if err != nil { - return string(v), nil + return nil, fmt.Errorf("unable to marshal mysql json to bits: %w", err) } - return t.Format(time.DateOnly), nil - case "timestamp", "datetime": - t, err := convertBitsToTime(v) + return bits, nil + default: + return value, nil + } +} + +func getMysqlNeosyncValue(root any) (value any, isNeosyncValue bool, err error) { + if valuer, ok := root.(neosynctypes.NeosyncMysqlValuer); ok { + value, err := valuer.ValueMysql() if err != nil { - return string(v), nil + return nil, false, fmt.Errorf("unable to get MYSQL value from NeosyncMysqlValuer: %w", err) } - return t.Format(time.DateTime), nil + return value, true, nil } - return v, nil + return root, false, nil } diff --git a/worker/pkg/benthos/sql/processor_neosync_mysql_test.go b/worker/pkg/benthos/sql/processor_neosync_mysql_test.go index 1a3a9266b1..b8352b7cb3 100644 --- a/worker/pkg/benthos/sql/processor_neosync_mysql_test.go +++ b/worker/pkg/benthos/sql/processor_neosync_mysql_test.go @@ -39,7 +39,7 @@ func Test_transformNeosyncToMysql(t *testing.T) { require.Equal(t, 1, result["id"]) require.Equal(t, "test", result["name"]) require.Equal(t, []byte(`{"foo":"bar"}`), result["data"]) - require.Equal(t, []byte{1}, result["bits"]) + require.Equal(t, []byte("1"), result["bits"]) require.Equal(t, goqu.Default(), result["default_col"]) }) @@ -98,7 +98,7 @@ func Test_getMysqlValue(t *testing.T) { t.Run("handles bit datatype", func(t *testing.T) { result, err := getMysqlValue([]byte("1"), nil, "bit") require.NoError(t, err) - require.Equal(t, []byte{1}, result) + require.Equal(t, []byte("1"), result) }) t.Run("returns original value for non-special cases", func(t *testing.T) { @@ -108,21 +108,6 @@ func Test_getMysqlValue(t *testing.T) { }) } -func Test_handleMysqlByteSlice(t *testing.T) { - t.Run("converts bit string to bytes", func(t *testing.T) { - result, err := handleMysqlByteSlice([]byte("1"), "bit") - require.NoError(t, err) - require.Equal(t, []byte{1}, result) - }) - - t.Run("returns original bytes for non-bit type", func(t *testing.T) { - input := []byte("test") - result, err := handleMysqlByteSlice(input, "varchar") - require.NoError(t, err) - require.Equal(t, input, result) - }) -} - func Test_NeosyncToMysqlProcessor(t *testing.T) { conf := ` columns: diff --git a/worker/pkg/benthos/sql/processor_neosync_pgx.go b/worker/pkg/benthos/sql/processor_neosync_pgx.go index c7647f2e83..ebafd59c27 100644 --- a/worker/pkg/benthos/sql/processor_neosync_pgx.go +++ b/worker/pkg/benthos/sql/processor_neosync_pgx.go @@ -2,13 +2,10 @@ package neosync_benthos_sql import ( "context" - "encoding/binary" "encoding/json" "fmt" "slices" - "strconv" "strings" - "time" "github.com/doug-martin/goqu/v9" "github.com/lib/pq" @@ -120,7 +117,6 @@ func transformNeosyncToPgx( } colDefaults := columnDefaultProperties[col] datatype := columnDataTypes[col] - newVal, err := getPgxValue(val, colDefaults, datatype) if err != nil { logger.Warn(err.Error()) @@ -145,28 +141,42 @@ func getPgxValue(value any, colDefaults *neosync_benthos.ColumnDefaultProperties return goqu.Default(), nil } - switch v := value.(type) { - case nil: - return v, nil - case []byte: - value, err := handlePgxByteSlice(v, datatype) + if value == nil { + return nil, nil + } + + switch { + case pgutil.IsJsonPgDataType(datatype): + bits, err := json.Marshal(value) if err != nil { - return nil, fmt.Errorf("unable to handle byte slice: %w", err) + return nil, fmt.Errorf("unable to marshal postgres json to bits: %w", err) } - return value, nil - default: - if pgutil.IsJsonPgDataType(datatype) { - bits, err := json.Marshal(value) + return bits, nil + case pgutil.IsPgArrayColumnDataType(datatype): + if byteSlice, ok := value.([]byte); ok { + // this handles the case where the array is in the form {1,2,3} + if strings.HasPrefix(string(byteSlice), "{") { + return string(byteSlice), nil + } + pgarray, err := processPgArrayFromJson(byteSlice, datatype) if err != nil { - return nil, fmt.Errorf("unable to marshal JSON: %w", err) + return nil, fmt.Errorf("unable to process PG Array: %w", err) } - return bits, nil - } else if gotypeutil.IsMultiDimensionalSlice(v) || gotypeutil.IsSliceOfMaps(v) { - return goqu.Literal(pgutil.FormatPgArrayLiteral(v, datatype)), nil - } else if gotypeutil.IsSlice(v) { - return pq.Array(v), nil + return pgarray, nil + } else if gotypeutil.IsMultiDimensionalSlice(value) || gotypeutil.IsSliceOfMaps(value) { + return goqu.Literal(pgutil.FormatPgArrayLiteral(value, datatype)), nil + } else if gotypeutil.IsSlice(value) { + return pq.Array(value), nil + } + return value, nil + case datatype == "money" || datatype == "uuid" || datatype == "tsvector": + if byteSlice, ok := value.([]byte); ok { + // Convert UUID []byte to string before inserting since postgres driver stores uuid bytes in different order + return string(byteSlice), nil } - return v, nil + return value, nil + default: + return value, nil } } @@ -176,138 +186,23 @@ func getPgxNeosyncValue(root any) (value any, isNeosyncValue bool, err error) { if err != nil { return nil, false, fmt.Errorf("unable to get PGX value from NeosyncPgxValuer: %w", err) } - if gotypeutil.IsSlice(value) { - return pq.Array(value), true, nil - } return value, true, nil } return root, false, nil } -func handlePgxByteSlice(v []byte, datatype string) (any, error) { - if pgutil.IsPgArrayColumnDataType(datatype) { - // this handles the case where the array is in the form {1,2,3} - if strings.HasPrefix(string(v), "{") { - return string(v), nil - } - pgarray, err := processPgArrayFromJson(v, datatype) - if err != nil { - return nil, fmt.Errorf("unable to process PG Array: %w", err) - } - return pgarray, nil - } - switch datatype { - case "bit": - bit, err := convertStringToBit(string(v)) - if err != nil { - return nil, fmt.Errorf("unable to convert bit string to SQL bit []byte: %w", err) - } - return bit, nil - case "json", "jsonb": - validJson, err := getValidJson(v) - if err != nil { - return nil, fmt.Errorf("unable to get valid json: %w", err) - } - return validJson, nil - case "date": - return convertDateForPostgres(v) - case "timestamp with time zone": - return convertTimestampWithTimezoneForPostgres(v), nil - case "timestamp", "timestamp without time zone": - return convertTimestampForPostgres(v) - case "money", "uuid", "tsvector", "time with time zone": - // Convert UUID []byte to string before inserting since postgres driver stores uuid bytes in different order - return string(v), nil - } - return v, nil -} - -func convertBitsToTime(bits []byte) (time.Time, error) { - timeStr := string(bits) - t, err := time.Parse(time.RFC3339, timeStr) - if err != nil { - // Try parsing as DateTime format if not RFC3339 format - t, err = time.Parse(time.DateTime, timeStr) - if err != nil { - return time.Time{}, err - } - } - - return t, nil -} - -func convertDateForPostgres(input []byte) (string, error) { - return convertTimeForPostgres(input, time.DateOnly) -} - -func convertTimestampForPostgres(input []byte) (string, error) { - return convertTimeForPostgres(input, time.DateTime) -} - -// pgtypes does not handle BC dates correctly -// convertTimeForPostgres handles BC dates properly -func convertTimeForPostgres(timebits []byte, layout string) (string, error) { - if strings.HasPrefix(string(timebits), "-") { - t, err := time.Parse("-2006-01-02T15:04:05Z", string(timebits)) - if err != nil { - return "", err - } - // For negative years, add 1 to get correct BC year - // year -1 is 2 BC, year -2 is 3 BC, etc. - yearsToAdd := t.Year() + 1 - - newT := time.Date(yearsToAdd, t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), t.Nanosecond(), t.Location()) - return fmt.Sprintf("%s BC", newT.Format(layout)), nil - } - - t, err := convertBitsToTime(timebits) - if err != nil { - return "", err - } - // Handle BC dates year 0 - // year 0 is 1 BC, - if t.Year() == 0 { - newT := time.Date(1, t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), t.Nanosecond(), t.Location()) - return fmt.Sprintf("%s BC", newT.Format(layout)), nil - } - return t.Format(layout), nil -} - -// pgtype.Timestamptz does not support BC dates, so we need to reformat them -func convertTimestampWithTimezoneForPostgres(input []byte) string { - // Remove the 'T' - withoutT := strings.Replace(string(input), "T", " ", 1) - - // Handle year 0000 case (should become 0001 BC) - if strings.HasPrefix(withoutT, "0000") { - rest := withoutT[4:] - return "0001" + rest[:len(rest)-6] + rest[len(rest)-6:] + " BC" - } - - // If starts with '-', remove it and add BC before timezone - if strings.HasPrefix(withoutT, "-") { - yearNum, _ := strconv.Atoi(withoutT[1:5]) - yearNum++ // Add 1 to convert from Go BC year to Postgres BC year - year := fmt.Sprintf("%04d", yearNum) - rest := withoutT[5:] - return year + rest[:len(rest)-6] + rest[len(rest)-6:] + " BC" - } - - return string(input) -} - // this expects the bits to be in the form [1,2,3] func processPgArrayFromJson(bits []byte, datatype string) (any, error) { var pgarray []any err := json.Unmarshal(bits, &pgarray) if err != nil { - return nil, err + return nil, fmt.Errorf("unable to unmarshal postgres array from bits: %w", err) } switch datatype { case "json[]", "jsonb[]": jsonArray, err := stringifyJsonArray(pgarray) if err != nil { - return nil, err + return nil, fmt.Errorf("unable to stringify postgres array: %w", err) } return pq.Array(jsonArray), nil default: @@ -324,7 +219,7 @@ func getValidJson(jsonData []byte) ([]byte, error) { quotedData, err := json.Marshal(string(jsonData)) if err != nil { - return nil, err + return nil, fmt.Errorf("unable to marshal postgres json string to bits: %w", err) } return quotedData, nil } @@ -341,21 +236,6 @@ func stringifyJsonArray(pgarray []any) ([]string, error) { return jsonArray, nil } -func convertStringToBit(bitString string) ([]byte, error) { - val, err := strconv.ParseUint(bitString, 2, len(bitString)) - if err != nil { - return nil, err - } - - // Always allocate 8 bytes for PutUint64 - bytes := make([]byte, 8) - binary.BigEndian.PutUint64(bytes, val) - - // Calculate actual needed bytes and return only those - neededBytes := (len(bitString) + 7) / 8 - return bytes[len(bytes)-neededBytes:], nil -} - func isColumnInList(column string, columns []string) bool { return slices.Contains(columns, column) } diff --git a/worker/pkg/benthos/sql/processor_neosync_pgx_test.go b/worker/pkg/benthos/sql/processor_neosync_pgx_test.go index f825d66a81..e2254c9819 100644 --- a/worker/pkg/benthos/sql/processor_neosync_pgx_test.go +++ b/worker/pkg/benthos/sql/processor_neosync_pgx_test.go @@ -5,7 +5,6 @@ import ( "database/sql/driver" "encoding/json" "testing" - "time" "github.com/doug-martin/goqu/v9" "github.com/lib/pq" @@ -16,46 +15,6 @@ import ( "github.com/warpstreamlabs/bento/public/service" ) -func Test_convertStringToBit(t *testing.T) { - t.Run("8 bits", func(t *testing.T) { - got, err := convertStringToBit("10101010") - require.NoError(t, err) - expected := []byte{170} - require.Equalf(t, expected, got, "got %v, want %v", got, expected) - }) - - t.Run("1 bit", func(t *testing.T) { - got, err := convertStringToBit("1") - require.NoError(t, err) - expected := []byte{1} - require.Equalf(t, expected, got, "got %v, want %v", got, expected) - }) - - t.Run("16 bits", func(t *testing.T) { - got, err := convertStringToBit("1010101010101010") - require.NoError(t, err) - expected := []byte{170, 170} - require.Equalf(t, expected, got, "got %v, want %v", got, expected) - }) - - t.Run("24 bits", func(t *testing.T) { - got, err := convertStringToBit("101010101111111100000000") - require.NoError(t, err) - expected := []byte{170, 255, 0} - require.Equalf(t, expected, got, "got %v, want %v", got, expected) - }) - - t.Run("invalid binary string", func(t *testing.T) { - _, err := convertStringToBit("102") - require.Error(t, err) - }) - - t.Run("empty string", func(t *testing.T) { - _, err := convertStringToBit("") - require.Error(t, err) - }) -} - func Test_getValidJson(t *testing.T) { t.Run("already valid json", func(t *testing.T) { input := []byte(`{"key": "value"}`) @@ -194,111 +153,6 @@ func Test_transformNeosyncToPgx(t *testing.T) { require.Error(t, err) }) } -func TestHandlePgxByteSlice(t *testing.T) { - t.Run("handles array types", func(t *testing.T) { - input := []byte(`[1,2,3]`) - got, err := handlePgxByteSlice(input, "integer[]") - require.NoError(t, err) - - // Should be wrapped in pq.Array - arr, ok := got.(interface{ Value() (driver.Value, error) }) - require.True(t, ok) - - val, err := arr.Value() - require.NoError(t, err) - require.Equal(t, "{1,2,3}", val) - }) - - t.Run("handles bit type", func(t *testing.T) { - input := []byte("1010") - got, err := handlePgxByteSlice(input, "bit") - require.NoError(t, err) - - bytes, ok := got.([]byte) - require.True(t, ok) - require.Equal(t, []byte{10}, bytes) // 1010 binary = 10 decimal - }) - - t.Run("handles json type", func(t *testing.T) { - input := []byte(`{"foo":"bar"}`) - got, err := handlePgxByteSlice(input, "json") - require.NoError(t, err) - - bytes, ok := got.([]byte) - require.True(t, ok) - require.JSONEq(t, `{"foo":"bar"}`, string(bytes)) - }) - - t.Run("handles jsonb type", func(t *testing.T) { - input := []byte(`{"foo":"bar"}`) - got, err := handlePgxByteSlice(input, "jsonb") - require.NoError(t, err) - - bytes, ok := got.([]byte) - require.True(t, ok) - require.JSONEq(t, `{"foo":"bar"}`, string(bytes)) - }) - - t.Run("handles uuid type", func(t *testing.T) { - input := []byte("550e8400-e29b-41d4-a716-446655440000") - got, err := handlePgxByteSlice(input, "uuid") - require.NoError(t, err) - - str, ok := got.(string) - require.True(t, ok) - require.Equal(t, "550e8400-e29b-41d4-a716-446655440000", str) - }) - - t.Run("handles timestamp with time zone", func(t *testing.T) { - input := []byte("2023-01-01 12:00:00+00") - got, err := handlePgxByteSlice(input, "timestamp with time zone") - require.NoError(t, err) - - str, ok := got.(string) - require.True(t, ok) - require.Equal(t, "2023-01-01 12:00:00+00", str) - }) - - t.Run("handles time with time zone", func(t *testing.T) { - input := []byte("12:00:00+00") - got, err := handlePgxByteSlice(input, "time with time zone") - require.NoError(t, err) - - str, ok := got.(string) - require.True(t, ok) - require.Equal(t, "12:00:00+00", str) - }) - - t.Run("handles money type", func(t *testing.T) { - input := []byte("$123.45") - got, err := handlePgxByteSlice(input, "money") - require.NoError(t, err) - - str, ok := got.(string) - require.True(t, ok) - require.Equal(t, "$123.45", str) - }) - - t.Run("returns original bytes for unknown type", func(t *testing.T) { - input := []byte("test") - got, err := handlePgxByteSlice(input, "text") - require.NoError(t, err) - require.Equal(t, input, got) - }) - - t.Run("handles invalid bit string", func(t *testing.T) { - input := []byte("not a bit string") - _, err := handlePgxByteSlice(input, "bit") - require.Error(t, err) - }) - - t.Run("handles invalid json", func(t *testing.T) { - input := []byte("{invalid json}") - got, err := handlePgxByteSlice(input, "json") - require.NoError(t, err) - require.JSONEq(t, `"{invalid json}"`, string(got.([]byte))) - }) -} func Test_getPgxValue(t *testing.T) { t.Run("handles json values", func(t *testing.T) { @@ -557,144 +411,3 @@ column_default_properties: require.NoError(t, proc.Close(context.Background())) } - -func TestConvertBitsToTime(t *testing.T) { - // Test RFC3339 format - input := []byte("2023-01-01T00:00:00Z") - want := time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC) - got, err := convertBitsToTime(input) - require.NoError(t, err) - require.Equal(t, want, got) - - // Test DateTime format - input = []byte("2023-01-01 00:00:00") - want = time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC) - got, err = convertBitsToTime(input) - require.NoError(t, err) - require.Equal(t, want, got) - - // Test Invalid format - input = []byte("invalid-date") - got, err = convertBitsToTime(input) - require.Error(t, err) - require.Equal(t, time.Time{}, got) - - // Test BC date - input = []byte("0000-01-01 00:00:00") - want = time.Date(0, 1, 1, 0, 0, 0, 0, time.UTC) - got, err = convertBitsToTime(input) - require.NoError(t, err) - require.Equal(t, want, got) - - input = []byte("0000-01-01T00:00:00Z") - want = time.Date(0, 1, 1, 0, 0, 0, 0, time.UTC) - got, err = convertBitsToTime(input) - require.NoError(t, err) - require.Equal(t, want, got) -} -func TestConvertTimeForPostgres(t *testing.T) { - // Test normal date - input := []byte("2023-01-01T00:00:00Z") - got, err := convertTimeForPostgres(input, time.DateTime) - require.NoError(t, err) - require.Equal(t, "2023-01-01 00:00:00", got) - - // Test BC date (year 0) - input = []byte("0000-01-01T00:00:00Z") - got, err = convertTimeForPostgres(input, time.DateTime) - require.NoError(t, err) - require.Equal(t, "0001-01-01 00:00:00 BC", got) - - // Test BC date (negative year) - input = []byte("-0001-01-01T00:00:00Z") - got, err = convertTimeForPostgres(input, time.DateTime) - require.NoError(t, err) - require.Equal(t, "0002-01-01 00:00:00 BC", got) - - // Test BC date (negative year) - input = []byte("-0002-01-01T00:00:00Z") - got, err = convertTimeForPostgres(input, time.DateTime) - require.NoError(t, err) - require.Equal(t, "0003-01-01 00:00:00 BC", got) - - // Test with DateOnly layout - input = []byte("2023-01-01T00:00:00Z") - got, err = convertTimeForPostgres(input, time.DateOnly) - require.NoError(t, err) - require.Equal(t, "2023-01-01", got) - - // Test BC date with DateOnly layout - input = []byte("-0001-01-01T00:00:00Z") - got, err = convertTimeForPostgres(input, time.DateOnly) - require.NoError(t, err) - require.Equal(t, "0002-01-01 BC", got) -} - -func Test_convertTimestampWithTimezoneForPostgres(t *testing.T) { - t.Run("normal timestamp", func(t *testing.T) { - input := []byte("2023-01-01T00:00:00Z") - got := convertTimestampWithTimezoneForPostgres(input) - require.Equal(t, "2023-01-01T00:00:00Z", got) - }) - - t.Run("year 0000 becomes 0001 BC", func(t *testing.T) { - input := []byte("0000-01-01T00:00:00+00") - got := convertTimestampWithTimezoneForPostgres(input) - require.Equal(t, "0001-01-01 00:00:00+00 BC", got) - }) - - t.Run("negative year removes minus and adds BC", func(t *testing.T) { - input := []byte("-0001-01-01T00:00:00+00") - got := convertTimestampWithTimezoneForPostgres(input) - require.Equal(t, "0002-01-01 00:00:00+00 BC", got) - }) - - t.Run("handles timezone offset", func(t *testing.T) { - input := []byte("-0002-01-01T00:00:00+07:00") - got := convertTimestampWithTimezoneForPostgres(input) - require.Equal(t, "0003-01-01 00:00:00+07:00 BC", got) - }) - - t.Run("handles negative timezone offset", func(t *testing.T) { - input := []byte("-0003-01-01T00:00:00-08:00") - got := convertTimestampWithTimezoneForPostgres(input) - require.Equal(t, "0004-01-01 00:00:00-08:00 BC", got) - }) -} - -func Test_convertDateForPostgres(t *testing.T) { - t.Run("normal date", func(t *testing.T) { - input := []byte("2023-01-01T00:00:00Z") - got, err := convertDateForPostgres(input) - require.NoError(t, err) - require.Equal(t, "2023-01-01", got) - }) - - t.Run("handles BC date", func(t *testing.T) { - input := []byte("-0001-01-01T00:00:00Z") - got, err := convertDateForPostgres(input) - require.NoError(t, err) - require.Equal(t, "0002-01-01 BC", got) - }) - - t.Run("handles year 0", func(t *testing.T) { - input := []byte("0000-01-01T00:00:00Z") - got, err := convertDateForPostgres(input) - require.NoError(t, err) - require.Equal(t, "0001-01-01 BC", got) - }) - - t.Run("handles negative years", func(t *testing.T) { - input := []byte("-0002-01-01T00:00:00Z") - got, err := convertDateForPostgres(input) - require.NoError(t, err) - require.Equal(t, "0003-01-01 BC", got) - }) - - t.Run("handles DateTime format", func(t *testing.T) { - input := []byte("2023-01-01 00:00:00") - got, err := convertDateForPostgres(input) - require.NoError(t, err) - require.Equal(t, "2023-01-01", got) - }) -} diff --git a/worker/pkg/integration-test/datasync_workflow.go b/worker/pkg/integration-test/datasync-workflow.go similarity index 94% rename from worker/pkg/integration-test/datasync_workflow.go rename to worker/pkg/integration-test/datasync-workflow.go index 6dfde25e1c..d2bd0a4692 100644 --- a/worker/pkg/integration-test/datasync_workflow.go +++ b/worker/pkg/integration-test/datasync-workflow.go @@ -40,9 +40,10 @@ type Option func(*TestWorkflowEnv) type TestWorkflowEnv struct { neosyncApi *tcneosyncapi.NeosyncApiTestClient redisconfig *shared.RedisConfig - redisclient redis.UniversalClient fakeEELicense *testutil.FakeEELicense - TestEnv *testsuite.TestWorkflowEnvironment + + TestEnv *testsuite.TestWorkflowEnvironment + Redisclient redis.UniversalClient } // WithRedis creates redis client with provided URL @@ -87,12 +88,12 @@ func NewTestDataSyncWorkflowEnv( if err != nil { t.Fatal(err) } - workflowEnv.redisclient = redisclient + workflowEnv.Redisclient = redisclient - connclient := neosyncApi.UnauthdClients.Connections - jobclient := neosyncApi.UnauthdClients.Jobs - transformerclient := neosyncApi.UnauthdClients.Transformers - userclient := neosyncApi.UnauthdClients.Users + connclient := neosyncApi.OSSUnauthenticatedLicensedClients.Connections() + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + transformerclient := neosyncApi.OSSUnauthenticatedLicensedClients.Transformers() + userclient := neosyncApi.OSSUnauthenticatedLicensedClients.Users() testSuite := &testsuite.WorkflowTestSuite{} testSuite.SetLogger(log.NewStructuredLogger(testutil.GetConcurrentTestLogger(t))) @@ -114,7 +115,7 @@ func NewTestDataSyncWorkflowEnv( jobhookTimingActivity := jobhooks_by_timing_activity.New(jobclient, connclient, dbManagers.SqlManager, workflowEnv.fakeEELicense) accountStatusActivity := accountstatus_activity.New(userclient) posttableSyncActivity := posttablesync_activity.New(jobclient, dbManagers.SqlManager, connclient) - redisCleanUpActivity := syncrediscleanup_activity.New(workflowEnv.redisclient) + redisCleanUpActivity := syncrediscleanup_activity.New(workflowEnv.Redisclient) env.RegisterWorkflow(datasync_workflow.Workflow) env.RegisterActivity(syncActivity.Sync) diff --git a/worker/pkg/integration-test/dynamodb_test.go b/worker/pkg/integration-test/dynamodb_test.go new file mode 100644 index 0000000000..c7f6dd0a87 --- /dev/null +++ b/worker/pkg/integration-test/dynamodb_test.go @@ -0,0 +1,397 @@ +package integrationtest + +import ( + "context" + "testing" + + "connectrpc.com/connect" + "github.com/aws/aws-sdk-go-v2/service/dynamodb" + dyntypes "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + tcneosyncapi "github.com/nucleuscloud/neosync/backend/pkg/integration-test" + "github.com/nucleuscloud/neosync/internal/gotypeutil" + tcdynamodb "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/dynamodb" + "github.com/stretchr/testify/require" + "golang.org/x/sync/errgroup" +) + +func createDynamodbSyncJob( + t *testing.T, + ctx context.Context, + jobclient mgmtv1alpha1connect.JobServiceClient, + config *createJobConfig, + sourceTableName, destTableName string, +) *mgmtv1alpha1.Job { + sourceTableOpts := []*mgmtv1alpha1.DynamoDBSourceTableOption{} + for table, where := range config.SubsetMap { + where := where + sourceTableOpts = append(sourceTableOpts, &mgmtv1alpha1.DynamoDBSourceTableOption{ + Table: table, + WhereClause: &where, + }) + } + + destinationOptions := &mgmtv1alpha1.JobDestinationOptions{ + Config: &mgmtv1alpha1.JobDestinationOptions_DynamodbOptions{ + DynamodbOptions: &mgmtv1alpha1.DynamoDBDestinationConnectionOptions{ + TableMappings: []*mgmtv1alpha1.DynamoDBDestinationTableMapping{{SourceTable: sourceTableName, DestinationTable: destTableName}}, + }, + }, + } + + job, err := jobclient.CreateJob(ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ + AccountId: config.AccountId, + JobName: config.JobName, + Source: &mgmtv1alpha1.JobSource{ + Options: &mgmtv1alpha1.JobSourceOptions{ + Config: &mgmtv1alpha1.JobSourceOptions_Dynamodb{ + Dynamodb: &mgmtv1alpha1.DynamoDBSourceConnectionOptions{ + ConnectionId: config.SourceConn.Id, + Tables: sourceTableOpts, + }, + }, + }, + }, + Destinations: []*mgmtv1alpha1.CreateJobDestination{ + { + ConnectionId: config.DestConn.Id, + Options: destinationOptions, + }, + }, + Mappings: config.JobMappings, + })) + require.NoError(t, err) + + return job.Msg.GetJob() +} + +func test_dynamodb_alltypes( + t *testing.T, + ctx context.Context, + dynamo *tcdynamodb.DynamoDBTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + neosyncApi.MockTemporalForCreateJob("test-dynamodb-sync") + tableName := "test-all-types" + primaryKey := "id" + + err := createDynamodbTables(ctx, dynamo, tableName, primaryKey) + if err != nil { + t.Fatal(err) + } + + testData := getAllTypesTestData() + + err = dynamo.Source.InsertDynamoDBRecords(ctx, tableName, testData) + if err != nil { + t.Fatal(err) + } + + mappings := []*mgmtv1alpha1.JobMapping{ + { + Schema: "aws", + Table: tableName, + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, + }, + }, + }, + { + Schema: "aws", + Table: tableName, + Column: "a", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, + }, + }, + }, + } + + job := createDynamodbSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "all_types", + JobMappings: mappings, + }, tableName, tableName) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: all_types") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: all_types") + + // Verify data was synced + out, err := dynamo.Target.Client.Scan(ctx, &dynamodb.ScanInput{ + TableName: &tableName, + }) + require.NoError(t, err) + require.Equal(t, int32(4), out.Count) + err = cleanupDynamodbTables(ctx, dynamo, tableName) + require.NoError(t, err) +} + +func test_dynamodb_subset( + t *testing.T, + ctx context.Context, + dynamo *tcdynamodb.DynamoDBTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + neosyncApi.MockTemporalForCreateJob("test-dynamodb-sync") + tableName := "test-subset" + primaryKey := "id" + + err := createDynamodbTables(ctx, dynamo, tableName, primaryKey) + if err != nil { + t.Fatal(err) + } + + testData := getAllTypesTestData() + + err = dynamo.Source.InsertDynamoDBRecords(ctx, tableName, testData) + if err != nil { + t.Fatal(err) + } + + mappings := []*mgmtv1alpha1.JobMapping{ + { + Schema: "aws", + Table: tableName, + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, + }, + }, + }, + { + Schema: "aws", + Table: tableName, + Column: "a", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, + }, + }, + }, + } + subsetMap := map[string]string{ + tableName: "id = '1'", + } + + job := createDynamodbSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: tableName, + SubsetMap: subsetMap, + JobMappings: mappings, + }, tableName, tableName) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: subset") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: subset") + + // Verify data was synced + out, err := dynamo.Target.Client.Scan(ctx, &dynamodb.ScanInput{ + TableName: &tableName, + }) + require.NoError(t, err) + require.Equal(t, int32(1), out.Count) + err = cleanupDynamodbTables(ctx, dynamo, tableName) + require.NoError(t, err) +} + +func test_dynamodb_default_transformers( + t *testing.T, + ctx context.Context, + dynamo *tcdynamodb.DynamoDBTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + neosyncApi.MockTemporalForCreateJob("test-dynamodb-sync") + tableName := "test-default-transformers" + primaryKey := "id" + + err := createDynamodbTables(ctx, dynamo, tableName, primaryKey) + if err != nil { + t.Fatal(err) + } + + testData := getAllTypesTestData() + err = dynamo.Source.InsertDynamoDBRecords(ctx, tableName, testData) + if err != nil { + t.Fatal(err) + } + + mappings := []*mgmtv1alpha1.JobMapping{ + { + Schema: "aws", + Table: tableName, + Column: "id", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, + }, + }, + }, + { + Schema: "aws", + Table: tableName, + Column: "a", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, + }, + }, + }, + } + jobOpts := TestJobOptions{ + DefaultTransformers: &DefaultTransformers{ + Boolean: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_GenerateBoolConfig{}, + }, + }, + Number: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_TransformInt64Config{ + TransformInt64Config: &mgmtv1alpha1.TransformInt64{RandomizationRangeMin: gotypeutil.ToPtr(int64(10)), RandomizationRangeMax: gotypeutil.ToPtr(int64(1000))}, + }, + }, + }, + String: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_TransformStringConfig{ + TransformStringConfig: &mgmtv1alpha1.TransformString{}, + }, + }, + }, + Byte: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, + }, + }, + }, + } + + job := createDynamodbSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: tableName, + JobOptions: &jobOpts, + JobMappings: mappings, + }, tableName, tableName) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: default_transformers") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: default_transformers") + + // Verify data was synced + out, err := dynamo.Target.Client.Scan(ctx, &dynamodb.ScanInput{ + TableName: &tableName, + }) + require.NoError(t, err) + require.Equal(t, int32(4), out.Count) + // tear down + err = cleanupDynamodbTables(ctx, dynamo, tableName) + require.NoError(t, err) +} + +func cleanupDynamodbTables(ctx context.Context, dynamo *tcdynamodb.DynamoDBTestSyncContainer, tableName string) error { + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { return dynamo.Source.DestroyDynamoDbTable(errctx, tableName) }) + errgrp.Go(func() error { return dynamo.Target.DestroyDynamoDbTable(errctx, tableName) }) + return errgrp.Wait() +} + +func createDynamodbTables(ctx context.Context, dynamo *tcdynamodb.DynamoDBTestSyncContainer, tableName, primaryKey string) error { + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { return dynamo.Source.SetupDynamoDbTable(errctx, tableName, primaryKey) }) + errgrp.Go(func() error { return dynamo.Target.SetupDynamoDbTable(errctx, tableName, primaryKey) }) + return errgrp.Wait() +} + +func getAllTypesTestData() []map[string]dyntypes.AttributeValue { + return []map[string]dyntypes.AttributeValue{ + { + "id": &dyntypes.AttributeValueMemberS{Value: "1"}, + "a": &dyntypes.AttributeValueMemberBOOL{Value: true}, + "NestedMap": &dyntypes.AttributeValueMemberM{ + Value: map[string]dyntypes.AttributeValue{ + "Level1": &dyntypes.AttributeValueMemberM{ + Value: map[string]dyntypes.AttributeValue{ + "Level2": &dyntypes.AttributeValueMemberM{ + Value: map[string]dyntypes.AttributeValue{ + "Attribute1": &dyntypes.AttributeValueMemberS{Value: "Value1"}, + "NumberSet": &dyntypes.AttributeValueMemberNS{Value: []string{"1", "2", "3"}}, + "BinaryData": &dyntypes.AttributeValueMemberB{Value: []byte("U29tZUJpbmFyeURhdGE=")}, + "Level3": &dyntypes.AttributeValueMemberM{ + Value: map[string]dyntypes.AttributeValue{ + "Attribute2": &dyntypes.AttributeValueMemberS{Value: "Value2"}, + "StringSet": &dyntypes.AttributeValueMemberSS{Value: []string{"Item1", "Item2", "Item3"}}, + "BinarySet": &dyntypes.AttributeValueMemberBS{ + Value: [][]byte{ + []byte("U29tZUJpbmFyeQ=="), + []byte("QW5vdGhlckJpbmFyeQ=="), + }, + }, + "Level4": &dyntypes.AttributeValueMemberM{ + Value: map[string]dyntypes.AttributeValue{ + "Attribute3": &dyntypes.AttributeValueMemberS{Value: "Value3"}, + "Boolean": &dyntypes.AttributeValueMemberBOOL{Value: true}, + "MoreBinaryData": &dyntypes.AttributeValueMemberB{Value: []byte("TW9yZUJpbmFyeURhdGE=")}, + "MoreBinarySet": &dyntypes.AttributeValueMemberBS{ + Value: [][]byte{ + []byte("TW9yZUJpbmFyeQ=="), + []byte("QW5vdGhlck1vcmVCaW5hcnk="), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + "id": &dyntypes.AttributeValueMemberS{Value: "2"}, + "a": &dyntypes.AttributeValueMemberBOOL{Value: false}, + }, + { + "id": &dyntypes.AttributeValueMemberS{Value: "3"}, + "name": &dyntypes.AttributeValueMemberS{Value: "test3"}, + }, + { + "id": &dyntypes.AttributeValueMemberS{Value: "4"}, + "name": &dyntypes.AttributeValueMemberS{Value: "test4"}, + }, + } +} diff --git a/worker/pkg/integration-test/mongodb_test.go b/worker/pkg/integration-test/mongodb_test.go new file mode 100644 index 0000000000..030746ad75 --- /dev/null +++ b/worker/pkg/integration-test/mongodb_test.go @@ -0,0 +1,286 @@ +package integrationtest + +import ( + "context" + "fmt" + "testing" + "time" + + "connectrpc.com/connect" + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + "github.com/stretchr/testify/require" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "golang.org/x/sync/errgroup" + + tcneosyncapi "github.com/nucleuscloud/neosync/backend/pkg/integration-test" + "github.com/nucleuscloud/neosync/internal/gotypeutil" + tcmongodb "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/mongodb" +) + +func createMongodbSyncJob( + t *testing.T, + ctx context.Context, + jobclient mgmtv1alpha1connect.JobServiceClient, + config *createJobConfig, +) *mgmtv1alpha1.Job { + destinationOptions := &mgmtv1alpha1.JobDestinationOptions{ + Config: &mgmtv1alpha1.JobDestinationOptions_MongodbOptions{ + MongodbOptions: &mgmtv1alpha1.MongoDBDestinationConnectionOptions{}, + }, + } + + job, err := jobclient.CreateJob(ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ + AccountId: config.AccountId, + JobName: config.JobName, + Source: &mgmtv1alpha1.JobSource{ + Options: &mgmtv1alpha1.JobSourceOptions{ + Config: &mgmtv1alpha1.JobSourceOptions_Mongodb{ + Mongodb: &mgmtv1alpha1.MongoDBSourceConnectionOptions{ + ConnectionId: config.SourceConn.Id, + }, + }, + }, + }, + Destinations: []*mgmtv1alpha1.CreateJobDestination{ + { + ConnectionId: config.DestConn.Id, + Options: destinationOptions, + }, + }, + Mappings: config.JobMappings, + })) + require.NoError(t, err) + + return job.Msg.GetJob() +} + +func test_mongodb_alltypes( + t *testing.T, + ctx context.Context, + mongo *tcmongodb.MongoDBTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + neosyncApi.MockTemporalForCreateJob("test-mongodb-sync") + dbName := "data" + collectionName := "test-sync" + docs := getMongodbAllTypesTestData() + + count, err := mongo.Source.InsertMongoDbRecords(ctx, dbName, collectionName, docs) + require.NoError(t, err) + require.Greater(t, count, 0) + + mappings := []*mgmtv1alpha1.JobMapping{ + { + Schema: "data", + Table: collectionName, + Column: "string", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, + }, + }, + }, + { + Schema: "data", + Table: collectionName, + Column: "bool", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, + }, + }, + }, + } + + job := createMongodbSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "mongo_all_types", + JobMappings: mappings, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: mongo_all_types") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: mongo_all_types") + + col := mongo.Target.Client.Database(dbName).Collection(collectionName) + cursor, err := col.Find(ctx, bson.D{}) + require.NoError(t, err) + var results []bson.M + for cursor.Next(ctx) { + var doc bson.M + err = cursor.Decode(&doc) + require.NoError(t, err) + results = append(results, doc) + } + cursor.Close(ctx) + require.Equal(t, 1, len(results), fmt.Sprintf("Test: mongo_all_types collection: %s", collectionName)) + err = cleanupMongodb(ctx, mongo, dbName, collectionName) + require.NoError(t, err) +} + +func test_mongodb_transform( + t *testing.T, + ctx context.Context, + mongo *tcmongodb.MongoDBTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + neosyncApi.MockTemporalForCreateJob("test-mongodb-sync") + dbName := "data" + collectionName := "test-sync-transform" + docs := getMongodbAllTypesTestData() + + count, err := mongo.Source.InsertMongoDbRecords(ctx, dbName, collectionName, docs) + require.NoError(t, err) + require.Greater(t, count, 0) + + mappings := []*mgmtv1alpha1.JobMapping{ + { + Schema: "data", + Table: collectionName, + Column: "string", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_TransformStringConfig{ + TransformStringConfig: &mgmtv1alpha1.TransformString{ + PreserveLength: gotypeutil.ToPtr(true), + }, + }, + }, + }, + }, + { + Schema: "data", + Table: collectionName, + Column: "embedded_document.name", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_GenerateFirstNameConfig{ + GenerateFirstNameConfig: &mgmtv1alpha1.GenerateFirstName{}, + }, + }, + }, + }, + { + Schema: "data", + Table: collectionName, + Column: "decimal128", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_TransformFloat64Config{ + TransformFloat64Config: &mgmtv1alpha1.TransformFloat64{ + RandomizationRangeMin: gotypeutil.ToPtr(float64(0)), + RandomizationRangeMax: gotypeutil.ToPtr(float64(300)), + }, + }, + }, + }, + }, + { + Schema: "data", + Table: collectionName, + Column: "int64", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_TransformInt64Config{ + TransformInt64Config: &mgmtv1alpha1.TransformInt64{ + RandomizationRangeMin: gotypeutil.ToPtr(int64(0)), + RandomizationRangeMax: gotypeutil.ToPtr(int64(300)), + }, + }, + }, + }, + }, + { + Schema: "data", + Table: collectionName, + Column: "timestamp", + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_GenerateUnixtimestampConfig{ + GenerateUnixtimestampConfig: &mgmtv1alpha1.GenerateUnixTimestamp{}, + }, + }, + }, + }, + } + + job := createMongodbSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "mongo_transform", + JobMappings: mappings, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: mongo_transform") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: mongo_transform") + + col := mongo.Target.Client.Database(dbName).Collection(collectionName) + cursor, err := col.Find(ctx, bson.D{}) + require.NoError(t, err) + var results []bson.M + for cursor.Next(ctx) { + var doc bson.M + err = cursor.Decode(&doc) + require.NoError(t, err) + results = append(results, doc) + } + cursor.Close(ctx) + require.Equal(t, 1, len(results), fmt.Sprintf("Test: mongo_transform collection: %s", collectionName)) + err = cleanupMongodb(ctx, mongo, dbName, collectionName) + require.NoError(t, err) +} + +func cleanupMongodb(ctx context.Context, mongo *tcmongodb.MongoDBTestSyncContainer, dbName, collectionName string) error { + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { return mongo.Source.DropMongoDbCollection(errctx, dbName, collectionName) }) + errgrp.Go(func() error { return mongo.Target.DropMongoDbCollection(errctx, dbName, collectionName) }) + err := errgrp.Wait() + return err +} + +func getMongodbAllTypesTestData() []any { + doc := bson.D{ + {Key: "_id", Value: primitive.NewObjectID()}, + {Key: "string", Value: "Hello, MongoDB!"}, + {Key: "bool", Value: true}, + {Key: "int32", Value: int32(42)}, + {Key: "int64", Value: int64(92233720)}, + {Key: "double", Value: 3.14159}, + {Key: "decimal128", Value: primitive.NewDecimal128(3, 14159)}, + {Key: "date", Value: primitive.NewDateTimeFromTime(time.Now())}, + {Key: "timestamp", Value: primitive.Timestamp{T: 1645553494, I: 1}}, + {Key: "null", Value: primitive.Null{}}, + {Key: "regex", Value: primitive.Regex{Pattern: "^test", Options: "i"}}, + {Key: "array", Value: bson.A{"apple", "banana", "cherry"}}, + {Key: "embedded_document", Value: bson.D{ + {Key: "name", Value: "John Doe"}, + {Key: "age", Value: 30}, + }}, + {Key: "binary", Value: primitive.Binary{Subtype: 0x80, Data: []byte("binary data")}}, + {Key: "undefined", Value: primitive.Undefined{}}, + {Key: "object_id", Value: primitive.NewObjectID()}, + {Key: "min_key", Value: primitive.MinKey{}}, + {Key: "max_key", Value: primitive.MaxKey{}}, + } + return []any{doc} +} diff --git a/worker/pkg/integration-test/mssql_test.go b/worker/pkg/integration-test/mssql_test.go new file mode 100644 index 0000000000..9676c92c48 --- /dev/null +++ b/worker/pkg/integration-test/mssql_test.go @@ -0,0 +1,439 @@ +package integrationtest + +import ( + "context" + "fmt" + "os" + "strings" + "testing" + + "connectrpc.com/connect" + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + tcneosyncapi "github.com/nucleuscloud/neosync/backend/pkg/integration-test" + sqlmanager_shared "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager/shared" + tcmssql "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/sqlserver" + testutil_testdata "github.com/nucleuscloud/neosync/internal/testutil/testdata" + mssql_alltypes "github.com/nucleuscloud/neosync/internal/testutil/testdata/mssql/alltypes" + mssql_commerce "github.com/nucleuscloud/neosync/internal/testutil/testdata/mssql/commerce" + "github.com/stretchr/testify/require" +) + +const ( + mssqlTestdataFolder string = "../../../internal/testutil/testdata/mssql" +) + +func createMssqlSyncJob( + t *testing.T, + ctx context.Context, + jobclient mgmtv1alpha1connect.JobServiceClient, + config *createJobConfig, +) *mgmtv1alpha1.Job { + schemas := []*mgmtv1alpha1.MssqlSourceSchemaOption{} + subsetMap := map[string]*mgmtv1alpha1.MssqlSourceSchemaOption{} + for table, where := range config.SubsetMap { + schema, table := sqlmanager_shared.SplitTableKey(table) + if _, exists := subsetMap[schema]; !exists { + subsetMap[schema] = &mgmtv1alpha1.MssqlSourceSchemaOption{ + Schema: schema, + Tables: []*mgmtv1alpha1.MssqlSourceTableOption{}, + } + } + w := where + subsetMap[schema].Tables = append(subsetMap[schema].Tables, &mgmtv1alpha1.MssqlSourceTableOption{ + Table: table, + WhereClause: &w, + }) + } + + for _, s := range subsetMap { + schemas = append(schemas, s) + } + + var subsetByForeignKeyConstraints bool + destinationOptions := &mgmtv1alpha1.JobDestinationOptions{ + Config: &mgmtv1alpha1.JobDestinationOptions_MssqlOptions{ + MssqlOptions: &mgmtv1alpha1.MssqlDestinationConnectionOptions{}, + }, + } + if config.JobOptions != nil { + if config.JobOptions.SubsetByForeignKeyConstraints { + subsetByForeignKeyConstraints = true + } + destinationOptions = &mgmtv1alpha1.JobDestinationOptions{ + Config: &mgmtv1alpha1.JobDestinationOptions_MssqlOptions{ + MssqlOptions: &mgmtv1alpha1.MssqlDestinationConnectionOptions{ + InitTableSchema: config.JobOptions.InitSchema, + TruncateTable: &mgmtv1alpha1.MssqlTruncateTableConfig{ + TruncateBeforeInsert: config.JobOptions.Truncate, + }, + SkipForeignKeyViolations: config.JobOptions.SkipForeignKeyViolations, + }, + }, + } + } + + job, err := jobclient.CreateJob(ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ + AccountId: config.AccountId, + JobName: config.JobName, + Source: &mgmtv1alpha1.JobSource{ + Options: &mgmtv1alpha1.JobSourceOptions{ + Config: &mgmtv1alpha1.JobSourceOptions_Mssql{ + Mssql: &mgmtv1alpha1.MssqlSourceConnectionOptions{ + ConnectionId: config.SourceConn.Id, + Schemas: schemas, + SubsetByForeignKeyConstraints: subsetByForeignKeyConstraints, + }, + }, + }, + }, + Destinations: []*mgmtv1alpha1.CreateJobDestination{ + { + ConnectionId: config.DestConn.Id, + Options: destinationOptions, + }, + }, + Mappings: config.JobMappings, + VirtualForeignKeys: config.VirtualForeignKeys, + })) + require.NoError(t, err) + + return job.Msg.GetJob() +} + +func test_mssql_types( + t *testing.T, + ctx context.Context, + mssql *tcmssql.MssqlTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + schema := "alltypes" + err := mssql.Source.RunCreateStmtsInSchema(ctx, mssqlTestdataFolder, []string{"alltypes/create-tables.sql"}, schema) + require.NoError(t, err) + err = mssql.Target.CreateSchemas(ctx, []string{schema}) + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-mssql-sync") + + alltypesMappings := mssql_alltypes.GetDefaultSyncJobMappings(schema) + + job := createMssqlSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "mssql_all_types", + JobMappings: alltypesMappings, + JobOptions: &TestJobOptions{ + Truncate: true, + InitSchema: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers, WithValidEELicense()) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: mssql_all_types") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: mssql_all_types") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: schema, table: "alldatatypes", rowCount: 1}, + } + + for _, expected := range expectedResults { + rowCount, err := mssql.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: mssql_all_types Table: %s", expected.table)) + } + + testutil_testdata.VerifySQLTableColumnValues(t, ctx, mssql.Source.DB, mssql.Target.DB, schema, "alldatatypes", sqlmanager_shared.MssqlDriver, "id") + + // TODO: Tear down, fix schema dropping issue. No way to force drop schemas in MSSQL. + // err = mssql.Source.DropSchemas(ctx, []string{schema}) + // require.NoError(t, err) + // err = mssql.Target.DropSchemas(ctx, []string{schema}) + // require.NoError(t, err) +} + +func test_mssql_cross_schema_foreign_keys( + t *testing.T, + ctx context.Context, + mssql *tcmssql.MssqlTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + testdataFolder := mssqlTestdataFolder + "/commerce" + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + err := mssql.Source.CreateSchemas(ctx, []string{"sales", "production"}) + require.NoError(t, err) + err = mssql.Source.RunSqlFiles(ctx, &testdataFolder, []string{"create-tables.sql"}) + require.NoError(t, err) + err = mssql.Target.CreateSchemas(ctx, []string{"sales", "production"}) + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-mssql-sync") + + mappings := mssql_commerce.GetDefaultSyncJobMappings() + + job := createMssqlSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "mssql_cross_schema_foreign_keys", + JobMappings: mappings, + JobOptions: &TestJobOptions{ + Truncate: true, + InitSchema: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers, WithValidEELicense()) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: mssql_cross_schema_foreign_keys") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: mssql_cross_schema_foreign_keys") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: "production", table: "categories", rowCount: 7}, + {schema: "production", table: "brands", rowCount: 9}, + {schema: "production", table: "products", rowCount: 18}, + {schema: "production", table: "stocks", rowCount: 32}, + {schema: "production", table: "identities", rowCount: 5}, + {schema: "sales", table: "customers", rowCount: 15}, + {schema: "sales", table: "stores", rowCount: 3}, + {schema: "sales", table: "staffs", rowCount: 10}, + {schema: "sales", table: "orders", rowCount: 13}, + {schema: "sales", table: "order_items", rowCount: 26}, + } + + for _, expected := range expectedResults { + rowCount, err := mssql.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: mssql_cross_schema_foreign_keys Table: %s", expected.table)) + } + + // TODO: Tear down, fix schema dropping issue. No way to force drop schemas in MSSQL. + // err = mssql.Source.DropSchemas(ctx, []string{schema}) + // require.NoError(t, err) + // err = mssql.Target.DropSchemas(ctx, []string{schema}) + // require.NoError(t, err) +} + +func test_mssql_subset( + t *testing.T, + ctx context.Context, + mssql *tcmssql.MssqlTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + testdataFolder := mssqlTestdataFolder + "/commerce" + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + err := mssql.Source.CreateSchemas(ctx, []string{"sales_subset", "production_subset"}) + require.NoError(t, err) + err = createCommerceTables(ctx, mssql.Source, &testdataFolder, []string{"create-tables.sql"}, "subset") + require.NoError(t, err) + err = mssql.Target.CreateSchemas(ctx, []string{"sales_subset", "production_subset"}) + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-mssql-sync") + + mappings := mssql_commerce.GetDefaultSyncJobMappings() + updatedMappings := []*mgmtv1alpha1.JobMapping{} + for _, jm := range mappings { + updatedMappings = append(updatedMappings, &mgmtv1alpha1.JobMapping{ + Schema: fmt.Sprintf("%s_subset", jm.Schema), + Table: jm.Table, + Column: jm.Column, + Transformer: jm.Transformer, + }) + } + + subsetMappings := map[string]string{ + "production_subset.products": "product_id in (1, 4, 8, 6)", + "sales_subset.customers": "customer_id in (1, 4, 8, 6)", + } + + job := createMssqlSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "mssql_subset", + JobMappings: updatedMappings, + SubsetMap: subsetMappings, + JobOptions: &TestJobOptions{ + Truncate: true, + InitSchema: true, + SubsetByForeignKeyConstraints: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers, WithValidEELicense()) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: mssql_subset") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: mssql_subset") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: "production_subset", table: "categories", rowCount: 7}, + {schema: "production_subset", table: "brands", rowCount: 9}, + {schema: "production_subset", table: "products", rowCount: 4}, + {schema: "production_subset", table: "stocks", rowCount: 10}, + {schema: "production_subset", table: "identities", rowCount: 5}, + {schema: "sales_subset", table: "customers", rowCount: 4}, + {schema: "sales_subset", table: "stores", rowCount: 3}, + {schema: "sales_subset", table: "staffs", rowCount: 10}, + {schema: "sales_subset", table: "orders", rowCount: 4}, + {schema: "sales_subset", table: "order_items", rowCount: 2}, + } + + for _, expected := range expectedResults { + rowCount, err := mssql.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: mssql_subset Table: %s", expected.table)) + } + + // TODO: Tear down, fix schema dropping issue. No way to force drop schemas in MSSQL. + // err = mssql.Source.DropSchemas(ctx, []string{schema}) + // require.NoError(t, err) + // err = mssql.Target.DropSchemas(ctx, []string{schema}) + // require.NoError(t, err) +} + +func test_mssql_identity_columns( + t *testing.T, + ctx context.Context, + mssql *tcmssql.MssqlTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + testdataFolder := mssqlTestdataFolder + "/commerce" + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + err := mssql.Source.CreateSchemas(ctx, []string{"sales_identity", "production_identity"}) + require.NoError(t, err) + err = createCommerceTables(ctx, mssql.Source, &testdataFolder, []string{"create-tables.sql"}, "identity") + require.NoError(t, err) + err = mssql.Target.CreateSchemas(ctx, []string{"sales_identity", "production_identity"}) + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-mssql-sync") + + mappings := mssql_commerce.GetDefaultSyncJobMappings() + tableColTypeMap := mssql_commerce.GetTableColumnTypeMap() + updatedJobmappings := []*mgmtv1alpha1.JobMapping{} + for _, jm := range mappings { + colTypeMap, ok := tableColTypeMap[fmt.Sprintf("%s.%s", jm.Schema, jm.Table)] + if ok { + t, ok := colTypeMap[jm.Column] + if ok && strings.HasPrefix(t, "INTIDENTITY") { + updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ + Schema: fmt.Sprintf("%s_identity", jm.Schema), + Table: jm.Table, + Column: jm.Column, + Transformer: getDefaultTransformerConfig(), + }) + continue + } + } + jm.Schema = fmt.Sprintf("%s_identity", jm.Schema) + updatedJobmappings = append(updatedJobmappings, jm) + } + + job := createMssqlSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "mssql_identity_columns", + JobMappings: updatedJobmappings, + JobOptions: &TestJobOptions{ + // Truncate: true, + InitSchema: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers, WithValidEELicense()) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: mssql_identity_columns") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: mssql_identity_columns") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: "production_identity", table: "categories", rowCount: 7}, + {schema: "production_identity", table: "brands", rowCount: 9}, + {schema: "production_identity", table: "products", rowCount: 18}, + {schema: "production_identity", table: "stocks", rowCount: 32}, + {schema: "production_identity", table: "identities", rowCount: 5}, + {schema: "sales_identity", table: "customers", rowCount: 15}, + {schema: "sales_identity", table: "stores", rowCount: 3}, + {schema: "sales_identity", table: "staffs", rowCount: 10}, + {schema: "sales_identity", table: "orders", rowCount: 13}, + {schema: "sales_identity", table: "order_items", rowCount: 26}, + } + + for _, expected := range expectedResults { + rowCount, err := mssql.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: mssql_identity_columns Table: %s", expected.table)) + } + + // TODO: Tear down, fix schema dropping issue. No way to force drop schemas in MSSQL. + // err = mssql.Source.DropSchemas(ctx, []string{schema}) + // require.NoError(t, err) + // err = mssql.Target.DropSchemas(ctx, []string{schema}) + // require.NoError(t, err) +} + +func getDefaultTransformerConfig() *mgmtv1alpha1.JobMappingTransformer { + return &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_GenerateDefaultConfig{ + GenerateDefaultConfig: &mgmtv1alpha1.GenerateDefault{}, + }, + }, + } +} + +func createCommerceTables(ctx context.Context, mssql *tcmssql.MssqlTestContainer, folder *string, files []string, schemaSuffix string) error { + for _, file := range files { + filePath := file + if folder != nil && *folder != "" { + filePath = fmt.Sprintf("./%s/%s", *folder, file) + } + sqlStr, err := os.ReadFile(filePath) + if err != nil { + return err + } + + updatedSql := strings.ReplaceAll(string(sqlStr), "sales.", fmt.Sprintf("sales_%s.", schemaSuffix)) + updatedSql = strings.ReplaceAll(updatedSql, "production.", fmt.Sprintf("production_%s.", schemaSuffix)) + _, err = mssql.DB.ExecContext(ctx, updatedSql) + if err != nil { + return fmt.Errorf("unable to exec SQL when running MsSQL SQL files: %w", err) + } + } + return nil +} diff --git a/worker/pkg/integration-test/mysql_test.go b/worker/pkg/integration-test/mysql_test.go new file mode 100644 index 0000000000..7953a306de --- /dev/null +++ b/worker/pkg/integration-test/mysql_test.go @@ -0,0 +1,331 @@ +package integrationtest + +import ( + "context" + "fmt" + "slices" + "testing" + + "connectrpc.com/connect" + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + tcneosyncapi "github.com/nucleuscloud/neosync/backend/pkg/integration-test" + sqlmanager_shared "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager/shared" + tcmysql "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/mysql" + testutil_testdata "github.com/nucleuscloud/neosync/internal/testutil/testdata" + mysql_alltypes "github.com/nucleuscloud/neosync/internal/testutil/testdata/mysql/alltypes" + mysql_composite_keys "github.com/nucleuscloud/neosync/internal/testutil/testdata/mysql/composite-keys" + mysql_edgecases "github.com/nucleuscloud/neosync/internal/testutil/testdata/mysql/edgecases" + "github.com/stretchr/testify/require" + "golang.org/x/sync/errgroup" +) + +const ( + mysqlTestdataFolder string = "../../../internal/testutil/testdata/mysql" +) + +func createMysqlSyncJob( + t *testing.T, + ctx context.Context, + jobclient mgmtv1alpha1connect.JobServiceClient, + config *createJobConfig, +) *mgmtv1alpha1.Job { + schemas := []*mgmtv1alpha1.MysqlSourceSchemaOption{} + subsetMap := map[string]*mgmtv1alpha1.MysqlSourceSchemaOption{} + for table, where := range config.SubsetMap { + schema, table := sqlmanager_shared.SplitTableKey(table) + if _, exists := subsetMap[schema]; !exists { + subsetMap[schema] = &mgmtv1alpha1.MysqlSourceSchemaOption{ + Schema: schema, + Tables: []*mgmtv1alpha1.MysqlSourceTableOption{}, + } + } + w := where + subsetMap[schema].Tables = append(subsetMap[schema].Tables, &mgmtv1alpha1.MysqlSourceTableOption{ + Table: table, + WhereClause: &w, + }) + } + + for _, s := range subsetMap { + schemas = append(schemas, s) + } + + var subsetByForeignKeyConstraints bool + destinationOptions := &mgmtv1alpha1.JobDestinationOptions{ + Config: &mgmtv1alpha1.JobDestinationOptions_MysqlOptions{ + MysqlOptions: &mgmtv1alpha1.MysqlDestinationConnectionOptions{}, + }, + } + if config.JobOptions != nil { + if config.JobOptions.SubsetByForeignKeyConstraints { + subsetByForeignKeyConstraints = true + } + destinationOptions = &mgmtv1alpha1.JobDestinationOptions{ + Config: &mgmtv1alpha1.JobDestinationOptions_MysqlOptions{ + MysqlOptions: &mgmtv1alpha1.MysqlDestinationConnectionOptions{ + InitTableSchema: config.JobOptions.InitSchema, + TruncateTable: &mgmtv1alpha1.MysqlTruncateTableConfig{ + TruncateBeforeInsert: config.JobOptions.Truncate, + }, + SkipForeignKeyViolations: config.JobOptions.SkipForeignKeyViolations, + }, + }, + } + } + + job, err := jobclient.CreateJob(ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ + AccountId: config.AccountId, + JobName: config.JobName, + Source: &mgmtv1alpha1.JobSource{ + Options: &mgmtv1alpha1.JobSourceOptions{ + Config: &mgmtv1alpha1.JobSourceOptions_Mysql{ + Mysql: &mgmtv1alpha1.MysqlSourceConnectionOptions{ + ConnectionId: config.SourceConn.Id, + Schemas: schemas, + SubsetByForeignKeyConstraints: subsetByForeignKeyConstraints, + }, + }, + }, + }, + Destinations: []*mgmtv1alpha1.CreateJobDestination{ + { + ConnectionId: config.DestConn.Id, + Options: destinationOptions, + }, + }, + Mappings: config.JobMappings, + VirtualForeignKeys: config.VirtualForeignKeys, + })) + require.NoError(t, err) + + return job.Msg.GetJob() +} + +func test_mysql_types( + t *testing.T, + ctx context.Context, + mysql *tcmysql.MysqlTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + alltypesSchema := "alltypes" + + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return mysql.Source.RunCreateStmtsInDatabase(errctx, mysqlTestdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) + }) + errgrp.Go(func() error { return mysql.Target.CreateDatabases(errctx, []string{alltypesSchema}) }) + err := errgrp.Wait() + require.NoError(t, err) + + neosyncApi.MockTemporalForCreateJob("test-mysql-sync") + + alltypesMappings := mysql_alltypes.GetDefaultSyncJobMappings(alltypesSchema) + + job := createMysqlSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "mysql_all_types", + JobMappings: alltypesMappings, + JobOptions: &TestJobOptions{ + Truncate: true, + InitSchema: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: mysql_all_types") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: mysql_all_types") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: alltypesSchema, table: "all_data_types", rowCount: 2}, + {schema: alltypesSchema, table: "json_data", rowCount: 12}, + } + + for _, expected := range expectedResults { + rowCount, err := mysql.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: mysql_all_types Table: %s", expected.table)) + } + + testutil_testdata.VerifySQLTableColumnValues(t, ctx, mysql.Source.DB, mysql.Target.DB, alltypesSchema, "all_data_types", sqlmanager_shared.MysqlDriver, "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, mysql.Source.DB, mysql.Target.DB, alltypesSchema, "json_data", sqlmanager_shared.MysqlDriver, "id") + + // tear down + err = cleanupMysqlDatabases(ctx, mysql, []string{alltypesSchema}) + require.NoError(t, err) +} + +func test_mysql_edgecases( + t *testing.T, + ctx context.Context, + mysql *tcmysql.MysqlTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + schema := "mysqledgecases" + schema2 := "mysqledgecasesother" + + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return mysql.Source.RunCreateStmtsInDatabase(errctx, mysqlTestdataFolder, []string{"edgecases/create-tables.sql"}, schema) + }) + errgrp.Go(func() error { + return mysql.Source.RunCreateStmtsInDatabase(errctx, mysqlTestdataFolder, []string{"edgecases/create-tables.sql"}, schema2) + }) + errgrp.Go(func() error { return mysql.Target.CreateDatabases(errctx, []string{schema, schema2}) }) + err := errgrp.Wait() + require.NoError(t, err) + + neosyncApi.MockTemporalForCreateJob("test-mysql-sync") + + mappings := mysql_edgecases.GetDefaultSyncJobMappings(schema) + mappings2 := mysql_edgecases.GetDefaultSyncJobMappings(schema2) + + job := createMysqlSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "mysql_edgecases", + JobMappings: slices.Concat(mappings, mappings2), + JobOptions: &TestJobOptions{ + Truncate: true, + InitSchema: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: mysql_edgecases") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: mysql_edgecases") + + expectedResults := []struct { + table string + rowCount int + }{ + {table: "container", rowCount: 5}, + {table: "container_status", rowCount: 5}, + {table: "container", rowCount: 5}, + {table: "users", rowCount: 5}, + {table: "unique_emails", rowCount: 5}, + {table: "unique_emails_and_usernames", rowCount: 5}, + {table: "t1", rowCount: 5}, + {table: "t2", rowCount: 5}, + {table: "t3", rowCount: 5}, + {table: "parent1", rowCount: 5}, + {table: "child1", rowCount: 5}, + {table: "t4", rowCount: 5}, + {table: "t5", rowCount: 5}, + {table: "employee_log", rowCount: 5}, + {table: "custom_table", rowCount: 5}, + {table: "tablewithcount", rowCount: 5}, + } + + // check schema1 + for _, expected := range expectedResults { + rowCount, err := mysql.Target.GetTableRowCount(ctx, schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: mysql_edgecases schema: %s Table: %s", schema, expected.table)) + } + + // check schema2 + for _, expected := range expectedResults { + rowCount, err := mysql.Target.GetTableRowCount(ctx, schema2, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: mysql_edgecases schema: %s Table: %s", schema2, expected.table)) + } + + // tear down + err = cleanupMysqlDatabases(ctx, mysql, []string{schema, schema2}) + require.NoError(t, err) +} + +func test_mysql_composite_keys( + t *testing.T, + ctx context.Context, + mysql *tcmysql.MysqlTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + schema := "mysqlcompositekeys" + + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return mysql.Source.RunCreateStmtsInDatabase(errctx, mysqlTestdataFolder, []string{"composite-keys/create-tables.sql"}, schema) + }) + errgrp.Go(func() error { + return mysql.Target.RunCreateStmtsInDatabase(errctx, mysqlTestdataFolder, []string{"composite-keys/create-tables.sql"}, schema) + }) + err := errgrp.Wait() + require.NoError(t, err) + + neosyncApi.MockTemporalForCreateJob("test-mysql-sync") + + mappings := mysql_composite_keys.GetDefaultSyncJobMappings(schema) + + job := createMysqlSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "mysql_composite_keys", + JobMappings: mappings, + JobOptions: &TestJobOptions{ + Truncate: true, + InitSchema: false, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: mysql_composite_keys") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: mysql_composite_keys") + + expectedResults := []struct { + table string + rowCount int + }{ + {table: "order_details", rowCount: 10}, + {table: "orders", rowCount: 10}, + {table: "order_shipping", rowCount: 10}, + {table: "shipping_status", rowCount: 10}, + } + + for _, expected := range expectedResults { + rowCount, err := mysql.Target.GetTableRowCount(ctx, schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: mysql_composite_keys schema: %s Table: %s", schema, expected.table)) + } + + // tear down + err = cleanupMysqlDatabases(ctx, mysql, []string{schema}) + require.NoError(t, err) +} + +func cleanupMysqlDatabases(ctx context.Context, mysql *tcmysql.MysqlTestSyncContainer, databases []string) error { + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { return mysql.Source.DropDatabases(errctx, databases) }) + errgrp.Go(func() error { return mysql.Target.DropDatabases(errctx, databases) }) + return errgrp.Wait() +} diff --git a/worker/pkg/integration-test/postgres_test.go b/worker/pkg/integration-test/postgres_test.go new file mode 100644 index 0000000000..08e483f14f --- /dev/null +++ b/worker/pkg/integration-test/postgres_test.go @@ -0,0 +1,946 @@ +package integrationtest + +import ( + "context" + "database/sql" + "fmt" + "slices" + "testing" + + "connectrpc.com/connect" + mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + tcneosyncapi "github.com/nucleuscloud/neosync/backend/pkg/integration-test" + sqlmanager_shared "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager/shared" + "github.com/nucleuscloud/neosync/internal/gotypeutil" + tcpostgres "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/postgres" + tcredis "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/redis" + testutil_testdata "github.com/nucleuscloud/neosync/internal/testutil/testdata" + pg_alltypes "github.com/nucleuscloud/neosync/internal/testutil/testdata/postgres/alltypes" + pg_edgecases "github.com/nucleuscloud/neosync/internal/testutil/testdata/postgres/edgecases" + pg_foreignkey_violations "github.com/nucleuscloud/neosync/internal/testutil/testdata/postgres/foreignkey-violations" + pg_humanresources "github.com/nucleuscloud/neosync/internal/testutil/testdata/postgres/humanresources" + pg_subsetting "github.com/nucleuscloud/neosync/internal/testutil/testdata/postgres/subsetting" + pg_transformers "github.com/nucleuscloud/neosync/internal/testutil/testdata/postgres/transformers" + pg_uuids "github.com/nucleuscloud/neosync/internal/testutil/testdata/postgres/uuids" + "github.com/stretchr/testify/require" + "golang.org/x/sync/errgroup" +) + +const ( + testdataFolder string = "../../../internal/testutil/testdata/postgres" +) + +type createJobConfig struct { + AccountId string + SourceConn *mgmtv1alpha1.Connection + DestConn *mgmtv1alpha1.Connection + JobName string + JobMappings []*mgmtv1alpha1.JobMapping + VirtualForeignKeys []*mgmtv1alpha1.VirtualForeignConstraint + SubsetMap map[string]string + JobOptions *TestJobOptions +} + +func createPostgresSyncJob( + t *testing.T, + ctx context.Context, + jobclient mgmtv1alpha1connect.JobServiceClient, + config *createJobConfig, +) *mgmtv1alpha1.Job { + schemas := []*mgmtv1alpha1.PostgresSourceSchemaOption{} + subsetMap := map[string]*mgmtv1alpha1.PostgresSourceSchemaOption{} + for table, where := range config.SubsetMap { + schema, table := sqlmanager_shared.SplitTableKey(table) + if _, exists := subsetMap[schema]; !exists { + subsetMap[schema] = &mgmtv1alpha1.PostgresSourceSchemaOption{ + Schema: schema, + Tables: []*mgmtv1alpha1.PostgresSourceTableOption{}, + } + } + w := where + subsetMap[schema].Tables = append(subsetMap[schema].Tables, &mgmtv1alpha1.PostgresSourceTableOption{ + Table: table, + WhereClause: &w, + }) + } + + for _, s := range subsetMap { + schemas = append(schemas, s) + } + + var subsetByForeignKeyConstraints bool + destinationOptions := &mgmtv1alpha1.JobDestinationOptions{ + Config: &mgmtv1alpha1.JobDestinationOptions_PostgresOptions{ + PostgresOptions: &mgmtv1alpha1.PostgresDestinationConnectionOptions{}, + }, + } + if config.JobOptions != nil { + if config.JobOptions.SubsetByForeignKeyConstraints { + subsetByForeignKeyConstraints = true + } + destinationOptions = &mgmtv1alpha1.JobDestinationOptions{ + Config: &mgmtv1alpha1.JobDestinationOptions_PostgresOptions{ + PostgresOptions: &mgmtv1alpha1.PostgresDestinationConnectionOptions{ + InitTableSchema: config.JobOptions.InitSchema, + TruncateTable: &mgmtv1alpha1.PostgresTruncateTableConfig{ + TruncateBeforeInsert: config.JobOptions.Truncate, + }, + SkipForeignKeyViolations: config.JobOptions.SkipForeignKeyViolations, + }, + }, + } + } + + job, err := jobclient.CreateJob(ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ + AccountId: config.AccountId, + JobName: config.JobName, + Source: &mgmtv1alpha1.JobSource{ + Options: &mgmtv1alpha1.JobSourceOptions{ + Config: &mgmtv1alpha1.JobSourceOptions_Postgres{ + Postgres: &mgmtv1alpha1.PostgresSourceConnectionOptions{ + ConnectionId: config.SourceConn.Id, + Schemas: schemas, + SubsetByForeignKeyConstraints: subsetByForeignKeyConstraints, + }, + }, + }, + }, + Destinations: []*mgmtv1alpha1.CreateJobDestination{ + { + ConnectionId: config.DestConn.Id, + Options: destinationOptions, + }, + }, + Mappings: config.JobMappings, + VirtualForeignKeys: config.VirtualForeignKeys, + })) + require.NoError(t, err) + + return job.Msg.GetJob() +} + +func test_postgres_types( + t *testing.T, + ctx context.Context, + postgres *tcpostgres.PostgresTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + alltypesSchema := "alltypes" + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return postgres.Source.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"alltypes/create-tables.sql"}, alltypesSchema) + }) + errgrp.Go(func() error { return postgres.Target.CreateSchemas(errctx, []string{alltypesSchema}) }) + err := errgrp.Wait() + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-postgres-sync") + + alltypesMappings := pg_alltypes.GetDefaultSyncJobMappings(alltypesSchema) + + job := createPostgresSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "all_types", + JobMappings: alltypesMappings, + JobOptions: &TestJobOptions{ + Truncate: true, + TruncateCascade: true, + InitSchema: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: all_types") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: all_types") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: alltypesSchema, table: "all_data_types", rowCount: 2}, + {schema: alltypesSchema, table: "array_types", rowCount: 1}, + {schema: alltypesSchema, table: "time_time", rowCount: 3}, + {schema: alltypesSchema, table: "json_data", rowCount: 12}, + {schema: alltypesSchema, table: "generated_table", rowCount: 4}, + } + + for _, expected := range expectedResults { + rowCount, err := postgres.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: all_types Table: %s", expected.table)) + } + + source, err := sql.Open("postgres", postgres.Source.URL) + require.NoError(t, err) + defer source.Close() + + target, err := sql.Open("postgres", postgres.Target.URL) + require.NoError(t, err) + defer target.Close() + + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "all_data_types", "postgres", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "json_data", "postgres", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "array_types", "postgres", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "generated_table", "postgres", "id") + testutil_testdata.VerifySQLTableColumnValues(t, ctx, source, target, alltypesSchema, "time_time", "postgres", "id") + + // tear down + err = cleanupPostgresSchemas(ctx, postgres, []string{alltypesSchema}) + require.NoError(t, err) +} + +func test_postgres_primary_key_transformations( + t *testing.T, + ctx context.Context, + postgres *tcpostgres.PostgresTestSyncContainer, + redis *tcredis.RedisTestContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + schema := "primary_$key_sdef" + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return postgres.Source.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"uuids/create-tables.sql", "humanresources/create-tables.sql"}, schema) + }) + errgrp.Go(func() error { + return postgres.Target.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"humanresources/create-tables.sql", "humanresources/create-constraints.sql"}, schema) + }) + err := errgrp.Wait() + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-postgres-sync") + + defaultMappings := pg_uuids.GetDefaultSyncJobMappings(schema) + updatedJobmappings := []*mgmtv1alpha1.JobMapping{} + for _, jm := range defaultMappings { + if jm.Column != "id" { + updatedJobmappings = append(updatedJobmappings, jm) + } else { + updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ + Schema: jm.Schema, + Table: jm.Table, + Column: jm.Column, + Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_GenerateUuidConfig{ + GenerateUuidConfig: &mgmtv1alpha1.GenerateUuid{ + IncludeHyphens: gotypeutil.ToPtr(true), + }, + }, + }, + }, + }) + } + } + + transformHumanresourcesMappings := pg_humanresources.GetDefaultSyncJobMappings(schema) + for _, m := range transformHumanresourcesMappings { + if m.Table == "countries" && m.Column == "country_id" { + m.Transformer = &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_TransformJavascriptConfig{ + TransformJavascriptConfig: &mgmtv1alpha1.TransformJavascript{Code: `if (value == 'US') { return 'SU'; } return value;`}, + }, + }, + } + } + } + + job := createPostgresSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "primary_key_transformations", + JobMappings: slices.Concat(updatedJobmappings, transformHumanresourcesMappings), + JobOptions: &TestJobOptions{ + Truncate: true, + TruncateCascade: true, + InitSchema: true, + }, + VirtualForeignKeys: pg_humanresources.GetVirtualForeignKeys(schema), + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers, WithRedis(redis.URL)) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: primary_key_transformations") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: all_types") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: schema, table: "store_notifications", rowCount: 20}, + {schema: schema, table: "stores", rowCount: 20}, + {schema: schema, table: "store_customers", rowCount: 20}, + {schema: schema, table: "referral_codes", rowCount: 20}, + {schema: schema, table: "regions", rowCount: 4}, + {schema: schema, table: "countries", rowCount: 25}, + {schema: schema, table: "locations", rowCount: 7}, + {schema: schema, table: "departments", rowCount: 11}, + {schema: schema, table: "jobs", rowCount: 19}, + {schema: schema, table: "employees", rowCount: 40}, + {schema: schema, table: "dependents", rowCount: 30}, + } + + for _, expected := range expectedResults { + rowCount, err := postgres.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: primary_key_transformations Table: %s", expected.table)) + } + + keys, err := testworkflow.Redisclient.Keys(ctx, "*").Result() + if err != nil { + t.Fatal(err) + } + require.Emptyf(t, keys, "Redis keys should be empty") + + // tear down + err = cleanupPostgresSchemas(ctx, postgres, []string{schema}) + require.NoError(t, err) +} + +func test_postgres_edgecases( + t *testing.T, + ctx context.Context, + postgres *tcpostgres.PostgresTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + schema := "CaPiTaL" + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return postgres.Source.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"edgecases/create-tables.sql"}, schema) + }) + errgrp.Go(func() error { + return postgres.Target.CreateSchemas(errctx, []string{schema}) + }) + err := errgrp.Wait() + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-postgres-sync") + + edgecasesMappings := pg_edgecases.GetDefaultSyncJobMappings(schema) + + job := createPostgresSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: schema, + JobMappings: edgecasesMappings, + JobOptions: &TestJobOptions{ + Truncate: true, + TruncateCascade: true, + InitSchema: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: edgecases") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: edgecases") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: schema, table: "addresses", rowCount: 8}, + {schema: schema, table: "customers", rowCount: 10}, + {schema: schema, table: "orders", rowCount: 10}, + {schema: schema, table: "company", rowCount: 3}, + {schema: schema, table: "department", rowCount: 4}, + {schema: schema, table: "expense_report", rowCount: 2}, + {schema: schema, table: "transaction", rowCount: 3}, + {schema: schema, table: "BadName", rowCount: 5}, + {schema: schema, table: "Bad Name 123!@#", rowCount: 5}, + } + + for _, expected := range expectedResults { + rowCount, err := postgres.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: edgecases Table: %s", expected.table)) + } + + // tear down + err = cleanupPostgresSchemas(ctx, postgres, []string{schema}) + require.NoError(t, err) +} + +func test_postgres_virtual_foreign_keys( + t *testing.T, + ctx context.Context, + postgres *tcpostgres.PostgresTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + schema := "vfk_hr" + subsetSchema := "vfk_hr_subset" + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return postgres.Source.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"humanresources/create-tables.sql"}, schema) + }) + errgrp.Go(func() error { + return postgres.Source.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"humanresources/create-tables.sql"}, subsetSchema) + }) + // only create foreign key constraints in target to test that virtual foreign keys are correct + errgrp.Go(func() error { + return postgres.Target.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"humanresources/create-tables.sql", "humanresources/create-constraints.sql"}, schema) + }) + errgrp.Go(func() error { + return postgres.Target.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"humanresources/create-tables.sql", "humanresources/create-constraints.sql"}, subsetSchema) + }) + err := errgrp.Wait() + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-postgres-sync") + + humanresourcesMappings := pg_humanresources.GetDefaultSyncJobMappings(schema) + subsetHumanresourcesMappings := pg_humanresources.GetDefaultSyncJobMappings(subsetSchema) + virtualForeignKeys := pg_humanresources.GetVirtualForeignKeys(schema) + subsetVirtualForeignKeys := pg_humanresources.GetVirtualForeignKeys(subsetSchema) + + job := createPostgresSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: schema, + JobMappings: slices.Concat(humanresourcesMappings, subsetHumanresourcesMappings), + SubsetMap: map[string]string{ + fmt.Sprintf("%s.employees", subsetSchema): "first_name = 'Alexander'", + }, + JobOptions: &TestJobOptions{ + Truncate: true, + TruncateCascade: true, + InitSchema: false, + SubsetByForeignKeyConstraints: true, + }, + VirtualForeignKeys: slices.Concat(virtualForeignKeys, subsetVirtualForeignKeys), + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: virtual-foreign-keys") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: virtual-foreign-keys") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: schema, table: "regions", rowCount: 4}, + {schema: schema, table: "countries", rowCount: 25}, + {schema: schema, table: "locations", rowCount: 7}, + {schema: schema, table: "departments", rowCount: 11}, + {schema: schema, table: "jobs", rowCount: 19}, + {schema: schema, table: "employees", rowCount: 40}, + {schema: schema, table: "dependents", rowCount: 30}, + {schema: subsetSchema, table: "regions", rowCount: 4}, + {schema: subsetSchema, table: "countries", rowCount: 25}, + {schema: subsetSchema, table: "locations", rowCount: 7}, + {schema: subsetSchema, table: "departments", rowCount: 11}, + {schema: subsetSchema, table: "dependents", rowCount: 2}, + {schema: subsetSchema, table: "employees", rowCount: 2}, + {schema: subsetSchema, table: "jobs", rowCount: 19}, + } + + for _, expected := range expectedResults { + rowCount, err := postgres.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: virtual-foreign-keys Table: %s", expected.table)) + } + + // tear down + err = cleanupPostgresSchemas(ctx, postgres, []string{schema}) + require.NoError(t, err) +} + +func test_postgres_javascript_transformers( + t *testing.T, + ctx context.Context, + postgres *tcpostgres.PostgresTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + transformersSchema := "transformers" + generatorsSchema := "generators" + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return postgres.Source.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"transformers/create-tables.sql"}, transformersSchema) + }) + errgrp.Go(func() error { + return postgres.Source.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"transformers/create-tables.sql"}, generatorsSchema) + }) + errgrp.Go(func() error { + return postgres.Target.CreateSchemas(errctx, []string{transformersSchema, generatorsSchema}) + }) + err := errgrp.Wait() + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-postgres-sync") + + transformersMappings := getJsTransformerJobmappings(pg_transformers.GetDefaultSyncJobMappings(transformersSchema)) + generatorsMappings := getJsGeneratorJobmappings(pg_transformers.GetDefaultSyncJobMappings(generatorsSchema)) + + job := createPostgresSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: "javascript-transformers", + JobMappings: slices.Concat(transformersMappings, generatorsMappings), + JobOptions: &TestJobOptions{ + Truncate: true, + TruncateCascade: true, + InitSchema: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: javascript-transformers") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: javascript-transformers") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: transformersSchema, table: "transformers", rowCount: 13}, + {schema: generatorsSchema, table: "transformers", rowCount: 13}, + } + + for _, expected := range expectedResults { + rowCount, err := postgres.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: javascript-transformers Table: %s", expected.table)) + } + + // tear down + err = cleanupPostgresSchemas(ctx, postgres, []string{transformersSchema, generatorsSchema}) + require.NoError(t, err) +} + +func getJsGeneratorJobmappings(jobmappings []*mgmtv1alpha1.JobMapping) []*mgmtv1alpha1.JobMapping { + colTransformerMap := map[string]*mgmtv1alpha1.JobMappingTransformer{ + "e164_phone_number": getJavascriptTransformerConfig("return neosync.generateInternationalPhoneNumber({ min: 9, max: 15});"), + "email": getJavascriptTransformerConfig("return neosync.generateEmail({ maxLength: 255});"), + "str": getJavascriptTransformerConfig("return neosync.generateRandomString({ min: 1, max: 50});"), + "measurement": getJavascriptTransformerConfig("return neosync.generateFloat64({ min: 3.14, max: 300.10});"), + "int64": getJavascriptTransformerConfig("return neosync.generateInt64({ min: 1, max: 50});"), + "int64_phone_number": getJavascriptTransformerConfig("return neosync.generateInt64PhoneNumber({});"), + "string_phone_number": getJavascriptTransformerConfig("return neosync.generateStringPhoneNumber({ min: 1, max: 15});"), + "first_name": getJavascriptTransformerConfig("return neosync.generateFirstName({ maxLength: 25});"), + "last_name": getJavascriptTransformerConfig("return neosync.generateLastName({ maxLength: 25});"), + "full_name": getJavascriptTransformerConfig("return neosync.generateFullName({ maxLength: 25});"), + "character_scramble": getJavascriptTransformerConfig("return neosync.generateCity({ maxLength: 100});"), + "bool": getJavascriptTransformerConfig("return neosync.generateBool({});"), + "card_number": getJavascriptTransformerConfig("return neosync.generateCardNumber({ validLuhn: true });"), + "categorical": getJavascriptTransformerConfig("return neosync.generateCategorical({ categories: 'dog,cat,horse'});"), + "city": getJavascriptTransformerConfig("return neosync.generateCity({ maxLength: 100 });"), + "full_address": getJavascriptTransformerConfig("return neosync.generateFullAddress({ maxLength: 100 });"), + "gender": getJavascriptTransformerConfig("return neosync.generateGender({});"), + "international_phone": getJavascriptTransformerConfig("return neosync.generateInternationalPhoneNumber({ min: 9, max: 14});"), + "sha256": getJavascriptTransformerConfig("return neosync.generateSHA256Hash({});"), + "ssn": getJavascriptTransformerConfig("return neosync.generateSSN({});"), + "state": getJavascriptTransformerConfig("return neosync.generateState({});"), + "street_address": getJavascriptTransformerConfig("return neosync.generateStreetAddress({ maxLength: 100 });"), + "unix_time": getJavascriptTransformerConfig("return neosync.generateUnixTimestamp({});"), + "username": getJavascriptTransformerConfig("return neosync.generateUsername({ maxLength: 100 });"), + "utc_timestamp": getJavascriptTransformerConfig("return neosync.generateUTCTimestamp({});"), + "uuid": getJavascriptTransformerConfig("return neosync.generateUUID({});"), + "zipcode": getJavascriptTransformerConfig("return neosync.generateZipcode({});"), + } + updatedJobmappings := []*mgmtv1alpha1.JobMapping{} + for _, jm := range jobmappings { + if _, ok := colTransformerMap[jm.Column]; !ok { + updatedJobmappings = append(updatedJobmappings, jm) + } else { + updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ + Schema: jm.Schema, + Table: jm.Table, + Column: jm.Column, + Transformer: colTransformerMap[jm.Column], + }) + } + } + return updatedJobmappings +} + +func getJsTransformerJobmappings(jobmappings []*mgmtv1alpha1.JobMapping) []*mgmtv1alpha1.JobMapping { + colTransformerMap := map[string]*mgmtv1alpha1.JobMappingTransformer{ + "e164_phone_number": getJavascriptTransformerConfig("return neosync.transformE164PhoneNumber(value, { preserveLength: true, maxLength: 20});"), + "email": getJavascriptTransformerConfig("return neosync.transformEmail(value, { preserveLength: true, maxLength: 255});"), + "str": getJavascriptTransformerConfig("return neosync.transformString(value, { preserveLength: true, maxLength: 30});"), + "measurement": getJavascriptTransformerConfig("return neosync.transformFloat64(value, { randomizationRangeMin: 3.14, randomizationRangeMax: 300.10});"), + "int64": getJavascriptTransformerConfig("return neosync.transformInt64(value, { randomizationRangeMin: 1, randomizationRangeMax: 300});"), + "int64_phone_number": getJavascriptTransformerConfig("return neosync.transformInt64PhoneNumber(value, { preserveLength: true});"), + "string_phone_number": getJavascriptTransformerConfig("return neosync.transformStringPhoneNumber(value, { preserveLength: true, maxLength: 200});"), + "first_name": getJavascriptTransformerConfig("return neosync.transformFirstName(value, { preserveLength: true, maxLength: 25});"), + "last_name": getJavascriptTransformerConfig("return neosync.transformLastName(value, { preserveLength: true, maxLength: 25});"), + "full_name": getJavascriptTransformerConfig("return neosync.transformFullName(value, { preserveLength: true, maxLength: 25});"), + "character_scramble": getJavascriptTransformerConfig("return neosync.transformCharacterScramble(value, { preserveLength: false, maxLength: 100});"), + } + updatedJobmappings := []*mgmtv1alpha1.JobMapping{} + for _, jm := range jobmappings { + updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ + Schema: jm.Schema, + Table: jm.Table, + Column: jm.Column, + Transformer: colTransformerMap[jm.Column], + }) + } + return updatedJobmappings +} + +func getJavascriptTransformerConfig(code string) *mgmtv1alpha1.JobMappingTransformer { + return &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_TransformJavascriptConfig{ + TransformJavascriptConfig: &mgmtv1alpha1.TransformJavascript{Code: code}, + }, + }, + } +} + +func test_postgres_skip_foreign_keys_violations( + t *testing.T, + ctx context.Context, + postgres *tcpostgres.PostgresTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + schema := "fk_violations" + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return postgres.Source.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"foreignkey-violations/create-tables.sql"}, schema) + }) + errgrp.Go(func() error { + return postgres.Target.CreateSchemas(errctx, []string{schema}) + }) + err := errgrp.Wait() + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-postgres-sync") + + jobmappings := pg_foreignkey_violations.GetDefaultSyncJobMappings(schema) + + job := createPostgresSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: schema, + JobMappings: jobmappings, + JobOptions: &TestJobOptions{ + Truncate: true, + TruncateCascade: true, + InitSchema: true, + SkipForeignKeyViolations: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: skip-foreign-keys-violations") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: skip-foreign-keys-violations") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: schema, table: "countries", rowCount: 24}, + {schema: schema, table: "dependents", rowCount: 7}, + {schema: schema, table: "employees", rowCount: 10}, + {schema: schema, table: "locations", rowCount: 4}, + {schema: schema, table: "departments", rowCount: 4}, + {schema: schema, table: "jobs", rowCount: 19}, + {schema: schema, table: "regions", rowCount: 4}, + } + + for _, expected := range expectedResults { + rowCount, err := postgres.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: skip-foreign-keys-violations Table: %s", expected.table)) + } + + // tear down + err = cleanupPostgresSchemas(ctx, postgres, []string{schema}) + require.NoError(t, err) +} + +func test_postgres_foreign_keys_violations_error( + t *testing.T, + ctx context.Context, + postgres *tcpostgres.PostgresTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + schema := "fk_violations_error" + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return postgres.Source.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"foreignkey-violations/create-tables.sql"}, schema) + }) + errgrp.Go(func() error { + return postgres.Target.CreateSchemas(errctx, []string{schema}) + }) + err := errgrp.Wait() + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-postgres-sync") + + jobmappings := pg_foreignkey_violations.GetDefaultSyncJobMappings(schema) + + job := createPostgresSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: schema, + JobMappings: jobmappings, + JobOptions: &TestJobOptions{ + Truncate: true, + TruncateCascade: true, + InitSchema: true, + SkipForeignKeyViolations: false, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: foreign-keys-violations-error") + err = testworkflow.TestEnv.GetWorkflowError() + require.Error(t, err, "Received Temporal Workflow Error: foreign-keys-violations-error") + + // tear down + err = cleanupPostgresSchemas(ctx, postgres, []string{schema}) + require.NoError(t, err) +} + +func test_postgres_subsetting( + t *testing.T, + ctx context.Context, + postgres *tcpostgres.PostgresTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + sourceConn, destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + schema := "subsetting" + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { + return postgres.Source.RunCreateStmtsInSchema(errctx, testdataFolder, []string{"subsetting/create-tables.sql"}, schema) + }) + errgrp.Go(func() error { + return postgres.Target.CreateSchemas(errctx, []string{schema}) + }) + err := errgrp.Wait() + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-postgres-sync") + + jobmappings := pg_subsetting.GetDefaultSyncJobMappings(schema) + + subsetMappings := map[string]string{ + "subsetting.users": "user_id in (1,2,5,6,7,8)", + "subsetting.test_2_x": "created > '2023-06-03'", + "subsetting.test_2_b": "created > '2023-06-03'", + "subsetting.addresses": "id in (1,5)", + "subsetting.division": "id in (3,5)", + "subsetting.bosses": "id in (3,5)", + } + + job := createPostgresSyncJob(t, ctx, jobclient, &createJobConfig{ + AccountId: accountId, + SourceConn: sourceConn, + DestConn: destConn, + JobName: schema, + JobMappings: jobmappings, + SubsetMap: subsetMappings, + JobOptions: &TestJobOptions{ + Truncate: true, + TruncateCascade: true, + InitSchema: true, + SubsetByForeignKeyConstraints: true, + }, + }) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: skip-foreign-keys-violations") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: skip-foreign-keys-violations") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: schema, table: "attachments", rowCount: 2}, + {schema: schema, table: "comments", rowCount: 4}, + {schema: schema, table: "initiatives", rowCount: 4}, + {schema: schema, table: "skills", rowCount: 10}, + {schema: schema, table: "tasks", rowCount: 2}, + {schema: schema, table: "user_skills", rowCount: 6}, + {schema: schema, table: "users", rowCount: 6}, + {schema: schema, table: "test_2_x", rowCount: 3}, + {schema: schema, table: "test_2_b", rowCount: 3}, + {schema: schema, table: "test_2_a", rowCount: 4}, + {schema: schema, table: "test_2_c", rowCount: 2}, + {schema: schema, table: "test_2_d", rowCount: 2}, + {schema: schema, table: "test_2_e", rowCount: 2}, + {schema: schema, table: "orders", rowCount: 2}, + {schema: schema, table: "addresses", rowCount: 2}, + {schema: schema, table: "customers", rowCount: 2}, + {schema: schema, table: "payments", rowCount: 1}, + {schema: schema, table: "division", rowCount: 2}, + {schema: schema, table: "employees", rowCount: 2}, + {schema: schema, table: "projects", rowCount: 2}, + {schema: schema, table: "bosses", rowCount: 2}, + {schema: schema, table: "minions", rowCount: 2}, + } + + for _, expected := range expectedResults { + rowCount, err := postgres.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: skip-foreign-keys-violations Table: %s", expected.table)) + } + + // tear down + err = cleanupPostgresSchemas(ctx, postgres, []string{schema}) + require.NoError(t, err) +} + +func test_postgres_generate_workflow( + t *testing.T, + ctx context.Context, + postgres *tcpostgres.PostgresTestSyncContainer, + neosyncApi *tcneosyncapi.NeosyncApiTestClient, + dbManagers *TestDatabaseManagers, + accountId string, + destConn *mgmtv1alpha1.Connection, +) { + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + schema := "generate" + err := postgres.Target.RunCreateStmtsInSchema(ctx, testdataFolder, []string{"alltypes/create-tables.sql"}, schema) + require.NoError(t, err) + neosyncApi.MockTemporalForCreateJob("test-postgres-sync") + + table := "all_data_types" + mappings := []*mgmtv1alpha1.JobMapping{ + {Schema: schema, Table: table, Column: "integer_col", Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{Config: &mgmtv1alpha1.TransformerConfig_GenerateInt64Config{}}, + }}, + {Schema: schema, Table: table, Column: "text_col", Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_GenerateStringConfig{}, + }, + }}, + {Schema: schema, Table: table, Column: "uuid_col", Transformer: &mgmtv1alpha1.JobMappingTransformer{ + Config: &mgmtv1alpha1.TransformerConfig{ + Config: &mgmtv1alpha1.TransformerConfig_GenerateUuidConfig{}, + }, + }}, + } + + job, err := jobclient.CreateJob(ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ + AccountId: accountId, + JobName: schema, + Source: &mgmtv1alpha1.JobSource{ + Options: &mgmtv1alpha1.JobSourceOptions{ + Config: &mgmtv1alpha1.JobSourceOptions_Generate{ + Generate: &mgmtv1alpha1.GenerateSourceOptions{ + FkSourceConnectionId: &destConn.Id, + Schemas: []*mgmtv1alpha1.GenerateSourceSchemaOption{ + {Schema: schema, Tables: []*mgmtv1alpha1.GenerateSourceTableOption{ + {Table: table, RowCount: 10}, + }}, + }, + }, + }, + }, + }, + Destinations: []*mgmtv1alpha1.CreateJobDestination{ + { + ConnectionId: destConn.Id, + Options: &mgmtv1alpha1.JobDestinationOptions{ + Config: &mgmtv1alpha1.JobDestinationOptions_PostgresOptions{ + PostgresOptions: &mgmtv1alpha1.PostgresDestinationConnectionOptions{ + InitTableSchema: false, + TruncateTable: &mgmtv1alpha1.PostgresTruncateTableConfig{ + TruncateBeforeInsert: true, + }, + SkipForeignKeyViolations: false, + }, + }, + }, + }, + }, + Mappings: mappings, + VirtualForeignKeys: nil, + })) + require.NoError(t, err) + + testworkflow := NewTestDataSyncWorkflowEnv(t, neosyncApi, dbManagers) + testworkflow.RequireActivitiesCompletedSuccessfully(t) + testworkflow.ExecuteTestDataSyncWorkflow(job.Msg.GetJob().GetId()) + require.Truef(t, testworkflow.TestEnv.IsWorkflowCompleted(), "Workflow did not complete. Test: generate") + err = testworkflow.TestEnv.GetWorkflowError() + require.NoError(t, err, "Received Temporal Workflow Error: generate") + + expectedResults := []struct { + schema string + table string + rowCount int + }{ + {schema: schema, table: table, rowCount: 10}, + } + + for _, expected := range expectedResults { + rowCount, err := postgres.Target.GetTableRowCount(ctx, expected.schema, expected.table) + require.NoError(t, err) + require.Equalf(t, expected.rowCount, rowCount, fmt.Sprintf("Test: generate Table: %s", expected.table)) + } + + // tear down + err = cleanupPostgresSchemas(ctx, postgres, []string{schema}) + require.NoError(t, err) +} + +func cleanupPostgresSchemas(ctx context.Context, postgres *tcpostgres.PostgresTestSyncContainer, schemas []string) error { + errgrp, errctx := errgroup.WithContext(ctx) + errgrp.Go(func() error { return postgres.Source.DropSchemas(errctx, schemas) }) + errgrp.Go(func() error { return postgres.Target.DropSchemas(errctx, schemas) }) + return errgrp.Wait() +} diff --git a/worker/pkg/integration-test/types.go b/worker/pkg/integration-test/types.go new file mode 100644 index 0000000000..10424a4c59 --- /dev/null +++ b/worker/pkg/integration-test/types.go @@ -0,0 +1,19 @@ +package integrationtest + +import mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + +type DefaultTransformers struct { + Boolean *mgmtv1alpha1.JobMappingTransformer + String *mgmtv1alpha1.JobMappingTransformer + Number *mgmtv1alpha1.JobMappingTransformer + Byte *mgmtv1alpha1.JobMappingTransformer +} + +type TestJobOptions struct { + SubsetByForeignKeyConstraints bool + InitSchema bool + Truncate bool + TruncateCascade bool + DefaultTransformers *DefaultTransformers + SkipForeignKeyViolations bool +} diff --git a/worker/pkg/integration-test/workflow-integration_test.go b/worker/pkg/integration-test/workflow-integration_test.go new file mode 100644 index 0000000000..809c88fc41 --- /dev/null +++ b/worker/pkg/integration-test/workflow-integration_test.go @@ -0,0 +1,249 @@ +package integrationtest + +import ( + "context" + "testing" + + tcneosyncapi "github.com/nucleuscloud/neosync/backend/pkg/integration-test" + "github.com/nucleuscloud/neosync/internal/testutil" + tcdynamodb "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/dynamodb" + tcmongodb "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/mongodb" + tcmysql "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/mysql" + tcpostgres "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/postgres" + tcredis "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/redis" + tcmssql "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/sqlserver" + "github.com/stretchr/testify/require" +) + +const neosyncDbMigrationsPath = "../../../backend/sql/postgresql/schema" + +func Test_Workflow(t *testing.T) { + t.Parallel() + ok := testutil.ShouldRunIntegrationTest() + if !ok { + return + } + ctx := context.Background() + + neosyncApi, err := tcneosyncapi.NewNeosyncApiTestClient(ctx, t, tcneosyncapi.WithMigrationsDirectory(neosyncDbMigrationsPath)) + if err != nil { + t.Fatal(err) + } + + connclient := neosyncApi.OSSUnauthenticatedLicensedClients.Connections() + accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Users()) + dbManagers := NewTestDatabaseManagers(t) + + t.Run("postgres", func(t *testing.T) { + t.Log("Starting postgres tests") + t.Parallel() + postgres, err := tcpostgres.NewPostgresTestSyncContainer(ctx, []tcpostgres.Option{}, []tcpostgres.Option{}) + if err != nil { + t.Fatal(err) + } + sourceConn := tcneosyncapi.CreatePostgresConnection(ctx, t, connclient, accountId, "postgres-source", postgres.Source.URL) + destConn := tcneosyncapi.CreatePostgresConnection(ctx, t, connclient, accountId, "postgres-dest", postgres.Target.URL) + + // Sync workflow tests + t.Run("types", func(t *testing.T) { + t.Parallel() + test_postgres_types(t, ctx, postgres, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("edgecases", func(t *testing.T) { + t.Parallel() + test_postgres_edgecases(t, ctx, postgres, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("virtual_foreign_keys", func(t *testing.T) { + t.Parallel() + test_postgres_virtual_foreign_keys(t, ctx, postgres, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("javascript_transformers", func(t *testing.T) { + t.Parallel() + test_postgres_javascript_transformers(t, ctx, postgres, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("skip_foreign_keys_violations", func(t *testing.T) { + t.Parallel() + test_postgres_skip_foreign_keys_violations(t, ctx, postgres, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("foreign_keys_violations_error", func(t *testing.T) { + t.Parallel() + test_postgres_foreign_keys_violations_error(t, ctx, postgres, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("subsetting", func(t *testing.T) { + t.Parallel() + test_postgres_subsetting(t, ctx, postgres, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("primary_key_transformations", func(t *testing.T) { + t.Parallel() + redis, err := tcredis.NewRedisTestContainer(ctx) + require.NoError(t, err) + + test_postgres_primary_key_transformations(t, ctx, postgres, redis, neosyncApi, dbManagers, accountId, sourceConn, destConn) + + t.Cleanup(func() { + err := redis.TearDown(ctx) + require.NoError(t, err) + }) + }) + + // Generate workflow tests + t.Run("generate", func(t *testing.T) { + t.Parallel() + test_postgres_generate_workflow(t, ctx, postgres, neosyncApi, dbManagers, accountId, destConn) + }) + + t.Cleanup(func() { + err := postgres.TearDown(ctx) + if err != nil { + t.Fatal(err) + } + }) + }) + + t.Run("mysql", func(t *testing.T) { + t.Log("Starting mysql tests") + t.Parallel() + mysql, err := tcmysql.NewMysqlTestSyncContainer(ctx, []tcmysql.Option{}, []tcmysql.Option{}) + if err != nil { + t.Fatal(err) + } + sourceConn := tcneosyncapi.CreateMysqlConnection(ctx, t, connclient, accountId, "mysql-source", mysql.Source.URL) + destConn := tcneosyncapi.CreateMysqlConnection(ctx, t, connclient, accountId, "mysql-dest", mysql.Target.URL) + + t.Run("types", func(t *testing.T) { + t.Parallel() + test_mysql_types(t, ctx, mysql, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("edgecases", func(t *testing.T) { + t.Parallel() + test_mysql_edgecases(t, ctx, mysql, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("composite_keys", func(t *testing.T) { + t.Parallel() + test_mysql_composite_keys(t, ctx, mysql, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Cleanup(func() { + err := mysql.TearDown(ctx) + if err != nil { + t.Fatal(err) + } + }) + }) + + t.Run("mssql", func(t *testing.T) { + t.Log("Starting mssql tests") + t.Parallel() + mssql, err := tcmssql.NewMssqlTestSyncContainer(ctx, []tcmssql.Option{}, []tcmssql.Option{}) + if err != nil { + t.Fatal(err) + } + sourceConn := tcneosyncapi.CreateMssqlConnection(ctx, t, connclient, accountId, "mssql-source", mssql.Source.URL) + destConn := tcneosyncapi.CreateMssqlConnection(ctx, t, connclient, accountId, "mssql-dest", mssql.Target.URL) + + t.Run("types", func(t *testing.T) { + t.Parallel() + test_mssql_types(t, ctx, mssql, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("cross_schema_foreign_keys", func(t *testing.T) { + t.Parallel() + test_mssql_cross_schema_foreign_keys(t, ctx, mssql, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("subset", func(t *testing.T) { + t.Parallel() + test_mssql_subset(t, ctx, mssql, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("identity_columns", func(t *testing.T) { + t.Parallel() + test_mssql_identity_columns(t, ctx, mssql, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Cleanup(func() { + err := mssql.TearDown(ctx) + if err != nil { + t.Fatal(err) + } + }) + }) + + t.Run("dynamodb", func(t *testing.T) { + t.Log("Starting dynamodb tests") + t.Parallel() + dynamo, err := tcdynamodb.NewDynamoDBTestSyncContainer(ctx, t, []tcdynamodb.Option{}, []tcdynamodb.Option{}) + if err != nil { + t.Fatal(err) + } + sourceConn := tcneosyncapi.CreateDynamoDBConnection(ctx, t, connclient, accountId, "dynamo-source", dynamo.Source.URL, dynamo.Source.Credentials) + destConn := tcneosyncapi.CreateDynamoDBConnection(ctx, t, connclient, accountId, "dynamo-dest", dynamo.Target.URL, dynamo.Target.Credentials) + + t.Run("types", func(t *testing.T) { + t.Parallel() + test_dynamodb_alltypes(t, ctx, dynamo, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("subset", func(t *testing.T) { + t.Parallel() + test_dynamodb_subset(t, ctx, dynamo, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("default_transformers", func(t *testing.T) { + t.Parallel() + test_dynamodb_default_transformers(t, ctx, dynamo, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Cleanup(func() { + err := dynamo.TearDown(ctx) + if err != nil { + t.Fatal(err) + } + }) + }) + + t.Run("mongodb", func(t *testing.T) { + t.Log("Starting mongodb tests") + t.Parallel() + mongodb, err := tcmongodb.NewMongoDBTestSyncContainer(ctx, t) + if err != nil { + t.Fatal(err) + } + + sourceConn := tcneosyncapi.CreateMongodbConnection(ctx, t, connclient, accountId, "mongodb-source", mongodb.Source.URL) + destConn := tcneosyncapi.CreateMongodbConnection(ctx, t, connclient, accountId, "mongodb-dest", mongodb.Target.URL) + + t.Run("types", func(t *testing.T) { + t.Parallel() + test_mongodb_alltypes(t, ctx, mongodb, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Run("transform", func(t *testing.T) { + t.Parallel() + test_mongodb_transform(t, ctx, mongodb, neosyncApi, dbManagers, accountId, sourceConn, destConn) + }) + + t.Cleanup(func() { + err := mongodb.TearDown(ctx) + if err != nil { + t.Fatal(err) + } + }) + }) + + t.Cleanup(func() { + err = neosyncApi.TearDown(ctx) + if err != nil { + panic(err) + } + }) +} diff --git a/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder.go b/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder.go index 3ad3471701..724f7dce6a 100644 --- a/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder.go +++ b/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder.go @@ -376,7 +376,7 @@ func (b *initStatementBuilder) RunSqlInitTableStatements( for _, c := range cols { if c.IdentityGeneration != nil && *c.IdentityGeneration != "" { schema, table := sqlmanager_shared.SplitTableKey(table) - identityResetStatement := sqlmanager_mssql.BuildMssqlIdentityColumnResetStatement(schema, table, *c.IdentityGeneration) + identityResetStatement := sqlmanager_mssql.BuildMssqlIdentityColumnResetStatement(schema, table, c.IdentitySeed, c.IdentityIncrement) identityStmts = append(identityStmts, identityResetStatement) } } diff --git a/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder_test.go b/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder_test.go index de76b0c6f8..4591e370e8 100644 --- a/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder_test.go +++ b/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder_test.go @@ -21,11 +21,9 @@ const ( workflowId = "workflow-id" ) -type fakeLicense struct{} - -func (f *fakeLicense) IsValid() bool { - return true -} +var ( + fakeEELicense = testutil.NewFakeEELicense(testutil.WithIsValid()) +) func Test_InitStatementBuilder_Pg_Generate_InitSchema(t *testing.T) { t.Parallel() @@ -167,7 +165,7 @@ func Test_InitStatementBuilder_Pg_Generate_InitSchema(t *testing.T) { mockSqlDb.On("BatchExec", mock.Anything, mock.Anything, []string{"test-idx-statement"}, &sqlmanager_shared.BatchExecOpts{}).Return(nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, @@ -269,7 +267,7 @@ func Test_InitStatementBuilder_Pg_Generate_NoInitStatement(t *testing.T) { mockSqlManager.On("NewSqlConnection", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(sqlmanager.NewPostgresSqlConnection(mockSqlDb), nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, @@ -401,7 +399,7 @@ func Test_InitStatementBuilder_Pg_TruncateCascade(t *testing.T) { mockSqlDb.On("BatchExec", mock.Anything, mock.Anything, mock.MatchedBy(func(query []string) bool { return compareSlices(query, stmts) }), &sqlmanager_shared.BatchExecOpts{}).Return(nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, @@ -541,7 +539,7 @@ func Test_InitStatementBuilder_Pg_Truncate(t *testing.T) { mockSqlDb.On("Exec", mock.Anything, "TRUNCATE \"public\".\"accounts\", \"public\".\"users\" RESTART IDENTITY;").Return(nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, @@ -685,7 +683,7 @@ func Test_InitStatementBuilder_Pg_InitSchema(t *testing.T) { mockSqlDb.On("BatchExec", mock.Anything, mock.Anything, []string{"test-idx-statement"}, &sqlmanager_shared.BatchExecOpts{}).Return(nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, @@ -797,7 +795,7 @@ func Test_InitStatementBuilder_Mysql_Generate(t *testing.T) { mockSqlManager.On("NewSqlConnection", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(sqlmanager.NewMysqlSqlConnection(mockSqlDb), nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, diff --git a/worker/pkg/workflows/datasync/activities/shared/shared.go b/worker/pkg/workflows/datasync/activities/shared/shared.go index 9ab926d0db..fab39dc0c4 100644 --- a/worker/pkg/workflows/datasync/activities/shared/shared.go +++ b/worker/pkg/workflows/datasync/activities/shared/shared.go @@ -11,6 +11,7 @@ import ( sqlmanager_shared "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager/shared" neosync_benthos "github.com/nucleuscloud/neosync/worker/pkg/benthos" + benthosbuilder_shared "github.com/nucleuscloud/neosync/internal/benthos/benthos-builder/shared" http_client "github.com/nucleuscloud/neosync/internal/http/client" "github.com/spf13/viper" ) @@ -236,30 +237,16 @@ func GetJobSourceConnection( return sourceConnection, nil } +// Returns the connection type as a string +// Should only be used for logging func GetConnectionType(connection *mgmtv1alpha1.Connection) string { - switch connection.GetConnectionConfig().GetConfig().(type) { - case *mgmtv1alpha1.ConnectionConfig_PgConfig: - return "postgres" - case *mgmtv1alpha1.ConnectionConfig_MysqlConfig: - return "mysql" - case *mgmtv1alpha1.ConnectionConfig_MssqlConfig: - return "sqlserver" - case *mgmtv1alpha1.ConnectionConfig_AwsS3Config: - return "aws-s3" - case *mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig: - return "gcp-cloud-storage" - case *mgmtv1alpha1.ConnectionConfig_MongoConfig: - return "mongodb" - case *mgmtv1alpha1.ConnectionConfig_DynamodbConfig: - return "aws-dynamodb" - case *mgmtv1alpha1.ConnectionConfig_LocalDirConfig: - return "local-directory" - case *mgmtv1alpha1.ConnectionConfig_OpenaiConfig: - return "openai" - default: + connectiontype, err := benthosbuilder_shared.GetConnectionType(connection) + if err != nil { return "unknown" } + return string(connectiontype) } + func GetConnectionById( ctx context.Context, connclient mgmtv1alpha1connect.ConnectionServiceClient, diff --git a/worker/pkg/workflows/datasync/workflow/integration_test.go b/worker/pkg/workflows/datasync/workflow/integration_test.go deleted file mode 100644 index b8fe504262..0000000000 --- a/worker/pkg/workflows/datasync/workflow/integration_test.go +++ /dev/null @@ -1,577 +0,0 @@ -package datasync_workflow - -import ( - "context" - "database/sql" - "fmt" - "os" - "testing" - - "github.com/aws/aws-sdk-go-v2/service/dynamodb" - dyntypes "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" - "github.com/docker/go-connections/nat" - _ "github.com/go-sql-driver/mysql" - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - sqlmanager_shared "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager/shared" - awsmanager "github.com/nucleuscloud/neosync/internal/aws" - "github.com/nucleuscloud/neosync/internal/testutil" - tcmysql "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/mysql" - tcpostgres "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/postgres" - "github.com/stretchr/testify/suite" - "github.com/testcontainers/testcontainers-go" - testmongodb "github.com/testcontainers/testcontainers-go/modules/mongodb" - testmssql "github.com/testcontainers/testcontainers-go/modules/mssql" - "github.com/testcontainers/testcontainers-go/modules/redis" - "github.com/testcontainers/testcontainers-go/wait" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" - "golang.org/x/sync/errgroup" -) - -type mssqlTest struct { - pool *sql.DB - testcontainer *testmssql.MSSQLServerContainer - source *mssqlTestContainer - target *mssqlTestContainer -} - -type mssqlTestContainer struct { - pool *sql.DB - url string -} - -type redisTest struct { - url string - testcontainer *redis.RedisContainer -} - -type mongodbTestContainer struct { - testcontainer *testmongodb.MongoDBContainer - client *mongo.Client - url string -} - -type mongodbTest struct { - source *mongodbTestContainer - target *mongodbTestContainer -} -type IntegrationTestSuite struct { - suite.Suite - - ctx context.Context - - mysql *tcmysql.MysqlTestSyncContainer - postgres *tcpostgres.PostgresTestSyncContainer - mssql *mssqlTest - redis *redisTest - dynamo *dynamodbTest - mongodb *mongodbTest -} - -func (s *IntegrationTestSuite) SetupMongoDb() (*mongodbTest, error) { - var source *mongodbTestContainer - var target *mongodbTestContainer - - errgrp := errgroup.Group{} - errgrp.Go(func() error { - sourcecontainer, err := createMongoTestContainer(s.ctx) - if err != nil { - return err - } - source = sourcecontainer - return nil - }) - - errgrp.Go(func() error { - targetcontainer, err := createMongoTestContainer(s.ctx) - if err != nil { - return err - } - target = targetcontainer - return nil - }) - - err := errgrp.Wait() - if err != nil { - return nil, err - } - - return &mongodbTest{ - source: source, - target: target, - }, nil -} - -func createMongoTestContainer( - ctx context.Context, -) (*mongodbTestContainer, error) { - mongodbContainer, err := testmongodb.Run(ctx, "mongo:6") - if err != nil { - return nil, err - } - uri, err := mongodbContainer.ConnectionString(ctx) - if err != nil { - return nil, err - } - clientOptions := options.Client().ApplyURI(uri) - client, err := mongo.Connect(ctx, clientOptions) - if err != nil { - return nil, err - } - - return &mongodbTestContainer{ - testcontainer: mongodbContainer, - client: client, - url: uri, - }, nil -} -func (s *IntegrationTestSuite) SetupMssql() (*mssqlTest, error) { - mssqlcontainer, err := testmssql.Run(s.ctx, - "mcr.microsoft.com/mssql/server:2022-latest", - testmssql.WithAcceptEULA(), - testmssql.WithPassword("mssqlPASSword1"), - ) - if err != nil { - return nil, err - } - connstr, err := mssqlcontainer.ConnectionString(s.ctx, "encrypt=disable") - if err != nil { - return nil, err - } - conn, err := sql.Open(sqlmanager_shared.MssqlDriver, connstr) - if err != nil { - return nil, err - } - - source, err := createMssqlTest(s.ctx, mssqlcontainer, conn, "datasync_source") - if err != nil { - return nil, err - } - target, err := createMssqlTest(s.ctx, mssqlcontainer, conn, "datasync_target") - if err != nil { - return nil, err - } - - return &mssqlTest{ - testcontainer: mssqlcontainer, - pool: conn, - source: source, - target: target, - }, nil -} - -func createMssqlTest(ctx context.Context, mssqlcontainer *testmssql.MSSQLServerContainer, conn *sql.DB, database string) (*mssqlTestContainer, error) { - _, err := conn.ExecContext(ctx, fmt.Sprintf("CREATE DATABASE %s;", database)) - if err != nil { - return nil, err - } - - connStr, err := mssqlcontainer.ConnectionString(ctx, fmt.Sprintf("database=%s", database), "encrypt=disable") - if err != nil { - return nil, err - } - - dbConn, err := sql.Open(sqlmanager_shared.MssqlDriver, connStr) - if err != nil { - return nil, err - } - - return &mssqlTestContainer{ - pool: dbConn, - url: connStr, - }, nil -} - -func (s *IntegrationTestSuite) SetupPostgres() (*tcpostgres.PostgresTestSyncContainer, error) { - container, err := tcpostgres.NewPostgresTestSyncContainer(s.ctx, []tcpostgres.Option{}, []tcpostgres.Option{}) - if err != nil { - return nil, err - } - return container, nil -} - -func (s *IntegrationTestSuite) SetupMysql() (*tcmysql.MysqlTestSyncContainer, error) { - container, err := tcmysql.NewMysqlTestSyncContainer(s.ctx, []tcmysql.Option{}, []tcmysql.Option{}) - if err != nil { - return nil, err - } - return container, nil -} - -func (s *IntegrationTestSuite) SetupRedis() (*redisTest, error) { - redisContainer, err := redis.Run( - s.ctx, - "docker.io/redis:7", - redis.WithSnapshotting(10, 1), - redis.WithLogLevel(redis.LogLevelVerbose), - testcontainers.WithWaitStrategy( - wait.ForLog("* Ready to accept connections"), - wait.ForExposedPort(), - ), - ) - if err != nil { - return nil, err - } - redisUrl, err := redisContainer.ConnectionString(s.ctx) - if err != nil { - return nil, err - } - return &redisTest{ - testcontainer: redisContainer, - url: redisUrl, - }, nil -} - -type dynamodbTest struct { - container testcontainers.Container - endpoint string - - // Used by plugging in to Neosync resources so Benthos can wire up its aws config - dtoAwsCreds *mgmtv1alpha1.AwsS3Credentials - - dynamoclient *dynamodb.Client -} - -func (s *IntegrationTestSuite) SetupDynamoDB() (*dynamodbTest, error) { - port := nat.Port("8000/tcp") - container, err := testcontainers.GenericContainer(s.ctx, testcontainers.GenericContainerRequest{ - ContainerRequest: testcontainers.ContainerRequest{ - Image: "amazon/dynamodb-local:2.5.2", - ExposedPorts: []string{string(port)}, - WaitingFor: wait.ForListeningPort(port), - }, - Started: true, - }) - if err != nil { - return nil, err - } - - mappedport, err := container.MappedPort(s.ctx, port) - if err != nil { - return nil, err - } - host, err := container.Host(s.ctx) - if err != nil { - return nil, err - } - - endpoint := fmt.Sprintf("http://%s:%d", host, mappedport.Int()) - fakeId := "fakeid" - fakeSecret := "fakesecret" - fakeToken := "faketoken" - - awscfg, err := awsmanager.GetAwsConfig(s.ctx, &awsmanager.AwsCredentialsConfig{ - Endpoint: endpoint, - Id: fakeId, - Secret: fakeSecret, - Token: fakeToken, - }) - if err != nil { - return nil, err - } - - dtoAwsCreds := &mgmtv1alpha1.AwsS3Credentials{ - AccessKeyId: &fakeId, - SecretAccessKey: &fakeSecret, - SessionToken: &fakeToken, - } - - return &dynamodbTest{ - container: container, - endpoint: endpoint, - dtoAwsCreds: dtoAwsCreds, - dynamoclient: dynamodb.NewFromConfig(*awscfg, func(o *dynamodb.Options) { - o.BaseEndpoint = &endpoint - }), - }, nil -} - -func (s *IntegrationTestSuite) SetupSuite() { - s.ctx = context.Background() - - var postgresTest *tcpostgres.PostgresTestSyncContainer - var mysqlTest *tcmysql.MysqlTestSyncContainer - var mssqlTest *mssqlTest - var redisTest *redisTest - var dynamoTest *dynamodbTest - var mongodbTest *mongodbTest - - errgrp := errgroup.Group{} - errgrp.Go(func() error { - p, err := s.SetupPostgres() - if err != nil { - return err - } - postgresTest = p - return nil - }) - - errgrp.Go(func() error { - m, err := s.SetupMysql() - if err != nil { - return err - } - mysqlTest = m - return nil - }) - - errgrp.Go(func() error { - m, err := s.SetupMssql() - if err != nil { - return err - } - mssqlTest = m - return nil - }) - - errgrp.Go(func() error { - r, err := s.SetupRedis() - if err != nil { - return err - } - redisTest = r - return nil - }) - - errgrp.Go(func() error { - d, err := s.SetupDynamoDB() - if err != nil { - return err - } - dynamoTest = d - return nil - }) - - errgrp.Go(func() error { - m, err := s.SetupMongoDb() - if err != nil { - return err - } - mongodbTest = m - return nil - }) - - err := errgrp.Wait() - if err != nil { - panic(err) - } - - s.postgres = postgresTest - s.mysql = mysqlTest - s.mssql = mssqlTest - s.redis = redisTest - s.dynamo = dynamoTest - s.mongodb = mongodbTest -} - -func (s *IntegrationTestSuite) RunMysqlSqlFiles(pool *sql.DB, testFolder string, files []string) { - s.T().Logf("running mysql sql file. folder: %s \n", testFolder) - for _, file := range files { - sqlStr, err := os.ReadFile(fmt.Sprintf("./testdata/%s/%s", testFolder, file)) - if err != nil { - panic(err) - } - - _, err = pool.ExecContext(s.ctx, string(sqlStr)) - if err != nil { - panic(err) - } - } -} - -func (s *IntegrationTestSuite) SetupDynamoDbTable(ctx context.Context, tableName, primaryKey string) error { - s.T().Logf("Creating DynamoDB table: %s\n", tableName) - - out, err := s.dynamo.dynamoclient.CreateTable(ctx, &dynamodb.CreateTableInput{ - TableName: &tableName, - KeySchema: []dyntypes.KeySchemaElement{{KeyType: dyntypes.KeyTypeHash, AttributeName: &primaryKey}}, - AttributeDefinitions: []dyntypes.AttributeDefinition{{AttributeName: &primaryKey, AttributeType: dyntypes.ScalarAttributeTypeS}}, - BillingMode: dyntypes.BillingModePayPerRequest, - }) - if err != nil { - return err - } - if out.TableDescription.TableStatus == dyntypes.TableStatusActive { - return nil - } - if out.TableDescription.TableStatus == dyntypes.TableStatusCreating { - return s.waitUntilDynamoTableExists(ctx, tableName) - } - return fmt.Errorf("%s dynamo table created but unexpected table status: %s", tableName, out.TableDescription.TableStatus) -} - -func (s *IntegrationTestSuite) waitUntilDynamoTableExists(ctx context.Context, tableName string) error { - input := &dynamodb.DescribeTableInput{TableName: &tableName} - for { - out, err := s.dynamo.dynamoclient.DescribeTable(ctx, input) - if err != nil && !awsmanager.IsNotFound(err) { - return err - } - if err != nil && awsmanager.IsNotFound(err) { - continue - } - if out.Table.TableStatus == dyntypes.TableStatusActive { - return nil - } - } -} - -func (s *IntegrationTestSuite) DestroyDynamoDbTable(ctx context.Context, tableName string) error { - s.T().Logf("Destroying DynamoDB table: %s\n", tableName) - - _, err := s.dynamo.dynamoclient.DeleteTable(ctx, &dynamodb.DeleteTableInput{ - TableName: &tableName, - }) - if err != nil { - return err - } - return s.waitUntilDynamoTableDestroy(ctx, tableName) -} - -func (s *IntegrationTestSuite) waitUntilDynamoTableDestroy(ctx context.Context, tableName string) error { - input := &dynamodb.DescribeTableInput{TableName: &tableName} - for { - _, err := s.dynamo.dynamoclient.DescribeTable(ctx, input) - if err != nil && !awsmanager.IsNotFound(err) { - return err - } - if err != nil && awsmanager.IsNotFound(err) { - return nil - } - } -} - -func (s *IntegrationTestSuite) InsertDynamoDBRecords(tableName string, data []map[string]dyntypes.AttributeValue) error { - s.T().Logf("Inserting %d DynamoDB Records into table: %s\n", len(data), tableName) - - writeRequests := make([]dyntypes.WriteRequest, len(data)) - for i, record := range data { - writeRequests[i] = dyntypes.WriteRequest{ - PutRequest: &dyntypes.PutRequest{ - Item: record, - }, - } - } - - _, err := s.dynamo.dynamoclient.BatchWriteItem(s.ctx, &dynamodb.BatchWriteItemInput{ - RequestItems: map[string][]dyntypes.WriteRequest{ - tableName: writeRequests, - }, - }) - if err != nil { - return err - } - return nil -} - -func (s *IntegrationTestSuite) InsertMongoDbRecords(client *mongo.Client, database, collection string, documents []any) (int, error) { - db := client.Database(database) - col := db.Collection(collection) - - result, err := col.InsertMany(s.ctx, documents) - if err != nil { - return 0, fmt.Errorf("failed to insert mongodb records: %v", err) - } - - return len(result.InsertedIDs), nil -} - -func (s *IntegrationTestSuite) DropMongoDbCollection(ctx context.Context, client *mongo.Client, database, collection string) error { - db := client.Database(database) - collections, err := db.ListCollectionNames(ctx, map[string]any{"name": collection}) - if err != nil { - return err - } - if len(collections) == 0 { - return nil - } - return db.Collection(collection).Drop(ctx) -} - -func (s *IntegrationTestSuite) TearDownSuite() { - s.T().Log("tearing down test suite") - // postgres - if s.postgres != nil { - err := s.postgres.TearDown(s.ctx) - if err != nil { - panic(err) - } - } - - // mssql - if s.mssql != nil { - if s.mssql.source.pool != nil { - s.mssql.source.pool.Close() - } - if s.mssql.target.pool != nil { - s.mssql.target.pool.Close() - } - if s.mssql.pool != nil { - s.mssql.pool.Close() - } - if s.mssql.testcontainer != nil { - err := s.mssql.testcontainer.Terminate(s.ctx) - if err != nil { - panic(err) - } - } - } - - // mysql - if s.mysql != nil { - err := s.mysql.TearDown(s.ctx) - if err != nil { - panic(err) - } - } - - // redis - if s.redis != nil { - if s.redis.testcontainer != nil { - if err := s.redis.testcontainer.Terminate(s.ctx); err != nil { - panic(err) - } - } - } - - // localstack - if s.dynamo != nil { - if s.dynamo.container != nil { - if err := s.dynamo.container.Terminate(s.ctx); err != nil { - panic(err) - } - } - } - - // mongodb - if s.mongodb != nil { - if s.mongodb.source.client != nil { - if err := s.mongodb.source.client.Disconnect(s.ctx); err != nil { - panic(err) - } - } - if s.mongodb.source.testcontainer != nil { - if err := s.mongodb.source.testcontainer.Terminate(s.ctx); err != nil { - panic(err) - } - } - if s.mongodb.target.client != nil { - if err := s.mongodb.target.client.Disconnect(s.ctx); err != nil { - panic(err) - } - } - if s.mongodb.target.testcontainer != nil { - if err := s.mongodb.target.testcontainer.Terminate(s.ctx); err != nil { - panic(err) - } - } - } -} - -func TestIntegrationTestSuite(t *testing.T) { - ok := testutil.ShouldRunIntegrationTest() - if !ok { - return - } - suite.Run(t, new(IntegrationTestSuite)) -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/gen-jobmappings-config.json b/worker/pkg/workflows/datasync/workflow/testdata/gen-jobmappings-config.json deleted file mode 100644 index 2a82b5fad9..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/gen-jobmappings-config.json +++ /dev/null @@ -1,73 +0,0 @@ - -[ - { - "folder": "postgres/double-reference", - "sql_file": "source-create.sql", - "driver": "postgres" - }, - { - "folder": "postgres/virtual-foreign-keys", - "sql_file": "source-setup.sql", - "driver": "postgres" - }, - { - "folder": "postgres/circular-dependencies", - "sql_file": "setup.sql", - "driver": "postgres" - }, - { - "folder": "javascript-transformers", - "sql_file": "create.sql", - "driver": "postgres" - }, - { - "folder": "mysql/multiple-dbs", - "sql_file": "create.sql", - "driver": "mysql" - }, - { - "folder": "primary-key-transformer", - "sql_file": "create.sql", - "driver": "postgres" - }, - { - "folder": "mysql/composite-keys", - "sql_file": "create.sql", - "driver": "mysql" - }, - { - "folder": "mysql/init-schema", - "sql_file": "create.sql", - "driver": "mysql" - }, - { - "folder": "postgres/subsetting", - "sql_file": "setup.sql", - "driver": "postgres" - }, - { - "folder":"mssql/simple", - "sql_file": "create-table.sql", - "driver": "sqlserver" - }, - { - "folder":"mssql/data-types", - "sql_file": "create-table.sql", - "driver": "sqlserver" - }, - { - "folder":"postgres/all-types", - "sql_file": "setup.sql", - "driver": "postgres" - }, - { - "folder": "skip-fk-violations", - "sql_file": "create.sql", - "driver": "postgres" - }, - { - "folder": "mysql/all-types", - "sql_file": "create.sql", - "driver": "mysql" - } -] diff --git a/worker/pkg/workflows/datasync/workflow/testdata/generate-job/setup.sql b/worker/pkg/workflows/datasync/workflow/testdata/generate-job/setup.sql deleted file mode 100644 index 7b4e88fe2a..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/generate-job/setup.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS generate_job; - -CREATE TABLE IF NOT EXISTS generate_job.regions ( - region_id SERIAL PRIMARY KEY, - region_name CHARACTER VARYING (25) -); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/generate-job/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/generate-job/teardown.sql deleted file mode 100644 index d2ce35e8ef..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/generate-job/teardown.sql +++ /dev/null @@ -1 +0,0 @@ -DROP SCHEMA IF EXISTS generate_job CASCADE; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/generators.go b/worker/pkg/workflows/datasync/workflow/testdata/generators.go deleted file mode 100644 index 8db8592897..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/generators.go +++ /dev/null @@ -1,3 +0,0 @@ -package workflow_testdata - -//go:generate go run jobmapping_generator.go gen-jobmappings-config.json $GOPACKAGE diff --git a/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/create.sql b/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/create.sql deleted file mode 100644 index c78345c920..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/create.sql +++ /dev/null @@ -1,33 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS javascript; -SET search_path TO javascript; - -CREATE TABLE transformers ( - id SERIAL PRIMARY KEY, - e164_phone_number VARCHAR(20), - email VARCHAR(255), - measurement FLOAT, - int64 BIGINT, - int64_phone_number BIGINT, - string_phone_number VARCHAR(20), - first_name VARCHAR(255), - last_name VARCHAR(255), - full_name VARCHAR(255), - str VARCHAR (255), - character_scramble VARCHAR (255), - bool BOOLEAN, - card_number BIGINT, - categorical VARCHAR(255), - city VARCHAR(255), - full_address VARCHAR(255), - gender VARCHAR(255), - international_phone VARCHAR(255), - sha256 VARCHAR(255), - ssn VARCHAR(255), - state VARCHAR(255), - street_address VARCHAR(255), - unix_time BIGINT, - username VARCHAR(255), - utc_timestamp TIMESTAMPTZ, - uuid VARCHAR(255), - zipcode BIGINT -); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/job_mappings.go deleted file mode 100644 index 4327af81c0..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/job_mappings.go +++ /dev/null @@ -1,239 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create.sql - -package testdata_javascripttransformers - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "javascript", - Table: "transformers", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "e164_phone_number", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "measurement", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "int64", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "int64_phone_number", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "string_phone_number", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "full_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "str", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "character_scramble", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "bool", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "card_number", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "categorical", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "city", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "full_address", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "gender", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "international_phone", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "sha256", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "ssn", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "state", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "street_address", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "unix_time", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "username", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "utc_timestamp", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "uuid", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "javascript", - Table: "transformers", - Column: "zipcode", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/teardown.sql deleted file mode 100644 index b28f6f6715..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/teardown.sql +++ /dev/null @@ -1 +0,0 @@ -DROP SCHEMA IF EXISTS javascript CASCADE; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/tests.go deleted file mode 100644 index 0e9928a2f1..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers/tests.go +++ /dev/null @@ -1,124 +0,0 @@ -package testdata_javascripttransformers - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" -) - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Javascript transformer sync", - Folder: "testdata/javascript-transformers", - SourceFilePaths: []string{"create.sql", "insert.sql"}, - TargetFilePaths: []string{"create.sql"}, - JobOptions: &workflow_testdata.TestJobOptions{ - Truncate: false, - TruncateCascade: false, - }, - JobMappings: getJsTransformerJobmappings(), - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "javascript.transformers": &workflow_testdata.ExpectedOutput{RowCount: 13}, - }, - }, - { - Name: "Javascript generator sync", - Folder: "testdata/javascript-transformers", - SourceFilePaths: []string{"create.sql", "insert.sql"}, - TargetFilePaths: []string{"create.sql"}, - JobOptions: &workflow_testdata.TestJobOptions{ - Truncate: false, - TruncateCascade: false, - }, - JobMappings: getJsGeneratorJobmappings(), - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "javascript.transformers": &workflow_testdata.ExpectedOutput{RowCount: 13}, - }, - }, - } -} - -func getJsGeneratorJobmappings() []*mgmtv1alpha1.JobMapping { - colTransformerMap := map[string]*mgmtv1alpha1.JobMappingTransformer{ - "e164_phone_number": getJavascriptTransformerConfig("return neosync.generateInternationalPhoneNumber({ min: 9, max: 15});"), - "email": getJavascriptTransformerConfig("return neosync.generateEmail({ maxLength: 255});"), - "str": getJavascriptTransformerConfig("return neosync.generateRandomString({ min: 1, max: 50});"), - "measurement": getJavascriptTransformerConfig("return neosync.generateFloat64({ min: 3.14, max: 300.10});"), - "int64": getJavascriptTransformerConfig("return neosync.generateInt64({ min: 1, max: 50});"), - "int64_phone_number": getJavascriptTransformerConfig("return neosync.generateInt64PhoneNumber({});"), - "string_phone_number": getJavascriptTransformerConfig("return neosync.generateStringPhoneNumber({ min: 1, max: 15});"), - "first_name": getJavascriptTransformerConfig("return neosync.generateFirstName({ maxLength: 25});"), - "last_name": getJavascriptTransformerConfig("return neosync.generateLastName({ maxLength: 25});"), - "full_name": getJavascriptTransformerConfig("return neosync.generateFullName({ maxLength: 25});"), - "character_scramble": getJavascriptTransformerConfig("return neosync.generateCity({ maxLength: 100});"), - "bool": getJavascriptTransformerConfig("return neosync.generateBool({});"), - "card_number": getJavascriptTransformerConfig("return neosync.generateCardNumber({ validLuhn: true });"), - "categorical": getJavascriptTransformerConfig("return neosync.generateCategorical({ categories: 'dog,cat,horse'});"), - "city": getJavascriptTransformerConfig("return neosync.generateCity({ maxLength: 100 });"), - "full_address": getJavascriptTransformerConfig("return neosync.generateFullAddress({ maxLength: 100 });"), - "gender": getJavascriptTransformerConfig("return neosync.generateGender({});"), - "international_phone": getJavascriptTransformerConfig("return neosync.generateInternationalPhoneNumber({ min: 9, max: 14});"), - "sha256": getJavascriptTransformerConfig("return neosync.generateSHA256Hash({});"), - "ssn": getJavascriptTransformerConfig("return neosync.generateSSN({});"), - "state": getJavascriptTransformerConfig("return neosync.generateState({});"), - "street_address": getJavascriptTransformerConfig("return neosync.generateStreetAddress({ maxLength: 100 });"), - "unix_time": getJavascriptTransformerConfig("return neosync.generateUnixTimestamp({});"), - "username": getJavascriptTransformerConfig("return neosync.generateUsername({ maxLength: 100 });"), - "utc_timestamp": getJavascriptTransformerConfig("return neosync.generateUTCTimestamp({});"), - "uuid": getJavascriptTransformerConfig("return neosync.generateUUID({});"), - "zipcode": getJavascriptTransformerConfig("return neosync.generateZipcode({});"), - } - jobmappings := GetDefaultSyncJobMappings() - updatedJobmappings := []*mgmtv1alpha1.JobMapping{} - for _, jm := range jobmappings { - if _, ok := colTransformerMap[jm.Column]; !ok { - updatedJobmappings = append(updatedJobmappings, jm) - } else { - updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ - Schema: jm.Schema, - Table: jm.Table, - Column: jm.Column, - Transformer: colTransformerMap[jm.Column], - }) - } - } - return updatedJobmappings -} - -func getJsTransformerJobmappings() []*mgmtv1alpha1.JobMapping { - colTransformerMap := map[string]*mgmtv1alpha1.JobMappingTransformer{ - "e164_phone_number": getJavascriptTransformerConfig("return neosync.transformE164PhoneNumber(value, { preserveLength: true, maxLength: 20});"), - "email": getJavascriptTransformerConfig("return neosync.transformEmail(value, { preserveLength: true, maxLength: 255});"), - "str": getJavascriptTransformerConfig("return neosync.transformString(value, { preserveLength: true, maxLength: 30});"), - "measurement": getJavascriptTransformerConfig("return neosync.transformFloat64(value, { randomizationRangeMin: 3.14, randomizationRangeMax: 300.10});"), - "int64": getJavascriptTransformerConfig("return neosync.transformInt64(value, { randomizationRangeMin: 1, randomizationRangeMax: 300});"), - "int64_phone_number": getJavascriptTransformerConfig("return neosync.transformInt64PhoneNumber(value, { preserveLength: true});"), - "string_phone_number": getJavascriptTransformerConfig("return neosync.transformStringPhoneNumber(value, { preserveLength: true, maxLength: 200});"), - "first_name": getJavascriptTransformerConfig("return neosync.transformFirstName(value, { preserveLength: true, maxLength: 25});"), - "last_name": getJavascriptTransformerConfig("return neosync.transformLastName(value, { preserveLength: true, maxLength: 25});"), - "full_name": getJavascriptTransformerConfig("return neosync.transformFullName(value, { preserveLength: true, maxLength: 25});"), - "character_scramble": getJavascriptTransformerConfig("return neosync.transformCharacterScramble(value, { preserveLength: false, maxLength: 100});"), - } - jobmappings := GetDefaultSyncJobMappings() - updatedJobmappings := []*mgmtv1alpha1.JobMapping{} - for _, jm := range jobmappings { - updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ - Schema: jm.Schema, - Table: jm.Table, - Column: jm.Column, - Transformer: colTransformerMap[jm.Column], - }) - } - return updatedJobmappings -} - -func getJavascriptTransformerConfig(code string) *mgmtv1alpha1.JobMappingTransformer { - return &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_TRANSFORM_JAVASCRIPT, - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_TransformJavascriptConfig{ - TransformJavascriptConfig: &mgmtv1alpha1.TransformJavascript{Code: code}, - }, - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/jobmapping_generator.go b/worker/pkg/workflows/datasync/workflow/testdata/jobmapping_generator.go deleted file mode 100644 index bb61572b5d..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/jobmapping_generator.go +++ /dev/null @@ -1,384 +0,0 @@ -//go:build ignore - -package main - -import ( - "bytes" - "encoding/json" - "fmt" - "html/template" - "io" - "os" - "regexp" - "slices" - "strings" - - "github.com/antlr4-go/antlr/v4" - parser "github.com/nucleuscloud/go-antlrv4-parser/tsql" - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - pg_query "github.com/pganalyze/pg_query_go/v5" -) - -type Input struct { - Folder string `json:"folder"` - SqlFile string `json:"sql_file"` - Driver string `json:"driver"` -} - -type Column struct { - Name string - TypeStr string -} - -type Table struct { - Schema string - Name string - Columns []*Column -} - -type JobMapping struct { - Schema string - Table string - Column string - Transformer string - Config string -} - -func parsePostegresStatements(sql string) ([]*Table, error) { - tree, err := pg_query.Parse(sql) - if err != nil { - return nil, err - } - - tables := []*Table{} - var schema string - for _, stmt := range tree.GetStmts() { - s := stmt.GetStmt() - switch s.Node.(type) { - case *pg_query.Node_CreateSchemaStmt: - schema = s.GetCreateSchemaStmt().GetSchemaname() - case *pg_query.Node_CreateStmt: - table := s.GetCreateStmt().GetRelation().GetRelname() - columns := []*Column{} - for _, col := range s.GetCreateStmt().GetTableElts() { - if col.GetColumnDef() != nil { - columns = append(columns, &Column{ - Name: col.GetColumnDef().Colname, - }) - } - } - tables = append(tables, &Table{ - Schema: schema, - Name: table, - Columns: columns, - }) - } - } - if schema == "" { - return nil, fmt.Errorf("unable to determine schema") - } - return tables, nil -} - -// todo fix very brittle -func parseSQLStatements(sql string) []*Table { - lines := strings.Split(sql, "\n") - tableColumnsMap := make(map[string][]string) - var currentSchema, currentTable string - - reUSE := regexp.MustCompile(`USE\s+(\w+);`) - reCreateTable := regexp.MustCompile(`CREATE\s+TABLE\s+IF\s+NOT\s+EXISTS\s+(\w+)\s*\.\s*(\w+)\s*\(`) - reCreateTableNoSchema := regexp.MustCompile(`CREATE\s+TABLE\s+IF\s+NOT\s+EXISTS\s+(\w+)\s*\(`) - reColumn := regexp.MustCompile(`^\s*([\w]+)\s+[\w\(\)]+.*`) - - for _, line := range lines { - line = strings.TrimSpace(line) - if matches := reUSE.FindStringSubmatch(line); len(matches) > 1 { - currentSchema = matches[1] - } else if matches := reCreateTable.FindStringSubmatch(line); len(matches) > 2 { - currentSchema = matches[1] - currentTable = matches[2] - } else if matches := reCreateTableNoSchema.FindStringSubmatch(line); len(matches) > 1 { - currentTable = matches[1] - } else if currentTable != "" { - if matches := reColumn.FindStringSubmatch(line); len(matches) > 1 { - columnName := matches[1] - if slices.Contains([]string{"primary key", "constraint", "key", "unique", "primary", "alter"}, strings.ToLower(matches[1])) { - continue - } - key := currentSchema + "." + currentTable - tableColumnsMap[key] = append(tableColumnsMap[key], columnName) - } else if strings.HasPrefix(line, "PRIMARY KEY") || strings.HasPrefix(line, "CONSTRAINT") || strings.HasPrefix(line, "UNIQUE") || strings.HasPrefix(line, "KEY") || strings.HasPrefix(line, "ENGINE") || strings.HasPrefix(line, ")") { - // Ignore key constraints and end of table definition - if strings.HasPrefix(line, ")") { - currentTable = "" - } - } - } - } - res := []*Table{} - for table, cols := range tableColumnsMap { - tableCols := []*Column{} - for _, c := range cols { - tableCols = append(tableCols, &Column{ - Name: c, - }) - } - split := strings.Split(table, ".") - res = append(res, &Table{ - Schema: split[0], - Name: split[1], - Columns: tableCols, - }) - } - - return res -} - -func generateJobMapping(tables []*Table) []*mgmtv1alpha1.JobMapping { - mappings := []*mgmtv1alpha1.JobMapping{} - for _, t := range tables { - for _, c := range t.Columns { - mappings = append(mappings, &mgmtv1alpha1.JobMapping{ - Schema: t.Schema, - Table: t.Name, - Column: c.Name, - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }) - - } - } - return mappings -} - -type TemplateData struct { - SourceFile string - PackageName string - Mappings []*mgmtv1alpha1.JobMapping - Tables []*Table - GenerateTypeMap bool -} - -func formatJobMappings(pkgName string, sqlFile string, mappings []*mgmtv1alpha1.JobMapping, tables []*Table, generateTypeMap bool) (string, error) { - const tmpl = ` -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: {{ .SourceFile }} - -package {{ .PackageName }} - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - {{- range .Mappings }} - { - Schema: "{{ .Schema }}", - Table: "{{ .Table }}", - Column: "{{ .Column }}", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - {{- end }} - } -} -{{ if .GenerateTypeMap }} - - -func GetTableColumnTypeMap() map[string]map[string]string { - return map[string]map[string]string{ - {{- range .Tables }} - "{{ .Schema }}.{{ .Name }}": { - {{- range .Columns }} - "{{ .Name }}": "{{ .TypeStr }}", - {{- end }} - }, - {{- end }} - } -} -{{- end }} -` - data := TemplateData{ - SourceFile: sqlFile, - PackageName: pkgName, - Mappings: mappings, - Tables: tables, - GenerateTypeMap: generateTypeMap, - } - t := template.Must(template.New("jobmappings").Parse(tmpl)) - var out bytes.Buffer - err := t.Execute(&out, data) - if err != nil { - return "", err - } - return out.String(), nil -} - -func main() { - args := os.Args - if len(args) < 3 { - panic("must provide necessary args") - } - - configFile := args[1] - gopackage := args[2] - - packageSplit := strings.Split(gopackage, "_") - goPkg := packageSplit[len(packageSplit)-1] - - jsonFile, err := os.Open(configFile) - if err != nil { - fmt.Println("failed to open file: %s", err) - return - } - defer jsonFile.Close() - - byteValue, err := io.ReadAll(jsonFile) - if err != nil { - fmt.Println("failed to read file: %s", err) - return - } - - var inputs []Input - if err := json.Unmarshal(byteValue, &inputs); err != nil { - fmt.Println("failed to unmarshal JSON: %s", err) - return - } - for _, input := range inputs { - folderSplit := strings.Split(input.Folder, "/") - var goPkgName string - if len(folderSplit) == 1 { - goPkgName = strings.ReplaceAll(fmt.Sprintf("%s_%s", goPkg, input.Folder), "-", "") - } else if len(folderSplit) > 1 { - lastTwo := folderSplit[len(folderSplit)-2:] - goPkgName = strings.ReplaceAll(strings.Join(lastTwo, "_"), "-", "") - } - sqlFile, err := os.Open(fmt.Sprintf("%s/%s", input.Folder, input.SqlFile)) - if err != nil { - fmt.Println("failed to open file: %s", err) - } - - byteValue, err := io.ReadAll(sqlFile) - if err != nil { - fmt.Println("failed to read file: %s", err) - } - - sqlContent := string(byteValue) - sqlFile.Close() - - var tables []*Table - if input.Driver == "postgres" { - t, err := parsePostegresStatements(sqlContent) - if err != nil { - fmt.Println("Error parsing postgres SQL schema:", err) - return - } - tables = t - } else if input.Driver == "mysql" { - t := parseSQLStatements(sqlContent) - tables = t - } else if input.Driver == "sqlserver" { - t := parseTsql(sqlContent) - tables = t - } - - jobMapping := generateJobMapping(tables) - - formattedJobMappings, err := formatJobMappings(goPkgName, input.SqlFile, jobMapping, tables, input.Driver == "sqlserver") - if err != nil { - fmt.Println("Error formatting job mappings:", err) - return - } - - output := fmt.Sprintf("%s/job_mappings.go", input.Folder) - outputFile, err := os.Create(output) - if err != nil { - fmt.Println("Error creating jobmapping.go file:", err) - return - } - - _, err = outputFile.WriteString(formattedJobMappings) - if err != nil { - fmt.Println("Error writing to jobmapping.go file:", err) - return - } - outputFile.Close() - } - - return -} - -type tsqlListener struct { - *parser.BaseTSqlParserListener - inCreate bool - currentSchema string - currentTable string - currentCols []*Column - mappings []*Table -} - -func (l *tsqlListener) PushTable() { - l.mappings = append(l.mappings, &Table{ - Schema: l.currentSchema, - Name: l.currentTable, - Columns: l.currentCols, - }) - l.currentSchema = "" - l.currentTable = "" - l.currentCols = []*Column{} - l.inCreate = false -} - -func (l *tsqlListener) PushColumn(name, typeStr string) { - l.currentCols = append(l.currentCols, &Column{ - Name: name, - TypeStr: typeStr, - }) -} - -func (l *tsqlListener) SetTable(schemaTable string) { - split := strings.Split(schemaTable, ".") - if len(split) == 1 { - l.currentSchema = "dbo" - l.currentTable = split[0] - } else if len(split) > 1 { - l.currentSchema = split[0] - l.currentTable = split[1] - } -} - -// EnterCreate_table is called when production create_table is entered. -func (l *tsqlListener) EnterCreate_table(ctx *parser.Create_tableContext) { - l.inCreate = true - table := ctx.Table_name().GetText() - l.SetTable(table) -} - -// ExitCreate_table is called when production create_table is exited. -func (l *tsqlListener) ExitCreate_table(ctx *parser.Create_tableContext) { - l.PushTable() -} -func (l *tsqlListener) EnterColumn_definition(ctx *parser.Column_definitionContext) { - l.PushColumn(ctx.Id_().GetText(), ctx.Data_type().GetText()) -} - -func parseTsql(sql string) []*Table { - inputStream := antlr.NewInputStream(sql) - - // create the lexer - lexer := parser.NewTSqlLexer(inputStream) - tokens := antlr.NewCommonTokenStream(lexer, antlr.TokenDefaultChannel) - - // create the parser - p := parser.NewTSqlParser(tokens) - - listener := &tsqlListener{} - tree := p.Tsql_file() - antlr.ParseTreeWalkerDefault.Walk(listener, tree) - - return listener.mappings -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/create-schema.sql b/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/create-schema.sql deleted file mode 100644 index 967aefcd19..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/create-schema.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE SCHEMA alltypes; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/create-table.sql b/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/create-table.sql deleted file mode 100644 index 15e677f45e..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/create-table.sql +++ /dev/null @@ -1,49 +0,0 @@ -CREATE TABLE alltypes.alldatatypes ( - -- Exact numerics - col_bigint BIGINT, - col_numeric NUMERIC(18,0), - col_bit BIT, - col_smallint SMALLINT, - col_decimal DECIMAL(18,0), - col_smallmoney SMALLMONEY, - col_int INT, - col_tinyint TINYINT, - col_money MONEY, - - -- Approximate numerics - col_float FLOAT, - col_real REAL, - - -- Date and time - col_date DATE, - col_datetimeoffset DATETIMEOFFSET, - col_datetime2 DATETIME2, - col_smalldatetime SMALLDATETIME, - col_datetime DATETIME, - col_time TIME, - - -- Character strings - col_char CHAR(10), - col_varchar VARCHAR(50), - col_text TEXT, - - -- Unicode character strings - col_nchar NCHAR(10), - col_nvarchar NVARCHAR(50), - col_json NVARCHAR(MAX), - col_ntext NTEXT, - - -- Binary strings BROKEN - -- col_binary BINARY(10), - -- col_varbinary VARBINARY(50), - -- col_image IMAGE, - - -- Other data types - col_uniqueidentifier UNIQUEIDENTIFIER, - col_xml XML - -- BROKEN - -- col_geography GEOGRAPHY, - -- col_geometry GEOMETRY, - -- col_hierarchyid HIERARCHYID, - -- col_sql_variant SQL_VARIANT -); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/job_mappings.go deleted file mode 100644 index 9f3a4f60df..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/job_mappings.go +++ /dev/null @@ -1,257 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create-table.sql - -package mssql_datatypes - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_bigint", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_numeric", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_bit", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_smallint", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_decimal", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_smallmoney", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_int", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_tinyint", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_money", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_float", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_real", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_datetimeoffset", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_datetime2", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_smalldatetime", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_datetime", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_time", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_char", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_varchar", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_text", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_nchar", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_nvarchar", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_json", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_ntext", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_uniqueidentifier", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "alldatatypes", - Column: "col_xml", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - - - -func GetTableColumnTypeMap() map[string]map[string]string { - return map[string]map[string]string{ - "alltypes.alldatatypes": { - "col_bigint": "BIGINT", - "col_numeric": "NUMERIC(18,0)", - "col_bit": "BIT", - "col_smallint": "SMALLINT", - "col_decimal": "DECIMAL(18,0)", - "col_smallmoney": "SMALLMONEY", - "col_int": "INT", - "col_tinyint": "TINYINT", - "col_money": "MONEY", - "col_float": "FLOAT", - "col_real": "REAL", - "col_date": "DATE", - "col_datetimeoffset": "DATETIMEOFFSET", - "col_datetime2": "DATETIME2", - "col_smalldatetime": "SMALLDATETIME", - "col_datetime": "DATETIME", - "col_time": "TIME", - "col_char": "CHAR(10)", - "col_varchar": "VARCHAR(50)", - "col_text": "TEXT", - "col_nchar": "NCHAR(10)", - "col_nvarchar": "NVARCHAR(50)", - "col_json": "NVARCHAR(MAX)", - "col_ntext": "NTEXT", - "col_uniqueidentifier": "UNIQUEIDENTIFIER", - "col_xml": "XML", - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/teardown.sql deleted file mode 100644 index 456c65b4b5..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/teardown.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP TABLE IF EXISTS alltypes.alldatatypes; -DROP SCHEMA IF EXISTS alltypes; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/tests.go deleted file mode 100644 index 6ac963206a..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types/tests.go +++ /dev/null @@ -1,21 +0,0 @@ -package mssql_datatypes - -import ( - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" -) - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Passthrough", - Folder: "mssql/data-types", - SourceFilePaths: []string{"create-schema.sql", "create-table.sql", "insert.sql"}, - TargetFilePaths: []string{"create-schema.sql", "create-table.sql"}, - JobMappings: GetDefaultSyncJobMappings(), - JobOptions: &workflow_testdata.TestJobOptions{}, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "alltypes.alldatatypes": &workflow_testdata.ExpectedOutput{RowCount: 1}, - }, - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/create-schema-production.sql b/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/create-schema-production.sql deleted file mode 100644 index b6d99a1f26..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/create-schema-production.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE SCHEMA production; - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/create-schema-sales.sql b/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/create-schema-sales.sql deleted file mode 100644 index fa4caf9def..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/create-schema-sales.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE SCHEMA sales; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/create-table.sql b/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/create-table.sql deleted file mode 100644 index b6b8aeba52..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/create-table.sql +++ /dev/null @@ -1,97 +0,0 @@ - -CREATE TABLE production.categories ( - category_id INT IDENTITY (1, 1) PRIMARY KEY, - category_name VARCHAR (255) NOT NULL -); - -CREATE TABLE production.brands ( - brand_id INT IDENTITY (1, 1) PRIMARY KEY, - brand_name VARCHAR (255) NOT NULL -); - -CREATE TABLE production.products ( - product_id INT IDENTITY (1, 1) PRIMARY KEY, - product_name VARCHAR (255) NOT NULL, - brand_id INT NOT NULL, - category_id INT NOT NULL, - model_year SMALLINT NOT NULL, - list_price DECIMAL (10, 2) NOT NULL, - FOREIGN KEY (category_id) REFERENCES production.categories (category_id) ON DELETE NO ACTION ON UPDATE NO ACTION, - FOREIGN KEY (brand_id) REFERENCES production.brands (brand_id) ON DELETE NO ACTION ON UPDATE NO ACTION -); - -CREATE TABLE production.identities( - id INT IDENTITY (1,1) PRIMARY KEY -) - -CREATE TABLE sales.customers ( - customer_id INT IDENTITY (1, 1) PRIMARY KEY, - first_name VARCHAR (255) NOT NULL, - last_name VARCHAR (255) NOT NULL, - phone VARCHAR (25), - email VARCHAR (255) NOT NULL, - street VARCHAR (255), - city VARCHAR (50), - state VARCHAR (25), - zip_code VARCHAR (5) -); - -CREATE TABLE sales.stores ( - store_id INT IDENTITY (1, 1) PRIMARY KEY, - store_name VARCHAR (255) NOT NULL, - phone VARCHAR (25), - email VARCHAR (255), - street VARCHAR (255), - city VARCHAR (255), - state VARCHAR (10), - zip_code VARCHAR (5) -); - -CREATE TABLE sales.staffs ( - staff_id INT IDENTITY (1, 1) PRIMARY KEY, - first_name VARCHAR (50) NOT NULL, - last_name VARCHAR (50) NOT NULL, - email VARCHAR (255) NOT NULL UNIQUE, - phone VARCHAR (25), - active tinyint NOT NULL, - store_id INT NOT NULL, - manager_id INT, - FOREIGN KEY (store_id) REFERENCES sales.stores (store_id) ON DELETE NO ACTION ON UPDATE NO ACTION, - FOREIGN KEY (manager_id) REFERENCES sales.staffs (staff_id) ON DELETE NO ACTION ON UPDATE NO ACTION -); - -CREATE TABLE sales.orders ( - order_id INT IDENTITY (1, 1) PRIMARY KEY, - customer_id INT, - order_status tinyint NOT NULL, - -- Order status: 1 = Pending; 2 = Processing; 3 = Rejected; 4 = Completed - order_date DATE NOT NULL, - required_date DATE NOT NULL, - shipped_date DATE, - store_id INT NOT NULL, - staff_id INT NOT NULL, - FOREIGN KEY (customer_id) REFERENCES sales.customers (customer_id) ON DELETE NO ACTION ON UPDATE NO ACTION, - FOREIGN KEY (store_id) REFERENCES sales.stores (store_id) ON DELETE NO ACTION ON UPDATE NO ACTION, - FOREIGN KEY (staff_id) REFERENCES sales.staffs (staff_id) ON DELETE NO ACTION ON UPDATE NO ACTION -); - -CREATE TABLE sales.order_items ( - order_id INT, - item_id INT, - product_id INT NOT NULL, - quantity INT NOT NULL, - list_price DECIMAL (10, 2) NOT NULL, - discount DECIMAL (4, 2) NOT NULL DEFAULT 0, - PRIMARY KEY (order_id, item_id), - FOREIGN KEY (order_id) REFERENCES sales.orders (order_id) ON DELETE NO ACTION ON UPDATE NO ACTION, - FOREIGN KEY (product_id) REFERENCES production.products (product_id) ON DELETE NO ACTION ON UPDATE NO ACTION -); - -CREATE TABLE production.stocks ( - store_id INT, - product_id INT, - quantity INT, - PRIMARY KEY (store_id, product_id), - FOREIGN KEY (store_id) REFERENCES sales.stores (store_id) ON DELETE NO ACTION ON UPDATE NO ACTION, - FOREIGN KEY (product_id) REFERENCES production.products (product_id) ON DELETE NO ACTION ON UPDATE NO ACTION -); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/job_mappings.go deleted file mode 100644 index b7e5fac225..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/job_mappings.go +++ /dev/null @@ -1,518 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create-table.sql - -package mssql_simple - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "production", - Table: "categories", - Column: "category_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "categories", - Column: "category_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "brands", - Column: "brand_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "brands", - Column: "brand_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "products", - Column: "product_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "products", - Column: "product_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "products", - Column: "brand_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "products", - Column: "category_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "products", - Column: "model_year", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "products", - Column: "list_price", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "identities", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "customers", - Column: "customer_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "customers", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "customers", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "customers", - Column: "phone", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "customers", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "customers", - Column: "street", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "customers", - Column: "city", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "customers", - Column: "state", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "customers", - Column: "zip_code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "stores", - Column: "store_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "stores", - Column: "store_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "stores", - Column: "phone", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "stores", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "stores", - Column: "street", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "stores", - Column: "city", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "stores", - Column: "state", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "stores", - Column: "zip_code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "staffs", - Column: "staff_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "staffs", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "staffs", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "staffs", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "staffs", - Column: "phone", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "staffs", - Column: "active", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "staffs", - Column: "store_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "staffs", - Column: "manager_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "orders", - Column: "order_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "orders", - Column: "customer_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "orders", - Column: "order_status", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "orders", - Column: "order_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "orders", - Column: "required_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "orders", - Column: "shipped_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "orders", - Column: "store_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "orders", - Column: "staff_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "order_items", - Column: "order_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "order_items", - Column: "item_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "order_items", - Column: "product_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "order_items", - Column: "quantity", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "order_items", - Column: "list_price", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "sales", - Table: "order_items", - Column: "discount", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "stocks", - Column: "store_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "stocks", - Column: "product_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "production", - Table: "stocks", - Column: "quantity", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - - - -func GetTableColumnTypeMap() map[string]map[string]string { - return map[string]map[string]string{ - "production.categories": { - "category_id": "INTIDENTITY(1,1)", - "category_name": "VARCHAR(255)", - }, - "production.brands": { - "brand_id": "INTIDENTITY(1,1)", - "brand_name": "VARCHAR(255)", - }, - "production.products": { - "product_id": "INTIDENTITY(1,1)", - "product_name": "VARCHAR(255)", - "brand_id": "INT", - "category_id": "INT", - "model_year": "SMALLINT", - "list_price": "DECIMAL(10,2)", - }, - "production.identities": { - "id": "INTIDENTITY(1,1)", - }, - "sales.customers": { - "customer_id": "INTIDENTITY(1,1)", - "first_name": "VARCHAR(255)", - "last_name": "VARCHAR(255)", - "phone": "VARCHAR(25)", - "email": "VARCHAR(255)", - "street": "VARCHAR(255)", - "city": "VARCHAR(50)", - "state": "VARCHAR(25)", - "zip_code": "VARCHAR(5)", - }, - "sales.stores": { - "store_id": "INTIDENTITY(1,1)", - "store_name": "VARCHAR(255)", - "phone": "VARCHAR(25)", - "email": "VARCHAR(255)", - "street": "VARCHAR(255)", - "city": "VARCHAR(255)", - "state": "VARCHAR(10)", - "zip_code": "VARCHAR(5)", - }, - "sales.staffs": { - "staff_id": "INTIDENTITY(1,1)", - "first_name": "VARCHAR(50)", - "last_name": "VARCHAR(50)", - "email": "VARCHAR(255)", - "phone": "VARCHAR(25)", - "active": "tinyint", - "store_id": "INT", - "manager_id": "INT", - }, - "sales.orders": { - "order_id": "INTIDENTITY(1,1)", - "customer_id": "INT", - "order_status": "tinyint", - "order_date": "DATE", - "required_date": "DATE", - "shipped_date": "DATE", - "store_id": "INT", - "staff_id": "INT", - }, - "sales.order_items": { - "order_id": "INT", - "item_id": "INT", - "product_id": "INT", - "quantity": "INT", - "list_price": "DECIMAL(10,2)", - "discount": "DECIMAL(4,2)", - }, - "production.stocks": { - "store_id": "INT", - "product_id": "INT", - "quantity": "INT", - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/teardown.sql deleted file mode 100644 index 6fe2ee71c3..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/teardown.sql +++ /dev/null @@ -1,15 +0,0 @@ -DROP TABLE IF EXISTS sales.order_items; -DROP TABLE IF EXISTS sales.orders; -DROP TABLE IF EXISTS production.stocks; -DROP TABLE IF EXISTS production.products; -DROP TABLE IF EXISTS production.categories; -DROP TABLE IF EXISTS production.brands; -DROP TABLE IF EXISTS sales.customers; -DROP TABLE IF EXISTS sales.staffs; -DROP TABLE IF EXISTS sales.stores; -DROP TABLE IF EXISTS production.identities; - --- drop the schemas - -DROP SCHEMA IF EXISTS sales; -DROP SCHEMA IF EXISTS production; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/tests.go deleted file mode 100644 index 2ef3472c36..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple/tests.go +++ /dev/null @@ -1,118 +0,0 @@ -package mssql_simple - -import ( - "fmt" - "strings" - - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" -) - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Passthrough", - Folder: "mssql/simple", - SourceFilePaths: []string{"create-schema-sales.sql", "create-schema-production.sql", "create-table.sql", "insert.sql"}, - TargetFilePaths: []string{"create-schema-sales.sql", "create-schema-production.sql"}, - JobMappings: GetDefaultSyncJobMappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - InitSchema: true, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "production.categories": &workflow_testdata.ExpectedOutput{RowCount: 7}, - "production.brands": &workflow_testdata.ExpectedOutput{RowCount: 9}, - "production.products": &workflow_testdata.ExpectedOutput{RowCount: 18}, - "production.stocks": &workflow_testdata.ExpectedOutput{RowCount: 32}, - "production.identities": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "sales.customers": &workflow_testdata.ExpectedOutput{RowCount: 15}, - "sales.stores": &workflow_testdata.ExpectedOutput{RowCount: 3}, - "sales.staffs": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "sales.orders": &workflow_testdata.ExpectedOutput{RowCount: 13}, - "sales.order_items": &workflow_testdata.ExpectedOutput{RowCount: 26}, - }, - }, - { - Name: "Identity Columns set to default", - Folder: "mssql/simple", - SourceFilePaths: []string{"create-schema-sales.sql", "create-schema-production.sql", "create-table.sql", "insert.sql"}, - TargetFilePaths: []string{"create-schema-sales.sql", "create-schema-production.sql", "create-table.sql", "insert.sql"}, - JobMappings: getJobmappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - InitSchema: true, - Truncate: true, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "production.categories": &workflow_testdata.ExpectedOutput{RowCount: 7}, - "production.brands": &workflow_testdata.ExpectedOutput{RowCount: 9}, - "production.products": &workflow_testdata.ExpectedOutput{RowCount: 18}, - "production.stocks": &workflow_testdata.ExpectedOutput{RowCount: 32}, - "production.identities": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "sales.customers": &workflow_testdata.ExpectedOutput{RowCount: 15}, - "sales.stores": &workflow_testdata.ExpectedOutput{RowCount: 3}, - "sales.staffs": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "sales.orders": &workflow_testdata.ExpectedOutput{RowCount: 13}, - "sales.order_items": &workflow_testdata.ExpectedOutput{RowCount: 26}, - }, - }, - { - Name: "Subset", - Folder: "mssql/simple", - SourceFilePaths: []string{"create-schema-sales.sql", "create-schema-production.sql", "create-table.sql", "insert.sql"}, - TargetFilePaths: []string{"create-schema-sales.sql", "create-schema-production.sql", "create-table.sql"}, - JobMappings: GetDefaultSyncJobMappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - SubsetByForeignKeyConstraints: true, - }, - SubsetMap: map[string]string{ - "production.products": "product_id IN (1, 4, 8, 6)", - "sales.customers": "customer_id IN (1, 4, 8, 6)", - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "production.categories": &workflow_testdata.ExpectedOutput{RowCount: 7}, - "production.brands": &workflow_testdata.ExpectedOutput{RowCount: 9}, - "production.products": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "production.stocks": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "production.identities": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "sales.customers": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "sales.stores": &workflow_testdata.ExpectedOutput{RowCount: 3}, - "sales.staffs": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "sales.orders": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "sales.order_items": &workflow_testdata.ExpectedOutput{RowCount: 2}, - }, - }, - } -} - -func getJobmappings() []*mgmtv1alpha1.JobMapping { - tableColTypeMap := GetTableColumnTypeMap() - jobmappings := GetDefaultSyncJobMappings() - updatedJobmappings := []*mgmtv1alpha1.JobMapping{} - for _, jm := range jobmappings { - colTypeMap, ok := tableColTypeMap[fmt.Sprintf("%s.%s", jm.Schema, jm.Table)] - if ok { - t, ok := colTypeMap[jm.Column] - if ok && strings.HasPrefix(t, "INTIDENTITY") { - updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ - Schema: jm.Schema, - Table: jm.Table, - Column: jm.Column, - Transformer: getDefaultTransformerConfig(), - }) - continue - } - } - updatedJobmappings = append(updatedJobmappings, jm) - } - return updatedJobmappings -} - -func getDefaultTransformerConfig() *mgmtv1alpha1.JobMappingTransformer { - return &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_GenerateDefaultConfig{ - GenerateDefaultConfig: &mgmtv1alpha1.GenerateDefault{}, - }, - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/create-dbs.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/create-dbs.sql deleted file mode 100644 index 4cfc1221a2..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/create-dbs.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE DATABASE IF NOT EXISTS all_types; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/create.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/create.sql deleted file mode 100644 index 7495dea586..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/create.sql +++ /dev/null @@ -1,62 +0,0 @@ -CREATE DATABASE IF NOT EXISTS all_types; - -USE all_types; -CREATE TABLE IF NOT EXISTS all_data_types ( - -- Auto-incrementing primary key - id INT AUTO_INCREMENT PRIMARY KEY, - - -- Numeric Types - tinyint_col TINYINT, - smallint_col SMALLINT, - mediumint_col MEDIUMINT, - int_col INT, - bigint_col BIGINT, - decimal_col DECIMAL(10, 2), - float_col FLOAT(7, 4), - double_col DOUBLE(15, 8), - bit_col BIT(8), - - -- Date and Time Types - date_col DATE, - time_col TIME, - datetime_col DATETIME, - timestamp_col TIMESTAMP, - year_col YEAR, - - -- String Types - char_col CHAR(10), - varchar_col VARCHAR(255), - binary_col BINARY(3), - varbinary_col VARBINARY(255), - tinyblob_col TINYBLOB, - tinytext_col TINYTEXT, - blob_col BLOB, - text_col TEXT, - mediumblob_col MEDIUMBLOB, - mediumtext_col MEDIUMTEXT, - longblob_col LONGBLOB, - longtext_col LONGTEXT, - enum_col ENUM('value1', 'value2', 'value3'), - set_col SET('option1', 'option2', 'option3'), - - -- Spatial Data Types BROKEN - -- geometry_col GEOMETRY, - -- point_col POINT, - -- linestring_col LINESTRING, - -- polygon_col POLYGON, - -- multipoint_col MULTIPOINT, - -- multilinestring_col MULTILINESTRING, - -- multipolygon_col MULTIPOLYGON, - -- geometrycollection_col GEOMETRYCOLLECTION, - - -- JSON Data Type - json_col JSON, - - -- Array-like representations - set_as_array SET('value1', 'value2', 'value3', 'value4', 'value5') -); - -CREATE TABLE all_types.json_data ( - id INT AUTO_INCREMENT PRIMARY KEY, - data JSON -); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/insert.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/insert.sql deleted file mode 100644 index 890b78a55b..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/insert.sql +++ /dev/null @@ -1,75 +0,0 @@ -USE all_types; - -INSERT INTO all_data_types ( - tinyint_col, smallint_col, mediumint_col, int_col, bigint_col, - decimal_col, float_col, double_col, - bit_col, - date_col, - time_col, datetime_col, year_col, - char_col, varchar_col,binary_col, varbinary_col, - tinyblob_col, tinytext_col, blob_col, text_col, - mediumblob_col, mediumtext_col, longblob_col, longtext_col, - enum_col, set_col, - -- geometry_col, point_col, linestring_col, polygon_col, - -- multipoint_col, multilinestring_col, multipolygon_col, geometrycollection_col, - json_col, - set_as_array -) VALUES ( - 127, 32767, 8388607, 2147483647, 9223372036854775807, - 1234.56, 3.1415, 3.14159265359, - b'10101010', - '2023-09-12', '14:30:00', '2023-09-12 14:30:00', 2023, - 'Fixed Char', 'Variable Char', 'Bin', 'VarBinary', - 'Tiny BLOB', 'Tiny Text', 'Regular BLOB', 'Regular Text', - 'Medium BLOB', 'Medium Text', 'Long BLOB', 'Long Text', - 'value2', 'option1,option3', - -- ST_GeomFromText('POINT(1 1)'), - -- ST_PointFromText('POINT(1 1)'), - -- ST_LineFromText('LINESTRING(0 0,1 1,2 2)'), - -- ST_PolygonFromText('POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5))'), - -- ST_MultiPointFromText('MULTIPOINT(1 1, 2 2)'), - -- ST_MultiLineStringFromText('MULTILINESTRING((0 0,1 1,2 2),(2 2,3 3,4 4))'), - -- ST_MultiPolygonFromText('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((5 5,7 5,7 7,5 7,5 5)))'), - -- ST_GeomCollFromText('GEOMETRYCOLLECTION(POINT(1 1),LINESTRING(0 0,1 1,2 2))'), - '{"key": "value", "array": [1, 2, 3]}', - 'value1,value3,value5' -); - -INSERT INTO all_data_types (id) VALUES (DEFAULT); - - -INSERT INTO json_data (data) VALUES ('"Hello, world!"'); -INSERT INTO json_data (data) VALUES ('42'); -INSERT INTO json_data (data) VALUES ('3.14'); -INSERT INTO json_data (data) VALUES ('true'); -INSERT INTO json_data (data) VALUES ('false'); -INSERT INTO json_data (data) VALUES ('null'); - -INSERT INTO json_data (data) VALUES ('{"name": "John", "age": 30}'); -INSERT INTO json_data (data) VALUES ('{"coords": {"x": 10, "y": 20}}'); - -INSERT INTO json_data (data) VALUES ('[1, 2, 3, 4]'); -INSERT INTO json_data (data) VALUES ('["apple", "banana", "cherry"]'); - -INSERT INTO json_data (data) VALUES ('{"items": ["book", "pen"], "count": 2, "in_stock": true}'); - -INSERT INTO json_data (data) VALUES ( - '{ - "user": { - "name": "Alice", - "age": 28, - "contacts": [ - {"type": "email", "value": "alice@example.com"}, - {"type": "phone", "value": "123-456-7890"} - ] - }, - "orders": [ - {"id": 1001, "total": 59.99}, - {"id": 1002, "total": 24.50} - ], - "preferences": { - "notifications": true, - "theme": "dark" - } - }' -); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/job_mappings.go deleted file mode 100644 index 9d62185242..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/job_mappings.go +++ /dev/null @@ -1,279 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create.sql - -package mysql_alltypes - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "all_types", - Table: "all_data_types", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "tinyint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "smallint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "mediumint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "int_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "bigint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "decimal_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "float_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "double_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "bit_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "date_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "time_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "datetime_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "timestamp_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "year_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "char_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "varchar_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "binary_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "varbinary_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "tinyblob_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "tinytext_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "blob_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "text_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "mediumblob_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "mediumtext_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "longblob_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "longtext_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "enum_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "set_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "json_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "all_data_types", - Column: "set_as_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "json_data", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "all_types", - Table: "json_data", - Column: "data", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/teardown.sql deleted file mode 100644 index c29cfed7fd..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/teardown.sql +++ /dev/null @@ -1 +0,0 @@ -DROP DATABASE IF EXISTS all_types; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/tests.go deleted file mode 100644 index b656fdff9f..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types/tests.go +++ /dev/null @@ -1,25 +0,0 @@ -package mysql_alltypes - -import ( - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" -) - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "All datatypes passthrough", - Folder: "testdata/mysql/all-types", - SourceFilePaths: []string{"create.sql", "insert.sql"}, - TargetFilePaths: []string{"create-dbs.sql"}, - JobMappings: GetDefaultSyncJobMappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - InitSchema: true, - Truncate: true, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "all_types.all_data_types": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "all_types.json_data": &workflow_testdata.ExpectedOutput{RowCount: 12}, - }, - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/create.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/create.sql deleted file mode 100644 index 2b6ca6a377..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/create.sql +++ /dev/null @@ -1,53 +0,0 @@ -CREATE DATABASE IF NOT EXISTS composite; -USE composite; - -CREATE TABLE IF NOT EXISTS orders ( - order_id CHAR(36) NOT NULL, - product_id CHAR(36) NOT NULL, - order_date DATE, - PRIMARY KEY (order_id, product_id) -); - - -CREATE TABLE IF NOT EXISTS order_details ( - detail_id CHAR(36) NOT NULL, - order_id CHAR(36) NOT NULL, - product_id CHAR(36) NOT NULL, - quantity INT, - PRIMARY KEY (detail_id) -); - - -CREATE TABLE IF NOT EXISTS order_shipping ( - shipping_id CHAR(36) NOT NULL, - order_id CHAR(36) NOT NULL, - product_id CHAR(36) NOT NULL, - shipping_date DATE, - PRIMARY KEY (shipping_id) -); - -CREATE TABLE IF NOT EXISTS shipping_status ( - status_id CHAR(36) NOT NULL, - order_id CHAR(36) NOT NULL, - product_id CHAR(36) NOT NULL, - status VARCHAR(255), - status_date DATE, - PRIMARY KEY (status_id) -); - - - -ALTER TABLE order_details -ADD FOREIGN KEY (order_id, product_id) -REFERENCES orders (order_id, product_id); - - -ALTER TABLE order_shipping -ADD FOREIGN KEY (order_id, product_id) -REFERENCES orders (order_id, product_id); - - -ALTER TABLE shipping_status -ADD FOREIGN KEY (order_id, product_id) -REFERENCES order_shipping (order_id, product_id); - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/job_mappings.go deleted file mode 100644 index 674a3e478d..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/job_mappings.go +++ /dev/null @@ -1,143 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create.sql - -package mysql_compositekeys - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "composite", - Table: "orders", - Column: "order_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "orders", - Column: "product_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "orders", - Column: "order_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "order_details", - Column: "detail_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "order_details", - Column: "order_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "order_details", - Column: "product_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "order_details", - Column: "quantity", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "order_shipping", - Column: "shipping_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "order_shipping", - Column: "order_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "order_shipping", - Column: "product_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "order_shipping", - Column: "shipping_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "shipping_status", - Column: "status_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "shipping_status", - Column: "order_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "shipping_status", - Column: "product_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "shipping_status", - Column: "status", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "composite", - Table: "shipping_status", - Column: "status_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/teardown.sql deleted file mode 100644 index f3304b2a99..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/teardown.sql +++ /dev/null @@ -1 +0,0 @@ -DROP DATABASE IF EXISTS `composite`; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/tests.go deleted file mode 100644 index d525b15c09..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys/tests.go +++ /dev/null @@ -1,56 +0,0 @@ -package mysql_compositekeys - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - "github.com/nucleuscloud/neosync/internal/gotypeutil" - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" -) - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Composite key transformation + truncate", - Folder: "testdata/mysql/composite-keys", - SourceFilePaths: []string{"create.sql", "insert.sql"}, - TargetFilePaths: []string{"create.sql", "insert.sql"}, - JobMappings: getPkTransformerJobmappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - InitSchema: false, - Truncate: true, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "composite.order_details": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "composite.orders": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "composite.order_shipping": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "composite.shipping_status": &workflow_testdata.ExpectedOutput{RowCount: 10}, - }, - }, - } -} - -func getPkTransformerJobmappings() []*mgmtv1alpha1.JobMapping { - jobmappings := GetDefaultSyncJobMappings() - updatedJobmappings := []*mgmtv1alpha1.JobMapping{} - for _, jm := range jobmappings { - if jm.Column != "id" { - updatedJobmappings = append(updatedJobmappings, jm) - } else { - updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ - Schema: jm.Schema, - Table: jm.Table, - Column: jm.Column, - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_GENERATE_UUID, - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_GenerateUuidConfig{ - GenerateUuidConfig: &mgmtv1alpha1.GenerateUuid{ - IncludeHyphens: gotypeutil.ToPtr(true), - }, - }, - }, - }, - }) - } - } - return updatedJobmappings -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/create-dbs.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/create-dbs.sql deleted file mode 100644 index 6f0907b9c1..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/create-dbs.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE DATABASE IF NOT EXISTS init_schema; -CREATE DATABASE IF NOT EXISTS init_schema2; -CREATE DATABASE IF NOT EXISTS init_schema3; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/insert.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/insert.sql deleted file mode 100644 index 648e867feb..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/insert.sql +++ /dev/null @@ -1,88 +0,0 @@ --- Disable foreign key checks -SET foreign_key_checks = 0; - --- Insert data into init_schema -USE init_schema; - -INSERT INTO container_status (id) VALUES (1), (2), (3), (4), (5); - -INSERT INTO container (code, container_status_id) VALUES -('code1', 1), -('code2', 2), -('code3', 3), -('code4', 4), -('code5', 5); - --- Insert data into init_schema2 -USE init_schema2; - -INSERT INTO container_status (id) VALUES (1), (2), (3), (4), (5); - -INSERT INTO container (code, container_status_id) VALUES -('code1', 1), -('code2', 2), -('code3', 3), -('code4', 4), -('code5', 5); - --- Insert data into init_schema3 -USE init_schema3; - -INSERT INTO users (first_name, last_name, age, current_salary) VALUES -('John', 'Doe', 30, 50000.00), -('Jane', 'Smith', 25, 60000.00), -('Alice', 'Johnson', 28, 55000.00), -('Bob', 'Williams', 35, 65000.00), -('Charlie', 'Brown', 40, 70000.00); - -INSERT INTO unique_emails (email) VALUES -('john.doe@example.com'), -('jane.smith@example.com'), -('alice.johnson@example.com'), -('bob.williams@example.com'), -('charlie.brown@example.com'); - -INSERT INTO unique_emails_and_usernames (email, username) VALUES -('john.doe@example.com', 'johndoe'), -('jane.smith@example.com', 'janesmith'), -('alice.johnson@example.com', 'alicejohnson'), -('bob.williams@example.com', 'bobwilliams'), -('charlie.brown@example.com', 'charliebrown'); - -INSERT INTO t1 (b) VALUES (NULL), (1), (2), (3), (4); - -INSERT INTO t2 (b) VALUES (NULL), (1), (2), (3), (4); - -INSERT INTO t3 (b) VALUES (NULL), (1), (2), (3), (4); - -INSERT INTO parent1 (id) VALUES -('550e8400-e29b-41d4-a716-446655440000'), -('550e8400-e29b-41d4-a716-446655440001'), -('550e8400-e29b-41d4-a716-446655440002'), -('550e8400-e29b-41d4-a716-446655440003'), -('550e8400-e29b-41d4-a716-446655440004'); - -INSERT INTO child1 (parent_id) VALUES -(NULL), -('550e8400-e29b-41d4-a716-446655440000'), -('550e8400-e29b-41d4-a716-446655440001'), -('550e8400-e29b-41d4-a716-446655440002'), -('550e8400-e29b-41d4-a716-446655440003'); - -INSERT INTO t4 (a, b, c) VALUES -(1, 1, 100), (2, 2, 200), (3, 3, 300), (4, 4, 400), (5, 5, 500); - -INSERT INTO t5 (x, y, z) VALUES -(1, 1, 10), (2, 2, 20), (3, 3, 30), (4, 4, 40), (5, 5, 50); - -INSERT INTO employee_log (employee_id, action) VALUES -(NULL, 'INSERT'), (NULL, 'UPDATE'), (NULL, 'DELETE'), (NULL, 'INSERT'), (NULL, 'UPDATE'); - -INSERT INTO custom_table (name, data, status) VALUES -('Alpha', '{}', 'Low'), ('Beta', '{}', 'Medium'), ('Gamma', '{}', 'High'), ('Delta', '{}', 'Low'), ('Epsilon', '{}', 'Medium'); - -INSERT INTO tablewithcount (id) VALUES -('1'), ('2'), ('3'), ('4'), ('5'); - --- Re-enable foreign key checks -SET foreign_key_checks = 1; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/job_mappings.go deleted file mode 100644 index 19f9b7204a..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/job_mappings.go +++ /dev/null @@ -1,367 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create.sql - -package mysql_initschema - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "init_schema", - Table: "container", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema", - Table: "container", - Column: "code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema", - Table: "container", - Column: "container_status_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema2", - Table: "container_status", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "unique_emails", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "unique_emails", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t2", - Column: "a", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t2", - Column: "b", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t4", - Column: "a", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t4", - Column: "b", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t4", - Column: "c", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t5", - Column: "x", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t5", - Column: "y", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t5", - Column: "z", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "users", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "users", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "users", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "users", - Column: "fullname", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "users", - Column: "age", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "users", - Column: "current_salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t3", - Column: "a", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t3", - Column: "b", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "tablewithcount", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema2", - Table: "container", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema2", - Table: "container", - Column: "code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema2", - Table: "container", - Column: "container_status_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t1", - Column: "a", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "t1", - Column: "b", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema", - Table: "container_status", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "unique_emails_and_usernames", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "unique_emails_and_usernames", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "unique_emails_and_usernames", - Column: "username", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "parent1", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "child1", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "child1", - Column: "parent_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "employee_log", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "employee_log", - Column: "employee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "employee_log", - Column: "action", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "employee_log", - Column: "change_time", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "custom_table", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "custom_table", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "custom_table", - Column: "data", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "custom_table", - Column: "status", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "init_schema3", - Table: "custom_table", - Column: "created_at", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/teardown.sql deleted file mode 100644 index f2f92e1abd..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/teardown.sql +++ /dev/null @@ -1,3 +0,0 @@ -DROP DATABASE IF EXISTS init_schema; -DROP DATABASE IF EXISTS init_schema2; -DROP DATABASE IF EXISTS init_schema3; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/tests.go deleted file mode 100644 index 289816bc20..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema/tests.go +++ /dev/null @@ -1,63 +0,0 @@ -package mysql_initschema - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" -) - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Init Schema", - Folder: "testdata/mysql/init-schema", - SourceFilePaths: []string{"create.sql", "insert.sql"}, - TargetFilePaths: []string{"create-dbs.sql"}, - JobMappings: getJobmappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - InitSchema: true, - Truncate: true, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "init_schema.container_status": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema.container": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema2.container_status": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema2.container": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.users": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.unique_emails": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.unique_emails_and_usernames": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.t1": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.t2": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.t3": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.parent1": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.child1": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.t4": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.t5": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.employee_log": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.custom_table": &workflow_testdata.ExpectedOutput{RowCount: 5}, - "init_schema3.tablewithcount": &workflow_testdata.ExpectedOutput{RowCount: 5}, - }, - }, - } -} - -func getJobmappings() []*mgmtv1alpha1.JobMapping { - jobmappings := GetDefaultSyncJobMappings() - updatedJobmappings := []*mgmtv1alpha1.JobMapping{} - for _, jm := range jobmappings { - if jm.Column != "fullname" { - updatedJobmappings = append(updatedJobmappings, jm) - } else { - updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ - Schema: jm.Schema, - Table: jm.Table, - Column: jm.Column, - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_GenerateDefaultConfig{}, - }, - }, - }) - } - } - return updatedJobmappings -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/create-dbs.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/create-dbs.sql deleted file mode 100644 index 449ec66886..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/create-dbs.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE DATABASE IF NOT EXISTS `m_db_1`; -CREATE DATABASE IF NOT EXISTS `m_db_2`; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/create.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/create.sql deleted file mode 100644 index 7b9462557e..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/create.sql +++ /dev/null @@ -1,32 +0,0 @@ -USE m_db_1; - -CREATE TABLE IF NOT EXISTS container_status ( - id int NOT NULL AUTO_INCREMENT, - PRIMARY KEY (id)); - -CREATE TABLE IF NOT EXISTS container ( - id int NOT NULL AUTO_INCREMENT, - code varchar(32) NOT NULL, - container_status_id int NOT NULL, -PRIMARY KEY (id), -UNIQUE KEY container_code_uniq (code), -KEY container_container_status_fk (container_status_id)) ENGINE = InnoDB AUTO_INCREMENT = 530 DEFAULT CHARSET = utf8mb3; - - -ALTER TABLE container ADD CONSTRAINT container_container_status_fk FOREIGN KEY (container_status_id) REFERENCES container_status (id); - - -USE m_db_2; -CREATE TABLE IF NOT EXISTS container_status ( - id int NOT NULL AUTO_INCREMENT, - PRIMARY KEY (id)) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb3; - -CREATE TABLE IF NOT EXISTS container ( - id int NOT NULL AUTO_INCREMENT, - code varchar(32) NOT NULL, - container_status_id int NOT NULL, -PRIMARY KEY (id), -UNIQUE KEY container_code_uniq (code), -KEY container_container_status_fk (container_status_id)) ENGINE = InnoDB AUTO_INCREMENT = 530 DEFAULT CHARSET = utf8mb3; - -ALTER TABLE container ADD CONSTRAINT container_container_status_fk FOREIGN KEY (container_status_id) REFERENCES container_status (id); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/insert.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/insert.sql deleted file mode 100644 index 8368d58668..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/insert.sql +++ /dev/null @@ -1,29 +0,0 @@ -INSERT INTO `m_db_1`.`container_status` (`id`) VALUES -(NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL); - -INSERT INTO `m_db_1`.`container` (`code`, `container_status_id`) VALUES -('code1', 4), -('code2', 4), -('code3', 3), -('code4', 2), -('code5', 5), -('code6', 2), -('code7', 9), -('code8', 8), -('code9', 6), -('code10',7); - - -INSERT INTO `m_db_2`.`container_status` (`id`) VALUES -(NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL); - --- Insert 10 rows into container table -INSERT INTO `m_db_2`.`container` (`code`, `container_status_id`) VALUES -('code1', 2), -('code2', 4), -('code3', 5), -('code4', 8), -('code5', 3), -('code6', 6), -('code7', 4), -('code8', 7); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/job_mappings.go deleted file mode 100644 index a37e50e39f..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/job_mappings.go +++ /dev/null @@ -1,79 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create.sql - -package mysql_multipledbs - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "m_db_1", - Table: "container", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "m_db_1", - Table: "container", - Column: "code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "m_db_1", - Table: "container", - Column: "container_status_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "m_db_2", - Table: "container_status", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "m_db_2", - Table: "container", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "m_db_2", - Table: "container", - Column: "code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "m_db_2", - Table: "container", - Column: "container_status_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "m_db_1", - Table: "container_status", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/teardown.sql deleted file mode 100644 index 9bf1e4b012..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/teardown.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP DATABASE IF EXISTS `m_db_1`; -DROP DATABASE IF EXISTS `m_db_2`; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/tests.go deleted file mode 100644 index ee2913649e..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs/tests.go +++ /dev/null @@ -1,24 +0,0 @@ -package mysql_multipledbs - -import workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "multiple databases sync + init schema", - Folder: "testdata/mysql/multiple-dbs", - SourceFilePaths: []string{"create-dbs.sql", "create.sql", "insert.sql"}, - TargetFilePaths: []string{"create-dbs.sql"}, - JobMappings: GetDefaultSyncJobMappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - InitSchema: true, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "m_db_1.container": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "m_db_1.container_status": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "m_db_2.container": &workflow_testdata.ExpectedOutput{RowCount: 8}, - "m_db_2.container_status": &workflow_testdata.ExpectedOutput{RowCount: 8}, - }, - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/job_mappings.go deleted file mode 100644 index f244196fd8..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/job_mappings.go +++ /dev/null @@ -1,759 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: setup.sql - -package postgres_alltypes - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "smallint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "integer_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "bigint_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "decimal_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "numeric_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "real_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "double_precision_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "serial_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "bigserial_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "money_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "char_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "varchar_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "text_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "bytea_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "timestamp_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "timestamptz_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "date_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "time_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "timetz_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "interval_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "boolean_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "uuid_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "inet_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "cidr_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "macaddr_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "bit_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "varbit_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "point_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "line_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "lseg_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "box_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "path_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "polygon_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "circle_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "json_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "jsonb_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "int4range_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "int8range_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "numrange_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "tsrange_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "tstzrange_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "daterange_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "integer_array_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "text_array_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "xml_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "tsvector_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "all_postgres_types", - Column: "oid_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "time_time", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "time_time", - Column: "timestamp_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "time_time", - Column: "timestamptz_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "time_time", - Column: "date_col", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "int_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "smallint_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "bigint_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "real_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "double_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "text_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "varchar_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "char_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "boolean_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "date_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "time_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "timestamp_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "timestamptz_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "interval_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "point_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "line_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "lseg_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "path_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "polygon_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "circle_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "uuid_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "json_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "jsonb_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "bit_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "varbit_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "numeric_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "money_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "xml_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "array_types", - Column: "int_double_array", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "json_data", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "json_data", - Column: "data", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "products", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "products", - Column: "price", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "products", - Column: "tax_rate", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "products", - Column: "tax_amount", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "alltypes", - Table: "products", - Column: "total_price", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "CaPiTaL", - Table: "BadName", - Column: "ID", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "CaPiTaL", - Table: "BadName", - Column: "NAME", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "CaPiTaL", - Table: "Bad Name 123!@#", - Column: "ID", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "CaPiTaL", - Table: "Bad Name 123!@#", - Column: "NAME", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/schema-create.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/schema-create.sql deleted file mode 100644 index 76e9b6f9a5..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/schema-create.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS alltypes; -CREATE SCHEMA IF NOT EXISTS "CaPiTaL"; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/setup.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/setup.sql deleted file mode 100644 index 44c01ca67b..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/setup.sql +++ /dev/null @@ -1,388 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS alltypes; -CREATE TABLE IF NOT EXISTS alltypes.all_postgres_types ( - id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, - -- Numeric Types - smallint_col SMALLINT, - integer_col INTEGER, - bigint_col BIGINT, - decimal_col DECIMAL(10, 2), - numeric_col NUMERIC(10, 2), - real_col REAL, - double_precision_col DOUBLE PRECISION, - serial_col SERIAL, - bigserial_col BIGSERIAL, - - -- Monetary Types - money_col MONEY, - - -- Character Types - char_col CHAR(10), - varchar_col VARCHAR(50), - text_col TEXT, - - -- Binary Types - bytea_col BYTEA, - - -- Date/Time Types - timestamp_col TIMESTAMP, - timestamptz_col TIMESTAMPTZ, - date_col DATE, - time_col TIME, - timetz_col TIMETZ, - interval_col INTERVAL, - - -- Boolean Type - boolean_col BOOLEAN, - - -- UUID Type - uuid_col UUID, - - -- Network Address Types - inet_col INET, - cidr_col CIDR, - macaddr_col MACADDR, - - -- Bit String Types - bit_col BIT(8), - varbit_col VARBIT(8), - - -- Geometric Types - point_col POINT, - line_col LINE, - lseg_col LSEG, - box_col BOX, - path_col PATH, - polygon_col POLYGON, - circle_col CIRCLE, - - -- JSON Types - json_col JSON, - jsonb_col JSONB, - - -- Range Types - int4range_col INT4RANGE, - int8range_col INT8RANGE, - numrange_col NUMRANGE, - tsrange_col TSRANGE, - tstzrange_col TSTZRANGE, - daterange_col DATERANGE, - - -- Array Types - integer_array_col INTEGER[], - text_array_col TEXT[], - - -- XML Type - xml_col XML, - - -- TSVECTOR Type (Full-Text Search) - tsvector_col TSVECTOR, - - -- OID Type - oid_col OID -); - - -INSERT INTO alltypes.all_postgres_types ( - Id, - smallint_col, - integer_col, - bigint_col, - decimal_col, - numeric_col, - real_col, - double_precision_col, - serial_col, - bigserial_col, - money_col, - char_col, - varchar_col, - text_col, - bytea_col, - timestamp_col, - timestamptz_col, - date_col, - time_col, - timetz_col, - interval_col, - boolean_col, - uuid_col, - inet_col, - cidr_col, - macaddr_col, - bit_col, - varbit_col, - point_col, - line_col, - lseg_col, - box_col, - path_col, - polygon_col, - circle_col, - json_col, - jsonb_col, - int4range_col, - int8range_col, - numrange_col, - tsrange_col, - tstzrange_col, - daterange_col, - integer_array_col, - text_array_col, - xml_col, - tsvector_col, - oid_col -) VALUES ( - DEFAULT, - 32767, -- smallint_col - 2147483647, -- integer_col - 9223372036854775807, -- bigint_col - 1234.56, -- decimal_col - 99999999.99, -- numeric_col - 12345.67, -- real_col - 123456789.123456789, -- double_precision_col - 1, -- serial_col (auto-incremented, will be generated) - 1, -- bigserial_col (auto-incremented, will be generated) - '$100.00', -- money_col - 'A', -- char_col - 'DEFAULT', -- varchar_col - 'default', -- text_col - decode('DEADBEEF', 'hex'), -- bytea_col - '2024-01-01 12:34:56', -- timestamp_col - '2024-01-01 12:34:56+00', -- timestamptz_col - '2024-01-01', -- date_col - '12:34:56', -- time_col - '12:34:56+00', -- timetz_col - '1 day', -- interval_col - TRUE, -- boolean_col - '123e4567-e89b-12d3-a456-426614174000', -- uuid_col - '192.168.1.1', -- inet_col - '192.168.1.0/24', -- cidr_col - '08:00:2b:01:02:03', -- macaddr_col - B'10101010', -- bit_col - B'1010', -- varbit_col - '(1, 2)', -- point_col - '{1, 1, 0}', -- line_col - '[(0,0), (1,1)]', -- lseg_col - '(0,0),(1,1)', -- box_col - '((0,0), (1,1), (2,2))', -- path_col - '((0,0), (1,1), (1,0))', -- polygon_col - '<(1,1),1>', -- circle_col - '{"name": "John", "age": 30}', -- json_col - '{"name": "John", "age": 30}', -- jsonb_col - '[1,10]', -- int4range_col - '[1,1000]', -- int8range_col - '[1.0,10.0]', -- numrange_col - '[2024-01-01 12:00:00, 2024-01-01 13:00:00]', -- tsrange_col - '[2024-01-01 12:00:00+00, 2024-01-01 13:00:00+00]', -- tstzrange_col - '[2024-01-01, 2024-01-02]', -- daterange_col - '{1, 2, 3}', -- integer_array_col - '{"one", "two", "three"}', -- text_array_col - 'bar', -- xml_col - 'example tsvector', -- tsvector_col - 123456 -- oid_col -); - -INSERT INTO alltypes.all_postgres_types ( - Id -) VALUES ( - DEFAULT -); - - -CREATE TABLE IF NOT EXISTS alltypes.time_time ( - id SERIAL PRIMARY KEY, - timestamp_col TIMESTAMP, - timestamptz_col TIMESTAMPTZ, - date_col DATE -); - -INSERT INTO alltypes.time_time ( - timestamp_col, - timestamptz_col, - date_col -) -VALUES ( - '2024-03-18 10:30:00', - '2024-03-18 10:30:00+00', - '2024-03-18' -); - -INSERT INTO alltypes.time_time ( - timestamp_col, - timestamptz_col, - date_col -) -VALUES ( - '0001-01-01 00:00:00 BC', - '0001-01-01 00:00:00+00 BC', - '0001-01-01 BC' -); - - -CREATE TABLE IF NOT EXISTS alltypes.array_types ( - "id" BIGINT NOT NULL PRIMARY KEY, - "int_array" _int4, - "smallint_array" _int2, - "bigint_array" _int8, - "real_array" _float4, - "double_array" _float8, - "text_array" _text, - "varchar_array" _varchar, - "char_array" _bpchar, - "boolean_array" _bool, - "date_array" _date, - "time_array" _time, - "timestamp_array" _timestamp, - "timestamptz_array" _timestamptz, - "interval_array" _interval, - -- "inet_array" _inet, // broken - -- "cidr_array" _cidr, - "point_array" _point, - "line_array" _line, - "lseg_array" _lseg, - -- "box_array" _box, // broken - "path_array" _path, - "polygon_array" _polygon, - "circle_array" _circle, - "uuid_array" _uuid, - "json_array" _json, - "jsonb_array" _jsonb, - "bit_array" _bit, - "varbit_array" _varbit, - "numeric_array" _numeric, - "money_array" _money, - "xml_array" _xml, - "int_double_array" _int4 -); - - -INSERT INTO alltypes.array_types ( - id, int_array, smallint_array, bigint_array, real_array, double_array, - text_array, varchar_array, char_array, boolean_array, date_array, - time_array, timestamp_array, timestamptz_array, interval_array, - -- inet_array, cidr_array, - point_array, line_array, lseg_array, - -- box_array, - path_array, polygon_array, circle_array, - uuid_array, - json_array, jsonb_array, - bit_array, varbit_array, numeric_array, - money_array, xml_array, int_double_array -) VALUES ( - 1, - ARRAY[1, 2, 3], - ARRAY[10::smallint, 20::smallint], - ARRAY[100::bigint, 200::bigint], - ARRAY[1.1::real, 2.2::real], - ARRAY[1.11::double precision, 2.22::double precision], - ARRAY['text1', 'text2'], - ARRAY['varchar1'::varchar, 'varchar2'::varchar], - ARRAY['a'::char, 'b'::char], - ARRAY[true, false], - ARRAY['2023-01-01'::date, '2023-01-02'::date], - ARRAY['12:00:00'::time, '13:00:00'::time], - ARRAY['2023-01-01 12:00:00'::timestamp, '2023-01-02 13:00:00'::timestamp], - ARRAY['2023-01-01 12:00:00+00'::timestamptz, '2023-01-02 13:00:00+00'::timestamptz], - ARRAY['1 day'::interval, '2 hours'::interval], - -- ARRAY['192.168.0.1'::inet, '10.0.0.1'::inet], - -- ARRAY['192.168.0.0/24'::cidr, '10.0.0.0/8'::cidr], - ARRAY['(1,1)'::point, '(2,2)'::point], - ARRAY['{1,2,2}'::line, '{3,4,4}'::line], - ARRAY['(1,1,2,2)'::lseg, '(3,3,4,4)'::lseg], - -- ARRAY['(1,1,2,2)'::box, '(3,3,4,4)'::box], - ARRAY['((1,1),(2,2),(3,3))'::path, '((4,4),(5,5),(6,6))'::path], - ARRAY['((1,1),(2,2),(3,3))'::polygon, '((4,4),(5,5),(6,6))'::polygon], - ARRAY['<(1,1),1>'::circle, '<(2,2),2>'::circle], - ARRAY['a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, 'b0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid], - ARRAY['{"key": "value1"}'::json, '{"key": "value2"}'::json], - ARRAY['{"key": "value1"}'::jsonb, '{"key": "value2"}'::jsonb], - ARRAY['101'::bit(3), '110'::bit(3)], - ARRAY['10101'::bit varying(5), '01010'::bit varying(5)], - ARRAY[1.23::numeric, 4.56::numeric], - ARRAY[10.00::money, 20.00::money], - ARRAY['value1'::xml, 'value2'::xml], - ARRAY[[1, 2], [3, 4]] -); - - -CREATE TABLE alltypes.json_data ( - id SERIAL PRIMARY KEY, - data JSONB -); - - -INSERT INTO alltypes.json_data (data) VALUES ('"Hello, world!"'); -INSERT INTO alltypes.json_data (data) VALUES ('42'); -INSERT INTO alltypes.json_data (data) VALUES ('3.14'); -INSERT INTO alltypes.json_data (data) VALUES ('true'); -INSERT INTO alltypes.json_data (data) VALUES ('false'); -INSERT INTO alltypes.json_data (data) VALUES ('null'); - -INSERT INTO alltypes.json_data (data) VALUES ('{"name": "John", "age": 30}'); -INSERT INTO alltypes.json_data (data) VALUES ('{"coords": {"x": 10, "y": 20}}'); - -INSERT INTO alltypes.json_data (data) VALUES ('[1, 2, 3, 4]'); -INSERT INTO alltypes.json_data (data) VALUES ('["apple", "banana", "cherry"]'); - -INSERT INTO alltypes.json_data (data) VALUES ('{"items": ["book", "pen"], "count": 2, "in_stock": true}'); - -INSERT INTO alltypes.json_data (data) VALUES ( - '{ - "user": { - "name": "Alice", - "age": 28, - "contacts": [ - {"type": "email", "value": "alice@example.com"}, - {"type": "phone", "value": "123-456-7890"} - ] - }, - "orders": [ - {"id": 1001, "total": 59.99}, - {"id": 1002, "total": 24.50} - ], - "preferences": { - "notifications": true, - "theme": "dark" - } - }' -); - -CREATE TABLE alltypes.products ( - id SERIAL PRIMARY KEY, - price DECIMAL(10,2), - tax_rate DECIMAL(4,2), - tax_amount DECIMAL(10,2) GENERATED ALWAYS AS (price * tax_rate / 100) STORED, - total_price DECIMAL(10,2) GENERATED ALWAYS AS (price + (price * tax_rate / 100)) STORED -); - -INSERT INTO alltypes.products (price, tax_rate) VALUES - (100.00, 10.00), - (50.00, 8.50); - -CREATE SCHEMA IF NOT EXISTS "CaPiTaL"; -CREATE TABLE IF NOT EXISTS "CaPiTaL"."BadName" ( - "ID" BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, - "NAME" text UNIQUE -); - -INSERT INTO "CaPiTaL"."BadName" ("NAME") -VALUES - ('Xk7pQ9nM3v'), - ('Rt5wLjH2yB'), - ('Zc8fAe4dN6'), - ('Ym9gKu3sW5'), - ('Vb4nPx7tJ2'); - -CREATE TABLE "CaPiTaL"."Bad Name 123!@#" ( - "ID" SERIAL PRIMARY KEY, - "NAME" text REFERENCES "CaPiTaL"."BadName" ("NAME") -); - - -INSERT INTO "CaPiTaL"."Bad Name 123!@#" ("NAME") -VALUES - ('Xk7pQ9nM3v'), - ('Rt5wLjH2yB'), - ('Zc8fAe4dN6'), - ('Ym9gKu3sW5'), - ('Vb4nPx7tJ2'); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/teardown.sql deleted file mode 100644 index 8c8b61d90c..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/teardown.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP SCHEMA IF EXISTS alltypes CASCADE; -DROP SCHEMA IF EXISTS "CaPiTaL" CASCADE; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/tests.go deleted file mode 100644 index d2b5438af2..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types/tests.go +++ /dev/null @@ -1,66 +0,0 @@ -package postgres_alltypes - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" -) - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "All Postgres types", - Folder: "testdata/postgres/all-types", - SourceFilePaths: []string{"setup.sql"}, - TargetFilePaths: []string{"schema-create.sql", "setup.sql"}, - JobMappings: getJobmappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - Truncate: true, - TruncateCascade: true, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "alltypes.all_postgres_types": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "alltypes.array_types": &workflow_testdata.ExpectedOutput{RowCount: 1}, - "alltypes.time_time": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "alltypes.json_data": &workflow_testdata.ExpectedOutput{RowCount: 12}, - }, - }, - { - Name: "All Postgres types + init schema", - Folder: "testdata/postgres/all-types", - SourceFilePaths: []string{"setup.sql"}, - TargetFilePaths: []string{"schema-create.sql"}, - JobMappings: getJobmappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - InitSchema: true, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "alltypes.all_postgres_types": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "alltypes.array_types": &workflow_testdata.ExpectedOutput{RowCount: 1}, - "alltypes.time_time": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "alltypes.json_data": &workflow_testdata.ExpectedOutput{RowCount: 12}, - }, - }, - } -} - -func getJobmappings() []*mgmtv1alpha1.JobMapping { - jobmappings := GetDefaultSyncJobMappings() - updatedJobmappings := []*mgmtv1alpha1.JobMapping{} - for _, jm := range jobmappings { - if jm.Column == "tax_amount" || jm.Column == "total_price" { - updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ - Schema: jm.Schema, - Table: jm.Table, - Column: jm.Column, - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_GenerateDefaultConfig{}, - }, - }, - }) - } else { - updatedJobmappings = append(updatedJobmappings, jm) - } - } - return updatedJobmappings -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/job_mappings.go deleted file mode 100644 index 028e3e2067..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/job_mappings.go +++ /dev/null @@ -1,63 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: setup.sql - -package postgres_circulardependencies - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "circular_dependencies", - Table: "addresses", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "circular_dependencies", - Table: "addresses", - Column: "order_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "circular_dependencies", - Table: "customers", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "circular_dependencies", - Table: "customers", - Column: "address_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "circular_dependencies", - Table: "orders", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "circular_dependencies", - Table: "orders", - Column: "customer_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/schema-create.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/schema-create.sql deleted file mode 100644 index df4159fda8..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/schema-create.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS circular_dependencies; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/setup.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/setup.sql deleted file mode 100644 index eb33f7bf71..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/setup.sql +++ /dev/null @@ -1,70 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS circular_dependencies; -SET search_path TO circular_dependencies; - --- Table addresses depends on Table orders -CREATE TABLE addresses( - id UUID PRIMARY KEY, - order_id UUID NULL -); - --- Table customers depends on Table addresses -CREATE TABLE customers( - id UUID PRIMARY KEY, - address_id UUID, - CONSTRAINT fk_address - FOREIGN KEY (address_id) - REFERENCES addresses (id) - -); - --- Table orders depends on Table customers -CREATE TABLE orders ( - id UUID PRIMARY KEY, - customer_id UUID, - CONSTRAINT fk_customer - FOREIGN KEY (customer_id) - REFERENCES customers (id) -); - --- Inserts for the addresses table -INSERT INTO addresses (id, order_id) VALUES ('ec3cbe4f-217e-49e0-bc7d-d0c334cc7d3b', 'f216a6f8-3bcd-46d8-8b99-e3b31dd5e6f3'); -INSERT INTO addresses (id, order_id) VALUES ('f6c7d5b6-9140-4dcb-bc34-648fcb2c8d1f', 'd5e95c33-08c5-4098-8b69-4b1a8e4c6a96'); -INSERT INTO addresses (id, order_id) VALUES ('cfba342e-46e5-45d7-8437-7fd7c22dfe0c', '7eaa7688-3730-4a55-8741-d6ae58a1b843'); -INSERT INTO addresses (id, order_id) VALUES ('a29487f8-ec77-4f84-bb1d-4f526457baba', '47873236-95b4-4c0f-ae45-7b19d9de4abf'); -INSERT INTO addresses (id, order_id) VALUES ('5c0f798e-8d4a-4f26-9b5d-1181f1b4d7a5', '9a2a85d2-1554-420b-b4e2-c769c674dbb1'); -INSERT INTO addresses (id, order_id) VALUES ('e295f80d-2f60-41a0-9945-7dbff521b193', 'b63f0e2c-f6d2-472f-b41c-9d5e64b48c3c'); -INSERT INTO addresses (id, order_id) VALUES ('f1a3c6e8-dccf-46c8-a0f3-79b93f3d2b0b', '6a1c1a7e-3e5c-4828-8228-91ff0b8d03e3'); -INSERT INTO addresses (id, order_id) VALUES ('36f594af-6d53-4a48-a9b7-b889e2df349e', 'ec5f8a5f-7352-4e4c-9d3f-08e4dbf98df5'); - - --- Inserts for the customers table -INSERT INTO customers (id, address_id) VALUES ('e1a65af8-b0c2-42a0-99c4-7a91a0b2a80d', 'ec3cbe4f-217e-49e0-bc7d-d0c334cc7d3b'); -INSERT INTO customers (id, address_id) VALUES ('a0e78f88-6b48-4d97-8a8a-212bece329b7', 'f6c7d5b6-9140-4dcb-bc34-648fcb2c8d1f'); -INSERT INTO customers (id, address_id) VALUES ('b5c6f69e-13da-4f60-9b8d-dae2fa526b1f', 'cfba342e-46e5-45d7-8437-7fd7c22dfe0c'); -INSERT INTO customers (id, address_id) VALUES ('d82c4a97-00ef-4e0b-8d3a-1b6a4e587524', 'a29487f8-ec77-4f84-bb1d-4f526457baba'); -INSERT INTO customers (id, address_id) VALUES ('4b60d61b-fd6b-4d8e-8978-63c2edb9a274', '5c0f798e-8d4a-4f26-9b5d-1181f1b4d7a5'); -INSERT INTO customers (id, address_id) VALUES ('76b2f70b-ade3-4d57-8b3b-fd1ccf9a5c3a', 'e295f80d-2f60-41a0-9945-7dbff521b193'); -INSERT INTO customers (id, address_id) VALUES ('b83f99cc-8655-4639-9b0f-0d0c60f3a8c3', 'f1a3c6e8-dccf-46c8-a0f3-79b93f3d2b0b'); -INSERT INTO customers (id, address_id) VALUES ('cf769742-74fa-4f2f-8580-df47cc927ba1', '36f594af-6d53-4a48-a9b7-b889e2df349e'); -INSERT INTO customers (id, address_id) VALUES ('dd1b75e6-062d-4fbb-963d-973b612a20c1', 'a29487f8-ec77-4f84-bb1d-4f526457baba'); -INSERT INTO customers (id, address_id) VALUES ('6f4587e5-4dfd-4e8d-8d98-c9c0e1b9ef2e', 'e295f80d-2f60-41a0-9945-7dbff521b193'); - --- Inserts for the orders table -INSERT INTO orders (id, customer_id) VALUES ('f216a6f8-3bcd-46d8-8b99-e3b31dd5e6f3', 'e1a65af8-b0c2-42a0-99c4-7a91a0b2a80d'); -INSERT INTO orders (id, customer_id) VALUES ('d5e95c33-08c5-4098-8b69-4b1a8e4c6a96', 'a0e78f88-6b48-4d97-8a8a-212bece329b7'); -INSERT INTO orders (id, customer_id) VALUES ('7eaa7688-3730-4a55-8741-d6ae58a1b843', 'b5c6f69e-13da-4f60-9b8d-dae2fa526b1f'); -INSERT INTO orders (id, customer_id) VALUES ('47873236-95b4-4c0f-ae45-7b19d9de4abf', 'd82c4a97-00ef-4e0b-8d3a-1b6a4e587524'); -INSERT INTO orders (id, customer_id) VALUES ('9a2a85d2-1554-420b-b4e2-c769c674dbb1', '4b60d61b-fd6b-4d8e-8978-63c2edb9a274'); -INSERT INTO orders (id, customer_id) VALUES ('b63f0e2c-f6d2-472f-b41c-9d5e64b48c3c', '76b2f70b-ade3-4d57-8b3b-fd1ccf9a5c3a'); -INSERT INTO orders (id, customer_id) VALUES ('6a1c1a7e-3e5c-4828-8228-91ff0b8d03e3', 'b83f99cc-8655-4639-9b0f-0d0c60f3a8c3'); -INSERT INTO orders (id, customer_id) VALUES ('ec5f8a5f-7352-4e4c-9d3f-08e4dbf98df5', 'cf769742-74fa-4f2f-8580-df47cc927ba1'); -INSERT INTO orders (id, customer_id) VALUES ('58dca9d5-8500-4f8b-a3f3-75b6390e3c1a', 'dd1b75e6-062d-4fbb-963d-973b612a20c1'); -INSERT INTO orders (id, customer_id) VALUES ('762b3bb2-3723-4e3b-8b53-b2e8057896ab', '6f4587e5-4dfd-4e8d-8d98-c9c0e1b9ef2e'); - - - --- Adding the foreign key constraints to create the circular dependency -ALTER TABLE addresses -ADD CONSTRAINT fk_order -FOREIGN KEY (order_id) -REFERENCES orders (id); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/teardown.sql deleted file mode 100644 index 26a73e22e9..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/teardown.sql +++ /dev/null @@ -1 +0,0 @@ -DROP SCHEMA IF EXISTS circular_dependencies CASCADE; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/tests.go deleted file mode 100644 index dcead5c2ab..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies/tests.go +++ /dev/null @@ -1,23 +0,0 @@ -package postgres_circulardependencies - -import workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Circular Dependency sync + init schema", - Folder: "testdata/postgres/circular-dependencies", - SourceFilePaths: []string{"setup.sql"}, - TargetFilePaths: []string{"schema-create.sql"}, - JobMappings: GetDefaultSyncJobMappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - InitSchema: true, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "circular_dependencies.addresses": &workflow_testdata.ExpectedOutput{RowCount: 8}, - "circular_dependencies.customers": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "circular_dependencies.orders": &workflow_testdata.ExpectedOutput{RowCount: 10}, - }, - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/insert.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/insert.sql deleted file mode 100644 index 08dbddb8b0..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/insert.sql +++ /dev/null @@ -1,29 +0,0 @@ -SET search_path TO double_reference; --- COMPANY DATA -INSERT INTO company (name, url, employee_count, uuid) -VALUES - ('Acme Corporation', 'www.acme.com', 500, uuid_generate_v4()), - ('Global Enterprises', 'globalenterprises.net', 1200, uuid_generate_v4()), - ('Tech Innovations', 'www.techinnovations.io', 250, uuid_generate_v4()); - --- DEPARTMENT DATA -INSERT INTO department (name, url, company_id, uuid) -VALUES - ('Marketing', 'marketing.acme.com', 1, uuid_generate_v4()), -- Acme Corporation - ('Sales', 'sales.acme.com', 1, uuid_generate_v4()), - ('Finance', null, 2, uuid_generate_v4()), -- Global Enterprises - ('R&D', 'rnd.techinnovations.io', 3, uuid_generate_v4()); -- Tech Innovations - --- TRANSACTION DATA -INSERT INTO transaction (id, amount, created, updated, department_id, date, currency, description, uuid) -VALUES - (1, 250.50, now() - interval '2 weeks', now(), 1, '2024-05-01', 'USD', 'Office Supplies', uuid_generate_v4()), - (2, 1250.00, now() - interval '5 days', now(), 2, '2024-05-06', 'GBP', 'Travel Expenses', uuid_generate_v4()), - (3, 87.25, now() - interval '1 month', now(), 3, '2024-04-20', 'EUR', 'Lunch Meeting', uuid_generate_v4()); - -- Repeat with varied data ... - --- EXPENSE REPORT DATA -INSERT INTO expense_report (id, invoice_id, date, amount, department_source_id, department_destination_id, created, updated, currency, transaction_type, paid, adjustment_amount, transaction_id) -VALUES - (1, 'INV-1234', '2024-05-03', 500.00, 1, 2, now() - interval '15 days', now(), 'USD', 1, true, null, 1), - (2,'INV-5678', '2024-04-28', 128.75, 3, 1, now() - interval '20 days', now() - interval '1 day', 'CAD', 2, false, 12.50, 3); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/job_mappings.go deleted file mode 100644 index 2da1ef2d4f..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/job_mappings.go +++ /dev/null @@ -1,295 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: source-create.sql - -package postgres_doublereference - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "double_reference", - Table: "company", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "company", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "company", - Column: "url", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "company", - Column: "employee_count", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "company", - Column: "uuid", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "department", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "department", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "department", - Column: "url", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "department", - Column: "company_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "department", - Column: "user_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "department", - Column: "uuid", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "amount", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "created", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "updated", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "department_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "currency", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "settings", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "description", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "timezone", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "transaction", - Column: "uuid", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "invoice_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "amount", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "department_source_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "department_destination_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "created", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "updated", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "currency", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "transaction_type", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "paid", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "transaction_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "double_reference", - Table: "expense_report", - Column: "adjustment_amount", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/source-create.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/source-create.sql deleted file mode 100644 index 6442d82bf9..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/source-create.sql +++ /dev/null @@ -1,67 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS double_reference; -SET search_path TO double_reference; - -CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -CREATE TABLE - IF NOT EXISTS "company" ( - "id" BIGSERIAL NOT NULL, - "name" text NOT NULL, - "url" text NULL, - "employee_count" integer NULL, - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4 (), - CONSTRAINT company_pkey PRIMARY KEY (id), - CONSTRAINT company_uuid_key UNIQUE (uuid) - ); -CREATE TABLE - IF NOT EXISTS "department" ( - "id" BIGSERIAL NOT NULL, - "name" text NOT NULL, - "url" text NULL, - "company_id" bigint NOT NULL, -- to be fk - "user_id" bigint NULL, - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4 (), - CONSTRAINT department_pkey PRIMARY KEY (id), - CONSTRAINT department_uuid_key UNIQUE (uuid), - CONSTRAINT department_company_id_fkey FOREIGN KEY (company_id) REFERENCES company (id) ON DELETE CASCADE - ); --- market -CREATE TABLE IF NOT EXISTS transaction ( - id bigint NOT NULL, - amount double precision NOT NULL, - created timestamp without time zone, - updated timestamp without time zone, - department_id bigint, -- to be fk - date date, - currency text NOT NULL, - settings json DEFAULT '{ - "historicalCount": 0, - "vacation": false, - "conference": true, - "travel": true - }'::json NOT NULL, - description text, - timezone text DEFAULT 'America/New_York'::text NOT NULL, - uuid uuid DEFAULT uuid_generate_v4() NOT NULL, - CONSTRAINT transaction_pkey PRIMARY KEY (id), - CONSTRAINT transaction_department_id_fkey FOREIGN KEY (department_id) REFERENCES department (ID) ON DELETE CASCADE -); -CREATE TABLE IF NOT EXISTS expense_report ( - id bigint NOT NULL, - invoice_id text, - date date NOT NULL, - amount numeric(15,2), - department_source_id bigint, -- fk - department_destination_id bigint, --fk - created timestamp without time zone, - updated timestamp without time zone, - currency character varying(5), - transaction_type integer NOT NULL, - paid boolean DEFAULT false, - transaction_id bigint, -- fk - adjustment_amount numeric(15,2), - CONSTRAINT transaction_type_valid_values CHECK ((transaction_type = ANY (ARRAY[1, 2]))), - CONSTRAINT expense_report_pkey PRIMARY KEY (id), - CONSTRAINT expense_report_dept_source_fkey FOREIGN KEY (department_source_id) REFERENCES department (ID) ON DELETE CASCADE, - CONSTRAINT expense_report_dept_destination_fkey FOREIGN KEY (department_destination_id) REFERENCES department (ID) ON DELETE CASCADE, - CONSTRAINT expense_report_transaction_fkey FOREIGN KEY (transaction_id) REFERENCES transaction (ID) ON DELETE CASCADE -); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/teardown.sql deleted file mode 100644 index e6a2e9baeb..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/teardown.sql +++ /dev/null @@ -1 +0,0 @@ -DROP SCHEMA IF EXISTS double_reference CASCADE; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/tests.go deleted file mode 100644 index b12d75798b..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference/tests.go +++ /dev/null @@ -1,40 +0,0 @@ -package postgres_doublereference - -import workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Double reference sync", - Folder: "testdata/postgres/double-reference", - SourceFilePaths: []string{"source-create.sql", "insert.sql"}, - TargetFilePaths: []string{"source-create.sql"}, - JobMappings: GetDefaultSyncJobMappings(), - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "double_reference.company": &workflow_testdata.ExpectedOutput{RowCount: 3}, - "double_reference.department": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "double_reference.expense_report": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "double_reference.transaction": &workflow_testdata.ExpectedOutput{RowCount: 3}, - }, - }, - { - Name: "Double reference subset", - Folder: "testdata/postgres/double-reference", - SourceFilePaths: []string{"source-create.sql", "insert.sql"}, - TargetFilePaths: []string{"source-create.sql"}, - SubsetMap: map[string]string{ - "double_reference.company": "id in (1)", - }, - JobOptions: &workflow_testdata.TestJobOptions{ - SubsetByForeignKeyConstraints: true, - }, - JobMappings: GetDefaultSyncJobMappings(), - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "double_reference.company": &workflow_testdata.ExpectedOutput{RowCount: 1}, - "double_reference.department": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "double_reference.expense_report": &workflow_testdata.ExpectedOutput{RowCount: 1}, - "double_reference.transaction": &workflow_testdata.ExpectedOutput{RowCount: 2}, - }, - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/job_mappings.go deleted file mode 100644 index 1e1b908799..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/job_mappings.go +++ /dev/null @@ -1,935 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: setup.sql - -package postgres_subsetting - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "subsetting", - Table: "test_2_x", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_x", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_x", - Column: "created", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_b", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_b", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_b", - Column: "created", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_a", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_a", - Column: "x_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_c", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_c", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_c", - Column: "created", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_c", - Column: "a_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_c", - Column: "b_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_d", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_d", - Column: "c_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_e", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_2_e", - Column: "c_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_a", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_b", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_b", - Column: "a_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_c", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_c", - Column: "b_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_d", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_d", - Column: "c_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_e", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_e", - Column: "d_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_f", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_g", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_g", - Column: "f_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_h", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_h", - Column: "g_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_i", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "test_3_i", - Column: "h_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "addresses", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "addresses", - Column: "order_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "customers", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "customers", - Column: "address_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "orders", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "orders", - Column: "customer_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "payments", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "payments", - Column: "customer_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "division", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "division", - Column: "division_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "division", - Column: "location", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "employees", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "employees", - Column: "division_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "employees", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "employees", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "employees", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "projects", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "projects", - Column: "project_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "projects", - Column: "start_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "projects", - Column: "end_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "projects", - Column: "responsible_employee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "projects", - Column: "responsible_division_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "bosses", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "bosses", - Column: "manager_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "bosses", - Column: "big_boss_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "minions", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "minions", - Column: "boss_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "users", - Column: "user_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "users", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "users", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "users", - Column: "manager_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "users", - Column: "mentor_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "initiatives", - Column: "initiative_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "initiatives", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "initiatives", - Column: "description", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "initiatives", - Column: "lead_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "initiatives", - Column: "client_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "tasks", - Column: "task_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "tasks", - Column: "title", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "tasks", - Column: "description", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "tasks", - Column: "status", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "tasks", - Column: "initiative_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "tasks", - Column: "assignee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "tasks", - Column: "reviewer_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "skills", - Column: "skill_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "skills", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "skills", - Column: "category", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "user_skills", - Column: "user_skill_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "user_skills", - Column: "user_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "user_skills", - Column: "skill_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "user_skills", - Column: "proficiency_level", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "comments", - Column: "comment_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "comments", - Column: "content", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "comments", - Column: "created_at", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "comments", - Column: "user_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "comments", - Column: "task_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "comments", - Column: "initiative_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "comments", - Column: "parent_comment_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "attachments", - Column: "attachment_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "attachments", - Column: "file_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "attachments", - Column: "file_path", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "attachments", - Column: "uploaded_by", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "attachments", - Column: "task_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "attachments", - Column: "initiative_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "attachments", - Column: "comment_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "accounts", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "accounts", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "accounts", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "accounts", - Column: "blueprint_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "accounts", - Column: "created_at", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "blueprints", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "blueprints", - Column: "name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "blueprints", - Column: "description", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "blueprints", - Column: "account_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "blueprints", - Column: "created_at", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "clients", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "titles", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "titles", - Column: "account_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "client_account_titles", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "client_account_titles", - Column: "account_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "client_account_titles", - Column: "title_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "subsetting", - Table: "client_account_titles", - Column: "client_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/schema-create.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/schema-create.sql deleted file mode 100644 index 506cb1223d..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/schema-create.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS subsetting; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/teardown.sql deleted file mode 100644 index 0ae11d127c..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/teardown.sql +++ /dev/null @@ -1 +0,0 @@ -DROP SCHEMA IF EXISTS subsetting CASCADE; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/tests.go deleted file mode 100644 index 12efebae33..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting/tests.go +++ /dev/null @@ -1,57 +0,0 @@ -package postgres_subsetting - -import workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Complex subsetting", - Folder: "testdata/postgres/subsetting", - SourceFilePaths: []string{"setup.sql"}, - TargetFilePaths: []string{"schema-create.sql"}, - JobMappings: GetDefaultSyncJobMappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - SubsetByForeignKeyConstraints: true, - InitSchema: true, - }, - SubsetMap: map[string]string{ - "subsetting.users": "user_id in (1,2,5,6,7,8)", - "subsetting.test_2_x": "created > '2023-06-03'", - "subsetting.test_2_b": "created > '2023-06-03'", - "subsetting.addresses": "id in (1,5)", - "subsetting.division": "id in (3,5)", - "subsetting.bosses": "id in (3,5)", - "subsetting.accounts": "id = 1", - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "subsetting.attachments": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.comments": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "subsetting.initiatives": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "subsetting.skills": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "subsetting.tasks": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.user_skills": &workflow_testdata.ExpectedOutput{RowCount: 6}, - "subsetting.users": &workflow_testdata.ExpectedOutput{RowCount: 6}, - "subsetting.test_2_x": &workflow_testdata.ExpectedOutput{RowCount: 3}, - "subsetting.test_2_b": &workflow_testdata.ExpectedOutput{RowCount: 3}, - "subsetting.test_2_a": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "subsetting.test_2_c": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.test_2_d": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.test_2_e": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.orders": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.addresses": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.customers": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.payments": &workflow_testdata.ExpectedOutput{RowCount: 1}, - "subsetting.division": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.employees": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.projects": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.bosses": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.minions": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.accounts": &workflow_testdata.ExpectedOutput{RowCount: 1}, - "subsetting.blueprints": &workflow_testdata.ExpectedOutput{RowCount: 1}, - "subsetting.clients": &workflow_testdata.ExpectedOutput{RowCount: 9}, - "subsetting.titles": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "subsetting.client_account_titles": &workflow_testdata.ExpectedOutput{RowCount: 3}, - }, - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/job_mappings.go deleted file mode 100644 index 8e2904e9f3..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/job_mappings.go +++ /dev/null @@ -1,279 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: source-setup.sql - -package postgres_virtualforeignkeys - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "vfk_hr", - Table: "regions", - Column: "region_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "regions", - Column: "region_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "countries", - Column: "country_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "countries", - Column: "country_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "countries", - Column: "region_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "locations", - Column: "location_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "locations", - Column: "street_address", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "locations", - Column: "postal_code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "locations", - Column: "city", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "locations", - Column: "state_province", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "locations", - Column: "country_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "departments", - Column: "department_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "departments", - Column: "department_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "departments", - Column: "location_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "jobs", - Column: "job_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "jobs", - Column: "job_title", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "jobs", - Column: "min_salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "jobs", - Column: "max_salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Column: "employee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Column: "phone_number", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Column: "hire_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Column: "job_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Column: "salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Column: "manager_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Column: "department_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "dependents", - Column: "dependent_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "dependents", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "dependents", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "dependents", - Column: "relationship", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "vfk_hr", - Table: "dependents", - Column: "employee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/target-setup.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/target-setup.sql deleted file mode 100644 index efbd80e1c1..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/target-setup.sql +++ /dev/null @@ -1,63 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS vfk_hr; -SET search_path TO vfk_hr; - -CREATE TABLE IF NOT EXISTS regions ( - region_id SERIAL PRIMARY KEY, - region_name CHARACTER VARYING (25) -); - -CREATE TABLE IF NOT EXISTS countries ( - country_id CHARACTER (2) PRIMARY KEY, - country_name CHARACTER VARYING (40), - region_id INTEGER NOT NULL, - FOREIGN KEY (region_id) REFERENCES regions (region_id) ON UPDATE CASCADE ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS locations ( - location_id SERIAL PRIMARY KEY, - street_address CHARACTER VARYING (40), - postal_code CHARACTER VARYING (12), - city CHARACTER VARYING (30) NOT NULL, - state_province CHARACTER VARYING (25), - country_id CHARACTER (2) NOT NULL, - FOREIGN KEY (country_id) REFERENCES countries (country_id) ON UPDATE CASCADE ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS departments ( - department_id SERIAL PRIMARY KEY, - department_name CHARACTER VARYING (30) NOT NULL, - location_id INTEGER, - FOREIGN KEY (location_id) REFERENCES locations (location_id) ON UPDATE CASCADE ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS jobs ( - job_id SERIAL PRIMARY KEY, - job_title CHARACTER VARYING (35) NOT NULL, - min_salary NUMERIC (8, 2), - max_salary NUMERIC (8, 2) -); - -CREATE TABLE IF NOT EXISTS employees ( - employee_id SERIAL PRIMARY KEY, - first_name CHARACTER VARYING (20), - last_name CHARACTER VARYING (25) NOT NULL, - email CHARACTER VARYING (100) NOT NULL, - phone_number CHARACTER VARYING (20), - hire_date DATE NOT NULL, - job_id INTEGER NOT NULL, - salary NUMERIC (8, 2) NOT NULL, - manager_id INTEGER, - department_id INTEGER, - FOREIGN KEY (job_id) REFERENCES jobs (job_id) ON UPDATE CASCADE ON DELETE CASCADE, - FOREIGN KEY (department_id) REFERENCES departments (department_id) ON UPDATE CASCADE ON DELETE CASCADE, - FOREIGN KEY (manager_id) REFERENCES employees (employee_id) ON UPDATE CASCADE ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS dependents ( - dependent_id SERIAL PRIMARY KEY, - first_name CHARACTER VARYING (50) NOT NULL, - last_name CHARACTER VARYING (50) NOT NULL, - relationship CHARACTER VARYING (25) NOT NULL, - employee_id INTEGER NOT NULL, - FOREIGN KEY (employee_id) REFERENCES employees (employee_id) ON DELETE CASCADE ON UPDATE CASCADE -); diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/teardown.sql deleted file mode 100644 index 3f24b1c66a..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/teardown.sql +++ /dev/null @@ -1 +0,0 @@ -DROP SCHEMA IF EXISTS vfk_hr CASCADE; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/tests.go deleted file mode 100644 index 76580d2abd..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys/tests.go +++ /dev/null @@ -1,131 +0,0 @@ -package postgres_virtualforeignkeys - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" -) - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Virtual Foreign Keys sync", - Folder: "testdata/postgres/virtual-foreign-keys", - SourceFilePaths: []string{"source-setup.sql"}, - TargetFilePaths: []string{"target-setup.sql"}, - JobOptions: &workflow_testdata.TestJobOptions{ - Truncate: false, - TruncateCascade: false, - }, - JobMappings: GetDefaultSyncJobMappings(), - VirtualForeignKeys: GetVirtualForeignKeys(), - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "vfk_hr.regions": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "vfk_hr.countries": &workflow_testdata.ExpectedOutput{RowCount: 25}, - "vfk_hr.locations": &workflow_testdata.ExpectedOutput{RowCount: 7}, - "vfk_hr.departments": &workflow_testdata.ExpectedOutput{RowCount: 11}, - "vfk_hr.dependents": &workflow_testdata.ExpectedOutput{RowCount: 30}, - "vfk_hr.employees": &workflow_testdata.ExpectedOutput{RowCount: 40}, - "vfk_hr.jobs": &workflow_testdata.ExpectedOutput{RowCount: 19}, - }, - }, - { - Name: "Virtual Foreign Keys subset", - Folder: "testdata/postgres/virtual-foreign-keys", - SourceFilePaths: []string{"source-setup.sql"}, - TargetFilePaths: []string{"target-setup.sql"}, - SubsetMap: map[string]string{ - "vfk_hr.employees": "first_name = 'Alexander'", - }, - JobOptions: &workflow_testdata.TestJobOptions{ - SubsetByForeignKeyConstraints: true, - }, - JobMappings: GetDefaultSyncJobMappings(), - VirtualForeignKeys: GetVirtualForeignKeys(), - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "vfk_hr.regions": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "vfk_hr.countries": &workflow_testdata.ExpectedOutput{RowCount: 25}, - "vfk_hr.locations": &workflow_testdata.ExpectedOutput{RowCount: 7}, - "vfk_hr.departments": &workflow_testdata.ExpectedOutput{RowCount: 11}, - "vfk_hr.dependents": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "vfk_hr.employees": &workflow_testdata.ExpectedOutput{RowCount: 2}, - "vfk_hr.jobs": &workflow_testdata.ExpectedOutput{RowCount: 19}, - }, - }, - } -} - -func GetVirtualForeignKeys() []*mgmtv1alpha1.VirtualForeignConstraint { - return []*mgmtv1alpha1.VirtualForeignConstraint{ - { - Schema: "vfk_hr", - Table: "countries", - Columns: []string{"region_id"}, - ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ - Schema: "vfk_hr", - Table: "regions", - Columns: []string{"region_id"}, - }, - }, - { - Schema: "vfk_hr", - Table: "departments", - Columns: []string{"location_id"}, - ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ - Schema: "vfk_hr", - Table: "locations", - Columns: []string{"location_id"}, - }, - }, - { - Schema: "vfk_hr", - Table: "dependents", - Columns: []string{"employee_id"}, - ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ - Schema: "vfk_hr", - Table: "employees", - Columns: []string{"employee_id"}, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Columns: []string{"manager_id"}, - ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ - Schema: "vfk_hr", - Table: "employees", - Columns: []string{"employee_id"}, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Columns: []string{"department_id"}, - ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ - Schema: "vfk_hr", - Table: "departments", - Columns: []string{"department_id"}, - }, - }, - { - Schema: "vfk_hr", - Table: "employees", - Columns: []string{"job_id"}, - ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ - Schema: "vfk_hr", - Table: "jobs", - Columns: []string{"job_id"}, - }, - }, - { - Schema: "vfk_hr", - Table: "locations", - Columns: []string{"country_id"}, - ForeignKey: &mgmtv1alpha1.VirtualForeignKey{ - Schema: "vfk_hr", - Table: "countries", - Columns: []string{"country_id"}, - }, - }, - } - -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/create.sql b/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/create.sql deleted file mode 100644 index ec44e4e10c..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/create.sql +++ /dev/null @@ -1,30 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS "primary_$key"; -SET search_path TO "primary_$key"; - -CREATE TABLE IF NOT EXISTS "primary_$key".store_notifications ( - id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid() -); - -CREATE TABLE IF NOT EXISTS "primary_$key".stores ( - id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid (), -notifications_id uuid UNIQUE NOT NULL -); - -CREATE TABLE IF NOT EXISTS "primary_$key".store_customers ( - id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid (), -store_id uuid NOT NULL, -referred_by_code uuid NULL -); - -CREATE TABLE IF NOT EXISTS "primary_$key".referral_codes ( - id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid (), -customer_id uuid NOT NULL -); - -ALTER TABLE "primary_$key".store_customers ADD FOREIGN KEY (store_id) REFERENCES "primary_$key".stores (id); -ALTER TABLE "primary_$key".store_customers ADD FOREIGN KEY (referred_by_code) REFERENCES "primary_$key".referral_codes (id); -ALTER TABLE "primary_$key".stores ADD FOREIGN KEY (notifications_id) REFERENCES "primary_$key".store_notifications (id); -ALTER TABLE "primary_$key".referral_codes ADD FOREIGN KEY (customer_id) REFERENCES "primary_$key".store_customers (id); - - - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/job_mappings.go deleted file mode 100644 index 03709430f5..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/job_mappings.go +++ /dev/null @@ -1,79 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create.sql - -package testdata_primarykeytransformer - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "primary_$key", - Table: "store_notifications", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "primary_$key", - Table: "stores", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "primary_$key", - Table: "stores", - Column: "notifications_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "primary_$key", - Table: "store_customers", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "primary_$key", - Table: "store_customers", - Column: "store_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "primary_$key", - Table: "store_customers", - Column: "referred_by_code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "primary_$key", - Table: "referral_codes", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "primary_$key", - Table: "referral_codes", - Column: "customer_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/teardown.sql deleted file mode 100644 index af2ecafedc..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/teardown.sql +++ /dev/null @@ -1 +0,0 @@ -DROP SCHEMA IF EXISTS "primary_$key" CASCADE; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/tests.go deleted file mode 100644 index 628dc0e17a..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer/tests.go +++ /dev/null @@ -1,55 +0,0 @@ -package testdata_primarykeytransformer - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - "github.com/nucleuscloud/neosync/internal/gotypeutil" - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" -) - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Circular Dependency primary key transformation", - Folder: "testdata/primary-key-transformer", - SourceFilePaths: []string{"create.sql", "insert.sql"}, - TargetFilePaths: []string{"create.sql"}, - JobMappings: getPkTransformerJobmappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - InitSchema: false, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "primary_$key.store_notifications": &workflow_testdata.ExpectedOutput{RowCount: 20}, - "primary_$key.stores": &workflow_testdata.ExpectedOutput{RowCount: 20}, - "primary_$key.store_customers": &workflow_testdata.ExpectedOutput{RowCount: 20}, - "primary_$key.referral_codes": &workflow_testdata.ExpectedOutput{RowCount: 20}, - }, - }, - } -} - -func getPkTransformerJobmappings() []*mgmtv1alpha1.JobMapping { - jobmappings := GetDefaultSyncJobMappings() - updatedJobmappings := []*mgmtv1alpha1.JobMapping{} - for _, jm := range jobmappings { - if jm.Column != "id" { - updatedJobmappings = append(updatedJobmappings, jm) - } else { - updatedJobmappings = append(updatedJobmappings, &mgmtv1alpha1.JobMapping{ - Schema: jm.Schema, - Table: jm.Table, - Column: jm.Column, - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_GENERATE_UUID, - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_GenerateUuidConfig{ - GenerateUuidConfig: &mgmtv1alpha1.GenerateUuid{ - IncludeHyphens: gotypeutil.ToPtr(true), - }, - }, - }, - }, - }) - } - } - return updatedJobmappings -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/create.sql b/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/create.sql deleted file mode 100644 index 27c723c6b1..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/create.sql +++ /dev/null @@ -1,64 +0,0 @@ -CREATE SCHEMA IF NOT EXISTS fk_violations; -SET search_path TO fk_violations; - -CREATE TABLE IF NOT EXISTS regions ( - region_id SERIAL PRIMARY KEY, - region_name CHARACTER VARYING (25) -); - -CREATE TABLE IF NOT EXISTS countries ( - country_id CHARACTER (2) PRIMARY KEY, - country_name CHARACTER VARYING (40), - region_id INTEGER NOT NULL, - FOREIGN KEY (region_id) REFERENCES regions (region_id) ON UPDATE CASCADE ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS locations ( - location_id SERIAL PRIMARY KEY, - street_address CHARACTER VARYING (40), - postal_code CHARACTER VARYING (12), - city CHARACTER VARYING (30) NOT NULL, - state_province CHARACTER VARYING (25), - country_id CHARACTER (2) NOT NULL, - FOREIGN KEY (country_id) REFERENCES countries (country_id) ON UPDATE CASCADE ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS departments ( - department_id SERIAL PRIMARY KEY, - department_name CHARACTER VARYING (30) NOT NULL, - location_id INTEGER, - FOREIGN KEY (location_id) REFERENCES locations (location_id) ON UPDATE CASCADE ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS jobs ( - job_id SERIAL PRIMARY KEY, - job_title CHARACTER VARYING (35) NOT NULL, - min_salary NUMERIC (8, 2), - max_salary NUMERIC (8, 2) -); - -CREATE TABLE IF NOT EXISTS employees ( - employee_id SERIAL PRIMARY KEY, - first_name CHARACTER VARYING (20), - last_name CHARACTER VARYING (25) NOT NULL, - email CHARACTER VARYING (100) NOT NULL, - phone_number CHARACTER VARYING (20), - hire_date DATE NOT NULL, - job_id INTEGER NOT NULL, - salary NUMERIC (8, 2) NOT NULL, - manager_id INTEGER, - department_id INTEGER, - FOREIGN KEY (job_id) REFERENCES jobs (job_id) ON UPDATE CASCADE ON DELETE CASCADE, - FOREIGN KEY (department_id) REFERENCES departments (department_id) ON UPDATE CASCADE ON DELETE CASCADE, - FOREIGN KEY (manager_id) REFERENCES employees (employee_id) ON UPDATE CASCADE ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS dependents ( - dependent_id SERIAL PRIMARY KEY, - first_name CHARACTER VARYING (50) NOT NULL, - last_name CHARACTER VARYING (50) NOT NULL, - relationship CHARACTER VARYING (25) NOT NULL, - employee_id INTEGER NOT NULL, - FOREIGN KEY (employee_id) REFERENCES employees (employee_id) ON DELETE CASCADE ON UPDATE CASCADE -); - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/insert.sql b/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/insert.sql deleted file mode 100644 index 416b778aa1..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/insert.sql +++ /dev/null @@ -1,180 +0,0 @@ -set search_path to fk_violations; - -/*Data for the table regions */ - -INSERT INTO regions(region_id,region_name) VALUES (1,'Europe'); -INSERT INTO regions(region_id,region_name) VALUES (2,'Americas'); -INSERT INTO regions(region_id,region_name) VALUES (3,'Asia'); -INSERT INTO regions(region_id,region_name) VALUES (4,'Middle East and Africa'); - - -/*Data for the table countries */ -INSERT INTO countries(country_id,country_name,region_id) VALUES ('AR','Argentina',2); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('AU','Australia',3); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('BE','Belgium',1); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('BR','Brazil',2); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('CA','Canada',2); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('CH','Switzerland',1); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('CN','China',3); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('DE','Germany',1); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('DK','Denmark',1); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('EG','Egypt',4); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('FR','France',1); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('HK','HongKong',3); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('IL','Israel',4); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('IN','India',3); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('IT','Italy',1); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('JP','Japan',3); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('KW','Kuwait',4); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('MX','Mexico',2); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('NG','Nigeria',4); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('NL','Netherlands',1); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('SG','Singapore',3); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('UK','United Kingdom',1); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('US','United States of America',2); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('ZM','Zambia',4); -INSERT INTO countries(country_id,country_name,region_id) VALUES ('ZW','Zimbabwe',4); - -/*Data for the table locations */ -INSERT INTO locations(location_id,street_address,postal_code,city,state_province,country_id) VALUES (1400,'2014 Jabberwocky Rd','26192','Southlake','Texas','US'); -INSERT INTO locations(location_id,street_address,postal_code,city,state_province,country_id) VALUES (1500,'2011 Interiors Blvd','99236','South San Francisco','California','US'); -INSERT INTO locations(location_id,street_address,postal_code,city,state_province,country_id) VALUES (1700,'2004 Charade Rd','98199','Seattle','Washington','US'); -INSERT INTO locations(location_id,street_address,postal_code,city,state_province,country_id) VALUES (1800,'147 Spadina Ave','M5V 2L7','Toronto','Ontario','CA'); -INSERT INTO locations(location_id,street_address,postal_code,city,state_province,country_id) VALUES (2400,'8204 Arthur St',NULL,'London',NULL,'UK'); -INSERT INTO locations(location_id,street_address,postal_code,city,state_province,country_id) VALUES (2500,'Magdalen Centre, The Oxford Science Park','OX9 9ZB','Oxford','Oxford','UK'); -INSERT INTO locations(location_id,street_address,postal_code,city,state_province,country_id) VALUES (2700,'Schwanthalerstr. 7031','80925','Munich','Bavaria','DE'); - - -/*Data for the table jobs */ - -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (1,'Public Accountant',4200.00,9000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (2,'Accounting Manager',8200.00,16000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (3,'Administration Assistant',3000.00,6000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (4,'President',20000.00,40000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (5,'Administration Vice President',15000.00,30000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (6,'Accountant',4200.00,9000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (7,'Finance Manager',8200.00,16000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (8,'Human Resources Representative',4000.00,9000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (9,'Programmer',4000.00,10000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (10,'Marketing Manager',9000.00,15000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (11,'Marketing Representative',4000.00,9000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (12,'Public Relations Representative',4500.00,10500.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (13,'Purchasing Clerk',2500.00,5500.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (14,'Purchasing Manager',8000.00,15000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (15,'Sales Manager',10000.00,20000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (16,'Sales Representative',6000.00,12000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (17,'Shipping Clerk',2500.00,5500.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (18,'Stock Clerk',2000.00,5000.00); -INSERT INTO jobs(job_id,job_title,min_salary,max_salary) VALUES (19,'Stock Manager',5500.00,8500.00); - - -/*Data for the table departments */ - -INSERT INTO departments(department_id,department_name,location_id) VALUES (1,'Administration',1700); -INSERT INTO departments(department_id,department_name,location_id) VALUES (2,'Marketing',1800); -INSERT INTO departments(department_id,department_name,location_id) VALUES (3,'Purchasing',1700); -INSERT INTO departments(department_id,department_name,location_id) VALUES (4,'Human Resources',2400); -INSERT INTO departments(department_id,department_name,location_id) VALUES (5,'Shipping',1500); -INSERT INTO departments(department_id,department_name,location_id) VALUES (6,'IT',1400); -INSERT INTO departments(department_id,department_name,location_id) VALUES (7,'Public Relations',2700); -INSERT INTO departments(department_id,department_name,location_id) VALUES (8,'Sales',2500); -INSERT INTO departments(department_id,department_name,location_id) VALUES (9,'Executive',1700); -INSERT INTO departments(department_id,department_name,location_id) VALUES (10,'Finance',1700); -INSERT INTO departments(department_id,department_name,location_id) VALUES (11,'Accounting',1700); - - - -/*Data for the table employees */ - -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (100,'Steven','King','steven.king@sqltutorial.org','515.123.4567','1987-06-17',4,24000.00,NULL,9); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (101,'Neena','Kochhar','neena.kochhar@sqltutorial.org','515.123.4568','1989-09-21',5,17000.00,100,9); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (102,'Lex','De Haan','lex.de haan@sqltutorial.org','515.123.4569','1993-01-13',5,17000.00,100,9); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (103,'Alexander','Hunold','alexander.hunold@sqltutorial.org','590.423.4567','1990-01-03',9,9000.00,102,6); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (104,'Bruce','Ernst','bruce.ernst@sqltutorial.org','590.423.4568','1991-05-21',9,6000.00,103,6); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (105,'David','Austin','david.austin@sqltutorial.org','590.423.4569','1997-06-25',9,4800.00,103,6); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (106,'Valli','Pataballa','valli.pataballa@sqltutorial.org','590.423.4560','1998-02-05',9,4800.00,103,6); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (107,'Diana','Lorentz','diana.lorentz@sqltutorial.org','590.423.5567','1999-02-07',9,4200.00,103,6); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (108,'Nancy','Greenberg','nancy.greenberg@sqltutorial.org','515.124.4569','1994-08-17',7,12000.00,101,10); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (109,'Daniel','Faviet','daniel.faviet@sqltutorial.org','515.124.4169','1994-08-16',6,9000.00,108,10); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (110,'John','Chen','john.chen@sqltutorial.org','515.124.4269','1997-09-28',6,8200.00,108,10); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (111,'Ismael','Sciarra','ismael.sciarra@sqltutorial.org','515.124.4369','1997-09-30',6,7700.00,108,10); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (112,'Jose Manuel','Urman','jose manuel.urman@sqltutorial.org','515.124.4469','1998-03-07',6,7800.00,108,10); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (113,'Luis','Popp','luis.popp@sqltutorial.org','515.124.4567','1999-12-07',6,6900.00,108,10); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (114,'Den','Raphaely','den.raphaely@sqltutorial.org','515.127.4561','1994-12-07',14,11000.00,100,3); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (115,'Alexander','Khoo','alexander.khoo@sqltutorial.org','515.127.4562','1995-05-18',13,3100.00,114,3); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (116,'Shelli','Baida','shelli.baida@sqltutorial.org','515.127.4563','1997-12-24',13,2900.00,114,3); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (117,'Sigal','Tobias','sigal.tobias@sqltutorial.org','515.127.4564','1997-07-24',13,2800.00,114,3); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (118,'Guy','Himuro','guy.himuro@sqltutorial.org','515.127.4565','1998-11-15',13,2600.00,114,3); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (119,'Karen','Colmenares','karen.colmenares@sqltutorial.org','515.127.4566','1999-08-10',13,2500.00,114,3); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (120,'Matthew','Weiss','matthew.weiss@sqltutorial.org','650.123.1234','1996-07-18',19,8000.00,100,5); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (121,'Adam','Fripp','adam.fripp@sqltutorial.org','650.123.2234','1997-04-10',19,8200.00,100,5); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (122,'Payam','Kaufling','payam.kaufling@sqltutorial.org','650.123.3234','1995-05-01',19,7900.00,100,5); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (123,'Shanta','Vollman','shanta.vollman@sqltutorial.org','650.123.4234','1997-10-10',19,6500.00,100,5); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (126,'Irene','Mikkilineni','irene.mikkilineni@sqltutorial.org','650.124.1224','1998-09-28',18,2700.00,120,5); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (145,'John','Russell','john.russell@sqltutorial.org',NULL,'1996-10-01',15,14000.00,100,8); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (146,'Karen','Partners','karen.partners@sqltutorial.org',NULL,'1997-01-05',15,13500.00,100,8); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (176,'Jonathon','Taylor','jonathon.taylor@sqltutorial.org',NULL,'1998-03-24',16,8600.00,100,8); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (177,'Jack','Livingston','jack.livingston@sqltutorial.org',NULL,'1998-04-23',16,8400.00,100,8); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (178,'Kimberely','Grant','kimberely.grant@sqltutorial.org',NULL,'1999-05-24',16,7000.00,100,8); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (179,'Charles','Johnson','charles.johnson@sqltutorial.org',NULL,'2000-01-04',16,6200.00,100,8); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (192,'Sarah','Bell','sarah.bell@sqltutorial.org','650.501.1876','1996-02-04',17,4000.00,123,5); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (193,'Britney','Everett','britney.everett@sqltutorial.org','650.501.2876','1997-03-03',17,3900.00,123,5); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (200,'Jennifer','Whalen','jennifer.whalen@sqltutorial.org','515.123.4444','1987-09-17',3,4400.00,101,1); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (201,'Michael','Hartstein','michael.hartstein@sqltutorial.org','515.123.5555','1996-02-17',10,13000.00,100,2); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (202,'Pat','Fay','pat.fay@sqltutorial.org','603.123.6666','1997-08-17',11,6000.00,201,2); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (203,'Susan','Mavris','susan.mavris@sqltutorial.org','515.123.7777','1994-06-07',8,6500.00,101,4); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (204,'Hermann','Baer','hermann.baer@sqltutorial.org','515.123.8888','1994-06-07',12,10000.00,101,7); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (205,'Shelley','Higgins','shelley.higgins@sqltutorial.org','515.123.8080','1994-06-07',2,12000.00,101,11); -INSERT INTO employees(employee_id,first_name,last_name,email,phone_number,hire_date,job_id,salary,manager_id,department_id) VALUES (206,'William','Gietz','william.gietz@sqltutorial.org','515.123.8181','1994-06-07',1,8300.00,205,11); - - -/*Data for the table dependents */ - -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (1,'Penelope','Gietz','Child',206); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (2,'Nick','Higgins','Child',205); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (3,'Ed','Whalen','Child',200); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (4,'Jennifer','King','Child',100); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (5,'Johnny','Kochhar','Child',101); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (6,'Bette','De Haan','Child',102); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (7,'Grace','Faviet','Child',109); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (8,'Matthew','Chen','Child',110); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (9,'Joe','Sciarra','Child',111); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (10,'Christian','Urman','Child',112); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (11,'Zero','Popp','Child',113); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (12,'Karl','Greenberg','Child',108); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (13,'Uma','Mavris','Child',203); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (14,'Vivien','Hunold','Child',103); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (15,'Cuba','Ernst','Child',104); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (16,'Fred','Austin','Child',105); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (17,'Helen','Pataballa','Child',106); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (18,'Dan','Lorentz','Child',107); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (19,'Bob','Hartstein','Child',201); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (20,'Lucille','Fay','Child',202); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (21,'Kirsten','Baer','Child',204); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (22,'Elvis','Khoo','Child',115); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (23,'Sandra','Baida','Child',116); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (24,'Cameron','Tobias','Child',117); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (25,'Kevin','Himuro','Child',118); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (26,'Rip','Colmenares','Child',119); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (27,'Julia','Raphaely','Child',114); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (28,'Woody','Russell','Child',145); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (29,'Alec','Partners','Child',146); -INSERT INTO dependents(dependent_id,first_name,last_name,relationship,employee_id) VALUES (30,'Sandra','Taylor','Child',176); - --- break foreign key constraints -ALTER TABLE fk_violations.countries -DISABLE TRIGGER ALL; - -UPDATE fk_violations.countries SET region_id = 6 WHERE country_id IN ('US'); - -ALTER TABLE fk_violations.countries -ENABLE TRIGGER ALL; - - -ALTER TABLE fk_violations.dependents -DISABLE TRIGGER ALL; - -UPDATE fk_violations.dependents SET employee_id = 1000 WHERE last_name IN ('King', 'Colmenares'); - -ALTER TABLE fk_violations.dependents -ENABLE TRIGGER ALL; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/job_mappings.go b/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/job_mappings.go deleted file mode 100644 index 46f03eb224..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/job_mappings.go +++ /dev/null @@ -1,279 +0,0 @@ - -// Code generated by Neosync jobmapping_generator. DO NOT EDIT. -// source: create.sql - -package testdata_skipfkviolations - -import ( - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" -) - -func GetDefaultSyncJobMappings()[]*mgmtv1alpha1.JobMapping { - return []*mgmtv1alpha1.JobMapping{ - { - Schema: "fk_violations", - Table: "regions", - Column: "region_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "regions", - Column: "region_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "countries", - Column: "country_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "countries", - Column: "country_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "countries", - Column: "region_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "locations", - Column: "location_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "locations", - Column: "street_address", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "locations", - Column: "postal_code", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "locations", - Column: "city", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "locations", - Column: "state_province", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "locations", - Column: "country_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "departments", - Column: "department_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "departments", - Column: "department_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "departments", - Column: "location_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "jobs", - Column: "job_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "jobs", - Column: "job_title", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "jobs", - Column: "min_salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "jobs", - Column: "max_salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "employees", - Column: "employee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "employees", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "employees", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "employees", - Column: "email", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "employees", - Column: "phone_number", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "employees", - Column: "hire_date", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "employees", - Column: "job_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "employees", - Column: "salary", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "employees", - Column: "manager_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "employees", - Column: "department_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "dependents", - Column: "dependent_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "dependents", - Column: "first_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "dependents", - Column: "last_name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "dependents", - Column: "relationship", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - { - Schema: "fk_violations", - Table: "dependents", - Column: "employee_id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_PASSTHROUGH, - }, - }, - } -} - diff --git a/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/teardown.sql b/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/teardown.sql deleted file mode 100644 index 1ac0278396..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/teardown.sql +++ /dev/null @@ -1 +0,0 @@ -DROP SCHEMA IF EXISTS fk_violations CASCADE; diff --git a/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/tests.go b/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/tests.go deleted file mode 100644 index c2259efe38..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations/tests.go +++ /dev/null @@ -1,41 +0,0 @@ -package testdata_skipfkviolations - -import ( - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" -) - -func GetSyncTests() []*workflow_testdata.IntegrationTest { - return []*workflow_testdata.IntegrationTest{ - { - Name: "Skip Foreign Key Violations", - Folder: "testdata/skip-fk-violations", - SourceFilePaths: []string{"create.sql", "insert.sql"}, - TargetFilePaths: []string{"create.sql"}, - JobMappings: GetDefaultSyncJobMappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - SkipForeignKeyViolations: true, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "fk_violations.jobs": &workflow_testdata.ExpectedOutput{RowCount: 19}, - "fk_violations.regions": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "fk_violations.countries": &workflow_testdata.ExpectedOutput{RowCount: 24}, - "fk_violations.dependents": &workflow_testdata.ExpectedOutput{RowCount: 7}, - "fk_violations.employees": &workflow_testdata.ExpectedOutput{RowCount: 10}, - "fk_violations.locations": &workflow_testdata.ExpectedOutput{RowCount: 4}, - "fk_violations.departments": &workflow_testdata.ExpectedOutput{RowCount: 4}, - }, - }, - { - Name: "Foreign Key Violations Error", - Folder: "testdata/skip-fk-violations", - SourceFilePaths: []string{"create.sql", "insert.sql"}, - TargetFilePaths: []string{"create.sql"}, - JobMappings: GetDefaultSyncJobMappings(), - JobOptions: &workflow_testdata.TestJobOptions{ - SubsetByForeignKeyConstraints: false, - }, - ExpectError: true, - Expected: map[string]*workflow_testdata.ExpectedOutput{}, - }, - } -} diff --git a/worker/pkg/workflows/datasync/workflow/testdata/types.go b/worker/pkg/workflows/datasync/workflow/testdata/types.go deleted file mode 100644 index 1e6f78ce33..0000000000 --- a/worker/pkg/workflows/datasync/workflow/testdata/types.go +++ /dev/null @@ -1,36 +0,0 @@ -package workflow_testdata - -import mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - -type ExpectedOutput struct { - RowCount int -} - -type DefaultTransformers struct { - Boolean *mgmtv1alpha1.JobMappingTransformer - String *mgmtv1alpha1.JobMappingTransformer - Number *mgmtv1alpha1.JobMappingTransformer - Byte *mgmtv1alpha1.JobMappingTransformer -} - -type TestJobOptions struct { - SubsetByForeignKeyConstraints bool - InitSchema bool - Truncate bool - TruncateCascade bool - DefaultTransformers *DefaultTransformers - SkipForeignKeyViolations bool -} -type IntegrationTest struct { - Name string - SourceFilePaths []string - TargetFilePaths []string - Folder string - SubsetMap map[string]string // schema.table -> where clause - TransformerMap map[string]map[string]*mgmtv1alpha1.JobMappingTransformer // schema.table.column -> transformer config - JobMappings []*mgmtv1alpha1.JobMapping - JobOptions *TestJobOptions - VirtualForeignKeys []*mgmtv1alpha1.VirtualForeignConstraint - ExpectError bool - Expected map[string]*ExpectedOutput // schema.table -> expected output -} diff --git a/worker/pkg/workflows/datasync/workflow/workflow_integration_test.go b/worker/pkg/workflows/datasync/workflow/workflow_integration_test.go deleted file mode 100644 index cbdd2a14ef..0000000000 --- a/worker/pkg/workflows/datasync/workflow/workflow_integration_test.go +++ /dev/null @@ -1,1710 +0,0 @@ -package datasync_workflow - -import ( - "context" - "errors" - "fmt" - "net/http" - "net/http/httptest" - "sync" - "testing" - "time" - - "github.com/aws/aws-sdk-go-v2/service/dynamodb" - dyntypes "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" - "github.com/google/uuid" - mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" - "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" - "github.com/nucleuscloud/neosync/backend/pkg/sqlconnect" - sql_manager "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager" - sqlmanager_shared "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager/shared" - connectionmanager "github.com/nucleuscloud/neosync/internal/connection-manager" - "github.com/nucleuscloud/neosync/internal/connection-manager/providers/mongoprovider" - "github.com/nucleuscloud/neosync/internal/connection-manager/providers/sqlprovider" - "github.com/nucleuscloud/neosync/internal/gotypeutil" - "github.com/nucleuscloud/neosync/internal/testutil" - neosync_redis "github.com/nucleuscloud/neosync/worker/internal/redis" - accountstatus_activity "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/activities/account-status" - genbenthosconfigs_activity "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/activities/gen-benthos-configs" - jobhooks_by_timing_activity "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/activities/jobhooks-by-timing" - posttablesync_activity "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/activities/post-table-sync" - runsqlinittablestmts_activity "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts" - "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/activities/shared" - sync_activity "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/activities/sync" - syncactivityopts_activity "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/activities/sync-activity-opts" - syncrediscleanup_activity "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/activities/sync-redis-clean-up" - workflow_testdata "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata" - testdata_javascripttransformers "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/javascript-transformers" - mssql_datatypes "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/mssql/data-types" - mssql_simple "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/mssql/simple" - - mysql_alltypes "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/mysql/all-types" - mysql_compositekeys "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/mysql/composite-keys" - mysql_initschema "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/mysql/init-schema" - mysql_multipledbs "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/mysql/multiple-dbs" - testdata_pgtypes "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/postgres/all-types" - testdata_circulardependencies "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/postgres/circular-dependencies" - testdata_doublereference "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/postgres/double-reference" - testdata_subsetting "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/postgres/subsetting" - testdata_virtualforeignkeys "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/postgres/virtual-foreign-keys" - testdata_primarykeytransformer "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/primary-key-transformer" - testdata_skipfkviolations "github.com/nucleuscloud/neosync/worker/pkg/workflows/datasync/workflow/testdata/skip-fk-violations" - "github.com/stretchr/testify/assert" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/bson/primitive" - "golang.org/x/sync/errgroup" - - "connectrpc.com/connect" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/metric" - "go.temporal.io/sdk/activity" - "go.temporal.io/sdk/client" - "go.temporal.io/sdk/converter" - "go.temporal.io/sdk/log" - "go.temporal.io/sdk/testsuite" -) - -func getAllPostgresSyncTests() map[string][]*workflow_testdata.IntegrationTest { - allTests := map[string][]*workflow_testdata.IntegrationTest{} - drTests := testdata_doublereference.GetSyncTests() - vfkTests := testdata_virtualforeignkeys.GetSyncTests() - cdTests := testdata_circulardependencies.GetSyncTests() - javascriptTests := testdata_javascripttransformers.GetSyncTests() - pkTransformationTests := testdata_primarykeytransformer.GetSyncTests() - subsettingTests := testdata_subsetting.GetSyncTests() - pgTypesTests := testdata_pgtypes.GetSyncTests() - skipFkViolationTests := testdata_skipfkviolations.GetSyncTests() - - allTests["Double_References"] = drTests - allTests["Virtual_Foreign_Keys"] = vfkTests - allTests["Circular_Dependencies"] = cdTests - allTests["Javascript_Transformers"] = javascriptTests - allTests["Primary_Key_Transformers"] = pkTransformationTests - allTests["Subsetting"] = subsettingTests - allTests["PG_Types"] = pgTypesTests - allTests["Skip_ForeignKey_Violations"] = skipFkViolationTests - return allTests -} - -func (s *IntegrationTestSuite) Test_Workflow_Sync_Postgres() { - tests := getAllPostgresSyncTests() - for groupName, group := range tests { - group := group - s.T().Run(groupName, func(t *testing.T) { - t.Parallel() - for _, tt := range group { - - t.Run(tt.Name, func(t *testing.T) { - t.Logf("running integration test: %s \n", tt.Name) - // setup - err := s.postgres.Source.RunSqlFiles(s.ctx, &tt.Folder, tt.SourceFilePaths) - require.NoError(t, err) - err = s.postgres.Target.RunSqlFiles(s.ctx, &tt.Folder, tt.TargetFilePaths) - require.NoError(t, err) - - schemas := []*mgmtv1alpha1.PostgresSourceSchemaOption{} - subsetMap := map[string]*mgmtv1alpha1.PostgresSourceSchemaOption{} - for table, where := range tt.SubsetMap { - schema, table := sqlmanager_shared.SplitTableKey(table) - if _, exists := subsetMap[schema]; !exists { - subsetMap[schema] = &mgmtv1alpha1.PostgresSourceSchemaOption{ - Schema: schema, - Tables: []*mgmtv1alpha1.PostgresSourceTableOption{}, - } - } - w := where - subsetMap[schema].Tables = append(subsetMap[schema].Tables, &mgmtv1alpha1.PostgresSourceTableOption{ - Table: table, - WhereClause: &w, - }) - } - - for _, s := range subsetMap { - schemas = append(schemas, s) - } - - var subsetByForeignKeyConstraints bool - destinationOptions := &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_PostgresOptions{ - PostgresOptions: &mgmtv1alpha1.PostgresDestinationConnectionOptions{}, - }, - } - if tt.JobOptions != nil { - if tt.JobOptions.SubsetByForeignKeyConstraints { - subsetByForeignKeyConstraints = true - } - destinationOptions = &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_PostgresOptions{ - PostgresOptions: &mgmtv1alpha1.PostgresDestinationConnectionOptions{ - InitTableSchema: tt.JobOptions.InitSchema, - TruncateTable: &mgmtv1alpha1.PostgresTruncateTableConfig{ - TruncateBeforeInsert: tt.JobOptions.Truncate, - }, - SkipForeignKeyViolations: tt.JobOptions.SkipForeignKeyViolations, - }, - }, - } - } - - jobId := uuid.New().String() - srcConnId := "c9b6ce58-5c8e-4dce-870d-96841b19d988" - destConnId := "226add85-5751-4232-b085-a0ae93afc7ce" - - mux := http.NewServeMux() - mux.Handle(mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.IsAccountStatusValidRequest]) (*connect.Response[mgmtv1alpha1.IsAccountStatusValidResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.IsAccountStatusValidResponse{IsValid: true}), nil - }, - )) - mux.Handle(mgmtv1alpha1connect.JobServiceGetJobProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceGetJobProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetJobRequest]) (*connect.Response[mgmtv1alpha1.GetJobResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.GetJobResponse{ - Job: &mgmtv1alpha1.Job{ - Id: jobId, - AccountId: "225aaf2c-776e-4847-8268-d914e3c15988", - Source: &mgmtv1alpha1.JobSource{ - Options: &mgmtv1alpha1.JobSourceOptions{ - Config: &mgmtv1alpha1.JobSourceOptions_Postgres{ - Postgres: &mgmtv1alpha1.PostgresSourceConnectionOptions{ - ConnectionId: srcConnId, - Schemas: schemas, - SubsetByForeignKeyConstraints: subsetByForeignKeyConstraints, - }, - }, - }, - }, - Destinations: []*mgmtv1alpha1.JobDestination{ - { - ConnectionId: destConnId, - Options: destinationOptions, - }, - }, - Mappings: tt.JobMappings, - VirtualForeignKeys: tt.VirtualForeignKeys, - }}), nil - }, - )) - - mux.Handle(mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetConnectionRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionResponse], error) { - if r.Msg.GetId() == srcConnId { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: srcConnId, - Name: "source", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ - PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ - Url: s.postgres.Source.URL, - }, - }, - }, - }, - }, - }), nil - } - if r.Msg.GetId() == destConnId { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: destConnId, - Name: "target", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ - PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ - Url: s.postgres.Target.URL, - }, - }, - }, - }, - }, - }), nil - } - return nil, connect.NewError(connect.CodeInternal, errors.New("invalid test connection id")) - }, - )) - mux.Handle(mgmtv1alpha1connect.JobServiceGetActiveJobHooksByTimingProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceGetActiveJobHooksByTimingProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetActiveJobHooksByTimingRequest]) (*connect.Response[mgmtv1alpha1.GetActiveJobHooksByTimingResponse], error) { - if r.Msg.GetJobId() != jobId { - return nil, connect.NewError(connect.CodeInternal, errors.New("invalid test job id")) - } - hooks := []*mgmtv1alpha1.JobHook{} - if r.Msg.Timing == mgmtv1alpha1.GetActiveJobHooksByTimingRequest_TIMING_PRESYNC { - hooks = append(hooks, &mgmtv1alpha1.JobHook{ - Id: uuid.NewString(), - Name: "test-presync-hook-1", - JobId: jobId, - Enabled: true, - Priority: 0, - Config: &mgmtv1alpha1.JobHookConfig{Config: &mgmtv1alpha1.JobHookConfig_Sql{Sql: &mgmtv1alpha1.JobHookConfig_JobSqlHook{ - Query: "select 1", - ConnectionId: srcConnId, - Timing: &mgmtv1alpha1.JobHookConfig_JobSqlHook_Timing{Timing: &mgmtv1alpha1.JobHookConfig_JobSqlHook_Timing_PreSync{}}, - }}}, - }) - } else if r.Msg.Timing == mgmtv1alpha1.GetActiveJobHooksByTimingRequest_TIMING_POSTSYNC { - hooks = append(hooks, &mgmtv1alpha1.JobHook{ - Id: uuid.NewString(), - Name: "test-postsync-hook-1", - JobId: jobId, - Enabled: true, - Priority: 0, - Config: &mgmtv1alpha1.JobHookConfig{Config: &mgmtv1alpha1.JobHookConfig_Sql{Sql: &mgmtv1alpha1.JobHookConfig_JobSqlHook{ - Query: "select 1", - ConnectionId: destConnId, - Timing: &mgmtv1alpha1.JobHookConfig_JobSqlHook_Timing{Timing: &mgmtv1alpha1.JobHookConfig_JobSqlHook_Timing_PreSync{}}, - }}}, - }) - } - return connect.NewResponse(&mgmtv1alpha1.GetActiveJobHooksByTimingResponse{Hooks: hooks}), nil - }, - )) - - addRunContextProcedureMux(mux) - srv := startHTTPServer(t, mux) - env := executeWorkflow(t, srv, &s.redis.url, jobId, tt.ExpectError) - require.Truef(t, env.IsWorkflowCompleted(), fmt.Sprintf("Workflow did not complete. Test: %s", tt.Name)) - err = env.GetWorkflowError() - if tt.ExpectError { - require.Error(t, err, "Did not receive Temporal Workflow Error %s", tt.Name) - return - } - require.NoError(t, err, "Received Temporal Workflow Error %s", tt.Name) - - for table, expected := range tt.Expected { - rows, err := s.postgres.Target.DB.Query(s.ctx, fmt.Sprintf("select * from %s;", table)) - require.NoError(t, err) - count := 0 - for rows.Next() { - count++ - } - require.Equalf(t, expected.RowCount, count, fmt.Sprintf("Test: %s Table: %s", tt.Name, table)) - } - - // tear down - err = s.postgres.Source.RunSqlFiles(s.ctx, &tt.Folder, []string{"teardown.sql"}) - require.NoError(t, err) - err = s.postgres.Target.RunSqlFiles(s.ctx, &tt.Folder, []string{"teardown.sql"}) - require.NoError(t, err) - }) - } - }) - } -} - -func getAllMssqlSyncTests() map[string][]*workflow_testdata.IntegrationTest { - allTests := map[string][]*workflow_testdata.IntegrationTest{} - simpleTests := mssql_simple.GetSyncTests() - allDatatypesTests := mssql_datatypes.GetSyncTests() - - allTests["Simple"] = simpleTests - allTests["DataTypes"] = allDatatypesTests - return allTests -} - -func (s *IntegrationTestSuite) Test_Workflow_Sync_Mssql() { - tests := getAllMssqlSyncTests() - for groupName, group := range tests { - group := group - s.T().Run(groupName, func(t *testing.T) { - t.Parallel() - for _, tt := range group { - t.Run(tt.Name, func(t *testing.T) { - t.Logf("running integration test: %s \n", tt.Name) - // setup - s.RunMysqlSqlFiles(s.mssql.source.pool, tt.Folder, tt.SourceFilePaths) - s.RunMysqlSqlFiles(s.mssql.target.pool, tt.Folder, tt.TargetFilePaths) - - schemas := []*mgmtv1alpha1.MssqlSourceSchemaOption{} - subsetMap := map[string]*mgmtv1alpha1.MssqlSourceSchemaOption{} - for table, where := range tt.SubsetMap { - schema, table := sqlmanager_shared.SplitTableKey(table) - if _, exists := subsetMap[schema]; !exists { - subsetMap[schema] = &mgmtv1alpha1.MssqlSourceSchemaOption{ - Schema: schema, - Tables: []*mgmtv1alpha1.MssqlSourceTableOption{}, - } - } - w := where - subsetMap[schema].Tables = append(subsetMap[schema].Tables, &mgmtv1alpha1.MssqlSourceTableOption{ - Table: table, - WhereClause: &w, - }) - } - - for _, s := range subsetMap { - schemas = append(schemas, s) - } - - var subsetByForeignKeyConstraints bool - destinationOptions := &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_MssqlOptions{ - MssqlOptions: &mgmtv1alpha1.MssqlDestinationConnectionOptions{}, - }, - } - if tt.JobOptions != nil { - if tt.JobOptions.SubsetByForeignKeyConstraints { - subsetByForeignKeyConstraints = true - } - destinationOptions = &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_MssqlOptions{ - MssqlOptions: &mgmtv1alpha1.MssqlDestinationConnectionOptions{ - InitTableSchema: tt.JobOptions.InitSchema, - TruncateTable: &mgmtv1alpha1.MssqlTruncateTableConfig{ - TruncateBeforeInsert: tt.JobOptions.Truncate, - }, - SkipForeignKeyViolations: tt.JobOptions.SkipForeignKeyViolations, - }, - }, - } - } - - mux := http.NewServeMux() - mux.Handle(mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.IsAccountStatusValidRequest]) (*connect.Response[mgmtv1alpha1.IsAccountStatusValidResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.IsAccountStatusValidResponse{IsValid: true}), nil - }, - )) - mux.Handle(mgmtv1alpha1connect.JobServiceGetJobProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceGetJobProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetJobRequest]) (*connect.Response[mgmtv1alpha1.GetJobResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.GetJobResponse{ - Job: &mgmtv1alpha1.Job{ - Id: "115aaf2c-776e-4847-8268-d914e3c15968", - AccountId: "225aaf2c-776e-4847-8268-d914e3c15988", - Source: &mgmtv1alpha1.JobSource{ - Options: &mgmtv1alpha1.JobSourceOptions{ - Config: &mgmtv1alpha1.JobSourceOptions_Mssql{ - Mssql: &mgmtv1alpha1.MssqlSourceConnectionOptions{ - ConnectionId: "c9b6ce58-5c8e-4dce-870d-96841b19d988", - Schemas: schemas, - SubsetByForeignKeyConstraints: subsetByForeignKeyConstraints, - }, - }, - }, - }, - Destinations: []*mgmtv1alpha1.JobDestination{ - { - ConnectionId: "226add85-5751-4232-b085-a0ae93afc7ce", - Options: destinationOptions, - }, - }, - Mappings: tt.JobMappings, - VirtualForeignKeys: tt.VirtualForeignKeys, - }}), nil - }, - )) - - mux.Handle(mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetConnectionRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionResponse], error) { - if r.Msg.GetId() == "c9b6ce58-5c8e-4dce-870d-96841b19d988" { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: "c9b6ce58-5c8e-4dce-870d-96841b19d988", - Name: "source", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_MssqlConfig{ - MssqlConfig: &mgmtv1alpha1.MssqlConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.MssqlConnectionConfig_Url{ - Url: s.mssql.source.url, - }, - }, - }, - }, - }, - }), nil - } - if r.Msg.GetId() == "226add85-5751-4232-b085-a0ae93afc7ce" { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: "226add85-5751-4232-b085-a0ae93afc7ce", - Name: "target", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_MssqlConfig{ - MssqlConfig: &mgmtv1alpha1.MssqlConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.MssqlConnectionConfig_Url{ - Url: s.mssql.target.url, - }, - }, - }, - }, - }, - }), nil - } - return nil, nil - }, - )) - - addRunContextProcedureMux(mux) - addEmptyJobHooksProcedureMux(mux) - srv := startHTTPServer(t, mux) - env := executeWorkflow(t, srv, nil, "115aaf2c-776e-4847-8268-d914e3c15968", tt.ExpectError) - require.Truef(t, env.IsWorkflowCompleted(), fmt.Sprintf("Workflow did not complete. Test: %s", tt.Name)) - err := env.GetWorkflowError() - if tt.ExpectError { - require.Error(t, err, "Did not received Temporal Workflow Error %s", tt.Name) - return - } - require.NoError(t, err, "Received Temporal Workflow Error %s", tt.Name) - - for table, expected := range tt.Expected { - rows, err := s.mssql.target.pool.QueryContext(s.ctx, fmt.Sprintf("select * from %s;", table)) - require.NoError(t, err) - count := 0 - for rows.Next() { - count++ - } - assert.Equalf(t, expected.RowCount, count, fmt.Sprintf("Test: %s Table: %s", tt.Name, table)) - } - - // tear down - s.RunMysqlSqlFiles(s.mssql.source.pool, tt.Folder, []string{"teardown.sql"}) - s.RunMysqlSqlFiles(s.mssql.target.pool, tt.Folder, []string{"teardown.sql"}) - }) - } - }) - } -} - -// Used if there is no plan for jobhooks in the test and just need to satisfy the impl -func addEmptyJobHooksProcedureMux(mux *http.ServeMux) { - mux.Handle(mgmtv1alpha1connect.JobServiceGetActiveJobHooksByTimingProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceGetActiveJobHooksByTimingProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetActiveJobHooksByTimingRequest]) (*connect.Response[mgmtv1alpha1.GetActiveJobHooksByTimingResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.GetActiveJobHooksByTimingResponse{Hooks: []*mgmtv1alpha1.JobHook{}}), nil - }, - )) -} - -func addRunContextProcedureMux(mux *http.ServeMux) { - rcmap := map[string][]byte{} - rcmu := sync.RWMutex{} - mux.Handle(mgmtv1alpha1connect.JobServiceGetRunContextProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceGetRunContextProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetRunContextRequest]) (*connect.Response[mgmtv1alpha1.GetRunContextResponse], error) { - rcmu.RLock() - defer rcmu.RUnlock() - val, ok := rcmap[toRunContextKeyString(r.Msg.GetId())] - if !ok { - return nil, connect.NewError(connect.CodeNotFound, fmt.Errorf("unable to find key: %s", toRunContextKeyString(r.Msg.GetId()))) - } - return connect.NewResponse(&mgmtv1alpha1.GetRunContextResponse{Value: val}), nil - }, - )) - - mux.Handle(mgmtv1alpha1connect.JobServiceSetRunContextsProcedure, connect.NewClientStreamHandler( - mgmtv1alpha1connect.JobServiceSetRunContextsProcedure, - func(ctx context.Context, cs *connect.ClientStream[mgmtv1alpha1.SetRunContextsRequest]) (*connect.Response[mgmtv1alpha1.SetRunContextsResponse], error) { - for cs.Receive() { - req := cs.Msg() - rcmu.Lock() - rcmap[toRunContextKeyString(req.GetId())] = req.GetValue() - rcmu.Unlock() - } - if err := cs.Err(); err != nil { - return nil, connect.NewError(connect.CodeUnknown, err) - } - return connect.NewResponse(&mgmtv1alpha1.SetRunContextsResponse{}), nil - }, - )) - - mux.Handle(mgmtv1alpha1connect.JobServiceSetRunContextProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceSetRunContextProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.SetRunContextRequest]) (*connect.Response[mgmtv1alpha1.SetRunContextResponse], error) { - rcmu.RLock() - defer rcmu.RUnlock() - rcmap[toRunContextKeyString(r.Msg.GetId())] = r.Msg.GetValue() - - return connect.NewResponse(&mgmtv1alpha1.SetRunContextResponse{}), nil - }, - )) -} - -func toRunContextKeyString(id *mgmtv1alpha1.RunContextKey) string { - return fmt.Sprintf("%s.%s.%s", id.GetJobRunId(), id.GetExternalId(), id.GetAccountId()) -} - -func (s *IntegrationTestSuite) Test_Workflow_VirtualForeignKeys_Transform() { - testFolder := "testdata/postgres/virtual-foreign-keys" - // setup - err := s.postgres.Source.RunSqlFiles(s.ctx, &testFolder, []string{"source-setup.sql"}) - require.NoError(s.T(), err) - err = s.postgres.Target.RunSqlFiles(s.ctx, &testFolder, []string{"target-setup.sql"}) - require.NoError(s.T(), err) - - virtualForeignKeys := testdata_virtualforeignkeys.GetVirtualForeignKeys() - jobmappings := testdata_virtualforeignkeys.GetDefaultSyncJobMappings() - - for _, m := range jobmappings { - if m.Table == "countries" && m.Column == "country_id" { - m.Transformer = &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_TransformJavascriptConfig{ - TransformJavascriptConfig: &mgmtv1alpha1.TransformJavascript{Code: `if (value == 'US') { return 'SU'; } return value;`}, - }, - }, - } - } - } - // neosync api mocks - mux := http.NewServeMux() - mux.Handle(mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.IsAccountStatusValidRequest]) (*connect.Response[mgmtv1alpha1.IsAccountStatusValidResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.IsAccountStatusValidResponse{IsValid: true}), nil - }, - )) - mux.Handle(mgmtv1alpha1connect.JobServiceGetJobProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceGetJobProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetJobRequest]) (*connect.Response[mgmtv1alpha1.GetJobResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.GetJobResponse{ - Job: &mgmtv1alpha1.Job{ - Id: "fd4d8660-31a0-48b2-9adf-10f11b94898f", - AccountId: "225aaf2c-776e-4847-8268-d914e3c15988", - Source: &mgmtv1alpha1.JobSource{ - Options: &mgmtv1alpha1.JobSourceOptions{ - Config: &mgmtv1alpha1.JobSourceOptions_Postgres{ - Postgres: &mgmtv1alpha1.PostgresSourceConnectionOptions{ - ConnectionId: "c9b6ce58-5c8e-4dce-870d-96841b19d988", - }, - }, - }, - }, - Mappings: jobmappings, - VirtualForeignKeys: virtualForeignKeys, - Destinations: []*mgmtv1alpha1.JobDestination{ - { - ConnectionId: "226add85-5751-4232-b085-a0ae93afc7ce", - Options: &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_PostgresOptions{ - PostgresOptions: &mgmtv1alpha1.PostgresDestinationConnectionOptions{}, - }, - }, - }, - }, - }, - }), nil - }, - )) - - mux.Handle(mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetConnectionRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionResponse], error) { - if r.Msg.GetId() == "c9b6ce58-5c8e-4dce-870d-96841b19d988" { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: "c9b6ce58-5c8e-4dce-870d-96841b19d988", - Name: "source", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ - PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ - Url: s.postgres.Source.URL, - }, - }, - }, - }, - }, - }), nil - } - if r.Msg.GetId() == "226add85-5751-4232-b085-a0ae93afc7ce" { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: "226add85-5751-4232-b085-a0ae93afc7ce", - Name: "target", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ - PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ - Url: s.postgres.Target.URL, - }, - }, - }, - }, - }, - }), nil - } - return nil, nil - }, - )) - - addRunContextProcedureMux(mux) - addEmptyJobHooksProcedureMux(mux) - srv := startHTTPServer(s.T(), mux) - testName := "Virtual Foreign Key primary key transform" - env := executeWorkflow(s.T(), srv, &s.redis.url, "fd4d8660-31a0-48b2-9adf-10f11b94898f", false) - require.Truef(s.T(), env.IsWorkflowCompleted(), fmt.Sprintf("Workflow did not complete. Test: %s", testName)) - err = env.GetWorkflowError() - require.NoError(s.T(), err, "Received Temporal Workflow Error %s", testName) - - tables := []string{"regions", "countries", "locations", "departments", "dependents", "jobs", "employees"} - for _, t := range tables { - rows, err := s.postgres.Target.DB.Query(s.ctx, fmt.Sprintf("select * from vfk_hr.%s;", t)) - require.NoError(s.T(), err) - count := 0 - for rows.Next() { - count++ - } - require.Greater(s.T(), count, 0) - require.NoError(s.T(), err) - } - - rows := s.postgres.Source.DB.QueryRow(s.ctx, "select count(*) from vfk_hr.countries where country_id = 'US';") - var rowCount int - err = rows.Scan(&rowCount) - require.NoError(s.T(), err) - require.Equal(s.T(), 1, rowCount) - - rows = s.postgres.Source.DB.QueryRow(s.ctx, "select count(*) from vfk_hr.locations where country_id = 'US';") - err = rows.Scan(&rowCount) - require.NoError(s.T(), err) - require.Equal(s.T(), 3, rowCount) - - rows = s.postgres.Target.DB.QueryRow(s.ctx, "select count(*) from vfk_hr.countries where country_id = 'US';") - err = rows.Scan(&rowCount) - require.NoError(s.T(), err) - require.Equal(s.T(), 0, rowCount) - - rows = s.postgres.Target.DB.QueryRow(s.ctx, "select count(*) from vfk_hr.countries where country_id = 'SU';") - err = rows.Scan(&rowCount) - require.NoError(s.T(), err) - require.Equal(s.T(), 1, rowCount) - - rows = s.postgres.Target.DB.QueryRow(s.ctx, "select count(*) from vfk_hr.locations where country_id = 'SU';") - err = rows.Scan(&rowCount) - require.NoError(s.T(), err) - require.Equal(s.T(), 3, rowCount) - - // tear down - err = s.postgres.Source.RunSqlFiles(s.ctx, &testFolder, []string{"teardown.sql"}) - require.NoError(s.T(), err) - err = s.postgres.Target.RunSqlFiles(s.ctx, &testFolder, []string{"teardown.sql"}) - require.NoError(s.T(), err) -} - -func getAllMysqlSyncTests() map[string][]*workflow_testdata.IntegrationTest { - allTests := map[string][]*workflow_testdata.IntegrationTest{} - mdTests := mysql_multipledbs.GetSyncTests() - initTests := mysql_initschema.GetSyncTests() - compositeTests := mysql_compositekeys.GetSyncTests() - dataTypesTests := mysql_alltypes.GetSyncTests() - allTests["Multiple_Dbs"] = mdTests - allTests["Composite_Keys"] = compositeTests - allTests["Init_Schema"] = initTests - allTests["DataTypes"] = dataTypesTests - return allTests -} - -func (s *IntegrationTestSuite) Test_Workflow_Sync_Mysql() { - tests := getAllMysqlSyncTests() - for groupName, group := range tests { - group := group - s.T().Run(groupName, func(t *testing.T) { - t.Parallel() - for _, tt := range group { - t.Run(tt.Name, func(t *testing.T) { - t.Logf("running integration test: %s \n", tt.Name) - // setup - err := s.mysql.Source.RunSqlFiles(s.ctx, &tt.Folder, tt.SourceFilePaths) - require.NoError(t, err) - err = s.mysql.Target.RunSqlFiles(s.ctx, &tt.Folder, tt.TargetFilePaths) - require.NoError(t, err) - - schemas := []*mgmtv1alpha1.MysqlSourceSchemaOption{} - subsetMap := map[string]*mgmtv1alpha1.MysqlSourceSchemaOption{} - for table, where := range tt.SubsetMap { - schema, table := sqlmanager_shared.SplitTableKey(table) - if _, exists := subsetMap[schema]; !exists { - subsetMap[schema] = &mgmtv1alpha1.MysqlSourceSchemaOption{ - Schema: schema, - Tables: []*mgmtv1alpha1.MysqlSourceTableOption{}, - } - } - w := where - subsetMap[schema].Tables = append(subsetMap[schema].Tables, &mgmtv1alpha1.MysqlSourceTableOption{ - Table: table, - WhereClause: &w, - }) - } - - for _, s := range subsetMap { - schemas = append(schemas, s) - } - - var subsetByForeignKeyConstraints bool - destinationOptions := &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_MysqlOptions{ - MysqlOptions: &mgmtv1alpha1.MysqlDestinationConnectionOptions{}, - }, - } - if tt.JobOptions != nil { - if tt.JobOptions.SubsetByForeignKeyConstraints { - subsetByForeignKeyConstraints = true - } - destinationOptions = &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_MysqlOptions{ - MysqlOptions: &mgmtv1alpha1.MysqlDestinationConnectionOptions{ - InitTableSchema: tt.JobOptions.InitSchema, - TruncateTable: &mgmtv1alpha1.MysqlTruncateTableConfig{ - TruncateBeforeInsert: tt.JobOptions.Truncate, - }, - SkipForeignKeyViolations: tt.JobOptions.SkipForeignKeyViolations, - }, - }, - } - } - - mux := http.NewServeMux() - mux.Handle(mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.IsAccountStatusValidRequest]) (*connect.Response[mgmtv1alpha1.IsAccountStatusValidResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.IsAccountStatusValidResponse{IsValid: true}), nil - }, - )) - mux.Handle(mgmtv1alpha1connect.JobServiceGetJobProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceGetJobProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetJobRequest]) (*connect.Response[mgmtv1alpha1.GetJobResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.GetJobResponse{ - Job: &mgmtv1alpha1.Job{ - Id: "115aaf2c-776e-4847-8268-d914e3c15968", - AccountId: "225aaf2c-776e-4847-8268-d914e3c15988", - Source: &mgmtv1alpha1.JobSource{ - Options: &mgmtv1alpha1.JobSourceOptions{ - Config: &mgmtv1alpha1.JobSourceOptions_Mysql{ - Mysql: &mgmtv1alpha1.MysqlSourceConnectionOptions{ - ConnectionId: "c9b6ce58-5c8e-4dce-870d-96841b19d988", - Schemas: schemas, - SubsetByForeignKeyConstraints: subsetByForeignKeyConstraints, - }, - }, - }, - }, - Destinations: []*mgmtv1alpha1.JobDestination{ - { - ConnectionId: "226add85-5751-4232-b085-a0ae93afc7ce", - Options: destinationOptions, - }, - }, - Mappings: tt.JobMappings, - VirtualForeignKeys: tt.VirtualForeignKeys, - }}), nil - }, - )) - - mux.Handle(mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetConnectionRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionResponse], error) { - if r.Msg.GetId() == "c9b6ce58-5c8e-4dce-870d-96841b19d988" { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: "c9b6ce58-5c8e-4dce-870d-96841b19d988", - Name: "source", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_MysqlConfig{ - MysqlConfig: &mgmtv1alpha1.MysqlConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.MysqlConnectionConfig_Url{ - Url: s.mysql.Source.URL, - }, - }, - }, - }, - }, - }), nil - } - if r.Msg.GetId() == "226add85-5751-4232-b085-a0ae93afc7ce" { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: "226add85-5751-4232-b085-a0ae93afc7ce", - Name: "target", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_MysqlConfig{ - MysqlConfig: &mgmtv1alpha1.MysqlConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.MysqlConnectionConfig_Url{ - Url: s.mysql.Target.URL, - }, - }, - }, - }, - }, - }), nil - } - return nil, nil - }, - )) - addRunContextProcedureMux(mux) - addEmptyJobHooksProcedureMux(mux) - srv := startHTTPServer(t, mux) - env := executeWorkflow(t, srv, &s.redis.url, "115aaf2c-776e-4847-8268-d914e3c15968", tt.ExpectError) - require.Truef(t, env.IsWorkflowCompleted(), fmt.Sprintf("Workflow did not complete. Test: %s", tt.Name)) - err = env.GetWorkflowError() - if tt.ExpectError { - require.Error(t, err, "Did not received Temporal Workflow Error %s", tt.Name) - return - } - require.NoError(t, err, "Received Temporal Workflow Error %s", tt.Name) - - for table, expected := range tt.Expected { - rows, err := s.mysql.Target.DB.QueryContext(s.ctx, fmt.Sprintf("select * from %s;", table)) - require.NoError(t, err) - count := 0 - for rows.Next() { - count++ - } - require.Equalf(t, expected.RowCount, count, fmt.Sprintf("Test: %s Table: %s", tt.Name, table)) - } - - // tear down - err = s.mysql.Source.RunSqlFiles(s.ctx, &tt.Folder, []string{"teardown.sql"}) - require.NoError(t, err) - err = s.mysql.Target.RunSqlFiles(s.ctx, &tt.Folder, []string{"teardown.sql"}) - require.NoError(t, err) - }) - } - }) - } -} - -func (s *IntegrationTestSuite) Test_Workflow_DynamoDB_Sync() { - tests := getAllDynamoDBSyncTests() - for groupName, group := range tests { - group := group - s.T().Run(groupName, func(t *testing.T) { - // cannot run in parallel until we have each test create/delete its own tables. - // t.Parallel() - for _, tt := range group { - t.Run(tt.Name, func(t *testing.T) { - t.Logf("running integration test: %s \n", tt.Name) - // setup - sourceTableName := "test-sync-source" - destTableName := "test-sync-dest" - errgrp, errctx := errgroup.WithContext(s.ctx) - errgrp.Go(func() error { return s.SetupDynamoDbTable(errctx, sourceTableName, "id") }) - errgrp.Go(func() error { return s.SetupDynamoDbTable(errctx, destTableName, "id") }) - err := errgrp.Wait() - require.NoError(t, err) - - err = s.InsertDynamoDBRecords(sourceTableName, []map[string]dyntypes.AttributeValue{ - { - "id": &dyntypes.AttributeValueMemberS{Value: "1"}, - "a": &dyntypes.AttributeValueMemberBOOL{Value: true}, - "NestedMap": &dyntypes.AttributeValueMemberM{ - Value: map[string]dyntypes.AttributeValue{ - "Level1": &dyntypes.AttributeValueMemberM{ - Value: map[string]dyntypes.AttributeValue{ - "Level2": &dyntypes.AttributeValueMemberM{ - Value: map[string]dyntypes.AttributeValue{ - "Attribute1": &dyntypes.AttributeValueMemberS{Value: "Value1"}, - "NumberSet": &dyntypes.AttributeValueMemberNS{Value: []string{"1", "2", "3"}}, - "BinaryData": &dyntypes.AttributeValueMemberB{Value: []byte("U29tZUJpbmFyeURhdGE=")}, - "Level3": &dyntypes.AttributeValueMemberM{ - Value: map[string]dyntypes.AttributeValue{ - "Attribute2": &dyntypes.AttributeValueMemberS{Value: "Value2"}, - "StringSet": &dyntypes.AttributeValueMemberSS{Value: []string{"Item1", "Item2", "Item3"}}, - "BinarySet": &dyntypes.AttributeValueMemberBS{ - Value: [][]byte{ - []byte("U29tZUJpbmFyeQ=="), - []byte("QW5vdGhlckJpbmFyeQ=="), - }, - }, - "Level4": &dyntypes.AttributeValueMemberM{ - Value: map[string]dyntypes.AttributeValue{ - "Attribute3": &dyntypes.AttributeValueMemberS{Value: "Value3"}, - "Boolean": &dyntypes.AttributeValueMemberBOOL{Value: true}, - "MoreBinaryData": &dyntypes.AttributeValueMemberB{Value: []byte("TW9yZUJpbmFyeURhdGE=")}, - "MoreBinarySet": &dyntypes.AttributeValueMemberBS{ - Value: [][]byte{ - []byte("TW9yZUJpbmFyeQ=="), - []byte("QW5vdGhlck1vcmVCaW5hcnk="), - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - { - "id": &dyntypes.AttributeValueMemberS{Value: "2"}, - "a": &dyntypes.AttributeValueMemberBOOL{Value: false}, - }, - }) - require.NoError(t, err) - - jobId := "115aaf2c-776e-4847-8268-d914e3c15968" - sourceConnectionId := "c9b6ce58-5c8e-4dce-870d-96841b19d988" - destConnectionId := "226add85-5751-4232-b085-a0ae93afc7ce" - - sourceTableOpts := []*mgmtv1alpha1.DynamoDBSourceTableOption{} - for table, where := range tt.SubsetMap { - where := where - sourceTableOpts = append(sourceTableOpts, &mgmtv1alpha1.DynamoDBSourceTableOption{ - Table: table, - WhereClause: &where, - }) - } - - destOpts := &mgmtv1alpha1.DynamoDBDestinationConnectionOptions{ - TableMappings: []*mgmtv1alpha1.DynamoDBDestinationTableMapping{{SourceTable: sourceTableName, DestinationTable: destTableName}}, - } - - mux := http.NewServeMux() - mux.Handle(mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.IsAccountStatusValidRequest]) (*connect.Response[mgmtv1alpha1.IsAccountStatusValidResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.IsAccountStatusValidResponse{IsValid: true}), nil - }, - )) - mux.Handle(mgmtv1alpha1connect.JobServiceGetJobProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceGetJobProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetJobRequest]) (*connect.Response[mgmtv1alpha1.GetJobResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.GetJobResponse{ - Job: &mgmtv1alpha1.Job{ - Id: jobId, - AccountId: "225aaf2c-776e-4847-8268-d914e3c15988", - Source: &mgmtv1alpha1.JobSource{ - Options: &mgmtv1alpha1.JobSourceOptions{ - Config: &mgmtv1alpha1.JobSourceOptions_Dynamodb{ - Dynamodb: &mgmtv1alpha1.DynamoDBSourceConnectionOptions{ - ConnectionId: sourceConnectionId, - Tables: sourceTableOpts, - }, - }, - }, - }, - Destinations: []*mgmtv1alpha1.JobDestination{ - { - ConnectionId: destConnectionId, - Options: &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_DynamodbOptions{ - DynamodbOptions: destOpts, - }, - }, - }, - }, - Mappings: tt.JobMappings, - VirtualForeignKeys: tt.VirtualForeignKeys, - }}), nil - }, - )) - - mux.Handle(mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetConnectionRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionResponse], error) { - if r.Msg.GetId() == sourceConnectionId { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: sourceConnectionId, - Name: "source", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_DynamodbConfig{ - DynamodbConfig: &mgmtv1alpha1.DynamoDBConnectionConfig{ - Credentials: s.dynamo.dtoAwsCreds, - Endpoint: &s.dynamo.endpoint, - }, - }, - }, - }, - }), nil - } - if r.Msg.GetId() == destConnectionId { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: destConnectionId, - Name: "target", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_DynamodbConfig{ - DynamodbConfig: &mgmtv1alpha1.DynamoDBConnectionConfig{ - Credentials: s.dynamo.dtoAwsCreds, - Endpoint: &s.dynamo.endpoint, - }, - }, - }, - }, - }), nil - } - return nil, fmt.Errorf("unknown test connection") - }, - )) - addRunContextProcedureMux(mux) - addEmptyJobHooksProcedureMux(mux) - srv := startHTTPServer(t, mux) - env := executeWorkflow(t, srv, &s.redis.url, jobId, tt.ExpectError) - require.Truef(t, env.IsWorkflowCompleted(), fmt.Sprintf("Workflow did not complete. Test: %s", tt.Name)) - err = env.GetWorkflowError() - if tt.ExpectError { - require.Error(t, err, "Did not received Temporal Workflow Error %s", tt.Name) - return - } - require.NoError(t, err, "Received Temporal Workflow Error %s", tt.Name) - - for table, expected := range tt.Expected { - out, err := s.dynamo.dynamoclient.Scan(s.ctx, &dynamodb.ScanInput{ - TableName: &table, - }) - require.NoError(t, err) - require.Equal(t, expected.RowCount, int(out.Count), fmt.Sprintf("Test: %s Table: %s", tt.Name, table)) - } - - // tear down - errgrp, errctx = errgroup.WithContext(s.ctx) - errgrp.Go(func() error { return s.DestroyDynamoDbTable(errctx, sourceTableName) }) - errgrp.Go(func() error { return s.DestroyDynamoDbTable(errctx, destTableName) }) - err = errgrp.Wait() - require.NoError(t, err) - }) - } - }) - } -} - -func getAllDynamoDBSyncTests() map[string][]*workflow_testdata.IntegrationTest { - allTests := map[string][]*workflow_testdata.IntegrationTest{} - - allTests["Standard Sync"] = []*workflow_testdata.IntegrationTest{ - { - Name: "Passthrough Sync", - JobMappings: []*mgmtv1alpha1.JobMapping{ - { - Schema: "aws", - Table: "test-sync-source", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, - }, - }, - }, - { - Schema: "aws", - Table: "test-sync-source", - Column: "a", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, - }, - }, - }, - }, - JobOptions: &workflow_testdata.TestJobOptions{}, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "test-sync-source": {RowCount: 2}, - "test-sync-dest": {RowCount: 2}, - }, - }, - { - Name: "Subset Sync", - JobMappings: []*mgmtv1alpha1.JobMapping{ - { - Schema: "aws", - Table: "test-sync-source", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, - }, - }, - }, - { - Schema: "aws", - Table: "test-sync-source", - Column: "a", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, - }, - }, - }, - }, - SubsetMap: map[string]string{ - "test-sync-source": "id = '1'", - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "test-sync-source": {RowCount: 2}, - "test-sync-dest": {RowCount: 1}, - }, - }, - { - Name: "Default Transformer Sync", - JobMappings: []*mgmtv1alpha1.JobMapping{ - { - Schema: "aws", - Table: "test-sync-source", - Column: "id", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, - }, - }, - }, - { - Schema: "aws", - Table: "test-sync-source", - Column: "a", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, - }, - }, - }, - }, - JobOptions: &workflow_testdata.TestJobOptions{ - DefaultTransformers: &workflow_testdata.DefaultTransformers{ - Boolean: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_GenerateBoolConfig{}, - }, - }, - Number: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_TransformInt64Config{ - TransformInt64Config: &mgmtv1alpha1.TransformInt64{RandomizationRangeMin: gotypeutil.ToPtr(int64(10)), RandomizationRangeMax: gotypeutil.ToPtr(int64(1000))}, - }, - }, - }, - String: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_TransformStringConfig{ - TransformStringConfig: &mgmtv1alpha1.TransformString{}, - }, - }, - }, - Byte: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, - }, - }, - }, - }, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "test-sync-source": {RowCount: 2}, - "test-sync-dest": {RowCount: 2}, - }, - }, - } - return allTests -} - -func (s *IntegrationTestSuite) Test_Workflow_MongoDB_Sync() { - tests := getAllMongoDBSyncTests() - for groupName, group := range tests { - group := group - s.T().Run(groupName, func(t *testing.T) { - // cannot run in parallel until we have each test create/delete its own tables. - // t.Parallel() - for _, tt := range group { - t.Run(tt.Name, func(t *testing.T) { - t.Logf("running integration test: %s \n", tt.Name) - // setup - dbName := "data" - collectionName := "test-sync" - - doc := bson.D{ - {Key: "_id", Value: primitive.NewObjectID()}, - {Key: "string", Value: "Hello, MongoDB!"}, - {Key: "bool", Value: true}, - {Key: "int32", Value: int32(42)}, - {Key: "int64", Value: int64(92233720)}, - {Key: "double", Value: 3.14159}, - {Key: "decimal128", Value: primitive.NewDecimal128(3, 14159)}, - {Key: "date", Value: primitive.NewDateTimeFromTime(time.Now())}, - {Key: "timestamp", Value: primitive.Timestamp{T: 1645553494, I: 1}}, - {Key: "null", Value: primitive.Null{}}, - {Key: "regex", Value: primitive.Regex{Pattern: "^test", Options: "i"}}, - {Key: "array", Value: bson.A{"apple", "banana", "cherry"}}, - {Key: "embedded_document", Value: bson.D{ - {Key: "name", Value: "John Doe"}, - {Key: "age", Value: 30}, - }}, - {Key: "binary", Value: primitive.Binary{Subtype: 0x80, Data: []byte("binary data")}}, - {Key: "undefined", Value: primitive.Undefined{}}, - {Key: "object_id", Value: primitive.NewObjectID()}, - {Key: "min_key", Value: primitive.MinKey{}}, - {Key: "max_key", Value: primitive.MaxKey{}}, - } - docs := []any{doc} - - count, err := s.InsertMongoDbRecords(s.mongodb.source.client, dbName, collectionName, docs) - require.NoError(t, err) - require.Greater(t, count, 0) - - jobId := "115aaf2c-776e-4847-8268-d914e3c15968" - sourceConnectionId := "c9b6ce58-5c8e-4dce-870d-96841b19d988" - destConnectionId := "226add85-5751-4232-b085-a0ae93afc7ce" - - mux := http.NewServeMux() - mux.Handle(mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.IsAccountStatusValidRequest]) (*connect.Response[mgmtv1alpha1.IsAccountStatusValidResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.IsAccountStatusValidResponse{IsValid: true}), nil - }, - )) - mux.Handle(mgmtv1alpha1connect.JobServiceGetJobProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceGetJobProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetJobRequest]) (*connect.Response[mgmtv1alpha1.GetJobResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.GetJobResponse{ - Job: &mgmtv1alpha1.Job{ - Id: jobId, - AccountId: "225aaf2c-776e-4847-8268-d914e3c15988", - Source: &mgmtv1alpha1.JobSource{ - Options: &mgmtv1alpha1.JobSourceOptions{ - Config: &mgmtv1alpha1.JobSourceOptions_Mongodb{ - Mongodb: &mgmtv1alpha1.MongoDBSourceConnectionOptions{ - ConnectionId: sourceConnectionId, - }, - }, - }, - }, - Destinations: []*mgmtv1alpha1.JobDestination{ - { - ConnectionId: destConnectionId, - Options: &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_MongodbOptions{ - MongodbOptions: &mgmtv1alpha1.MongoDBDestinationConnectionOptions{}, - }, - }, - }, - }, - Mappings: tt.JobMappings, - VirtualForeignKeys: tt.VirtualForeignKeys, - }}), nil - }, - )) - - mux.Handle(mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetConnectionRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionResponse], error) { - if r.Msg.GetId() == sourceConnectionId { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: sourceConnectionId, - Name: "source", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_MongoConfig{ - MongoConfig: &mgmtv1alpha1.MongoConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.MongoConnectionConfig_Url{ - Url: s.mongodb.source.url, - }, - }, - }, - }, - }, - }), nil - } - if r.Msg.GetId() == destConnectionId { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: destConnectionId, - Name: "target", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_MongoConfig{ - MongoConfig: &mgmtv1alpha1.MongoConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.MongoConnectionConfig_Url{ - Url: s.mongodb.target.url, - }, - }, - }, - }, - }, - }), nil - } - return nil, fmt.Errorf("unknown test connection") - }, - )) - addRunContextProcedureMux(mux) - addEmptyJobHooksProcedureMux(mux) - srv := startHTTPServer(t, mux) - env := executeWorkflow(t, srv, &s.redis.url, jobId, tt.ExpectError) - require.Truef(t, env.IsWorkflowCompleted(), fmt.Sprintf("Workflow did not complete. Test: %s", tt.Name)) - err = env.GetWorkflowError() - if tt.ExpectError { - require.Error(t, err, "Did not received Temporal Workflow Error %s", tt.Name) - return - } - require.NoError(t, err, "Received Temporal Workflow Error %s", tt.Name) - - for table, expected := range tt.Expected { - col := s.mongodb.target.client.Database(dbName).Collection(collectionName) - cursor, err := col.Find(s.ctx, bson.D{}) - require.NoError(t, err) - var results []bson.M - for cursor.Next(s.ctx) { - var doc bson.M - err = cursor.Decode(&doc) - require.NoError(t, err) - results = append(results, doc) - } - cursor.Close(s.ctx) - require.Equal(t, expected.RowCount, len(results), fmt.Sprintf("Test: %s Table: %s", tt.Name, table)) - } - - // tear down - errgrp, errctx := errgroup.WithContext(s.ctx) - errgrp.Go(func() error { return s.DropMongoDbCollection(errctx, s.mongodb.source.client, dbName, collectionName) }) - errgrp.Go(func() error { return s.DropMongoDbCollection(errctx, s.mongodb.target.client, dbName, collectionName) }) - err = errgrp.Wait() - require.NoError(t, err) - }) - } - }) - } -} - -func getAllMongoDBSyncTests() map[string][]*workflow_testdata.IntegrationTest { - allTests := map[string][]*workflow_testdata.IntegrationTest{} - allTests["Standard Sync"] = []*workflow_testdata.IntegrationTest{ - { - Name: "Passthrough Sync", - JobMappings: []*mgmtv1alpha1.JobMapping{ - { - Schema: "data", - Table: "test-sync", - Column: "string", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, - }, - }, - }, - { - Schema: "data", - Table: "test-sync", - Column: "bool", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_PassthroughConfig{}, - }, - }, - }, - }, - JobOptions: &workflow_testdata.TestJobOptions{}, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "test-sync": {RowCount: 1}, - }, - }, - { - Name: "Transform Sync", - JobMappings: []*mgmtv1alpha1.JobMapping{ - { - Schema: "data", - Table: "test-sync", - Column: "string", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_TransformStringConfig{ - TransformStringConfig: &mgmtv1alpha1.TransformString{ - PreserveLength: gotypeutil.ToPtr(true), - }, - }, - }, - }, - }, - { - Schema: "data", - Table: "test-sync", - Column: "embedded_document.name", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_GenerateFirstNameConfig{ - GenerateFirstNameConfig: &mgmtv1alpha1.GenerateFirstName{}, - }, - }, - }, - }, - { - Schema: "data", - Table: "test-sync", - Column: "decimal128", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_TransformFloat64Config{ - TransformFloat64Config: &mgmtv1alpha1.TransformFloat64{ - RandomizationRangeMin: gotypeutil.ToPtr(float64(0)), - RandomizationRangeMax: gotypeutil.ToPtr(float64(300)), - }, - }, - }, - }, - }, - { - Schema: "data", - Table: "test-sync", - Column: "int64", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_TransformInt64Config{ - TransformInt64Config: &mgmtv1alpha1.TransformInt64{ - RandomizationRangeMin: gotypeutil.ToPtr(int64(0)), - RandomizationRangeMax: gotypeutil.ToPtr(int64(300)), - }, - }, - }, - }, - }, - { - Schema: "data", - Table: "test-sync", - Column: "timestamp", - Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_GenerateUnixtimestampConfig{ - GenerateUnixtimestampConfig: &mgmtv1alpha1.GenerateUnixTimestamp{}, - }, - }, - }, - }, - }, - JobOptions: &workflow_testdata.TestJobOptions{}, - Expected: map[string]*workflow_testdata.ExpectedOutput{ - "test-sync": {RowCount: 1}, - }, - }, - } - return allTests -} - -func (s *IntegrationTestSuite) Test_Workflow_Generate() { - // setup - testName := "Generate Job" - folder := "testdata/generate-job" - err := s.postgres.Target.RunSqlFiles(s.ctx, &folder, []string{"setup.sql"}) - require.NoError(s.T(), err) - - connectionId := "226add85-5751-4232-b085-a0ae93afc7ce" - schema := "generate_job" - table := "regions" - - destinationOptions := &mgmtv1alpha1.JobDestinationOptions{ - Config: &mgmtv1alpha1.JobDestinationOptions_PostgresOptions{ - PostgresOptions: &mgmtv1alpha1.PostgresDestinationConnectionOptions{ - InitTableSchema: false, - TruncateTable: &mgmtv1alpha1.PostgresTruncateTableConfig{ - TruncateBeforeInsert: false, - }, - SkipForeignKeyViolations: false, - }, - }, - } - - mux := http.NewServeMux() - mux.Handle(mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.UserAccountServiceIsAccountStatusValidProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.IsAccountStatusValidRequest]) (*connect.Response[mgmtv1alpha1.IsAccountStatusValidResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.IsAccountStatusValidResponse{IsValid: true}), nil - }, - )) - mux.Handle(mgmtv1alpha1connect.JobServiceGetJobProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.JobServiceGetJobProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetJobRequest]) (*connect.Response[mgmtv1alpha1.GetJobResponse], error) { - return connect.NewResponse(&mgmtv1alpha1.GetJobResponse{ - Job: &mgmtv1alpha1.Job{ - Id: "115aaf2c-776e-4847-8268-d914e3c15968", - AccountId: "225aaf2c-776e-4847-8268-d914e3c15988", - Source: &mgmtv1alpha1.JobSource{ - Options: &mgmtv1alpha1.JobSourceOptions{ - Config: &mgmtv1alpha1.JobSourceOptions_Generate{ - Generate: &mgmtv1alpha1.GenerateSourceOptions{ - Schemas: []*mgmtv1alpha1.GenerateSourceSchemaOption{{Schema: schema, Tables: []*mgmtv1alpha1.GenerateSourceTableOption{ - {Table: table, RowCount: 10}, - }}}, - FkSourceConnectionId: &connectionId, - }, - }, - }, - }, - Destinations: []*mgmtv1alpha1.JobDestination{ - { - ConnectionId: connectionId, - Options: destinationOptions, - }, - }, - Mappings: []*mgmtv1alpha1.JobMapping{ - {Schema: schema, Table: table, Column: "region_id", Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{Config: &mgmtv1alpha1.TransformerConfig_GenerateDefaultConfig{}}, - }}, - {Schema: schema, Table: table, Column: "region_name", Transformer: &mgmtv1alpha1.JobMappingTransformer{ - Config: &mgmtv1alpha1.TransformerConfig{ - Config: &mgmtv1alpha1.TransformerConfig_GenerateCityConfig{ - GenerateCityConfig: &mgmtv1alpha1.GenerateCity{}, - }, - }, - }}, - }, - }}), nil - }, - )) - - mux.Handle(mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, connect.NewUnaryHandler( - mgmtv1alpha1connect.ConnectionServiceGetConnectionProcedure, - func(ctx context.Context, r *connect.Request[mgmtv1alpha1.GetConnectionRequest]) (*connect.Response[mgmtv1alpha1.GetConnectionResponse], error) { - if r.Msg.GetId() == "226add85-5751-4232-b085-a0ae93afc7ce" { - return connect.NewResponse(&mgmtv1alpha1.GetConnectionResponse{ - Connection: &mgmtv1alpha1.Connection{ - Id: "226add85-5751-4232-b085-a0ae93afc7ce", - Name: "target", - ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ - Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ - PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ - ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ - Url: s.postgres.Target.URL, - }, - }, - }, - }, - }, - }), nil - } - return nil, nil - }, - )) - - addRunContextProcedureMux(mux) - addEmptyJobHooksProcedureMux(mux) - srv := startHTTPServer(s.T(), mux) - env := executeWorkflow(s.T(), srv, &s.redis.url, "115aaf2c-776e-4847-8268-d914e3c15968", false) - require.Truef(s.T(), env.IsWorkflowCompleted(), fmt.Sprintf("Workflow did not complete. Test: %s", testName)) - err = env.GetWorkflowError() - require.NoError(s.T(), err, "Received Temporal Workflow Error %s", testName) - - rows, err := s.postgres.Target.DB.Query(s.ctx, fmt.Sprintf("select * from %s.%s;", schema, table)) - require.NoError(s.T(), err) - count := 0 - for rows.Next() { - count++ - } - require.Equalf(s.T(), 10, count, fmt.Sprintf("Test: %s Table: %s", testName, table)) - - // tear down - err = s.postgres.Target.RunSqlFiles(s.ctx, &folder, []string{"teardown.sql"}) - require.NoError(s.T(), err) -} - -type fakeEELicense struct{} - -func (f *fakeEELicense) IsValid() bool { - return true -} - -func executeWorkflow( - t testing.TB, - srv *httptest.Server, - redisUrl *string, - jobId string, - expectActivityErr bool, -) *testsuite.TestWorkflowEnvironment { - t.Helper() - connclient := mgmtv1alpha1connect.NewConnectionServiceClient(srv.Client(), srv.URL) - jobclient := mgmtv1alpha1connect.NewJobServiceClient(srv.Client(), srv.URL) - transformerclient := mgmtv1alpha1connect.NewTransformersServiceClient(srv.Client(), srv.URL) - userclient := mgmtv1alpha1connect.NewUserAccountServiceClient(srv.Client(), srv.URL) - var redisconfig *shared.RedisConfig - if redisUrl != nil && *redisUrl != "" { - redisconfig = &shared.RedisConfig{ - Url: *redisUrl, - Kind: "simple", - Tls: &shared.RedisTlsConfig{ - Enabled: false, - }, - } - } - redisclient, err := neosync_redis.GetRedisClient(redisconfig) - if err != nil { - t.Fatal(err) - } - - sqlconnmanager := connectionmanager.NewConnectionManager(sqlprovider.NewProvider(&sqlconnect.SqlOpenConnector{}), connectionmanager.WithReaperPoll(10*time.Second)) - go sqlconnmanager.Reaper(testutil.GetConcurrentTestLogger(t)) - mongoconnmanager := connectionmanager.NewConnectionManager(mongoprovider.NewProvider()) - go mongoconnmanager.Reaper(testutil.GetConcurrentTestLogger(t)) - - t.Cleanup(func() { - sqlconnmanager.Shutdown(testutil.GetConcurrentTestLogger(t)) - mongoconnmanager.Shutdown(testutil.GetConcurrentTestLogger(t)) - }) - - sqlmanager := sql_manager.NewSqlManager( - sql_manager.WithConnectionManager(sqlconnmanager), - ) - - // temporal workflow - testSuite := &testsuite.WorkflowTestSuite{} - testSuite.SetLogger(log.NewStructuredLogger(testutil.GetConcurrentTestLogger(t))) - env := testSuite.NewTestWorkflowEnvironment() - - // register activities - genbenthosActivity := genbenthosconfigs_activity.New( - jobclient, - connclient, - transformerclient, - sqlmanager, - redisconfig, - false, - ) - var activityMeter metric.Meter - - syncActivity := sync_activity.New(connclient, jobclient, sqlconnmanager, mongoconnmanager, activityMeter, sync_activity.NewBenthosStreamManager()) - retrieveActivityOpts := syncactivityopts_activity.New(jobclient) - runSqlInitTableStatements := runsqlinittablestmts_activity.New(jobclient, connclient, sqlmanager, &fakeEELicense{}) - accountStatusActivity := accountstatus_activity.New(userclient) - jobhookTimingActivity := jobhooks_by_timing_activity.New(jobclient, connclient, sqlmanager, &fakeEELicense{}) - posttableSyncActivity := posttablesync_activity.New(jobclient, sqlmanager, connclient) - redisCleanUpActivity := syncrediscleanup_activity.New(redisclient) - - env.RegisterWorkflow(Workflow) - env.RegisterActivity(syncActivity.Sync) - env.RegisterActivity(retrieveActivityOpts.RetrieveActivityOptions) - env.RegisterActivity(runSqlInitTableStatements.RunSqlInitTableStatements) - env.RegisterActivity(redisCleanUpActivity.DeleteRedisHash) - env.RegisterActivity(genbenthosActivity.GenerateBenthosConfigs) - env.RegisterActivity(accountStatusActivity.CheckAccountStatus) - env.RegisterActivity(jobhookTimingActivity.RunJobHooksByTiming) - env.RegisterActivity(posttableSyncActivity.RunPostTableSync) - env.SetTestTimeout(600 * time.Second) // increase the test timeout - - env.SetOnActivityCompletedListener(func(activityInfo *activity.Info, result converter.EncodedValue, err error) { - if !expectActivityErr { - require.NoError(t, err, "Activity %s failed", activityInfo.ActivityType.Name) - } - if activityInfo.ActivityType.Name == "RunPostTableSync" && result.HasValue() { - var postTableSyncResp posttablesync_activity.RunPostTableSyncResponse - decodeErr := result.Get(&postTableSyncResp) - require.NoError(t, decodeErr, "Failed to decode result for activity %s", activityInfo.ActivityType.Name) - - require.Emptyf(t, postTableSyncResp.Errors, "Post table sync activity returned errors: %v", formatPostTableSyncErrors(postTableSyncResp.Errors)) - } - }) - - env.SetStartWorkflowOptions(client.StartWorkflowOptions{ID: jobId}) - env.ExecuteWorkflow(Workflow, &WorkflowRequest{JobId: jobId}) - return env -} - -func startHTTPServer(tb testing.TB, h http.Handler) *httptest.Server { - tb.Helper() - srv := httptest.NewUnstartedServer(h) - srv.EnableHTTP2 = true - srv.Start() - tb.Cleanup(srv.Close) - return srv -} - -func formatPostTableSyncErrors(errors []*posttablesync_activity.PostTableSyncError) []string { - formatted := []string{} - for _, err := range errors { - for _, e := range err.Errors { - formatted = append(formatted, fmt.Sprintf("statement: %s error: %s", e.Statement, e.Error)) - } - } - return formatted -}