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

require 'google/protobuf'

require 'google/protobuf/timestamp_pb'
require 'google/protobuf/wrappers_pb'

Google::Protobuf::DescriptorPool.generated_pool.build do
  add_file("twirp/code.justin.tv.revenue.mulan/service.proto", :syntax => :proto3) do
    add_message "code.justin.tv.revenue.mulan.GetPurchaseProfilesByTicketIDsRequest" do
      repeated :ticket_ids, :int64, 1
    end
    add_message "code.justin.tv.revenue.mulan.GetPurchaseProfilesByTicketIDsResponse" do
      map :purchase_profiles, :int64, :message, 1, "code.justin.tv.revenue.mulan.PurchaseProfile"
    end
    add_message "code.justin.tv.revenue.mulan.GetUnacknowledgedSubscriptionEventsRequest" do
      optional :user_id, :int64, 1
      optional :platform, :enum, 2, "code.justin.tv.revenue.mulan.Platform"
    end
    add_message "code.justin.tv.revenue.mulan.SubscriptionEvent" do
      optional :ext_product_id, :string, 1
      optional :subscription_id, :string, 2
      optional :status, :enum, 3, "code.justin.tv.revenue.mulan.SubscriptionState"
      optional :owner_id, :string, 4
      optional :end_date, :message, 5, "google.protobuf.Timestamp"
    end
    add_message "code.justin.tv.revenue.mulan.GetUnacknowledgedSubscriptionEventsResponse" do
      repeated :unacknowledgedEvents, :message, 1, "code.justin.tv.revenue.mulan.SubscriptionEvent"
    end
    add_message "code.justin.tv.revenue.mulan.GetSubscriptionsByIDsRequest" do
      repeated :ids, :string, 1
    end
    add_message "code.justin.tv.revenue.mulan.GetSubscriptionsByIDsResponse" do
      map :subscriptions, :string, :message, 1, "code.justin.tv.revenue.mulan.Subscription"
    end
    add_message "code.justin.tv.revenue.mulan.GetPurchaseOrdersByIDsRequest" do
      repeated :ids, :string, 1
    end
    add_message "code.justin.tv.revenue.mulan.GetPurchaseOrdersByIDsResponse" do
      map :purchase_orders, :string, :message, 1, "code.justin.tv.revenue.mulan.Purchase"
    end
    add_message "code.justin.tv.revenue.mulan.GetPurchaseOrderPaymentsByIDsRequest" do
      repeated :ids, :string, 1
    end
    add_message "code.justin.tv.revenue.mulan.GetPurchaseOrderPaymentsByIDsResponse" do
      map :purchase_order_payments, :string, :message, 1, "code.justin.tv.revenue.mulan.PurchaseOrderPayments"
    end
    add_message "code.justin.tv.revenue.mulan.Purchase" do
      optional :id, :string, 1
      optional :payment_provider, :string, 2
      optional :purchaser_id, :int64, 3
      optional :platform, :string, 4
      optional :product_id, :string, 5
      optional :ext_product_id, :string, 6
      optional :is_refundable, :bool, 7
      optional :paid_on, :message, 8, "google.protobuf.Timestamp"
      optional :state_deprecated, :string, 9
      optional :renewal_date, :message, 10, "google.protobuf.Timestamp"
      optional :tenant, :string, 11
      optional :is_gift, :bool, 12
      optional :state, :enum, 13, "code.justin.tv.revenue.mulan.OrderState"
      optional :state_details, :string, 14
    end
    add_message "code.justin.tv.revenue.mulan.PurchaseOrderPayments" do
      repeated :purchase_order_payments, :message, 1, "code.justin.tv.revenue.mulan.PurchaseOrderPayment"
    end
    add_message "code.justin.tv.revenue.mulan.PurchaseOrderPayment" do
      optional :payment_gateway, :string, 1
      optional :ext_transaction_id, :string, 2
      optional :gross_amount_usd, :int64, 3
      optional :fees_usd, :int64, 4
      optional :taxes_usd, :int64, 5
      optional :gross_amount, :int64, 6
      optional :fees, :int64, 7
      optional :taxes, :int64, 8
      optional :currency, :string, 9
      optional :state, :string, 10
      optional :details, :string, 11
      optional :gateway, :string, 12
    end
    add_message "code.justin.tv.revenue.mulan.QueryPurchaseProfileRequest" do
      optional :id, :int64, 1
      optional :created_on_end, :message, 2, "google.protobuf.Timestamp"
      optional :created_on_start, :message, 3, "google.protobuf.Timestamp"
      optional :ext_purchaser_id, :string, 4
      optional :ext_subscription_id, :string, 5
      optional :paying, :message, 6, "google.protobuf.BoolValue"
      repeated :payment_provider, :string, 7
      repeated :purchasable_id, :int64, 8
      optional :purchaser_email, :string, 9
      optional :purchaser_id, :int64, 10
      optional :purchaser_name, :string, 11
      optional :state, :string, 12
      repeated :ticket_owner_id, :int64, 13
      repeated :ticket_product_id, :int64, 14
      optional :updated_on_end, :message, 15, "google.protobuf.Timestamp"
      optional :updated_on_start, :message, 16, "google.protobuf.Timestamp"
      optional :will_renew, :message, 17, "google.protobuf.BoolValue"
      optional :full_details, :message, 18, "google.protobuf.BoolValue"
      optional :page, :int64, 19
      optional :per_page, :string, 20
      repeated :ids, :string, 21
    end
    add_message "code.justin.tv.revenue.mulan.QueryPurchaseProfileResponse" do
      repeated :purchase_profiles, :message, 1, "code.justin.tv.revenue.mulan.PurchaseProfile"
    end
    add_message "code.justin.tv.revenue.mulan.PurchaseProfile" do
      optional :id, :int64, 1
      optional :state, :string, 2
      optional :platform, :string, 3
      optional :payment_provider, :string, 4
      optional :ext_subscription_id, :string, 5
      optional :ext_purchaser_id, :string, 6
      optional :ticket_id, :int64, 7
      optional :purchaser_id, :int64, 8
      optional :purchaser_name, :string, 9
      optional :purchaser_email, :string, 10
      optional :created_on, :message, 11, "google.protobuf.Timestamp"
      optional :updated_on, :message, 12, "google.protobuf.Timestamp"
      optional :will_renew, :bool, 13
      optional :purchase_datetime, :message, 14, "google.protobuf.Timestamp"
      optional :cancel_datetime, :message, 15, "google.protobuf.Timestamp"
      optional :do_not_renew_datetime, :message, 16, "google.protobuf.Timestamp"
      optional :is_paying, :bool, 17
      optional :is_recurring, :bool, 18
      optional :is_test, :bool, 19
      optional :product_type, :string, 20
      optional :last_payment_date, :message, 21, "google.protobuf.Timestamp"
      optional :paid_on, :message, 22, "google.protobuf.Timestamp"
      optional :expires_on, :message, 23, "google.protobuf.Timestamp"
      optional :renewal_date, :message, 24, "google.protobuf.Timestamp"
      optional :is_refundable, :bool, 25
      optional :is_expired, :bool, 26
      optional :is_gift, :bool, 27
      optional :ticket_owner_id, :int64, 28
      optional :ticket_product_id, :string, 29
    end
    add_message "code.justin.tv.revenue.mulan.GetActiveSubscriptionsByUserIDAndTenantRequest" do
      optional :tenant, :string, 1
      optional :user_id, :int64, 2
    end
    add_message "code.justin.tv.revenue.mulan.GetActiveSubscriptionsByUserIDAndTenantResponse" do
      repeated :subscriptions, :message, 1, "code.justin.tv.revenue.mulan.Subscription"
    end
    add_message "code.justin.tv.revenue.mulan.Price" do
      optional :currency, :string, 1
    end
    add_message "code.justin.tv.revenue.mulan.Subscription" do
      optional :id, :string, 1
      optional :state, :enum, 2, "code.justin.tv.revenue.mulan.SubscriptionState"
      optional :platform, :string, 3
      optional :user_id, :int64, 4
      optional :product_id, :string, 5
      optional :ext_subscription_id, :string, 6
      optional :ext_product_id, :string, 7
      optional :payment_gateway, :string, 8
      optional :tenant, :string, 9
      optional :expires_at, :message, 10, "google.protobuf.Timestamp"
      optional :created_at, :message, 11, "google.protobuf.Timestamp"
      optional :updated_at, :message, 12, "google.protobuf.Timestamp"
      optional :purchased_at, :message, 13, "google.protobuf.Timestamp"
      optional :renewal_date, :message, 14, "google.protobuf.Timestamp"
      optional :is_refundable, :bool, 15
      optional :tenant_id, :string, 16
      optional :price, :message, 17, "code.justin.tv.revenue.mulan.Price"
    end
    add_message "code.justin.tv.revenue.mulan.GetAggregatedPurchaseOrderAmountsRequest" do
      optional :purchaser_id, :int64, 1
      optional :created_after, :message, 2, "google.protobuf.Timestamp"
    end
    add_message "code.justin.tv.revenue.mulan.GetAggregatedPurchaseOrderAmountsResponse" do
      map :order_aggregations, :string, :message, 1, "code.justin.tv.revenue.mulan.AmountAggregations"
    end
    add_message "code.justin.tv.revenue.mulan.AmountAggregations" do
      repeated :aggregations, :message, 1, "code.justin.tv.revenue.mulan.AggregationsPerCurrency"
    end
    add_message "code.justin.tv.revenue.mulan.AggregationsPerCurrency" do
      optional :currency, :string, 1
      optional :gross_amount, :int64, 2
      optional :gross_amount_usd, :int64, 3
    end
    add_message "code.justin.tv.revenue.mulan.GetMaterializedOfferRequest" do
      optional :purchase_order_id, :string, 1
    end
    add_message "code.justin.tv.revenue.mulan.GetMaterializedOfferResponse" do
      optional :materialized_offer, :string, 1
      optional :offer_id, :string, 2
      optional :promotion_id, :string, 3
      optional :promotion_name, :string, 4
    end
    add_message "code.justin.tv.revenue.mulan.BalanceEvent" do
      optional :date, :message, 1, "google.protobuf.Timestamp"
      optional :gross_amount_usd, :int64, 2
      optional :gross_amount, :int64, 3
      optional :currency, :string, 4
      optional :purchase_order_id, :string, 5
      optional :product_type, :string, 6
    end
    add_message "code.justin.tv.revenue.mulan.GetBalanceHistoryRequest" do
      optional :user_id, :int64, 1
    end
    add_message "code.justin.tv.revenue.mulan.GetBalanceHistoryResponse" do
      repeated :balance_events, :message, 1, "code.justin.tv.revenue.mulan.BalanceEvent"
    end
    add_enum "code.justin.tv.revenue.mulan.SubscriptionState" do
      value :UNKNOWN, 0
      value :ACTIVE, 1
      value :DNR_INITIATED, 2
      value :WILL_NOT_RENEW, 3
      value :CANCEL_INITIATED, 4
      value :CANCELLED, 5
      value :ON_HOLD, 6
    end
    add_enum "code.justin.tv.revenue.mulan.OrderState" do
      value :UNKNOWN_ORDER_STATE, 0
      value :INITIATED, 1
      value :FULFILLMENT_INITIATED, 2
      value :REFUND_INITIATED, 3
      value :REFUND_APPLIED, 4
      value :REFUND_FAILED, 5
      value :FAILED, 6
      value :SUCCESS, 7
      value :PAYMENT_PENDING, 8
      value :CANCEL_BENEFITS_INITIATED, 9
      value :BENEFITS_CANCELLED, 10
      value :THREE_D_SECURE_CHALLENGE_REQUIRED, 11
    end
    add_enum "code.justin.tv.revenue.mulan.Platform" do
      value :ANDROID, 0
      value :IOS, 1
      value :WEB, 2
    end
  end
end

module Code
  module Justin
    module Tv
      module Revenue
        module Mulan
          GetPurchaseProfilesByTicketIDsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetPurchaseProfilesByTicketIDsRequest").msgclass
          GetPurchaseProfilesByTicketIDsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetPurchaseProfilesByTicketIDsResponse").msgclass
          GetUnacknowledgedSubscriptionEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetUnacknowledgedSubscriptionEventsRequest").msgclass
          SubscriptionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.SubscriptionEvent").msgclass
          GetUnacknowledgedSubscriptionEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetUnacknowledgedSubscriptionEventsResponse").msgclass
          GetSubscriptionsByIDsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetSubscriptionsByIDsRequest").msgclass
          GetSubscriptionsByIDsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetSubscriptionsByIDsResponse").msgclass
          GetPurchaseOrdersByIDsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetPurchaseOrdersByIDsRequest").msgclass
          GetPurchaseOrdersByIDsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetPurchaseOrdersByIDsResponse").msgclass
          GetPurchaseOrderPaymentsByIDsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetPurchaseOrderPaymentsByIDsRequest").msgclass
          GetPurchaseOrderPaymentsByIDsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetPurchaseOrderPaymentsByIDsResponse").msgclass
          Purchase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.Purchase").msgclass
          PurchaseOrderPayments = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.PurchaseOrderPayments").msgclass
          PurchaseOrderPayment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.PurchaseOrderPayment").msgclass
          QueryPurchaseProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.QueryPurchaseProfileRequest").msgclass
          QueryPurchaseProfileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.QueryPurchaseProfileResponse").msgclass
          PurchaseProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.PurchaseProfile").msgclass
          GetActiveSubscriptionsByUserIDAndTenantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetActiveSubscriptionsByUserIDAndTenantRequest").msgclass
          GetActiveSubscriptionsByUserIDAndTenantResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetActiveSubscriptionsByUserIDAndTenantResponse").msgclass
          Price = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.Price").msgclass
          Subscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.Subscription").msgclass
          GetAggregatedPurchaseOrderAmountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetAggregatedPurchaseOrderAmountsRequest").msgclass
          GetAggregatedPurchaseOrderAmountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetAggregatedPurchaseOrderAmountsResponse").msgclass
          AmountAggregations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.AmountAggregations").msgclass
          AggregationsPerCurrency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.AggregationsPerCurrency").msgclass
          GetMaterializedOfferRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetMaterializedOfferRequest").msgclass
          GetMaterializedOfferResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetMaterializedOfferResponse").msgclass
          BalanceEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.BalanceEvent").msgclass
          GetBalanceHistoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetBalanceHistoryRequest").msgclass
          GetBalanceHistoryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.GetBalanceHistoryResponse").msgclass
          SubscriptionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.SubscriptionState").enummodule
          OrderState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.OrderState").enummodule
          Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("code.justin.tv.revenue.mulan.Platform").enummodule
        end
      end
    end
  end
end
