androidenterprise  v1
Public Member Functions | Static Public Member Functions | List of all members
google_androidenterprise_api::Entitlement Class Reference

#include <entitlement.h>

Inheritance diagram for google_androidenterprise_api::Entitlement:

Public Member Functions

 Entitlement (const Json::Value &storage)
 
 Entitlement (Json::Value *storage)
 
virtual ~Entitlement ()
 
const StringPiece GetTypeName () const
 
bool has_kind () const
 
void clear_kind ()
 
const StringPiece get_kind () const
 
void set_kind (const StringPiece &value)
 
bool has_product_id () const
 
void clear_product_id ()
 
const StringPiece get_product_id () const
 
void set_product_id (const StringPiece &value)
 
bool has_reason () const
 
void clear_reason ()
 
const StringPiece get_reason () const
 
void set_reason (const StringPiece &value)
 

Static Public Member Functions

static EntitlementNew ()
 

Detailed Description

The presence of an Entitlements resource indicates that a user has the right to use a particular app. Entitlements are user specific, not device specific. This allows a user with an entitlement to an app to install the app on all their devices. It's also possible for a user to hold an entitlement to an app without installing the app on any device.

The API can be used to create an entitlement. As an option, you can also use the API to trigger the installation of an app on all a user's managed devices at the same time the entitlement is created.

If the app is free, creating the entitlement also creates a group license for that app. For paid apps, creating the entitlement consumes one license, and that license remains consumed until the entitlement is removed. If the enterprise hasn't purchased enough licenses, then no entitlement is created and the installation fails. An entitlement is also not created for an app if the app requires permissions that the enterprise hasn't accepted.

If an entitlement is deleted, the app may be uninstalled from a user's device. As a best practice, uninstall the app by calling Installs.delete() before deleting the entitlement.

Entitlements for apps that a user pays for on an unmanaged profile have "userPurchase" as the entitlement reason. These entitlements cannot be removed via the API.

Constructor & Destructor Documentation

◆ Entitlement() [1/2]

google_androidenterprise_api::Entitlement::Entitlement ( const Json::Value &  storage)
explicit

Standard constructor for an immutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ Entitlement() [2/2]

google_androidenterprise_api::Entitlement::Entitlement ( Json::Value *  storage)
explicit

Standard constructor for a mutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ ~Entitlement()

google_androidenterprise_api::Entitlement::~Entitlement ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_kind()

void google_androidenterprise_api::Entitlement::clear_kind ( )
inline

Clears the 'kind' attribute.

◆ clear_product_id()

void google_androidenterprise_api::Entitlement::clear_product_id ( )
inline

Clears the 'productId' attribute.

◆ clear_reason()

void google_androidenterprise_api::Entitlement::clear_reason ( )
inline

Clears the 'reason' attribute.

◆ get_kind()

const StringPiece google_androidenterprise_api::Entitlement::get_kind ( ) const
inline

Get the value of the 'kind' attribute.

◆ get_product_id()

const StringPiece google_androidenterprise_api::Entitlement::get_product_id ( ) const
inline

Get the value of the 'productId' attribute.

◆ get_reason()

const StringPiece google_androidenterprise_api::Entitlement::get_reason ( ) const
inline

Get the value of the 'reason' attribute.

◆ GetTypeName()

const StringPiece google_androidenterprise_api::Entitlement::GetTypeName ( ) const
inline

Returns a string denoting the type of this data object.

Returns
google_androidenterprise_api::Entitlement

◆ has_kind()

bool google_androidenterprise_api::Entitlement::has_kind ( ) const
inline

Determine if the 'kind' attribute was set.

Returns
true if the 'kind' attribute was set.

◆ has_product_id()

bool google_androidenterprise_api::Entitlement::has_product_id ( ) const
inline

Determine if the 'productId' attribute was set.

Returns
true if the 'productId' attribute was set.

◆ has_reason()

bool google_androidenterprise_api::Entitlement::has_reason ( ) const
inline

Determine if the 'reason' attribute was set.

Returns
true if the 'reason' attribute was set.

◆ New()

Entitlement * google_androidenterprise_api::Entitlement::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_kind()

void google_androidenterprise_api::Entitlement::set_kind ( const StringPiece &  value)
inline

Change the 'kind' attribute.

Parameters
[in]valueThe new value.

◆ set_product_id()

void google_androidenterprise_api::Entitlement::set_product_id ( const StringPiece &  value)
inline

Change the 'productId' attribute.

The ID of the product that the entitlement is for. For example, "app:com.google.android.gm".

Parameters
[in]valueThe new value.

◆ set_reason()

void google_androidenterprise_api::Entitlement::set_reason ( const StringPiece &  value)
inline

Change the 'reason' attribute.

The reason for the entitlement. For example, "free" for free apps. This property is temporary: it will be replaced by the acquisition kind field of group licenses.

Parameters
[in]valueThe new value.

The documentation for this class was generated from the following files: