Skip to content

Commit

Permalink
feat: Add state field in resources docs: Minor changes (#11)
Browse files Browse the repository at this point in the history
* feat: Add state field in resources docs: Minor changes

PiperOrigin-RevId: 355488930

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Feb 3 14:55:32 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 5e27c5cafe0952f50ff81552526b3e3d333ef2c3
Source-Link: googleapis/googleapis@5e27c5c

* build: change package name to correct name

PiperOrigin-RevId: 355768365

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Feb 4 20:11:22 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: bb17e41ec1e9f1197520560bc13cc5da24e04e6f
Source-Link: googleapis/googleapis@bb17e41
  • Loading branch information
yoshi-automation committed Mar 2, 2021
1 parent 8d7451a commit 5386e82
Show file tree
Hide file tree
Showing 10 changed files with 203 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-networkconnectivity/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ accept your pull requests.
[setup]: https://cloud.google.com/nodejs/docs/setup
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=network-connectivity.googleapis.com
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=networkconnectivity.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
3 changes: 2 additions & 1 deletion packages/google-cloud-networkconnectivity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ const {HubServiceClient} = require('@google-cloud/network-connectivity');
const client = new HubServiceClient();

async function listNetworkHubs() {
const [hubs] = await client.listHubs({parent: `projects/${projectId}/locations/${location}`
const [hubs] = await client.listHubs({
parent: `projects/${projectId}/locations/${location}`,
});
console.info(hubs);
}
Expand Down
11 changes: 10 additions & 1 deletion packages/google-cloud-networkconnectivity/linkinator.config.json
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io", "https://googleapis.dev/nodejs/network-connectivity/latest", "https://github.com/googleapis/nodejs-network-connectivity/blob/master/CHANGELOG.md"],"silent":true,"concurrency":10}
{
"recurse": true,
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io"
],
"silent": true,
"concurrency": 10
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ option (google.api.resource_definition) = {
pattern: "projects/{project}/zones/{zone}/instances/{instance}"
};

// Connectivity Hub is a hub-and-spoke abstraction for network connectivity
// management in Google Cloud. The Hub aims to reduce operational complexity
// through a simple, centralized connectivity management model.
// Network Connectivity Center is a hub-and-spoke abstraction for
// network connectivity management in Google Cloud. It reduces
// operational complexity through a simple, centralized connectivity management
// model.
service HubService {
option (google.api.default_host) = "networkconnectivity.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
Expand Down Expand Up @@ -160,10 +161,10 @@ service HubService {
}
}

// The Connectivity Hub is a hub-and-spoke abstraction for network connectivity
// management in Google Cloud. It aims to reduce operational complexity
// through a simple, centralized connectivity management model. Here is the
// resource message of a Hub.
// Network Connectivity Center is a hub-and-spoke abstraction for
// network connectivity management in Google Cloud. It reduces
// operational complexity through a simple, centralized connectivity management
// model. Following is the resource message of a hub.
message Hub {
option (google.api.resource) = {
type: "networkconnectivity.googleapis.com/Hub"
Expand Down Expand Up @@ -197,6 +198,9 @@ message Hub {
// resources. If a Hub resource is deleted and another with the same name is
// created, it gets a different unique_id.
string unique_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The current lifecycle state of this Hub.
State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// A Spoke is an abstraction of a network attachment being attached
Expand Down Expand Up @@ -245,6 +249,9 @@ message Spoke {
// resources. If a Spoke resource is deleted and another with the same name is
// created, it gets a different unique_id.
string unique_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The current lifecycle state of this Hub.
State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Request for [HubService.ListHubs][google.cloud.networkconnectivity.v1alpha1.HubService.ListHubs] method.
Expand Down Expand Up @@ -526,3 +533,19 @@ message RouterApplianceInstance {

string network_interface = 2 [deprecated = true];
}

// The State enum represents the lifecycle of a Network Connectivity Center
// resource.
enum State {
// No state information available
STATE_UNSPECIFIED = 0;

// The resource's create operation is in progress
CREATING = 1;

// The resource is active
ACTIVE = 2;

// The resource's Delete operation is in progress
DELETING = 3;
}
20 changes: 20 additions & 0 deletions packages/google-cloud-networkconnectivity/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

108 changes: 108 additions & 0 deletions packages/google-cloud-networkconnectivity/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5386e82

Please sign in to comment.