Skip to content
Permalink
Browse files
feat: generate initial client
  • Loading branch information
chingor13 committed Oct 30, 2019
1 parent b700d9a commit 33e5520bca6594fb6f0535538e040b6dd859f127
Showing with 19,900 additions and 0 deletions.
  1. +51 −0 .github/ISSUE_TEMPLATE/bug_report.md
  2. +21 −0 .github/ISSUE_TEMPLATE/feature_request.md
  3. +7 −0 .github/ISSUE_TEMPLATE/support_request.md
  4. +1 −0 .github/PULL_REQUEST_TEMPLATE.md
  5. +1 −0 .github/release-please.yml
  6. +3 −0 .kokoro/build.bat
  7. +60 −0 .kokoro/build.sh
  8. +38 −0 .kokoro/coerce_logs.sh
  9. +13 −0 .kokoro/common.cfg
  10. +25 −0 .kokoro/continuous/common.cfg
  11. +12 −0 .kokoro/continuous/dependencies.cfg
  12. +7 −0 .kokoro/continuous/integration.cfg
  13. +7 −0 .kokoro/continuous/java11.cfg
  14. +7 −0 .kokoro/continuous/java7.cfg
  15. +3 −0 .kokoro/continuous/java8-osx.cfg
  16. +3 −0 .kokoro/continuous/java8-win.cfg
  17. +7 −0 .kokoro/continuous/java8.cfg
  18. +13 −0 .kokoro/continuous/lint.cfg
  19. +53 −0 .kokoro/continuous/propose_release.cfg
  20. +29 −0 .kokoro/continuous/propose_release.sh
  21. +27 −0 .kokoro/dependencies.sh
  22. +33 −0 .kokoro/linkage-monitor.sh
  23. +25 −0 .kokoro/nightly/common.cfg
  24. +12 −0 .kokoro/nightly/dependencies.cfg
  25. +7 −0 .kokoro/nightly/integration.cfg
  26. +7 −0 .kokoro/nightly/java11.cfg
  27. +7 −0 .kokoro/nightly/java7.cfg
  28. +3 −0 .kokoro/nightly/java8-osx.cfg
  29. +3 −0 .kokoro/nightly/java8-win.cfg
  30. +7 −0 .kokoro/nightly/java8.cfg
  31. +13 −0 .kokoro/nightly/lint.cfg
  32. +13 −0 .kokoro/presubmit/clirr.cfg
  33. +34 −0 .kokoro/presubmit/common.cfg
  34. +12 −0 .kokoro/presubmit/dependencies.cfg
  35. +31 −0 .kokoro/presubmit/integration.cfg
  36. +7 −0 .kokoro/presubmit/java11.cfg
  37. +7 −0 .kokoro/presubmit/java7.cfg
  38. +3 −0 .kokoro/presubmit/java8-osx.cfg
  39. +3 −0 .kokoro/presubmit/java8-win.cfg
  40. +7 −0 .kokoro/presubmit/java8.cfg
  41. +12 −0 .kokoro/presubmit/linkage-monitor.cfg
  42. +13 −0 .kokoro/presubmit/lint.cfg
  43. +53 −0 .kokoro/release/bump_snapshot.cfg
  44. +30 −0 .kokoro/release/bump_snapshot.sh
  45. +49 −0 .kokoro/release/common.cfg
  46. +50 −0 .kokoro/release/common.sh
  47. +6 −0 .kokoro/release/drop.cfg
  48. +32 −0 .kokoro/release/drop.sh
  49. +6 −0 .kokoro/release/promote.cfg
  50. +34 −0 .kokoro/release/promote.sh
  51. +19 −0 .kokoro/release/publish_javadoc.cfg
  52. +55 −0 .kokoro/release/publish_javadoc.sh
  53. +6 −0 .kokoro/release/snapshot.cfg
  54. +33 −0 .kokoro/release/snapshot.sh
  55. +44 −0 .kokoro/release/stage.cfg
  56. +42 −0 .kokoro/release/stage.sh
  57. +24 −0 .kokoro/trampoline.sh
  58. +9 −0 .repo-metadata.json
  59. +93 −0 CODE_OF_CONDUCT.md
  60. +28 −0 CONTRIBUTING.md
  61. +202 −0 LICENSE
  62. +127 −0 README.md
  63. +4 −0 codecov.yaml
  64. +92 −0 google-cloud-billingbudgets-bom/pom.xml
  65. +135 −0 google-cloud-billingbudgets/pom.xml
  66. +537 −0 ...ud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClient.java
  67. +223 −0 ...-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceSettings.java
  68. +46 −0 google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/package-info.java
  69. +69 −0 ...billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/stub/BudgetServiceStub.java
  70. +435 −0 ...udgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/stub/BudgetServiceStubSettings.java
  71. +115 −0 ...src/main/java/com/google/cloud/billing/budgets/v1beta1/stub/GrpcBudgetServiceCallableFactory.java
  72. +282 −0 ...ingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/stub/GrpcBudgetServiceStub.java
  73. +65 −0 ...illingbudgets/src/test/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClientTest.java
  74. +57 −0 ...loud-billingbudgets/src/test/java/com/google/cloud/billing/budgets/v1beta1/MockBudgetService.java
  75. +130 −0 ...-billingbudgets/src/test/java/com/google/cloud/billing/budgets/v1beta1/MockBudgetServiceImpl.java
  76. +60 −0 grpc-google-cloud-billingbudgets-v1beta1/pom.xml
  77. +885 −0 ...lingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceGrpc.java
  78. +15 −0 java.header
  79. +10 −0 license-checks.xml
  80. +293 −0 pom.xml
  81. +33 −0 proto-google-cloud-billingbudgets-v1beta1/pom.xml
  82. +856 −0 ...billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRule.java
  83. +89 −0 ...dgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRuleOrBuilder.java
  84. +162 −0 ...ingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BillingAccountName.java
  85. +2,459 −0 ...e-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Budget.java
  86. +1,139 −0 ...d-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetAmount.java
  87. +99 −0 ...budgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetAmountOrBuilder.java
  88. +183 −0 ...ud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetModel.java
  89. +182 −0 ...oud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetName.java
  90. +283 −0 ...illingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetOrBuilder.java
  91. +205 −0 ...dgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceOuterClass.java
  92. +929 −0 ...ngbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/CreateBudgetRequest.java
  93. +89 −0 ...-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/CreateBudgetRequestOrBuilder.java
  94. +638 −0 ...ngbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/DeleteBudgetRequest.java
  95. +52 −0 ...-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/DeleteBudgetRequestOrBuilder.java
  96. +1,351 −0 ...e-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Filter.java
  97. +168 −0 ...illingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/FilterOrBuilder.java
  98. +635 −0 ...llingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/GetBudgetRequest.java
  99. +52 −0 ...ets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/GetBudgetRequestOrBuilder.java
  100. +457 −0 ...llingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/LastPeriodAmount.java
  101. +24 −0 ...ets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/LastPeriodAmountOrBuilder.java
  102. +893 −0 ...ingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsRequest.java
  103. +89 −0 ...s-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsRequestOrBuilder.java
  104. +1,116 −0 ...ngbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsResponse.java
  105. +100 −0 ...-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsResponseOrBuilder.java
  106. +862 −0 ...-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ThresholdRule.java
  107. +65 −0 ...udgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ThresholdRuleOrBuilder.java
  108. +1,091 −0 ...ngbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/UpdateBudgetRequest.java
  109. +114 −0 ...-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/UpdateBudgetRequestOrBuilder.java
  110. +177 −0 ...oud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_model.proto
  111. +160 −0 ...d-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_service.proto
  112. +27 −0 renovate.json
  113. +39 −0 synth.metadata
  114. +40 −0 synth.py
@@ -0,0 +1,51 @@
---
name: Bug report
about: Create a report to help us improve

---

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/googleapis/java-billingbudgets/issues
- Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform

If you are still having issues, please include as much information as possible:

#### Environment details

1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
General, Core, and Other are also allowed as types
2. OS type and version:
3. Java version:
4. billingbudgets version(s):

#### Steps to reproduce

1. ?
2. ?

#### Code example

```java
// example
```

#### Stack trace
```
Any relevant stacktrace here.
```

#### External references such as API reference guides

- ?

#### Any additional information below


Following these steps guarantees the quickest resolution possible.

Thanks!
@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea for this library

---

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

**Is your feature request related to a problem? Please describe.**
What the problem is. Example: I'm always frustrated when [...]

**Describe the solution you'd like**
What you want to happen.

**Describe alternatives you've considered**
Any alternative solutions or features you've considered.

**Additional context**
Any other context or screenshots about the feature request.
@@ -0,0 +1,7 @@
---
name: Support request
about: If you have a support contract with Google, please create an issue in the Google Cloud Support console.

---

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
@@ -0,0 +1 @@
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for context and/or discussion)
@@ -0,0 +1 @@
releaseType: java-yoshi
@@ -0,0 +1,3 @@
:: See documentation in type-shell-output.bat

"C:\Program Files\Git\bin\bash.exe" github/java-billingbudgets/.kokoro/build.sh
@@ -0,0 +1,60 @@
#!/bin/bash
# Copyright 2019 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.

set -eo pipefail

## Get the directory of the build script
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
## cd to the parent directory, i.e. the root of the git repo
cd ${scriptDir}/..

# Print out Java version
java -version
echo ${JOB_TYPE}

mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true \
-T 1C

# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
fi

case ${JOB_TYPE} in
test)
mvn test -B -Dclirr.skip=true
bash ${KOKORO_GFILE_DIR}/codecov.sh
bash .kokoro/coerce_logs.sh
;;
lint)
mvn com.coveo:fmt-maven-plugin:check
;;
javadoc)
mvn javadoc:javadoc javadoc:test-javadoc
;;
integration)
mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -Dclirr.skip=true -fae verify
bash .kokoro/coerce_logs.sh
;;
clirr)
mvn -B clirr:check
;;
*)
;;
esac
@@ -0,0 +1,38 @@
#!/bin/bash
# Copyright 2019 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.

# This script finds and moves sponge logs so that they can be found by placer
# and are not flagged as flaky by sponge.

set -eo pipefail

## Get the directory of the build script
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
## cd to the parent directory, i.e. the root of the git repo
cd ${scriptDir}/..

job=$(basename ${KOKORO_JOB_NAME})

echo "coercing sponge logs..."
for xml in `find . -name *-sponge_log.xml`
do
echo "processing ${xml}"
class=$(basename ${xml} | cut -d- -f2)
dir=$(dirname ${xml})/${job}/${class}
text=$(dirname ${xml})/${class}-sponge_log.txt
mkdir -p ${dir}
mv ${xml} ${dir}/sponge_log.xml
mv ${text} ${dir}/sponge_log.txt
done
@@ -0,0 +1,13 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR}
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# All builds use the trampoline script to run in docker.
build_file: "java-billingbudgets/.kokoro/trampoline.sh"

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-billingbudgets/.kokoro/build.sh"
}
@@ -0,0 +1,25 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
regex: "**/*sponge_log.txt"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "java-billingbudgets/.kokoro/trampoline.sh"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-billingbudgets/.kokoro/build.sh"
}

env_vars: {
key: "JOB_TYPE"
value: "test"
}
@@ -0,0 +1,12 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-billingbudgets/.kokoro/dependencies.sh"
}
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
}
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
}
@@ -0,0 +1,3 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "java-billingbudgets/.kokoro/build.sh"
@@ -0,0 +1,3 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "java-billingbudgets/.kokoro/build.bat"
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}
@@ -0,0 +1,13 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.

env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "JOB_TYPE"
value: "lint"
}
@@ -0,0 +1,53 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "java-billingbudgets/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-billingbudgets/.kokoro/continuous/propose_release.sh"
}

# tokens used by release-please to keep an up-to-date release PR.
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "github-magic-proxy-key-release-please"
}
}
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "github-magic-proxy-token-release-please"
}
}
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "github-magic-proxy-url-release-please"
}
}
}
@@ -0,0 +1,29 @@
#!/bin/bash

# Copyright 2019 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.

set -eo pipefail

export NPM_CONFIG_PREFIX=/home/node/.npm-global

if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then
# Groom the release PR as new commits are merged.
npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \
--repo-url=googleapis/java-billingbudgets \
--package-name="billingbudgets" \
--api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \
--proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \
--release-type=java-yoshi
fi

0 comments on commit 33e5520

Please sign in to comment.