pub struct Entitlement {Show 26 fields
pub account: Option<String>,
pub cancellation_reason: Option<String>,
pub consumers: Option<Vec<Consumer>>,
pub create_time: Option<DateTime<Utc>>,
pub entitlement_benefit_ids: Option<Vec<String>>,
pub input_properties: Option<HashMap<String, Value>>,
pub message_to_user: Option<String>,
pub name: Option<String>,
pub new_offer_end_time: Option<DateTime<Utc>>,
pub new_offer_start_time: Option<DateTime<Utc>>,
pub new_pending_offer: Option<String>,
pub new_pending_offer_duration: Option<String>,
pub new_pending_plan: Option<String>,
pub offer: Option<String>,
pub offer_duration: Option<String>,
pub offer_end_time: Option<DateTime<Utc>>,
pub order_id: Option<String>,
pub plan: Option<String>,
pub product: Option<String>,
pub product_external_name: Option<String>,
pub provider: Option<String>,
pub quote_external_name: Option<String>,
pub state: Option<String>,
pub subscription_end_time: Option<DateTime<Utc>>,
pub update_time: Option<DateTime<Utc>>,
pub usage_reporting_id: Option<String>,
}Expand description
Represents a procured product of a customer.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- entitlements get providers (response)
- entitlements patch providers (request|response)
Fields§
§account: Option<String>Output only. The resource name of the account that this entitlement is based on, if any.
cancellation_reason: Option<String>Output only. The reason the entitlement was cancelled. If this entitlement wasn’t cancelled, this field is empty. Possible values include “unknown”, “expired”, “user-cancelled”, “account-closed”, “billing-disabled” (if the customer has manually disabled billing to their resources), “user-aborted”, and “migrated” (if the entitlement has migrated across products). Values of this field are subject to change, and we recommend that you don’t build your technical integration to rely on these fields.
consumers: Option<Vec<Consumer>>Output only. The resources using this entitlement, if applicable.
create_time: Option<DateTime<Utc>>Output only. The creation timestamp.
entitlement_benefit_ids: Option<Vec<String>>Output only. The entitlement benefit IDs associated with the purchase.
input_properties: Option<HashMap<String, Value>>Output only. The custom properties that were collected from the user to create this entitlement.
message_to_user: Option<String>Provider-supplied message that is displayed to the end user. Currently this is used to communicate progress and ETA for provisioning. This field can be updated only when a user is waiting for an action from the provider, i.e. entitlement state is EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED or EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL. This field is cleared automatically when the entitlement state changes.
name: Option<String>Output only. The resource name of the entitlement. Entitlement names have the form providers/{provider_id}/entitlements/{entitlement_id}.
new_offer_end_time: Option<DateTime<Utc>>Output only. The end time of the new offer, determined from the offer’s specified end date. If the offer des not have a specified end date then this field is not set. This field is populated even if the entitlement isn’t active yet. If there’s no upcoming offer, the field is empty. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION, then this field is empty. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE, and the upcoming offer has a specified end date, then this field is populated with the expected end time of the upcoming offer, in the future. Otherwise, this field is empty. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this field is empty.
new_offer_start_time: Option<DateTime<Utc>>Output only. The timestamp when the new offer becomes effective. This field is populated even if the entitlement isn’t active yet. If there’s no upcoming offer, the field is empty. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, this field isn’t populated when the entitlement isn’t yet approved. After the entitlement is approved, this field is populated with the effective time of the upcoming offer. * If the entitlement is in the state ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION, this field isn’t populated. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL, this field isn’t populated, because the entitlement change is waiting on approval. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE, this field is populated with the expected effective time of the upcoming offer, which is in the future. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this field is empty.
new_pending_offer: Option<String>Output only. Upon a pending plan change, the name of the offer that the entitlement is switching to. Only exists if the pending plan change is moving to an offer. This field isn’t populated for entitlements which aren’t active yet. Format: ‘projects/{project}/services/{service}/privateOffers/{offer}’ OR ‘projects/{project}/services/{service}/standardOffers/{offer}’, depending on whether the offer is private or public. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don’t build your integration to rely on the meaning of this {service} part. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION, then this field is empty. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE, then this field is populated with the upcoming offer. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this is empty.
new_pending_offer_duration: Option<String>Output only. The duration of the new offer, in ISO 8601 duration format. This field is populated for pending offer changes. It isn’t populated for entitlements which aren’t active yet. If the offer has a specified end date instead of a duration, this field is empty. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION, this field is empty. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE, and the upcoming offer doesn’t have a specified end date, then this field is populated with the duration of the upcoming offer. Otherwise, this field is empty. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this field is empty.
new_pending_plan: Option<String>Output only. The identifier of the pending new plan. Required if the product has plans and the entitlement has a pending plan change.
offer: Option<String>Output only. The name of the offer that was procured. Field is empty if order wasn’t made using an offer. Format: ‘projects/{project}/services/{service}/privateOffers/{offer}’ OR ‘projects/{project}/services/{service}/standardOffers/{offer}’, depending on whether the offer is private or public. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don’t build your integration to rely on the meaning of this {service} part. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, this field is populated with the upcoming offer. * If the entitlement is in the state ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL, this field is populated with the current offer. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this field is populated with the latest offer that the order was associated with.
offer_duration: Option<String>Output only. The offer duration of the current offer, in ISO 8601 duration format. This is empty if the entitlement wasn’t made using an offer, or if the offer has a specified end date instead of a duration. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, and the upcoming offer doesn’t have a specified end date, then this field is populated with the duration of the upcoming offer. Otherwise, this field is empty. * If the entitlement is in the state ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL, and the current offer doesn’t have a specified end date, then this field contains the duration of the current offer. Otherwise, this field is empty. * If the entitlement is in the state ENTITLEMENT_CANCELLED, and the offer doesn’t have a specified end date, then this field is populated with the duration of the latest offer that the order was associated with. Otherwise, this field is empty.
offer_end_time: Option<DateTime<Utc>>Output only. End time for the current term of the Offer associated with this entitlement. The value of this field can change naturally over time due to auto-renewal, even if the offer isn’t changed. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, then: * If the entitlement isn’t approved yet approved, and the offer has a specified end date, then this field is populated with the expected end time of the upcoming offer, in the future. Otherwise, this field is empty. * If the entitlement is approved, then this field is populated with the expected end time of the upcoming offer, in the future. This means that this field and the field offer_duration can both exist. * If the entitlement is in the state ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION, then this field is populated with the expected end time of the current offer, in the future. This field’s value is set regardless of whether the offer has a specific end date or a duration. This means that this field and the field offer_duration can both exist. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE: * If the entitlement’s pricing model is usage based and the associated offer is a private offer whose term has ended, then this field reflects the ACTUAL end time of the entitlement’s associated offer (in the past), even though the entitlement associated with this private offer does not terminate at the end of that private offer’s term. * Otherwise, this is the expected end date of the current offer, in the future. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this field is populated with the end time, in the past, of the latest offer that the order was associated with. If the entitlement was cancelled before any offer started, then this field is empty.
order_id: Option<String>Output only. The order ID of this entitlement, without any orders/ resource name prefix.
plan: Option<String>Output only. The identifier of the plan that was procured. Required if the product has plans.
product: Option<String>Output only. The identifier of the entity that was purchased. This may actually represent a product, quote, or offer. We strongly recommend that you use the following more explicit fields: productExternalName, quoteExternalName, or offer.
product_external_name: Option<String>Output only. The identifier of the product that was procured.
provider: Option<String>Output only. The identifier of the service provider that this entitlement was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform.
quote_external_name: Option<String>Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote.
state: Option<String>Output only. The state of the entitlement.
subscription_end_time: Option<DateTime<Utc>>Output only. End time for the subscription corresponding to this entitlement.
update_time: Option<DateTime<Utc>>Output only. The last update timestamp.
usage_reporting_id: Option<String>Output only. The consumerId to use when reporting usage through the Service Control API. See the consumerId field at Reporting Metrics for more details. This field is present only if the product has usage-based billing configured.
Trait Implementations§
Source§impl Clone for Entitlement
impl Clone for Entitlement
Source§fn clone(&self) -> Entitlement
fn clone(&self) -> Entitlement
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more