blob: 5067d17684ba853d93c81661b4f4b69fecbd752b [file] [log] [blame]
// Copyright 2021 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.
// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package domains_test
import (
"context"
domains "cloud.google.com/go/domains/apiv1beta1"
"google.golang.org/api/iterator"
domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)
func ExampleNewClient() {
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use client.
_ = c
}
func ExampleClient_SearchDomains() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.SearchDomainsRequest{
// TODO: Fill request struct fields.
}
resp, err := c.SearchDomains(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_RetrieveRegisterParameters() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.RetrieveRegisterParametersRequest{
// TODO: Fill request struct fields.
}
resp, err := c.RetrieveRegisterParameters(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_RegisterDomain() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.RegisterDomainRequest{
// TODO: Fill request struct fields.
}
op, err := c.RegisterDomain(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ListRegistrations() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.ListRegistrationsRequest{
// TODO: Fill request struct fields.
}
it := c.ListRegistrations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func ExampleClient_GetRegistration() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.GetRegistrationRequest{
// TODO: Fill request struct fields.
}
resp, err := c.GetRegistration(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_UpdateRegistration() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.UpdateRegistrationRequest{
// TODO: Fill request struct fields.
}
op, err := c.UpdateRegistration(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ConfigureManagementSettings() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.ConfigureManagementSettingsRequest{
// TODO: Fill request struct fields.
}
op, err := c.ConfigureManagementSettings(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ConfigureDnsSettings() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.ConfigureDnsSettingsRequest{
// TODO: Fill request struct fields.
}
op, err := c.ConfigureDnsSettings(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ConfigureContactSettings() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.ConfigureContactSettingsRequest{
// TODO: Fill request struct fields.
}
op, err := c.ConfigureContactSettings(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ExportRegistration() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.ExportRegistrationRequest{
// TODO: Fill request struct fields.
}
op, err := c.ExportRegistration(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_DeleteRegistration() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.DeleteRegistrationRequest{
// TODO: Fill request struct fields.
}
op, err := c.DeleteRegistration(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func ExampleClient_RetrieveAuthorizationCode() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.RetrieveAuthorizationCodeRequest{
// TODO: Fill request struct fields.
}
resp, err := c.RetrieveAuthorizationCode(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ResetAuthorizationCode() {
// import domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
ctx := context.Background()
c, err := domains.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &domainspb.ResetAuthorizationCodeRequest{
// TODO: Fill request struct fields.
}
resp, err := c.ResetAuthorizationCode(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}