Copyright 2020 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 errorreporting

import (
	
	
	
	
	

	gax 
	
	gtransport 
	clouderrorreportingpb 
	
	
	
)

var newErrorGroupClientHook clientHook
ErrorGroupClient is a client for interacting with Stackdriver Error Reporting API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Connection pool of gRPC connections to the service.
flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE
The call options for this service.
The x-goog-* metadata to be sent with each request.
NewErrorGroupClient creates a new error group service client. Service for retrieving and updating individual error groups.
func ( context.Context,  ...option.ClientOption) (*ErrorGroupClient, error) {
	 := defaultErrorGroupClientOptions()

	if newErrorGroupClientHook != nil {
		,  := newErrorGroupClientHook(, clientHookParams{})
		if  != nil {
			return nil, 
		}
		 = append(, ...)
	}

	,  := checkDisableDeadlines()
	if  != nil {
		return nil, 
	}

	,  := gtransport.DialPool(, append(, ...)...)
	if  != nil {
		return nil, 
	}
	 := &ErrorGroupClient{
		connPool:         ,
		disableDeadlines: ,
		CallOptions:      defaultErrorGroupCallOptions(),

		errorGroupClient: clouderrorreportingpb.NewErrorGroupServiceClient(),
	}
	.setGoogleClientInfo()

	return , nil
}
Connection returns a connection to the API service. Deprecated.
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func ( *ErrorGroupClient) () error {
	return .connPool.Close()
}
setGoogleClientInfo sets the name and version of the application in the `x-goog-api-client` header passed on each request. Intended for use by Google-written clients.
func ( *ErrorGroupClient) ( ...string) {
	 := append([]string{"gl-go", versionGo()}, ...)
	 = append(, "gapic", versionClient, "gax", gax.Version, "grpc", grpc.Version)
	.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(...))
}
GetGroup get the specified group.
func ( *ErrorGroupClient) ( context.Context,  *clouderrorreportingpb.GetGroupRequest,  ...gax.CallOption) (*clouderrorreportingpb.ErrorGroup, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 600000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "group_name", url.QueryEscape(.GetGroupName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.GetGroup[0:len(.CallOptions.GetGroup):len(.CallOptions.GetGroup)], ...)
	var  *clouderrorreportingpb.ErrorGroup
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .errorGroupClient.GetGroup(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
UpdateGroup replace the data for the specified group. Fails if the group does not exist.
func ( *ErrorGroupClient) ( context.Context,  *clouderrorreportingpb.UpdateGroupRequest,  ...gax.CallOption) (*clouderrorreportingpb.ErrorGroup, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 600000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "group.name", url.QueryEscape(.GetGroup().GetName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.UpdateGroup[0:len(.CallOptions.UpdateGroup):len(.CallOptions.UpdateGroup)], ...)
	var  *clouderrorreportingpb.ErrorGroup
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .errorGroupClient.UpdateGroup(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil