# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

# FB:AUTOGEN

module FacebookAds
  # This class is auto-generated.

  # For any issues or feature requests related to this class, please let us know
  # on github and we'll fix in our codegen framework. We'll not be able to accept
  # pull request for this class.

  class IgUserForIgOnlyApi < AdObject

    field :account_type, 'string'
    field :biography, 'string'
    field :followers_count, 'int'
    field :follows_count, 'int'
    field :id, 'string'
    field :media_count, 'int'
    field :name, 'string'
    field :profile_picture_url, 'string'
    field :user_id, 'int'
    field :username, 'string'
    field :website, 'string'
    has_no_post
    has_no_delete

    has_edge :business_messaging_feature_status do |edge|
      edge.get do |api|
        api.has_param :feature, 'string'
      end
    end

    has_edge :content_publishing_limit do |edge|
      edge.get 'ContentPublishingLimitResponse' do |api|
        api.has_param :since, 'datetime'
      end
    end

    has_edge :conversations do |edge|
      edge.get 'UnifiedThread' do |api|
        api.has_param :folder, 'string'
        api.has_param :is_owner, 'bool'
        api.has_param :platform, { enum: -> { UnifiedThread::PLATFORM }}
        api.has_param :tags, { list: 'string' }
        api.has_param :user_id, 'string'
      end
    end

    has_edge :insights do |edge|
      edge.get 'InsightsResult' do |api|
        api.has_param :breakdown, { list: { enum: -> { InsightsResult::BREAKDOWN }} }
        api.has_param :metric, { list: { enum: -> { InsightsResult::METRIC }} }
        api.has_param :metric_type, { enum: -> { InsightsResult::METRIC_TYPE }}
        api.has_param :period, { list: { enum: -> { InsightsResult::PERIOD }} }
        api.has_param :since, 'datetime'
        api.has_param :timeframe, { enum: -> { InsightsResult::TIMEFRAME }}
        api.has_param :until, 'datetime'
      end
    end

    has_edge :live_media do |edge|
      edge.get
    end

    has_edge :media do |edge|
      edge.get do |api|
        api.has_param :since, 'datetime'
        api.has_param :until, 'datetime'
      end
      edge.post do |api|
        api.has_param :alt_text, 'string'
        api.has_param :audio_name, 'string'
        api.has_param :caption, 'string'
        api.has_param :children, { list: 'string' }
        api.has_param :collaborators, { list: 'string' }
        api.has_param :cover_url, 'string'
        api.has_param :image_url, 'string'
        api.has_param :is_carousel_item, 'bool'
        api.has_param :location_id, 'string'
        api.has_param :media_type, 'string'
        api.has_param :product_tags, { list: 'hash' }
        api.has_param :share_to_feed, 'bool'
        api.has_param :thumb_offset, 'string'
        api.has_param :upload_type, 'string'
        api.has_param :user_tags, { list: 'hash' }
        api.has_param :video_url, 'string'
      end
    end

    has_edge :mediapublish do |edge|
      edge.post do |api|
        api.has_param :creation_id, 'int'
      end
    end

    has_edge :mentions do |edge|
      edge.post do |api|
        api.has_param :comment_id, 'string'
        api.has_param :media_id, 'string'
        api.has_param :message, 'string'
      end
    end

    has_edge :messageattachments do |edge|
      edge.post do |api|
        api.has_param :message, 'object'
      end
    end

    has_edge :messages do |edge|
      edge.post do |api|
        api.has_param :message, 'object'
        api.has_param :messaging_type, { enum: %w{MESSAGE_TAG RESPONSE UPDATE UTILITY }}
        api.has_param :payload, 'string'
        api.has_param :recipient, 'object'
        api.has_param :sender_action, { enum: %w{MARK_SEEN REACT TYPING_OFF TYPING_ON UNREACT }}
        api.has_param :tag, 'object'
        api.has_param :thread_control, 'object'
      end
    end

    has_edge :messenger_profile do |edge|
      edge.delete do |api|
        api.has_param :fields, { list: { enum: %w{ACCOUNT_LINKING_URL COMMANDS DESCRIPTION GET_STARTED GREETING HOME_URL ICE_BREAKERS PERSISTENT_MENU PLATFORM SUBJECT_TO_NEW_EU_PRIVACY_RULES TITLE WHITELISTED_DOMAINS }} }
      end
      edge.get
      edge.post do |api|
        api.has_param :ice_breakers, { list: 'hash' }
        api.has_param :persistent_menu, { list: 'object' }
      end
    end

    has_edge :stories do |edge|
      edge.get
    end

    has_edge :subscribed_apps do |edge|
      edge.delete
      edge.get
      edge.post do |api|
        api.has_param :subscribed_fields, { list: { enum: %w{comment_poll_response comments creator_marketplace_invited_creator_onboarding creator_marketplace_projects delta follow live_comments mentions message_edit message_reactions messages messaging_handover messaging_optins messaging_postbacks messaging_referral messaging_seen onboarding_welcome_message_series share_to_story standby story_insights story_poll_response story_reactions }} }
      end
    end

    has_edge :tags do |edge|
      edge.get
    end

    has_edge :welcome_message_flows do |edge|
      edge.delete do |api|
        api.has_param :flow_id, 'string'
      end
      edge.get 'CtxPartnerAppWelcomeMessageFlow' do |api|
        api.has_param :app_id, 'string'
        api.has_param :flow_id, 'string'
      end
      edge.post do |api|
        api.has_param :eligible_platforms, { list: { enum: %w{INSTAGRAM MESSENGER WHATSAPP }} }
        api.has_param :flow_id, 'string'
        api.has_param :name, 'string'
        api.has_param :welcome_message_flow, { list: 'object' }
      end
    end

  end
end
