You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

130 lines
2.8 KiB

  1. // Copyright 2019 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // https://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // Code generated by gapic-generator. DO NOT EDIT.
  15. package talent_test
  16. import (
  17. "context"
  18. talent "cloud.google.com/go/talent/apiv4beta1"
  19. "google.golang.org/api/iterator"
  20. talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
  21. )
  22. func ExampleNewCompanyClient() {
  23. ctx := context.Background()
  24. c, err := talent.NewCompanyClient(ctx)
  25. if err != nil {
  26. // TODO: Handle error.
  27. }
  28. // TODO: Use client.
  29. _ = c
  30. }
  31. func ExampleCompanyClient_CreateCompany() {
  32. ctx := context.Background()
  33. c, err := talent.NewCompanyClient(ctx)
  34. if err != nil {
  35. // TODO: Handle error.
  36. }
  37. req := &talentpb.CreateCompanyRequest{
  38. // TODO: Fill request struct fields.
  39. }
  40. resp, err := c.CreateCompany(ctx, req)
  41. if err != nil {
  42. // TODO: Handle error.
  43. }
  44. // TODO: Use resp.
  45. _ = resp
  46. }
  47. func ExampleCompanyClient_GetCompany() {
  48. ctx := context.Background()
  49. c, err := talent.NewCompanyClient(ctx)
  50. if err != nil {
  51. // TODO: Handle error.
  52. }
  53. req := &talentpb.GetCompanyRequest{
  54. // TODO: Fill request struct fields.
  55. }
  56. resp, err := c.GetCompany(ctx, req)
  57. if err != nil {
  58. // TODO: Handle error.
  59. }
  60. // TODO: Use resp.
  61. _ = resp
  62. }
  63. func ExampleCompanyClient_UpdateCompany() {
  64. ctx := context.Background()
  65. c, err := talent.NewCompanyClient(ctx)
  66. if err != nil {
  67. // TODO: Handle error.
  68. }
  69. req := &talentpb.UpdateCompanyRequest{
  70. // TODO: Fill request struct fields.
  71. }
  72. resp, err := c.UpdateCompany(ctx, req)
  73. if err != nil {
  74. // TODO: Handle error.
  75. }
  76. // TODO: Use resp.
  77. _ = resp
  78. }
  79. func ExampleCompanyClient_DeleteCompany() {
  80. ctx := context.Background()
  81. c, err := talent.NewCompanyClient(ctx)
  82. if err != nil {
  83. // TODO: Handle error.
  84. }
  85. req := &talentpb.DeleteCompanyRequest{
  86. // TODO: Fill request struct fields.
  87. }
  88. err = c.DeleteCompany(ctx, req)
  89. if err != nil {
  90. // TODO: Handle error.
  91. }
  92. }
  93. func ExampleCompanyClient_ListCompanies() {
  94. ctx := context.Background()
  95. c, err := talent.NewCompanyClient(ctx)
  96. if err != nil {
  97. // TODO: Handle error.
  98. }
  99. req := &talentpb.ListCompaniesRequest{
  100. // TODO: Fill request struct fields.
  101. }
  102. it := c.ListCompanies(ctx, req)
  103. for {
  104. resp, err := it.Next()
  105. if err == iterator.Done {
  106. break
  107. }
  108. if err != nil {
  109. // TODO: Handle error.
  110. }
  111. // TODO: Use resp.
  112. _ = resp
  113. }
  114. }