Class: Google::Apis::AndroidenterpriseV1::Entitlement
- Inherits:
-
Object
- Object
- Google::Apis::AndroidenterpriseV1::Entitlement
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/androidenterprise_v1/classes.rb,
generated/google/apis/androidenterprise_v1/representations.rb,
generated/google/apis/androidenterprise_v1/representations.rb
Overview
The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise. It should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the EMM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails. Note that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices. The API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted. Entitlements for paid apps that are due to purchases by the user on a non- managed profile will have "userPurchase" as entitlement reason; those entitlements cannot be removed via the API.
Instance Attribute Summary collapse
-
#kind ⇒ String
Identifies what kind of resource this is.
-
#product_id ⇒ String
The ID of the product that the entitlement is for, e.g.
-
#reason ⇒ String
The reason for the entitlement, e.g.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Entitlement
constructor
A new instance of Entitlement.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Entitlement
Returns a new instance of Entitlement.
774 775 776 |
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 774 def initialize(**args) update!(**args) end |
Instance Attribute Details
#kind ⇒ String
Identifies what kind of resource this is. Value: the fixed string "
androidenterprise#entitlement".
Corresponds to the JSON property kind
760 761 762 |
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 760 def kind @kind end |
#product_id ⇒ String
The ID of the product that the entitlement is for, e.g. "app:com.google.
android.gm".
Corresponds to the JSON property productId
766 767 768 |
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 766 def product_id @product_id end |
#reason ⇒ String
The reason for the entitlement, e.g. "free" for free apps. This is temporary,
it will be replaced by the acquisition kind field of group licenses.
Corresponds to the JSON property reason
772 773 774 |
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 772 def reason @reason end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
779 780 781 782 783 |
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 779 def update!(**args) @kind = args[:kind] if args.key?(:kind) @product_id = args[:product_id] if args.key?(:product_id) @reason = args[:reason] if args.key?(:reason) end |