Skip to content

Commit

Permalink
feat: [gdchardwaremanagement] add an order type field to distinguish …
Browse files Browse the repository at this point in the history
…a fulfillment request from a sales inquiry (#5685)

* feat: add an order type field to distinguish a fulfillment request from a sales inquiry
feat: add support to mark comments as read or unread
feat: rename zone state signal READY_FOR_SITE_TURNUP to FACTORY_TURNUP_CHECKS_PASSED
docs: clarify how access_times are used

PiperOrigin-RevId: 675275984

Source-Link: googleapis/googleapis@fde103c

Source-Link: googleapis/googleapis-gen@a58cb74
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdkY2hhcmR3YXJlbWFuYWdlbWVudC8uT3dsQm90LnlhbWwiLCJoIjoiYTU4Y2I3NDQ5ZmNjYWE3ZTljNzZiZDVhMTM3ZTc5YWVmYTQ1ZWRlNyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: sofisl <[email protected]>
  • Loading branch information
3 people authored Sep 20, 2024
1 parent 100e106 commit ba7cd86
Show file tree
Hide file tree
Showing 14 changed files with 1,866 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-gdchardwaremanagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| G_d_c_hardware_management.list_sites | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.list_sites.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-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.list_sites.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.list_skus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.list_skus.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-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.list_skus.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.list_zones | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.list_zones.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-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.list_zones.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.record_action_on_comment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.record_action_on_comment.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-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.record_action_on_comment.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.signal_zone_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.signal_zone_state.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-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.signal_zone_state.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.submit_order | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.submit_order.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-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.submit_order.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.update_hardware | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.update_hardware.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-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.update_hardware.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ enum PowerSupply {
POWER_SUPPLY_DC = 2;
}

// Entity is used to denote an organization or party.
enum Entity {
// Entity is unspecified.
ENTITY_UNSPECIFIED = 0;

// Google.
GOOGLE = 1;

// Customer.
CUSTOMER = 2;

// Vendor.
VENDOR = 3;
}

// An order for GDC hardware.
message Order {
option (google.api.resource) = {
Expand All @@ -66,6 +81,10 @@ message Order {
// Order has been submitted to Google.
SUBMITTED = 2;

// All information required from the customer for fulfillment of the order
// is complete.
INFO_COMPLETE = 12;

// Order has been accepted by Google.
ACCEPTED = 3;

Expand Down Expand Up @@ -218,6 +237,12 @@ message Site {

// Optional. The time periods when the site is accessible.
// If this field is empty, the site is accessible at all times.
//
// This field is used by Google to schedule the initial installation as well
// as any later hardware maintenance. You may update this at any time. For
// example, if the initial installation is requested during off-hours but
// maintenance should be performed during regular business hours, you should
// update the access times after initial installation is complete.
repeated TimePeriod access_times = 26
[(google.api.field_behavior) = OPTIONAL];

Expand All @@ -228,6 +253,10 @@ message Site {
// - any special process or approval required to move the equipment
// - whether a representative will be available during site visits
string notes = 27 [(google.api.field_behavior) = OPTIONAL];

// Optional. Customer defined identifier for this Site. This can be used to
// identify the site in the customer's own systems.
string customer_site_id = 28 [(google.api.field_behavior) = OPTIONAL];
}

// A group of hardware that is part of the same order, has the same SKU, and is
Expand Down Expand Up @@ -473,6 +502,14 @@ message Comment {
// Required. Text of this comment. The length of text must be <= 1000
// characters.
string text = 5 [(google.api.field_behavior) = REQUIRED];

// Output only. Timestamp of the first time this comment was viewed by the
// customer. If the comment wasn't viewed then this timestamp will be unset.
google.protobuf.Timestamp customer_viewed_time = 6
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The entity the author belongs to.
Entity author_entity = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// A log entry of a change made to an order.
Expand Down Expand Up @@ -637,6 +674,10 @@ message Zone {

// Output only. Globally unique identifier generated for this Edge Zone.
string globally_unique_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Subscription configurations for this zone.
repeated SubscriptionConfig subscription_configs = 13
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// Contact information of the customer organization.
Expand Down Expand Up @@ -942,3 +983,40 @@ message HardwareLocation {
// If unset, this location is assumed to be the entire rack.
repeated RackSpace rack_space = 3 [(google.api.field_behavior) = OPTIONAL];
}

// A message to store a subscription configuration.
message SubscriptionConfig {
// Enum to represent the state of the subscription.
enum SubscriptionState {
// State is unspecified.
SUBSCRIPTION_STATE_UNSPECIFIED = 0;

// Active state means that the subscription has been created successfully
// and billing is happening.
ACTIVE = 1;

// Inactive means that the subscription has been created successfully, but
// billing has not started yet.
INACTIVE = 2;

// The subscription is in an erroneous state.
ERROR = 3;

// The subscription state failed to be retrieved. This may be a transient
// issue. The user should retry the request.
FAILED_TO_RETRIEVE = 4;

// The subscription has been completed, because it has reached the end date.
COMPLETED = 5;
}

// Output only. The unique identifier of the subscription.
string subscription_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The Google Cloud Billing ID that the subscription is created
// under.
string billing_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The current state of the subscription.
SubscriptionState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,18 @@ service GDCHardwareManagement {
};
}

// Record Action on a Comment. If the Action specified in the request is READ,
// the viewed time in the comment is set to the time the request was received.
// If the comment is already marked as read, subsequent calls will be ignored.
// If the Action is UNREAD, the viewed time is cleared from the comment.
rpc RecordActionOnComment(RecordActionOnCommentRequest) returns (Comment) {
option (google.api.http) = {
post: "/v1alpha/{name=projects/*/locations/*/orders/*/comments/*}:recordAction"
body: "*"
};
option (google.api.method_signature) = "name,action_type";
}

// Lists the changes made to an order.
rpc ListChangeLogEntries(ListChangeLogEntriesRequest)
returns (ListChangeLogEntriesResponse) {
Expand Down Expand Up @@ -516,6 +528,30 @@ message DeleteOrderRequest {

// A request to submit an order.
message SubmitOrderRequest {
// Valid types of submit order request.
enum Type {
// Request type is unspecified. This should not be used.
TYPE_UNSPECIFIED = 0;

// Use this request type to submit your order and initiate conversation with
// Google. After this submission, you will not be able to modify the number
// or SKU of your ordered hardware. Please note that this order will not be
// ready for fulfillment yet until you provide more information, such as
// zone network configuration, hardware physical and installation
// information, etc.
// If you are submitting an order for a SKU type of RACK, please use this
// request type, as additional information will be required outside of the
// API.
INFO_PENDING = 1;

// Use this request type if and when you are ready to submit your order for
// fulfillment. In addition to the information required for `INFO_PENDING`,
// the order must contain all required information, such as zone network
// configuration, hardware physical and installation information, etc.
// Further changes to any order information will no longer be allowed.
INFO_COMPLETE = 2;
}

// Required. The name of the order.
// Format: `projects/{project}/locations/{location}/orders/{order}`
string name = 1 [
Expand All @@ -528,6 +564,10 @@ message SubmitOrderRequest {
// Optional. An optional unique identifier for this request. See
// [AIP-155](https://google.aip.dev/155).
string request_id = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. Type of this request. If unset, the request type is assumed to be
// `INFO_PENDING`.
Type type = 3 [(google.api.field_behavior) = OPTIONAL];
}

// A request to list sites.
Expand Down Expand Up @@ -928,6 +968,34 @@ message CreateCommentRequest {
string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
}

// A request to record an action on a comment.
message RecordActionOnCommentRequest {
// Valid action types of Comment.
enum ActionType {
// Action is unspecified.
ACTION_TYPE_UNSPECIFIED = 0;

// Mark comment as read.
READ = 1;

// Mark comment as unread.
UNREAD = 2;
}

// Required. The name of the comment.
// Format:
// `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "gdchardwaremanagement.googleapis.com/Comment"
}
];

// Required. The action type of the recorded action.
ActionType action_type = 2 [(google.api.field_behavior) = REQUIRED];
}

// A request to list change log entries.
message ListChangeLogEntriesRequest {
// Required. The order to list change log entries for.
Expand Down Expand Up @@ -1151,11 +1219,16 @@ message DeleteZoneRequest {
message SignalZoneStateRequest {
// Valid state signals for a zone.
enum StateSignal {
option allow_alias = true;

// State signal of the zone is unspecified.
STATE_SIGNAL_UNSPECIFIED = 0;

// The Zone is ready for site turnup.
READY_FOR_SITE_TURNUP = 1;
FACTORY_TURNUP_CHECKS_PASSED = 1;

// The Zone is ready for site turnup. Deprecated, but not deleted.
READY_FOR_SITE_TURNUP = 1 [deprecated = true];

// The Zone failed in factory turnup checks.
FACTORY_TURNUP_CHECKS_FAILED = 2;
Expand Down
Loading

0 comments on commit ba7cd86

Please sign in to comment.