FIRRemoteModel.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #import <Foundation/Foundation.h>
  2. @class FIRModelDownloadConditions;
  3. NS_ASSUME_NONNULL_BEGIN
  4. /** A model that is stored remotely on the server and downloaded to the device. */
  5. NS_SWIFT_NAME(RemoteModel)
  6. @interface FIRRemoteModel : NSObject
  7. /** The model name. */
  8. @property(nonatomic, copy, readonly) NSString *name;
  9. /** Indicates whether model updates are allowed. */
  10. @property(nonatomic, readonly) BOOL allowsModelUpdates;
  11. /** Initial downloading conditions for the model. */
  12. @property(nonatomic, readonly) FIRModelDownloadConditions *initialConditions;
  13. /** Downloading conditions for subsequent calls to update the model. */
  14. @property(nonatomic, readonly) FIRModelDownloadConditions *updateConditions;
  15. /**
  16. * Creates an instance of `RemoteModel` with the given name and download conditions.
  17. *
  18. * @param name The name of the remote model. Specify the name assigned to the model when it was
  19. * uploaded to the Firebase Console. Within the same Firebase app, all remote models should have
  20. * distinct names.
  21. * @param allowsModelUpdates Indicates whether model updates are allowed.
  22. * @param initialConditions Initial downloading conditions for the model.
  23. * @param updateConditions Downloading conditions for subsequent calls to update the model. If `nil`
  24. * is passed and `allowsModelUpdates` is `YES`, the default download conditions are used via the
  25. * `ModelDownloadConditions` `init` call.
  26. * @return A new `RemoteModel` instance.
  27. */
  28. - (instancetype)initWithName:(NSString *)name
  29. allowsModelUpdates:(BOOL)allowsModelUpdates
  30. initialConditions:(FIRModelDownloadConditions *)initialConditions
  31. updateConditions:(nullable FIRModelDownloadConditions *)updateConditions
  32. NS_SWIFT_NAME(init(name:allowsModelUpdates:initialConditions:updateConditions:));
  33. /** Unavailable. */
  34. - (instancetype)init NS_UNAVAILABLE;
  35. @end
  36. NS_ASSUME_NONNULL_END