approve(name, body=None, x__xgafv=None)
Approves an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to approve the creation of the entitlement resource.
approvePlanChange(name, body=None, x__xgafv=None)
Approves an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to approve the plan change on the entitlement resource.
Close httplib2 connections.
Gets a requested Entitlement resource.
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists Entitlements for which the provider has read access.
Retrieves the next page of results.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an existing Entitlement.
reject(name, body=None, x__xgafv=None)
Rejects an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to reject the creation of the entitlement resource.
rejectPlanChange(name, body=None, x__xgafv=None)
Rejects an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to reject the plan change on the entitlement resource.
suspend(name, body=None, x__xgafv=None)
Requests suspension of an active Entitlement. This is not yet supported.
approve(name, body=None, x__xgafv=None)
Approves an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to approve the creation of the entitlement resource. Args: name: string, Required. The resource name of the entitlement, with the format `providers/{providerId}/entitlements/{entitlementId}`. (required) body: object, The request body. The object takes the form of: { # Request message for [PartnerProcurementService.ApproveEntitlement[]. "entitlementMigrated": "A String", # Optional. The resource name of the entitlement that was migrated, with the format `providers/{provider_id}/entitlements/{entitlement_id}`. Should only be sent when resources have been migrated from entitlement_migrated to the new entitlement. Optional. "properties": { # Set of properties that should be associated with the entitlement. Optional. "a_key": "A String", }, } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } }
approvePlanChange(name, body=None, x__xgafv=None)
Approves an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to approve the plan change on the entitlement resource. Args: name: string, Required. The resource name of the entitlement. (required) body: object, The request body. The object takes the form of: { # Request message for [PartnerProcurementService.ApproveEntitlementPlanChange[]. "pendingPlanName": "A String", # Required. Name of the pending plan that's being approved. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } }
close()
Close httplib2 connections.
get(name, x__xgafv=None)
Gets a requested Entitlement resource. Args: name: string, Required. The name of the entitlement to retrieve. (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Represents a procured product of a customer. "account": "A String", # Output only. The resource name of the account that this entitlement is based on, if any. "cancellationReason": "A 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": [ # Output only. The resources using this entitlement, if applicable. { # A resource using (consuming) this entitlement. "project": "A String", # A project name with format `projects/`. }, ], "createTime": "A String", # Output only. The creation timestamp. "entitlementBenefitIds": [ # Output only. The entitlement benefit IDs associated with the purchase. "A String", ], "inputProperties": { # Output only. The custom properties that were collected from the user to create this entitlement. "a_key": "", # Properties of the object. }, "messageToUser": "A 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": "A String", # Output only. The resource name of the entitlement. Entitlement names have the form `providers/{provider_id}/entitlements/{entitlement_id}`. "newOfferEndTime": "A String", # Output only. The end time of the new offer. If the offer was has a term duration instead of a specified end date, this field is empty. 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 ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the expected end time of the upcoming offer (in the future) if the upcoming offer has a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newOfferStartTime": "A String", # 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 ENTITLEMENT_ACTIVATION_REQUESTED state, this field will not be populated when the entitlement is not yet approved. But after the entitlement is approved, then this field will be populated with effective time of the upcoming offer. * If the entitlement is in ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, this field will not be populated. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, this field will not be populated since the entitlement change is waiting on approval. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE state, this field will be populated with the expected effective time of the upcoming offer (in the future). * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newPendingOffer": "A String", # Output only. The name of the offer the entitlement is switching to upon a pending plan change. 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 ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the upcoming offer. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this will be empty. "newPendingOfferDuration": "A String", # Output only. The duration of the new offer, in ISO 8601 duration format. This field isn't populated for entitlements which aren't active yet, only for pending offer changes. If the offer was has a specified end date instead of a duration, this field is empty. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION state, then this field is empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the duration of the upcoming offer, if the upcoming offer is does not have a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newPendingPlan": "A 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": "A String", # Output only. The name of the offer that was procured. Field is empty if order was not 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 ENTITLEMENT_ACTIVATION_REQUESTED state, this field will be populated with the upcoming offer. * If the entitlement is in ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, this field will be populated with the current offer. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the latest offer the order was associated with. "offerDuration": "A String", # Output only. The offer duration of the current offer in ISO 8601 duration format. Field is empty if entitlement was not made using an offer. If the offer has a specified end date instead of a duration, this field is empty. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, then this field will be populated with the duration of the upcoming offer, if the upcoming offer does not have a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, then this field will be populated with the duration of the current offer if the current offer is does not have a specific end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the duration of the latest offer the order was associated with if that offer does not have a specific end date. Otherwise, this field will be empty. "offerEndTime": "A String", # Output only. End time for the Offer associated with this entitlement. Note that this field value can change over time. This occurs naturally even if the offer is not changed, due to auto renewal. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, then: * If the entitlement is not yet approved, then this field will be populated with the expected end time of the upcoming offer (in the future) if the upcoming offer has a specified end date. Otherwise this field will be empty. * If the entitlement is approved, then this field will always be populated with the expected end time of the upcoming offer (in the future). This means both this field, and the offer_duration field, can co-exist. * If the entitlement is in ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be populated with the actual expected end time of the current offer (in the futre). Meaning, this field will be set, regardless of whether the offer has a specific end date or a duration. This means both this field, and the offer_duration field, can co-exist. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state: * If the current offer has already ended and became pure PAYG, then this field reflects the ACTUAL end time of the current offer (in the past). * Otherwise, then this is the EXPECTED end date of the current offer (in the future). * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the ACTUAL end time of the latest offer the order was associated with (in the past). If the entitlement was cancelled before any offer started, then this field will be empty. "orderId": "A String", # Output only. The order ID of this entitlement, without any `orders/` resource name prefix. "plan": "A String", # Output only. The identifier of the plan that was procured. Required if the product has plans. "product": "A 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. "productExternalName": "A String", # Output only. The identifier of the product that was procured. "provider": "A 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. "quoteExternalName": "A String", # Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote. "state": "A String", # Output only. The state of the entitlement. "subscriptionEndTime": "A String", # Output only. End time for the subscription corresponding to this entitlement. "updateTime": "A String", # Output only. The last update timestamp. "usageReportingId": "A String", # Output only. The consumerId to use when reporting usage through the Service Control API. See the consumerId field at [Reporting Metrics](https://cloud.google.com/service-control/reporting-metrics) for more details. This field is present only if the product has usage-based billing configured. }
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists Entitlements for which the provider has read access. Args: parent: string, Required. The parent resource name. (required) filter: string, The filter that can be used to limit the list request. The filter is a query string that can match a selected set of attributes with string values. For example `account=E-1234-5678-ABCD-EFGH`, `state=pending_cancellation`, and `plan!=foo-plan`. Supported query attributes are * `account` * `customer_billing_account` with value in the format of: `billingAccounts/{id}` * `product_external_name` * `quote_external_name` * `offer` * `new_pending_offer` * `plan` * `newPendingPlan` or `new_pending_plan` * `state` * `services` * `consumers.project` * `change_history.new_offer` Note that the consumers and change_history.new_offer match works on repeated structures, so equality (`consumers.project=projects/123456789`) is not supported. Set membership can be expressed with the `:` operator. For example, `consumers.project:projects/123456789` finds entitlements with at least one consumer with project field equal to `projects/123456789`. `change_history.new_offer` retrieves all entitlements that were once associated or are currently active with the offer. Also note that the state name match is case-insensitive and query can omit the prefix "ENTITLEMENT_". For example, `state=active` is equivalent to `state=ENTITLEMENT_ACTIVE`. If the query contains some special characters other than letters, underscore, or digits, the phrase must be quoted with double quotes. For example, `product="providerId:productId"`, where the product name needs to be quoted because it contains special character colon. Queries can be combined with `AND`, `OR`, and `NOT` to form more complex queries. They can also be grouped to force a desired evaluation order. For example, `state=active AND (account=E-1234 OR account=5678) AND NOT (product=foo-product)`. Connective `AND` can be omitted between two predicates. For example `account=E-1234 state=active` is equivalent to `account=E-1234 AND state=active`. pageSize: integer, The maximum number of entries that are requested. The default page size is 200. pageToken: string, The token for fetching the next page. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response message for PartnerProcurementService.ListEntitlements. "entitlements": [ # The list of entitlements in this response. { # Represents a procured product of a customer. "account": "A String", # Output only. The resource name of the account that this entitlement is based on, if any. "cancellationReason": "A 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": [ # Output only. The resources using this entitlement, if applicable. { # A resource using (consuming) this entitlement. "project": "A String", # A project name with format `projects/`. }, ], "createTime": "A String", # Output only. The creation timestamp. "entitlementBenefitIds": [ # Output only. The entitlement benefit IDs associated with the purchase. "A String", ], "inputProperties": { # Output only. The custom properties that were collected from the user to create this entitlement. "a_key": "", # Properties of the object. }, "messageToUser": "A 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": "A String", # Output only. The resource name of the entitlement. Entitlement names have the form `providers/{provider_id}/entitlements/{entitlement_id}`. "newOfferEndTime": "A String", # Output only. The end time of the new offer. If the offer was has a term duration instead of a specified end date, this field is empty. 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 ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the expected end time of the upcoming offer (in the future) if the upcoming offer has a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newOfferStartTime": "A String", # 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 ENTITLEMENT_ACTIVATION_REQUESTED state, this field will not be populated when the entitlement is not yet approved. But after the entitlement is approved, then this field will be populated with effective time of the upcoming offer. * If the entitlement is in ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, this field will not be populated. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, this field will not be populated since the entitlement change is waiting on approval. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE state, this field will be populated with the expected effective time of the upcoming offer (in the future). * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newPendingOffer": "A String", # Output only. The name of the offer the entitlement is switching to upon a pending plan change. 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 ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the upcoming offer. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this will be empty. "newPendingOfferDuration": "A String", # Output only. The duration of the new offer, in ISO 8601 duration format. This field isn't populated for entitlements which aren't active yet, only for pending offer changes. If the offer was has a specified end date instead of a duration, this field is empty. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION state, then this field is empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the duration of the upcoming offer, if the upcoming offer is does not have a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newPendingPlan": "A 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": "A String", # Output only. The name of the offer that was procured. Field is empty if order was not 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 ENTITLEMENT_ACTIVATION_REQUESTED state, this field will be populated with the upcoming offer. * If the entitlement is in ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, this field will be populated with the current offer. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the latest offer the order was associated with. "offerDuration": "A String", # Output only. The offer duration of the current offer in ISO 8601 duration format. Field is empty if entitlement was not made using an offer. If the offer has a specified end date instead of a duration, this field is empty. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, then this field will be populated with the duration of the upcoming offer, if the upcoming offer does not have a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, then this field will be populated with the duration of the current offer if the current offer is does not have a specific end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the duration of the latest offer the order was associated with if that offer does not have a specific end date. Otherwise, this field will be empty. "offerEndTime": "A String", # Output only. End time for the Offer associated with this entitlement. Note that this field value can change over time. This occurs naturally even if the offer is not changed, due to auto renewal. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, then: * If the entitlement is not yet approved, then this field will be populated with the expected end time of the upcoming offer (in the future) if the upcoming offer has a specified end date. Otherwise this field will be empty. * If the entitlement is approved, then this field will always be populated with the expected end time of the upcoming offer (in the future). This means both this field, and the offer_duration field, can co-exist. * If the entitlement is in ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be populated with the actual expected end time of the current offer (in the futre). Meaning, this field will be set, regardless of whether the offer has a specific end date or a duration. This means both this field, and the offer_duration field, can co-exist. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state: * If the current offer has already ended and became pure PAYG, then this field reflects the ACTUAL end time of the current offer (in the past). * Otherwise, then this is the EXPECTED end date of the current offer (in the future). * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the ACTUAL end time of the latest offer the order was associated with (in the past). If the entitlement was cancelled before any offer started, then this field will be empty. "orderId": "A String", # Output only. The order ID of this entitlement, without any `orders/` resource name prefix. "plan": "A String", # Output only. The identifier of the plan that was procured. Required if the product has plans. "product": "A 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. "productExternalName": "A String", # Output only. The identifier of the product that was procured. "provider": "A 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. "quoteExternalName": "A String", # Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote. "state": "A String", # Output only. The state of the entitlement. "subscriptionEndTime": "A String", # Output only. End time for the subscription corresponding to this entitlement. "updateTime": "A String", # Output only. The last update timestamp. "usageReportingId": "A String", # Output only. The consumerId to use when reporting usage through the Service Control API. See the consumerId field at [Reporting Metrics](https://cloud.google.com/service-control/reporting-metrics) for more details. This field is present only if the product has usage-based billing configured. }, ], "nextPageToken": "A String", # The token for fetching the next page. }
list_next()
Retrieves the next page of results. Args: previous_request: The request for the previous page. (required) previous_response: The response from the request for the previous page. (required) Returns: A request object that you can call 'execute()' on to request the next page. Returns None if there are no more items in the collection.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an existing Entitlement. Args: name: string, Required. The name of the entitlement to update. (required) body: object, The request body. The object takes the form of: { # Represents a procured product of a customer. "account": "A String", # Output only. The resource name of the account that this entitlement is based on, if any. "cancellationReason": "A 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": [ # Output only. The resources using this entitlement, if applicable. { # A resource using (consuming) this entitlement. "project": "A String", # A project name with format `projects/`. }, ], "createTime": "A String", # Output only. The creation timestamp. "entitlementBenefitIds": [ # Output only. The entitlement benefit IDs associated with the purchase. "A String", ], "inputProperties": { # Output only. The custom properties that were collected from the user to create this entitlement. "a_key": "", # Properties of the object. }, "messageToUser": "A 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": "A String", # Output only. The resource name of the entitlement. Entitlement names have the form `providers/{provider_id}/entitlements/{entitlement_id}`. "newOfferEndTime": "A String", # Output only. The end time of the new offer. If the offer was has a term duration instead of a specified end date, this field is empty. 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 ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the expected end time of the upcoming offer (in the future) if the upcoming offer has a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newOfferStartTime": "A String", # 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 ENTITLEMENT_ACTIVATION_REQUESTED state, this field will not be populated when the entitlement is not yet approved. But after the entitlement is approved, then this field will be populated with effective time of the upcoming offer. * If the entitlement is in ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, this field will not be populated. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, this field will not be populated since the entitlement change is waiting on approval. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE state, this field will be populated with the expected effective time of the upcoming offer (in the future). * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newPendingOffer": "A String", # Output only. The name of the offer the entitlement is switching to upon a pending plan change. 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 ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the upcoming offer. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this will be empty. "newPendingOfferDuration": "A String", # Output only. The duration of the new offer, in ISO 8601 duration format. This field isn't populated for entitlements which aren't active yet, only for pending offer changes. If the offer was has a specified end date instead of a duration, this field is empty. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION state, then this field is empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the duration of the upcoming offer, if the upcoming offer is does not have a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newPendingPlan": "A 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": "A String", # Output only. The name of the offer that was procured. Field is empty if order was not 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 ENTITLEMENT_ACTIVATION_REQUESTED state, this field will be populated with the upcoming offer. * If the entitlement is in ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, this field will be populated with the current offer. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the latest offer the order was associated with. "offerDuration": "A String", # Output only. The offer duration of the current offer in ISO 8601 duration format. Field is empty if entitlement was not made using an offer. If the offer has a specified end date instead of a duration, this field is empty. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, then this field will be populated with the duration of the upcoming offer, if the upcoming offer does not have a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, then this field will be populated with the duration of the current offer if the current offer is does not have a specific end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the duration of the latest offer the order was associated with if that offer does not have a specific end date. Otherwise, this field will be empty. "offerEndTime": "A String", # Output only. End time for the Offer associated with this entitlement. Note that this field value can change over time. This occurs naturally even if the offer is not changed, due to auto renewal. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, then: * If the entitlement is not yet approved, then this field will be populated with the expected end time of the upcoming offer (in the future) if the upcoming offer has a specified end date. Otherwise this field will be empty. * If the entitlement is approved, then this field will always be populated with the expected end time of the upcoming offer (in the future). This means both this field, and the offer_duration field, can co-exist. * If the entitlement is in ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be populated with the actual expected end time of the current offer (in the futre). Meaning, this field will be set, regardless of whether the offer has a specific end date or a duration. This means both this field, and the offer_duration field, can co-exist. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state: * If the current offer has already ended and became pure PAYG, then this field reflects the ACTUAL end time of the current offer (in the past). * Otherwise, then this is the EXPECTED end date of the current offer (in the future). * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the ACTUAL end time of the latest offer the order was associated with (in the past). If the entitlement was cancelled before any offer started, then this field will be empty. "orderId": "A String", # Output only. The order ID of this entitlement, without any `orders/` resource name prefix. "plan": "A String", # Output only. The identifier of the plan that was procured. Required if the product has plans. "product": "A 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. "productExternalName": "A String", # Output only. The identifier of the product that was procured. "provider": "A 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. "quoteExternalName": "A String", # Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote. "state": "A String", # Output only. The state of the entitlement. "subscriptionEndTime": "A String", # Output only. End time for the subscription corresponding to this entitlement. "updateTime": "A String", # Output only. The last update timestamp. "usageReportingId": "A String", # Output only. The consumerId to use when reporting usage through the Service Control API. See the consumerId field at [Reporting Metrics](https://cloud.google.com/service-control/reporting-metrics) for more details. This field is present only if the product has usage-based billing configured. } updateMask: string, The update mask that applies to the resource. See the [FieldMask definition] (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) for more details. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Represents a procured product of a customer. "account": "A String", # Output only. The resource name of the account that this entitlement is based on, if any. "cancellationReason": "A 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": [ # Output only. The resources using this entitlement, if applicable. { # A resource using (consuming) this entitlement. "project": "A String", # A project name with format `projects/`. }, ], "createTime": "A String", # Output only. The creation timestamp. "entitlementBenefitIds": [ # Output only. The entitlement benefit IDs associated with the purchase. "A String", ], "inputProperties": { # Output only. The custom properties that were collected from the user to create this entitlement. "a_key": "", # Properties of the object. }, "messageToUser": "A 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": "A String", # Output only. The resource name of the entitlement. Entitlement names have the form `providers/{provider_id}/entitlements/{entitlement_id}`. "newOfferEndTime": "A String", # Output only. The end time of the new offer. If the offer was has a term duration instead of a specified end date, this field is empty. 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 ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the expected end time of the upcoming offer (in the future) if the upcoming offer has a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newOfferStartTime": "A String", # 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 ENTITLEMENT_ACTIVATION_REQUESTED state, this field will not be populated when the entitlement is not yet approved. But after the entitlement is approved, then this field will be populated with effective time of the upcoming offer. * If the entitlement is in ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, this field will not be populated. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, this field will not be populated since the entitlement change is waiting on approval. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE state, this field will be populated with the expected effective time of the upcoming offer (in the future). * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newPendingOffer": "A String", # Output only. The name of the offer the entitlement is switching to upon a pending plan change. 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 ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the upcoming offer. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this will be empty. "newPendingOfferDuration": "A String", # Output only. The duration of the new offer, in ISO 8601 duration format. This field isn't populated for entitlements which aren't active yet, only for pending offer changes. If the offer was has a specified end date instead of a duration, this field is empty. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION state, then this field is empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the duration of the upcoming offer, if the upcoming offer is does not have a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty. "newPendingPlan": "A 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": "A String", # Output only. The name of the offer that was procured. Field is empty if order was not 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 ENTITLEMENT_ACTIVATION_REQUESTED state, this field will be populated with the upcoming offer. * If the entitlement is in ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, this field will be populated with the current offer. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the latest offer the order was associated with. "offerDuration": "A String", # Output only. The offer duration of the current offer in ISO 8601 duration format. Field is empty if entitlement was not made using an offer. If the offer has a specified end date instead of a duration, this field is empty. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, then this field will be populated with the duration of the upcoming offer, if the upcoming offer does not have a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, then this field will be populated with the duration of the current offer if the current offer is does not have a specific end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the duration of the latest offer the order was associated with if that offer does not have a specific end date. Otherwise, this field will be empty. "offerEndTime": "A String", # Output only. End time for the Offer associated with this entitlement. Note that this field value can change over time. This occurs naturally even if the offer is not changed, due to auto renewal. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, then: * If the entitlement is not yet approved, then this field will be populated with the expected end time of the upcoming offer (in the future) if the upcoming offer has a specified end date. Otherwise this field will be empty. * If the entitlement is approved, then this field will always be populated with the expected end time of the upcoming offer (in the future). This means both this field, and the offer_duration field, can co-exist. * If the entitlement is in ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be populated with the actual expected end time of the current offer (in the futre). Meaning, this field will be set, regardless of whether the offer has a specific end date or a duration. This means both this field, and the offer_duration field, can co-exist. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state: * If the current offer has already ended and became pure PAYG, then this field reflects the ACTUAL end time of the current offer (in the past). * Otherwise, then this is the EXPECTED end date of the current offer (in the future). * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the ACTUAL end time of the latest offer the order was associated with (in the past). If the entitlement was cancelled before any offer started, then this field will be empty. "orderId": "A String", # Output only. The order ID of this entitlement, without any `orders/` resource name prefix. "plan": "A String", # Output only. The identifier of the plan that was procured. Required if the product has plans. "product": "A 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. "productExternalName": "A String", # Output only. The identifier of the product that was procured. "provider": "A 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. "quoteExternalName": "A String", # Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote. "state": "A String", # Output only. The state of the entitlement. "subscriptionEndTime": "A String", # Output only. End time for the subscription corresponding to this entitlement. "updateTime": "A String", # Output only. The last update timestamp. "usageReportingId": "A String", # Output only. The consumerId to use when reporting usage through the Service Control API. See the consumerId field at [Reporting Metrics](https://cloud.google.com/service-control/reporting-metrics) for more details. This field is present only if the product has usage-based billing configured. }
reject(name, body=None, x__xgafv=None)
Rejects an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to reject the creation of the entitlement resource. Args: name: string, Required. The resource name of the entitlement. (required) body: object, The request body. The object takes the form of: { # Request message for PartnerProcurementService.RejectEntitlement. "reason": "A String", # Free form text string explaining the rejection reason. Max allowed length: 256 bytes. Longer strings will be truncated. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } }
rejectPlanChange(name, body=None, x__xgafv=None)
Rejects an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to reject the plan change on the entitlement resource. Args: name: string, Required. The resource name of the entitlement. (required) body: object, The request body. The object takes the form of: { # Request message for PartnerProcurementService.RejectEntitlementPlanChange. "pendingPlanName": "A String", # Required. Name of the pending plan that is being rejected. "reason": "A String", # Free form text string explaining the rejection reason. Max allowed length: 256 bytes. Longer strings will be truncated. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } }
suspend(name, body=None, x__xgafv=None)
Requests suspension of an active Entitlement. This is not yet supported. Args: name: string, Required. The name of the entitlement to suspend. (required) body: object, The request body. The object takes the form of: { # Request message for ParterProcurementService.SuspendEntitlement. This is not yet supported. "reason": "A String", # A free-form reason string, explaining the reason for suspension request. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } }