defmodule InternalApi.Projecthub.ResponseMeta.Code do
  @moduledoc false
  use Protobuf, enum: true, syntax: :proto3

  @type t :: integer | :OK | :NOT_FOUND | :FAILED_PRECONDITION

  field :OK, 0
  field :NOT_FOUND, 2
  field :FAILED_PRECONDITION, 3
end

defmodule InternalApi.Projecthub.Project.Spec.Visibility do
  @moduledoc false
  use Protobuf, enum: true, syntax: :proto3

  @type t :: integer | :PRIVATE | :PUBLIC

  field :PRIVATE, 0
  field :PUBLIC, 1
end

defmodule InternalApi.Projecthub.Project.Spec.PermissionType do
  @moduledoc false
  use Protobuf, enum: true, syntax: :proto3

  @type t ::
          integer
          | :EMPTY
          | :DEFAULT_BRANCH
          | :NON_DEFAULT_BRANCH
          | :PULL_REQUEST
          | :FORKED_PULL_REQUEST
          | :TAG

  field :EMPTY, 0
  field :DEFAULT_BRANCH, 1
  field :NON_DEFAULT_BRANCH, 2
  field :PULL_REQUEST, 3
  field :FORKED_PULL_REQUEST, 4
  field :TAG, 5
end

defmodule InternalApi.Projecthub.Project.Spec.Repository.RunType do
  @moduledoc false
  use Protobuf, enum: true, syntax: :proto3

  @type t :: integer | :BRANCHES | :TAGS | :PULL_REQUESTS | :FORKED_PULL_REQUESTS

  field :BRANCHES, 0
  field :TAGS, 1
  field :PULL_REQUESTS, 2
  field :FORKED_PULL_REQUESTS, 3
end

defmodule InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile.Level do
  @moduledoc false
  use Protobuf, enum: true, syntax: :proto3

  @type t :: integer | :BLOCK | :PIPELINE

  field :BLOCK, 0
  field :PIPELINE, 1
end

defmodule InternalApi.Projecthub.Project.Status.State do
  @moduledoc false
  use Protobuf, enum: true, syntax: :proto3

  @type t :: integer | :INITIALIZING | :READY | :ERROR

  field :INITIALIZING, 0
  field :READY, 1
  field :ERROR, 2
end

defmodule InternalApi.Projecthub.RequestMeta do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          api_version: String.t(),
          kind: String.t(),
          req_id: String.t(),
          org_id: String.t(),
          user_id: String.t()
        }

  defstruct api_version: "",
            kind: "",
            req_id: "",
            org_id: "",
            user_id: ""

  field :api_version, 1, type: :string, json_name: "apiVersion"
  field :kind, 2, type: :string
  field :req_id, 3, type: :string, json_name: "reqId"
  field :org_id, 4, type: :string, json_name: "orgId"
  field :user_id, 5, type: :string, json_name: "userId"
end

defmodule InternalApi.Projecthub.ResponseMeta.Status do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          code: InternalApi.Projecthub.ResponseMeta.Code.t(),
          message: String.t()
        }

  defstruct code: :OK,
            message: ""

  field :code, 1, type: InternalApi.Projecthub.ResponseMeta.Code, enum: true
  field :message, 2, type: :string
end

defmodule InternalApi.Projecthub.ResponseMeta do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          api_version: String.t(),
          kind: String.t(),
          req_id: String.t(),
          org_id: String.t(),
          user_id: String.t(),
          status: InternalApi.Projecthub.ResponseMeta.Status.t() | nil
        }

  defstruct api_version: "",
            kind: "",
            req_id: "",
            org_id: "",
            user_id: "",
            status: nil

  field :api_version, 1, type: :string, json_name: "apiVersion"
  field :kind, 2, type: :string
  field :req_id, 3, type: :string, json_name: "reqId"
  field :org_id, 4, type: :string, json_name: "orgId"
  field :user_id, 5, type: :string, json_name: "userId"
  field :status, 6, type: InternalApi.Projecthub.ResponseMeta.Status
end

defmodule InternalApi.Projecthub.PaginationRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          page: integer,
          page_size: integer
        }

  defstruct page: 0,
            page_size: 0

  field :page, 1, type: :int32
  field :page_size, 2, type: :int32, json_name: "pageSize"
end

defmodule InternalApi.Projecthub.PaginationResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          page_number: integer,
          page_size: integer,
          total_entries: integer,
          total_pages: integer
        }

  defstruct page_number: 0,
            page_size: 0,
            total_entries: 0,
            total_pages: 0

  field :page_number, 1, type: :int32, json_name: "pageNumber"
  field :page_size, 2, type: :int32, json_name: "pageSize"
  field :total_entries, 3, type: :int32, json_name: "totalEntries"
  field :total_pages, 4, type: :int32, json_name: "totalPages"
end

defmodule InternalApi.Projecthub.Project.Metadata do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          name: String.t(),
          id: String.t(),
          owner_id: String.t(),
          org_id: String.t(),
          description: String.t(),
          created_at: Google.Protobuf.Timestamp.t() | nil
        }

  defstruct name: "",
            id: "",
            owner_id: "",
            org_id: "",
            description: "",
            created_at: nil

  field :name, 1, type: :string
  field :id, 2, type: :string
  field :owner_id, 3, type: :string, json_name: "ownerId"
  field :org_id, 4, type: :string, json_name: "orgId"
  field :description, 5, type: :string
  field :created_at, 6, type: Google.Protobuf.Timestamp, json_name: "createdAt"
end

defmodule InternalApi.Projecthub.Project.Spec.Repository.ForkedPullRequests do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          allowed_secrets: [String.t()],
          allowed_contributors: [String.t()]
        }

  defstruct allowed_secrets: [],
            allowed_contributors: []

  field :allowed_secrets, 1, repeated: true, type: :string, json_name: "allowedSecrets"
  field :allowed_contributors, 2, repeated: true, type: :string, json_name: "allowedContributors"
end

defmodule InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          path: String.t(),
          level: InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile.Level.t()
        }

  defstruct path: "",
            level: :BLOCK

  field :path, 1, type: :string

  field :level, 2,
    type: InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile.Level,
    enum: true
end

defmodule InternalApi.Projecthub.Project.Spec.Repository.Status do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          pipeline_files: [InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile.t()]
        }

  defstruct pipeline_files: []

  field :pipeline_files, 1,
    repeated: true,
    type: InternalApi.Projecthub.Project.Spec.Repository.Status.PipelineFile,
    json_name: "pipelineFiles"
end

defmodule InternalApi.Projecthub.Project.Spec.Repository.Whitelist do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          branches: [String.t()],
          tags: [String.t()]
        }

  defstruct branches: [],
            tags: []

  field :branches, 1, repeated: true, type: :string
  field :tags, 2, repeated: true, type: :string
end

defmodule InternalApi.Projecthub.Project.Spec.Repository do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          run_present: {:run, boolean},
          url: String.t(),
          name: String.t(),
          owner: String.t(),
          run_on: [InternalApi.Projecthub.Project.Spec.Repository.RunType.t()],
          forked_pull_requests:
            InternalApi.Projecthub.Project.Spec.Repository.ForkedPullRequests.t() | nil,
          pipeline_file: String.t(),
          status: InternalApi.Projecthub.Project.Spec.Repository.Status.t() | nil,
          whitelist: InternalApi.Projecthub.Project.Spec.Repository.Whitelist.t() | nil,
          public: boolean,
          integration_type: InternalApi.RepositoryIntegrator.IntegrationType.t(),
          connected: boolean,
          id: String.t()
        }

  defstruct run_present: nil,
            url: "",
            name: "",
            owner: "",
            run_on: [],
            forked_pull_requests: nil,
            pipeline_file: "",
            status: nil,
            whitelist: nil,
            public: false,
            integration_type: :GITHUB_OAUTH_TOKEN,
            connected: false,
            id: ""

  oneof(:run_present, 0)

  field :url, 1, type: :string
  field :name, 2, type: :string
  field :owner, 3, type: :string

  field :run_on, 4,
    repeated: true,
    type: InternalApi.Projecthub.Project.Spec.Repository.RunType,
    json_name: "runOn",
    enum: true

  field :forked_pull_requests, 5,
    type: InternalApi.Projecthub.Project.Spec.Repository.ForkedPullRequests,
    json_name: "forkedPullRequests"

  field :run, 6, type: :bool, oneof: 0
  field :pipeline_file, 7, type: :string, json_name: "pipelineFile"
  field :status, 8, type: InternalApi.Projecthub.Project.Spec.Repository.Status
  field :whitelist, 9, type: InternalApi.Projecthub.Project.Spec.Repository.Whitelist
  field :public, 10, type: :bool

  field :integration_type, 11,
    type: InternalApi.RepositoryIntegrator.IntegrationType,
    json_name: "integrationType",
    enum: true

  field :connected, 12, type: :bool
  field :id, 13, type: :string
end

defmodule InternalApi.Projecthub.Project.Spec.Scheduler do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          id: String.t(),
          name: String.t(),
          branch: String.t(),
          at: String.t(),
          pipeline_file: String.t()
        }

  defstruct id: "",
            name: "",
            branch: "",
            at: "",
            pipeline_file: ""

  field :id, 1, type: :string
  field :name, 2, type: :string
  field :branch, 3, type: :string
  field :at, 4, type: :string
  field :pipeline_file, 5, type: :string, json_name: "pipelineFile"
end

defmodule InternalApi.Projecthub.Project.Spec do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          repository: InternalApi.Projecthub.Project.Spec.Repository.t() | nil,
          schedulers: [InternalApi.Projecthub.Project.Spec.Scheduler.t()],
          private: boolean,
          public: boolean,
          visibility: InternalApi.Projecthub.Project.Spec.Visibility.t(),
          custom_permissions: boolean,
          debug_permissions: [InternalApi.Projecthub.Project.Spec.PermissionType.t()],
          attach_permissions: [InternalApi.Projecthub.Project.Spec.PermissionType.t()]
        }

  defstruct repository: nil,
            schedulers: [],
            private: false,
            public: false,
            visibility: :PRIVATE,
            custom_permissions: false,
            debug_permissions: [],
            attach_permissions: []

  field :repository, 1, type: InternalApi.Projecthub.Project.Spec.Repository
  field :schedulers, 2, repeated: true, type: InternalApi.Projecthub.Project.Spec.Scheduler
  field :private, 3, type: :bool
  field :public, 4, type: :bool
  field :visibility, 5, type: InternalApi.Projecthub.Project.Spec.Visibility, enum: true
  field :custom_permissions, 8, type: :bool, json_name: "customPermissions"

  field :debug_permissions, 6,
    repeated: true,
    type: InternalApi.Projecthub.Project.Spec.PermissionType,
    json_name: "debugPermissions",
    enum: true

  field :attach_permissions, 7,
    repeated: true,
    type: InternalApi.Projecthub.Project.Spec.PermissionType,
    json_name: "attachPermissions",
    enum: true
end

defmodule InternalApi.Projecthub.Project.Status.Cache do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          state: InternalApi.Projecthub.Project.Status.State.t()
        }

  defstruct state: :INITIALIZING

  field :state, 1, type: InternalApi.Projecthub.Project.Status.State, enum: true
end

defmodule InternalApi.Projecthub.Project.Status.ArtifactStore do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          state: InternalApi.Projecthub.Project.Status.State.t()
        }

  defstruct state: :INITIALIZING

  field :state, 1, type: InternalApi.Projecthub.Project.Status.State, enum: true
end

defmodule InternalApi.Projecthub.Project.Status.Repository do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          state: InternalApi.Projecthub.Project.Status.State.t()
        }

  defstruct state: :INITIALIZING

  field :state, 1, type: InternalApi.Projecthub.Project.Status.State, enum: true
end

defmodule InternalApi.Projecthub.Project.Status.Analysis do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          state: InternalApi.Projecthub.Project.Status.State.t()
        }

  defstruct state: :INITIALIZING

  field :state, 1, type: InternalApi.Projecthub.Project.Status.State, enum: true
end

defmodule InternalApi.Projecthub.Project.Status do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          state: InternalApi.Projecthub.Project.Status.State.t(),
          state_reason: String.t(),
          cache: InternalApi.Projecthub.Project.Status.Cache.t() | nil,
          artifact_store: InternalApi.Projecthub.Project.Status.ArtifactStore.t() | nil,
          repository: InternalApi.Projecthub.Project.Status.Repository.t() | nil,
          analysis: InternalApi.Projecthub.Project.Status.Analysis.t() | nil
        }

  defstruct state: :INITIALIZING,
            state_reason: "",
            cache: nil,
            artifact_store: nil,
            repository: nil,
            analysis: nil

  field :state, 1, type: InternalApi.Projecthub.Project.Status.State, enum: true
  field :state_reason, 2, type: :string, json_name: "stateReason"
  field :cache, 3, type: InternalApi.Projecthub.Project.Status.Cache

  field :artifact_store, 4,
    type: InternalApi.Projecthub.Project.Status.ArtifactStore,
    json_name: "artifactStore"

  field :repository, 5, type: InternalApi.Projecthub.Project.Status.Repository
  field :analysis, 6, type: InternalApi.Projecthub.Project.Status.Analysis
end

defmodule InternalApi.Projecthub.Project do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.Project.Metadata.t() | nil,
          spec: InternalApi.Projecthub.Project.Spec.t() | nil,
          status: InternalApi.Projecthub.Project.Status.t() | nil
        }

  defstruct metadata: nil,
            spec: nil,
            status: nil

  field :metadata, 1, type: InternalApi.Projecthub.Project.Metadata
  field :spec, 2, type: InternalApi.Projecthub.Project.Spec
  field :status, 3, type: InternalApi.Projecthub.Project.Status
end

defmodule InternalApi.Projecthub.ListRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          pagination: InternalApi.Projecthub.PaginationRequest.t() | nil,
          owner_id: String.t(),
          repo_url: String.t()
        }

  defstruct metadata: nil,
            pagination: nil,
            owner_id: "",
            repo_url: ""

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :pagination, 2, type: InternalApi.Projecthub.PaginationRequest
  field :owner_id, 3, type: :string, json_name: "ownerId"
  field :repo_url, 4, type: :string, json_name: "repoUrl"
end

defmodule InternalApi.Projecthub.ListResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          pagination: InternalApi.Projecthub.PaginationResponse.t() | nil,
          projects: [InternalApi.Projecthub.Project.t()]
        }

  defstruct metadata: nil,
            pagination: nil,
            projects: []

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
  field :pagination, 2, type: InternalApi.Projecthub.PaginationResponse
  field :projects, 3, repeated: true, type: InternalApi.Projecthub.Project
end

defmodule InternalApi.Projecthub.DescribeRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          id: String.t(),
          name: String.t(),
          detailed: boolean
        }

  defstruct metadata: nil,
            id: "",
            name: "",
            detailed: false

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :id, 2, type: :string
  field :name, 3, type: :string
  field :detailed, 4, type: :bool
end

defmodule InternalApi.Projecthub.DescribeResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          project: InternalApi.Projecthub.Project.t() | nil
        }

  defstruct metadata: nil,
            project: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
  field :project, 2, type: InternalApi.Projecthub.Project
end

defmodule InternalApi.Projecthub.DescribeManyRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          ids: [String.t()]
        }

  defstruct metadata: nil,
            ids: []

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :ids, 2, repeated: true, type: :string
end

defmodule InternalApi.Projecthub.DescribeManyResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          projects: [InternalApi.Projecthub.Project.t()]
        }

  defstruct metadata: nil,
            projects: []

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
  field :projects, 2, repeated: true, type: InternalApi.Projecthub.Project
end

defmodule InternalApi.Projecthub.CreateRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          project: InternalApi.Projecthub.Project.t() | nil
        }

  defstruct metadata: nil,
            project: nil

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :project, 2, type: InternalApi.Projecthub.Project
end

defmodule InternalApi.Projecthub.CreateResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          project: InternalApi.Projecthub.Project.t() | nil
        }

  defstruct metadata: nil,
            project: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
  field :project, 2, type: InternalApi.Projecthub.Project
end

defmodule InternalApi.Projecthub.UpdateRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          project: InternalApi.Projecthub.Project.t() | nil
        }

  defstruct metadata: nil,
            project: nil

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :project, 2, type: InternalApi.Projecthub.Project
end

defmodule InternalApi.Projecthub.UpdateResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          project: InternalApi.Projecthub.Project.t() | nil
        }

  defstruct metadata: nil,
            project: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
  field :project, 2, type: InternalApi.Projecthub.Project
end

defmodule InternalApi.Projecthub.DestroyRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          id: String.t(),
          name: String.t()
        }

  defstruct metadata: nil,
            id: "",
            name: ""

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :id, 2, type: :string
  field :name, 3, type: :string
end

defmodule InternalApi.Projecthub.DestroyResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil
        }

  defstruct metadata: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
end

defmodule InternalApi.Projecthub.UsersRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          id: String.t()
        }

  defstruct metadata: nil,
            id: ""

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :id, 2, type: :string
end

defmodule InternalApi.Projecthub.UsersResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          users: [InternalApi.User.User.t()]
        }

  defstruct metadata: nil,
            users: []

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
  field :users, 2, repeated: true, type: InternalApi.User.User
end

defmodule InternalApi.Projecthub.CheckDeployKeyRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          id: String.t()
        }

  defstruct metadata: nil,
            id: ""

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :id, 2, type: :string
end

defmodule InternalApi.Projecthub.CheckDeployKeyResponse.DeployKey do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          title: String.t(),
          fingerprint: String.t(),
          created_at: Google.Protobuf.Timestamp.t() | nil
        }

  defstruct title: "",
            fingerprint: "",
            created_at: nil

  field :title, 1, type: :string
  field :fingerprint, 2, type: :string
  field :created_at, 3, type: Google.Protobuf.Timestamp, json_name: "createdAt"
end

defmodule InternalApi.Projecthub.CheckDeployKeyResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          deploy_key: InternalApi.Projecthub.CheckDeployKeyResponse.DeployKey.t() | nil
        }

  defstruct metadata: nil,
            deploy_key: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta

  field :deploy_key, 2,
    type: InternalApi.Projecthub.CheckDeployKeyResponse.DeployKey,
    json_name: "deployKey"
end

defmodule InternalApi.Projecthub.RegenerateDeployKeyRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          id: String.t()
        }

  defstruct metadata: nil,
            id: ""

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :id, 2, type: :string
end

defmodule InternalApi.Projecthub.RegenerateDeployKeyResponse.DeployKey do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          title: String.t(),
          fingerprint: String.t(),
          created_at: Google.Protobuf.Timestamp.t() | nil
        }

  defstruct title: "",
            fingerprint: "",
            created_at: nil

  field :title, 1, type: :string
  field :fingerprint, 2, type: :string
  field :created_at, 3, type: Google.Protobuf.Timestamp, json_name: "createdAt"
end

defmodule InternalApi.Projecthub.RegenerateDeployKeyResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          deploy_key: InternalApi.Projecthub.RegenerateDeployKeyResponse.DeployKey.t() | nil
        }

  defstruct metadata: nil,
            deploy_key: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta

  field :deploy_key, 2,
    type: InternalApi.Projecthub.RegenerateDeployKeyResponse.DeployKey,
    json_name: "deployKey"
end

defmodule InternalApi.Projecthub.CheckWebhookRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          id: String.t()
        }

  defstruct metadata: nil,
            id: ""

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :id, 2, type: :string
end

defmodule InternalApi.Projecthub.CheckWebhookResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          webhook: InternalApi.Projecthub.Webhook.t() | nil
        }

  defstruct metadata: nil,
            webhook: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
  field :webhook, 2, type: InternalApi.Projecthub.Webhook
end

defmodule InternalApi.Projecthub.RegenerateWebhookRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          id: String.t()
        }

  defstruct metadata: nil,
            id: ""

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :id, 2, type: :string
end

defmodule InternalApi.Projecthub.RegenerateWebhookResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          webhook: InternalApi.Projecthub.Webhook.t() | nil
        }

  defstruct metadata: nil,
            webhook: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
  field :webhook, 2, type: InternalApi.Projecthub.Webhook
end

defmodule InternalApi.Projecthub.Webhook do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          url: String.t()
        }

  defstruct url: ""

  field :url, 1, type: :string
end

defmodule InternalApi.Projecthub.ChangeProjectOwnerRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          id: String.t(),
          user_id: String.t()
        }

  defstruct metadata: nil,
            id: "",
            user_id: ""

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :id, 2, type: :string
  field :user_id, 3, type: :string, json_name: "userId"
end

defmodule InternalApi.Projecthub.ChangeProjectOwnerResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil
        }

  defstruct metadata: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
end

defmodule InternalApi.Projecthub.ForkAndCreateRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          project: InternalApi.Projecthub.Project.t() | nil
        }

  defstruct metadata: nil,
            project: nil

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :project, 2, type: InternalApi.Projecthub.Project
end

defmodule InternalApi.Projecthub.ForkAndCreateResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil,
          project: InternalApi.Projecthub.Project.t() | nil
        }

  defstruct metadata: nil,
            project: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
  field :project, 2, type: InternalApi.Projecthub.Project
end

defmodule InternalApi.Projecthub.GithubAppSwitchRequest do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.RequestMeta.t() | nil,
          id: String.t()
        }

  defstruct metadata: nil,
            id: ""

  field :metadata, 1, type: InternalApi.Projecthub.RequestMeta
  field :id, 2, type: :string
end

defmodule InternalApi.Projecthub.GithubAppSwitchResponse do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          metadata: InternalApi.Projecthub.ResponseMeta.t() | nil
        }

  defstruct metadata: nil

  field :metadata, 1, type: InternalApi.Projecthub.ResponseMeta
end

defmodule InternalApi.Projecthub.ProjectCreated do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          project_id: String.t(),
          timestamp: Google.Protobuf.Timestamp.t() | nil,
          org_id: String.t()
        }

  defstruct project_id: "",
            timestamp: nil,
            org_id: ""

  field :project_id, 1, type: :string, json_name: "projectId"
  field :timestamp, 2, type: Google.Protobuf.Timestamp
  field :org_id, 3, type: :string, json_name: "orgId"
end

defmodule InternalApi.Projecthub.ProjectDeleted do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          project_id: String.t(),
          timestamp: Google.Protobuf.Timestamp.t() | nil,
          org_id: String.t()
        }

  defstruct project_id: "",
            timestamp: nil,
            org_id: ""

  field :project_id, 1, type: :string, json_name: "projectId"
  field :timestamp, 2, type: Google.Protobuf.Timestamp
  field :org_id, 3, type: :string, json_name: "orgId"
end

defmodule InternalApi.Projecthub.ProjectUpdated do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          project_id: String.t(),
          org_id: String.t(),
          timestamp: Google.Protobuf.Timestamp.t() | nil
        }

  defstruct project_id: "",
            org_id: "",
            timestamp: nil

  field :project_id, 1, type: :string, json_name: "projectId"
  field :org_id, 2, type: :string, json_name: "orgId"
  field :timestamp, 3, type: Google.Protobuf.Timestamp
end

defmodule InternalApi.Projecthub.CollaboratorsChanged do
  @moduledoc false
  use Protobuf, syntax: :proto3

  @type t :: %__MODULE__{
          project_id: String.t(),
          timestamp: Google.Protobuf.Timestamp.t() | nil
        }

  defstruct project_id: "",
            timestamp: nil

  field :project_id, 1, type: :string, json_name: "projectId"
  field :timestamp, 2, type: Google.Protobuf.Timestamp
end

defmodule InternalApi.Projecthub.ProjectService.Service do
  @moduledoc false
  use GRPC.Service, name: "InternalApi.Projecthub.ProjectService"

  rpc :List, InternalApi.Projecthub.ListRequest, InternalApi.Projecthub.ListResponse

  rpc :Describe, InternalApi.Projecthub.DescribeRequest, InternalApi.Projecthub.DescribeResponse

  rpc :DescribeMany,
      InternalApi.Projecthub.DescribeManyRequest,
      InternalApi.Projecthub.DescribeManyResponse

  rpc :Create, InternalApi.Projecthub.CreateRequest, InternalApi.Projecthub.CreateResponse

  rpc :Update, InternalApi.Projecthub.UpdateRequest, InternalApi.Projecthub.UpdateResponse

  rpc :Destroy, InternalApi.Projecthub.DestroyRequest, InternalApi.Projecthub.DestroyResponse

  rpc :Users, InternalApi.Projecthub.UsersRequest, InternalApi.Projecthub.UsersResponse

  rpc :CheckDeployKey,
      InternalApi.Projecthub.CheckDeployKeyRequest,
      InternalApi.Projecthub.CheckDeployKeyResponse

  rpc :RegenerateDeployKey,
      InternalApi.Projecthub.RegenerateDeployKeyRequest,
      InternalApi.Projecthub.RegenerateDeployKeyResponse

  rpc :CheckWebhook,
      InternalApi.Projecthub.CheckWebhookRequest,
      InternalApi.Projecthub.CheckWebhookResponse

  rpc :RegenerateWebhook,
      InternalApi.Projecthub.RegenerateWebhookRequest,
      InternalApi.Projecthub.RegenerateWebhookResponse

  rpc :ChangeProjectOwner,
      InternalApi.Projecthub.ChangeProjectOwnerRequest,
      InternalApi.Projecthub.ChangeProjectOwnerResponse

  rpc :ForkAndCreate,
      InternalApi.Projecthub.ForkAndCreateRequest,
      InternalApi.Projecthub.ForkAndCreateResponse

  rpc :GithubAppSwitch,
      InternalApi.Projecthub.GithubAppSwitchRequest,
      InternalApi.Projecthub.GithubAppSwitchResponse
end

defmodule InternalApi.Projecthub.ProjectService.Stub do
  @moduledoc false
  use GRPC.Stub, service: InternalApi.Projecthub.ProjectService.Service
end
