1// Copyright 2021 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 protoc-gen-go_gapic. DO NOT EDIT.
16
17package oslogin_test
18
19import (
20	"context"
21
22	oslogin "cloud.google.com/go/oslogin/apiv1"
23	osloginpb "google.golang.org/genproto/googleapis/cloud/oslogin/v1"
24)
25
26func ExampleNewClient() {
27	ctx := context.Background()
28	c, err := oslogin.NewClient(ctx)
29	if err != nil {
30		// TODO: Handle error.
31	}
32	// TODO: Use client.
33	_ = c
34}
35
36func ExampleClient_DeletePosixAccount() {
37	ctx := context.Background()
38	c, err := oslogin.NewClient(ctx)
39	if err != nil {
40		// TODO: Handle error.
41	}
42
43	req := &osloginpb.DeletePosixAccountRequest{
44		// TODO: Fill request struct fields.
45	}
46	err = c.DeletePosixAccount(ctx, req)
47	if err != nil {
48		// TODO: Handle error.
49	}
50}
51
52func ExampleClient_DeleteSshPublicKey() {
53	ctx := context.Background()
54	c, err := oslogin.NewClient(ctx)
55	if err != nil {
56		// TODO: Handle error.
57	}
58
59	req := &osloginpb.DeleteSshPublicKeyRequest{
60		// TODO: Fill request struct fields.
61	}
62	err = c.DeleteSshPublicKey(ctx, req)
63	if err != nil {
64		// TODO: Handle error.
65	}
66}
67
68func ExampleClient_GetLoginProfile() {
69	// import osloginpb "google.golang.org/genproto/googleapis/cloud/oslogin/v1"
70
71	ctx := context.Background()
72	c, err := oslogin.NewClient(ctx)
73	if err != nil {
74		// TODO: Handle error.
75	}
76
77	req := &osloginpb.GetLoginProfileRequest{
78		// TODO: Fill request struct fields.
79	}
80	resp, err := c.GetLoginProfile(ctx, req)
81	if err != nil {
82		// TODO: Handle error.
83	}
84	// TODO: Use resp.
85	_ = resp
86}
87
88func ExampleClient_GetSshPublicKey() {
89	// import osloginpb "google.golang.org/genproto/googleapis/cloud/oslogin/v1"
90
91	ctx := context.Background()
92	c, err := oslogin.NewClient(ctx)
93	if err != nil {
94		// TODO: Handle error.
95	}
96
97	req := &osloginpb.GetSshPublicKeyRequest{
98		// TODO: Fill request struct fields.
99	}
100	resp, err := c.GetSshPublicKey(ctx, req)
101	if err != nil {
102		// TODO: Handle error.
103	}
104	// TODO: Use resp.
105	_ = resp
106}
107
108func ExampleClient_ImportSshPublicKey() {
109	// import osloginpb "google.golang.org/genproto/googleapis/cloud/oslogin/v1"
110
111	ctx := context.Background()
112	c, err := oslogin.NewClient(ctx)
113	if err != nil {
114		// TODO: Handle error.
115	}
116
117	req := &osloginpb.ImportSshPublicKeyRequest{
118		// TODO: Fill request struct fields.
119	}
120	resp, err := c.ImportSshPublicKey(ctx, req)
121	if err != nil {
122		// TODO: Handle error.
123	}
124	// TODO: Use resp.
125	_ = resp
126}
127
128func ExampleClient_UpdateSshPublicKey() {
129	// import osloginpb "google.golang.org/genproto/googleapis/cloud/oslogin/v1"
130
131	ctx := context.Background()
132	c, err := oslogin.NewClient(ctx)
133	if err != nil {
134		// TODO: Handle error.
135	}
136
137	req := &osloginpb.UpdateSshPublicKeyRequest{
138		// TODO: Fill request struct fields.
139	}
140	resp, err := c.UpdateSshPublicKey(ctx, req)
141	if err != nil {
142		// TODO: Handle error.
143	}
144	// TODO: Use resp.
145	_ = resp
146}
147