# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: twirp/code.justin.tv.subs.chronobreak/service.proto

require 'google/protobuf'

require 'google/protobuf/timestamp_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
  add_message "subs.PreviewTenureRequest" do
    optional :owner_id, :string, 1
    optional :item_id, :string, 2
    optional :domain, :string, 3
    optional :start, :message, 4, "google.protobuf.Timestamp"
    optional :end, :message, 5, "google.protobuf.Timestamp"
    optional :tenure_date, :message, 6, "google.protobuf.Timestamp"
  end
  add_message "subs.PreviewTenureResponse" do
    optional :owner_id, :string, 1
    optional :item_id, :string, 2
    optional :domain, :string, 3
    optional :streak_value, :int32, 4
    optional :tenure_value, :int32, 5
  end
  add_message "subs.ReadTenureRequest" do
    optional :owner_id, :string, 1
    optional :item_id, :string, 2
    optional :domain, :string, 3
    optional :tenure_method, :enum, 4, "subs.TenureMethod"
    optional :tenure_date, :message, 5, "google.protobuf.Timestamp"
  end
  add_message "subs.ReadTenureResponse" do
    optional :owner_id, :string, 1
    optional :item_id, :string, 2
    optional :domain, :string, 3
    optional :tenure_value, :int32, 4
    optional :tenure_method, :enum, 5, "subs.TenureMethod"
    optional :start, :message, 6, "google.protobuf.Timestamp"
    optional :end, :message, 7, "google.protobuf.Timestamp"
    optional :elapsedDays, :int32, 8
    optional :daysRemaining, :int32, 9
  end
  add_message "subs.ReadTenuresRequest" do
    optional :owner_id, :string, 1
    optional :item_id, :string, 2
    optional :domain, :string, 3
    optional :tenure_method, :enum, 4, "subs.TenureMethod"
  end
  add_message "subs.ReadTenuresResponse" do
    repeated :tenures, :message, 1, "subs.Tenure"
  end
  add_message "subs.Tenure" do
    optional :id, :string, 1
    optional :owner_id, :string, 2
    optional :item_id, :string, 3
    optional :domain, :string, 4
    optional :method, :enum, 5, "subs.TenureMethod"
    optional :value, :int32, 6
    optional :action, :enum, 7, "subs.Action"
    optional :start, :message, 8, "google.protobuf.Timestamp"
    optional :end, :message, 9, "google.protobuf.Timestamp"
  end
  add_message "subs.UpsertGrantRequest" do
    optional :owner_id, :string, 1
    optional :item_id, :string, 2
    optional :origin_id, :string, 3
    optional :domain, :string, 4
    optional :start, :message, 5, "google.protobuf.Timestamp"
    optional :end, :message, 6, "google.protobuf.Timestamp"
    optional :action, :string, 7
  end
  add_message "subs.UpsertGrantResponse" do
  end
  add_message "subs.ReadGrantsRequest" do
    optional :owner_id, :string, 1
    optional :item_id, :string, 2
    optional :domain, :string, 4
  end
  add_message "subs.ReadGrantsResponse" do
    repeated :grants, :message, 1, "subs.Grant"
  end
  add_message "subs.Grant" do
    optional :id, :string, 1
    optional :owner_id, :string, 2
    optional :domain, :string, 3
    optional :item_id, :string, 4
    optional :origin, :string, 5
    optional :action, :string, 6
    optional :start, :message, 7, "google.protobuf.Timestamp"
    optional :end, :message, 8, "google.protobuf.Timestamp"
    optional :updated_at, :message, 9, "google.protobuf.Timestamp"
    optional :created_at, :message, 10, "google.protobuf.Timestamp"
  end
  add_message "subs.DeleteOverrideGrantRequest" do
    optional :owner_id, :string, 1
    optional :item_id, :string, 2
    optional :domain, :string, 3
    optional :origin_id, :string, 4
  end
  add_message "subs.DeleteOverrideGrantResponse" do
  end
  add_enum "subs.TenureMethod" do
    value :CUMULATIVE, 0
    value :STREAK, 1
  end
  add_enum "subs.Action" do
    value :NONE, 0
    value :CREATED, 1
    value :CANCELED, 2
    value :BACKFILLED, 3
    value :GRANDFATHERED, 4
  end
end

module Subs
  PreviewTenureRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.PreviewTenureRequest").msgclass
  PreviewTenureResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.PreviewTenureResponse").msgclass
  ReadTenureRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.ReadTenureRequest").msgclass
  ReadTenureResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.ReadTenureResponse").msgclass
  ReadTenuresRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.ReadTenuresRequest").msgclass
  ReadTenuresResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.ReadTenuresResponse").msgclass
  Tenure = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.Tenure").msgclass
  UpsertGrantRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.UpsertGrantRequest").msgclass
  UpsertGrantResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.UpsertGrantResponse").msgclass
  ReadGrantsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.ReadGrantsRequest").msgclass
  ReadGrantsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.ReadGrantsResponse").msgclass
  Grant = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.Grant").msgclass
  DeleteOverrideGrantRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.DeleteOverrideGrantRequest").msgclass
  DeleteOverrideGrantResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.DeleteOverrideGrantResponse").msgclass
  TenureMethod = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.TenureMethod").enummodule
  Action = Google::Protobuf::DescriptorPool.generated_pool.lookup("subs.Action").enummodule
end
