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
15// Code generated by gapic-generator. DO NOT EDIT.
16
17package dialogflow_test
18
19import (
20	"context"
21
22	dialogflow "cloud.google.com/go/dialogflow/apiv2"
23	"google.golang.org/api/iterator"
24	dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2"
25)
26
27func ExampleNewSessionEntityTypesClient() {
28	ctx := context.Background()
29	c, err := dialogflow.NewSessionEntityTypesClient(ctx)
30	if err != nil {
31		// TODO: Handle error.
32	}
33	// TODO: Use client.
34	_ = c
35}
36
37func ExampleSessionEntityTypesClient_ListSessionEntityTypes() {
38	ctx := context.Background()
39	c, err := dialogflow.NewSessionEntityTypesClient(ctx)
40	if err != nil {
41		// TODO: Handle error.
42	}
43
44	req := &dialogflowpb.ListSessionEntityTypesRequest{
45		// TODO: Fill request struct fields.
46	}
47	it := c.ListSessionEntityTypes(ctx, req)
48	for {
49		resp, err := it.Next()
50		if err == iterator.Done {
51			break
52		}
53		if err != nil {
54			// TODO: Handle error.
55		}
56		// TODO: Use resp.
57		_ = resp
58	}
59}
60
61func ExampleSessionEntityTypesClient_GetSessionEntityType() {
62	ctx := context.Background()
63	c, err := dialogflow.NewSessionEntityTypesClient(ctx)
64	if err != nil {
65		// TODO: Handle error.
66	}
67
68	req := &dialogflowpb.GetSessionEntityTypeRequest{
69		// TODO: Fill request struct fields.
70	}
71	resp, err := c.GetSessionEntityType(ctx, req)
72	if err != nil {
73		// TODO: Handle error.
74	}
75	// TODO: Use resp.
76	_ = resp
77}
78
79func ExampleSessionEntityTypesClient_CreateSessionEntityType() {
80	ctx := context.Background()
81	c, err := dialogflow.NewSessionEntityTypesClient(ctx)
82	if err != nil {
83		// TODO: Handle error.
84	}
85
86	req := &dialogflowpb.CreateSessionEntityTypeRequest{
87		// TODO: Fill request struct fields.
88	}
89	resp, err := c.CreateSessionEntityType(ctx, req)
90	if err != nil {
91		// TODO: Handle error.
92	}
93	// TODO: Use resp.
94	_ = resp
95}
96
97func ExampleSessionEntityTypesClient_UpdateSessionEntityType() {
98	ctx := context.Background()
99	c, err := dialogflow.NewSessionEntityTypesClient(ctx)
100	if err != nil {
101		// TODO: Handle error.
102	}
103
104	req := &dialogflowpb.UpdateSessionEntityTypeRequest{
105		// TODO: Fill request struct fields.
106	}
107	resp, err := c.UpdateSessionEntityType(ctx, req)
108	if err != nil {
109		// TODO: Handle error.
110	}
111	// TODO: Use resp.
112	_ = resp
113}
114
115func ExampleSessionEntityTypesClient_DeleteSessionEntityType() {
116	ctx := context.Background()
117	c, err := dialogflow.NewSessionEntityTypesClient(ctx)
118	if err != nil {
119		// TODO: Handle error.
120	}
121
122	req := &dialogflowpb.DeleteSessionEntityTypeRequest{
123		// TODO: Fill request struct fields.
124	}
125	err = c.DeleteSessionEntityType(ctx, req)
126	if err != nil {
127		// TODO: Handle error.
128	}
129}
130