Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [channel] add show_future_offers to ListOffers #4079

Merged
merged 5 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/google-cloud-channel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Cloud_channel_service.list_channel_partner_repricing_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_channel_partner_repricing_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_channel_partner_repricing_configs.js,samples/README.md) |
| Cloud_channel_service.list_customer_repricing_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customer_repricing_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customer_repricing_configs.js,samples/README.md) |
| Cloud_channel_service.list_customers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customers.js,samples/README.md) |
| Cloud_channel_service.list_entitlement_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlement_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlement_changes.js,samples/README.md) |
| Cloud_channel_service.list_entitlements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlements.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlements.js,samples/README.md) |
| Cloud_channel_service.list_offers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_offers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_offers.js,samples/README.md) |
| Cloud_channel_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_products.js,samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ message ChannelPartnerLink {
// Output only. Cloud Identity info of the channel partner (IR).
CloudIdentityInfo channel_partner_cloud_identity_info = 8
[(google.api.field_behavior) = OUTPUT_ONLY];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ message AdminUser {

// Family name of the admin user.
string family_name = 3;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ message Customer {
// Cloud Identity ID of the customer's channel partner.
// Populated only if a channel partner exists for this customer.
string channel_partner_id = 13;

// Optional. External CRM ID for the customer.
// Populated only if a CRM ID exists for this customer.
string correlation_id = 14 [(google.api.field_behavior) = OPTIONAL];
}

// Contact information for a customer account.
Expand All @@ -111,4 +115,4 @@ message ContactInfo {

// The customer account's contact phone number.
string phone = 7;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.channel.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/channel/v1/entitlements.proto";
import "google/protobuf/timestamp.proto";

option go_package = "cloud.google.com/go/channel/apiv1/channelpb;channelpb";
option java_multiple_files = true;
option java_outer_classname = "EntitlementChangesProto";
option java_package = "com.google.cloud.channel.v1";

// Change event entry for Entitlement order history
message EntitlementChange {
// Specifies the type of change action
enum ChangeType {
// Not used.
CHANGE_TYPE_UNSPECIFIED = 0;

// New Entitlement was created.
CREATED = 1;

// Price plan associated with an Entitlement was changed.
PRICE_PLAN_SWITCHED = 3;

// Number of seats committed for a commitment Entitlement was changed.
COMMITMENT_CHANGED = 4;

// An annual Entitlement was renewed.
RENEWED = 5;

// Entitlement was suspended.
SUSPENDED = 6;

// Entitlement was activated.
ACTIVATED = 7;

// Entitlement was cancelled.
CANCELLED = 8;

// Entitlement was upgraded or downgraded for ex. from Google Workspace
// Business Standard to Google Workspace Business Plus.
SKU_CHANGED = 9;

// The settings for renewal of an Entitlement have changed.
RENEWAL_SETTING_CHANGED = 10;

// Use for Google Workspace subscription.
// Either a trial was converted to a paid subscription or a new subscription
// with no trial is created.
PAID_SUBSCRIPTION_STARTED = 11;

// License cap was changed for the entitlement.
LICENSE_CAP_CHANGED = 12;

// The suspension details have changed (but it is still suspended).
SUSPENSION_DETAILS_CHANGED = 13;

// The trial end date was extended.
TRIAL_END_DATE_EXTENDED = 14;

// Entitlement started trial.
TRIAL_STARTED = 15;
}

// Specifies the type of operator responsible for the change
enum OperatorType {
// Not used.
OPERATOR_TYPE_UNSPECIFIED = 0;

// Customer service representative.
CUSTOMER_SERVICE_REPRESENTATIVE = 1;

// System auto job.
SYSTEM = 2;

// Customer user.
CUSTOMER = 3;

// Reseller user.
RESELLER = 4;
}

// Cancellation reason for the entitlement
enum CancellationReason {
// Not used.
CANCELLATION_REASON_UNSPECIFIED = 0;

// Reseller triggered a cancellation of the service.
SERVICE_TERMINATED = 1;

// Relationship between the reseller and customer has ended due to a
// transfer.
RELATIONSHIP_ENDED = 2;

// Entitlement transferred away from reseller while still keeping other
// entitlement(s) with the reseller.
PARTIAL_TRANSFER = 3;
}

// The Entitlement's activation reason
enum ActivationReason {
// Not used.
ACTIVATION_REASON_UNSPECIFIED = 0;

// Reseller reactivated a suspended Entitlement.
RESELLER_REVOKED_SUSPENSION = 1;

// Customer accepted pending terms of service.
CUSTOMER_ACCEPTED_PENDING_TOS = 2;

// Reseller updated the renewal settings on an entitlement that was
// suspended due to cancellation, and this update reactivated the
// entitlement.
RENEWAL_SETTINGS_CHANGED = 3;

// Other reasons (Activated temporarily for cancellation, added a payment
// plan to a trial entitlement, etc.)
OTHER_ACTIVATION_REASON = 100;
}

// The reason the change was made
oneof change_reason {
// Suspension reason for the Entitlement.
Entitlement.SuspensionReason suspension_reason = 9;

// Cancellation reason for the Entitlement.
CancellationReason cancellation_reason = 10;

// The Entitlement's activation reason
ActivationReason activation_reason = 11;

// e.g. purchase_number change reason, entered by CRS.
string other_change_reason = 100;
}

// Required. Resource name of an entitlement in the form:
// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
string entitlement = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudchannel.googleapis.com/Entitlement"
}
];

// Required. Resource name of the Offer at the time of change.
// Takes the form: accounts/{account_id}/offers/{offer_id}.
string offer = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudchannel.googleapis.com/Offer"
}
];

// Service provisioned for an Entitlement.
ProvisionedService provisioned_service = 3;

// The change action type.
ChangeType change_type = 4;

// The submitted time of the change.
google.protobuf.Timestamp create_time = 5;

// Operator type responsible for the change.
OperatorType operator_type = 6;

// Extended parameters, such as:
// purchase_order_number, gcp_details;
// internal_correlation_id, long_running_operation_id, order_id;
// etc.
repeated Parameter parameters = 8;

// Human-readable identifier that shows what operator made a change.
// When the operator_type is RESELLER, this is the user's email address.
// For all other operator types, this is empty.
string operator = 12;
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,22 @@ message Entitlement {
// parameter names and values are defined in the
// [Offer.parameter_definitions][google.cloud.channel.v1.Offer.parameter_definitions].
//
// The response may include the following output-only Parameters:
// For Google Workspace, the following Parameters may be accepted as input:
//
// - max_units: The maximum assignable units for a flexible offer
//
// OR
//
// - num_units: The total commitment for commitment-based offers
//
// The response may additionally include the following output-only Parameters:
//
// - assigned_units: The number of licenses assigned to users.
//
// - max_units: The maximum assignable units for a flexible offer.
// For GCP billing subaccounts, the following Parameter may be accepted as
// input:
//
// - num_units: The total commitment for commitment-based offers.
// - display_name: The display name of the billing subaccount.
repeated Parameter parameters = 26;
}

Expand Down Expand Up @@ -259,4 +268,4 @@ message TransferEligibility {

// Specified the reason for ineligibility.
Reason ineligibility_reason = 3;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,4 @@ message Period {

// Period Type.
PeriodType period_type = 2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ message OperationMetadata {

// The RPC that initiated this Long Running Operation.
OperationType operation_type = 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ message Media {

// Type of the media.
MediaType type = 3;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/channel/v1/operations.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/timestamp.proto";
import "google/type/date.proto";
Expand Down Expand Up @@ -441,4 +442,4 @@ message Report {
// A description of other aspects of the report, such as the products
// it supports.
string description = 4;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,4 @@ message SkuGroupCondition {
// Example:
// "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
string sku_group = 1;
}
}
Loading