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: Add support for granular repricing configurations via SkuGroups in Cloud Channel Repricing APIs #3718

Merged
merged 6 commits into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions owl-bot-staging/google-cloud-channel/v1/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/node_modules
**/.coverage
build/
docs/
protos/
system-test/
samples/generated/
3 changes: 3 additions & 0 deletions owl-bot-staging/google-cloud-channel/v1/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts"
}
14 changes: 14 additions & 0 deletions owl-bot-staging/google-cloud-channel/v1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**/*.log
**/node_modules
.coverage
coverage
.nyc_output
docs/
out/
build/
system-test/secrets.js
system-test/*key.json
*.lock
.DS_Store
package-lock.json
__pycache__
55 changes: 55 additions & 0 deletions owl-bot-staging/google-cloud-channel/v1/.jsdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// 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
//
// https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

'use strict';

module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/jsdoc-fresh',
recurse: true,
verbose: true,
destination: './docs/'
},
plugins: [
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'build/src',
'protos'
],
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2022 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/channel',
theme: 'lumen',
default: {
outputSourceFiles: false
}
},
markdown: {
idInHeadings: true
}
};
33 changes: 33 additions & 0 deletions owl-bot-staging/google-cloud-channel/v1/.mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// 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
//
// https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

const config = {
"enable-source-maps": true,
"throw-deprecation": true,
"timeout": 10000
}
if (process.env.MOCHA_THROW_DEPRECATION === 'false') {
delete config['throw-deprecation'];
}
if (process.env.MOCHA_REPORTER) {
config.reporter = process.env.MOCHA_REPORTER;
}
if (process.env.MOCHA_REPORTER_OUTPUT) {
config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`;
}
module.exports = config
22 changes: 22 additions & 0 deletions owl-bot-staging/google-cloud-channel/v1/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 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
//
// https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **


module.exports = {
...require('gts/.prettierrc.json')
}
1 change: 1 addition & 0 deletions owl-bot-staging/google-cloud-channel/v1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Channel: Nodejs Client
16 changes: 16 additions & 0 deletions owl-bot-staging/google-cloud-channel/v1/linkinator.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"recurse": true,
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io",
"https://console.cloud.google.com/cloudshell",
"https://support.google.com"
],
"silent": true,
"concurrency": 5,
"retry": true,
"retryErrors": true,
"retryErrorsCount": 5,
"retryErrorsJitter": 3000
}
65 changes: 65 additions & 0 deletions owl-bot-staging/google-cloud-channel/v1/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "@google-cloud/channel",
"version": "0.1.0",
"description": "Channel client for Node.js",
"repository": "googleapis/nodejs-channel",
"license": "Apache-2.0",
"author": "Google LLC",
"main": "build/src/index.js",
"files": [
"build/src",
"build/protos"
],
"keywords": [
"google apis client",
"google api client",
"google apis",
"google api",
"google",
"google cloud platform",
"google cloud",
"cloud",
"google channel",
"channel",
"cloud channel reports service",
"cloud channel service"
],
"scripts": {
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/ && minifyProtoJson",
"compile-protos": "compileProtos src",
"docs": "jsdoc -c .jsdoc.js",
"predocs-test": "npm run docs",
"docs-test": "linkinator docs",
"fix": "gts fix",
"lint": "gts check",
"prepare": "npm run compile-protos && npm run compile",
"system-test": "c8 mocha build/system-test",
"test": "c8 mocha build/test"
},
"dependencies": {
"google-gax": "^3.5.2"
},
"devDependencies": {
"@types/mocha": "^9.1.1",
"@types/node": "^16.11.62",
"@types/sinon": "^10.0.13",
"c8": "^7.12.0",
"gts": "^3.1.1",
"jsdoc": "^3.6.11",
"jsdoc-fresh": "^2.0.1",
"jsdoc-region-tag": "^2.0.1",
"linkinator": "^4.0.3",
"mocha": "^10.0.0",
"null-loader": "^4.0.1",
"pack-n-play": "^1.0.0-2",
"sinon": "^14.0.0",
"ts-loader": "^8.4.0",
"typescript": "^4.8.3",
"webpack": "^4.46.0",
"webpack-cli": "^4.10.0"
},
"engines": {
"node": ">=v12"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// 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/common.proto";
import "google/protobuf/timestamp.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
option java_multiple_files = true;
option java_outer_classname = "ChannelPartnerLinksProto";
option java_package = "com.google.cloud.channel.v1";

// The level of granularity the
// [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] will
// display.
enum ChannelPartnerLinkView {
// The default / unset value.
// The API will default to the BASIC view.
UNSPECIFIED = 0;

// Includes all fields except the
// [ChannelPartnerLink.channel_partner_cloud_identity_info][google.cloud.channel.v1.ChannelPartnerLink.channel_partner_cloud_identity_info].
BASIC = 1;

// Includes all fields.
FULL = 2;
}

// ChannelPartnerLinkState represents state of a channel partner link.
enum ChannelPartnerLinkState {
// Not used.
CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0;

// An invitation has been sent to the reseller to create a channel partner
// link.
INVITED = 1;

// Status when the reseller is active.
ACTIVE = 2;

// Status when the reseller has been revoked by the distributor.
REVOKED = 3;

// Status when the reseller is suspended by Google or distributor.
SUSPENDED = 4;
}

// Entity representing a link between distributors and their indirect
// resellers in an n-tier resale channel.
message ChannelPartnerLink {
option (google.api.resource) = {
type: "cloudchannel.googleapis.com/ChannelPartnerLink"
pattern: "accounts/{account}/channelPartnerLinks/{channel_partner_link}"
};

// Output only. Resource name for the channel partner link, in the format
// accounts/{account_id}/channelPartnerLinks/{id}.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Required. Cloud Identity ID of the linked reseller.
string reseller_cloud_identity_id = 2
[(google.api.field_behavior) = REQUIRED];

// Required. State of the channel partner link.
ChannelPartnerLinkState link_state = 3
[(google.api.field_behavior) = REQUIRED];

// Output only. URI of the web page where partner accepts the link invitation.
string invite_link_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Timestamp of when the channel partner link is created.
google.protobuf.Timestamp create_time = 5
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Timestamp of when the channel partner link is updated.
google.protobuf.Timestamp update_time = 6
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Public identifier that a customer must use to generate a
// transfer token to move to this distributor-reseller combination.
string public_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Cloud Identity info of the channel partner (IR).
CloudIdentityInfo channel_partner_cloud_identity_info = 8
[(google.api.field_behavior) = OUTPUT_ONLY];
}
Loading