// Code generated by volcengine with private/model/cli/gen-api/main.go. DO NOT EDIT.

package ark

import (
	"github.com/volcengine/volcengine-go-sdk/volcengine"
	"github.com/volcengine/volcengine-go-sdk/volcengine/request"
	"github.com/volcengine/volcengine-go-sdk/volcengine/response"
	"github.com/volcengine/volcengine-go-sdk/volcengine/volcengineutil"
)

const opGetModelCustomizationJobMetricsCommon = "GetModelCustomizationJobMetrics"

// GetModelCustomizationJobMetricsCommonRequest generates a "volcengine/request.Request" representing the
// client's request for the GetModelCustomizationJobMetricsCommon operation. The "output" return
// value will be populated with the GetModelCustomizationJobMetricsCommon request's response once the request completes
// successfully.
//
// Use "Send" method on the returned GetModelCustomizationJobMetricsCommon Request to send the API call to the service.
// the "output" return value is not valid until after GetModelCustomizationJobMetricsCommon Send returns without error.
//
// See GetModelCustomizationJobMetricsCommon for more information on using the GetModelCustomizationJobMetricsCommon
// API call, and error handling.
//
//    // Example sending a request using the GetModelCustomizationJobMetricsCommonRequest method.
//    req, resp := client.GetModelCustomizationJobMetricsCommonRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
func (c *ARK) GetModelCustomizationJobMetricsCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{}) {
	op := &request.Operation{
		Name:       opGetModelCustomizationJobMetricsCommon,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &map[string]interface{}{}
	}

	output = &map[string]interface{}{}
	req = c.newRequest(op, input, output)

	req.HTTPRequest.Header.Set("Content-Type", "application/json; charset=utf-8")

	return
}

// GetModelCustomizationJobMetricsCommon API operation for ARK.
//
// Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions
// with volcengineerr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the VOLCENGINE API reference guide for ARK's
// API operation GetModelCustomizationJobMetricsCommon for usage and error information.
func (c *ARK) GetModelCustomizationJobMetricsCommon(input *map[string]interface{}) (*map[string]interface{}, error) {
	req, out := c.GetModelCustomizationJobMetricsCommonRequest(input)
	return out, req.Send()
}

// GetModelCustomizationJobMetricsCommonWithContext is the same as GetModelCustomizationJobMetricsCommon with the addition of
// the ability to pass a context and additional request options.
//
// See GetModelCustomizationJobMetricsCommon for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur.
// In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ARK) GetModelCustomizationJobMetricsCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error) {
	req, out := c.GetModelCustomizationJobMetricsCommonRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetModelCustomizationJobMetrics = "GetModelCustomizationJobMetrics"

// GetModelCustomizationJobMetricsRequest generates a "volcengine/request.Request" representing the
// client's request for the GetModelCustomizationJobMetrics operation. The "output" return
// value will be populated with the GetModelCustomizationJobMetricsCommon request's response once the request completes
// successfully.
//
// Use "Send" method on the returned GetModelCustomizationJobMetricsCommon Request to send the API call to the service.
// the "output" return value is not valid until after GetModelCustomizationJobMetricsCommon Send returns without error.
//
// See GetModelCustomizationJobMetrics for more information on using the GetModelCustomizationJobMetrics
// API call, and error handling.
//
//    // Example sending a request using the GetModelCustomizationJobMetricsRequest method.
//    req, resp := client.GetModelCustomizationJobMetricsRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
func (c *ARK) GetModelCustomizationJobMetricsRequest(input *GetModelCustomizationJobMetricsInput) (req *request.Request, output *GetModelCustomizationJobMetricsOutput) {
	op := &request.Operation{
		Name:       opGetModelCustomizationJobMetrics,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetModelCustomizationJobMetricsInput{}
	}

	output = &GetModelCustomizationJobMetricsOutput{}
	req = c.newRequest(op, input, output)

	req.HTTPRequest.Header.Set("Content-Type", "application/json; charset=utf-8")

	return
}

// GetModelCustomizationJobMetrics API operation for ARK.
//
// Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions
// with volcengineerr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the VOLCENGINE API reference guide for ARK's
// API operation GetModelCustomizationJobMetrics for usage and error information.
func (c *ARK) GetModelCustomizationJobMetrics(input *GetModelCustomizationJobMetricsInput) (*GetModelCustomizationJobMetricsOutput, error) {
	req, out := c.GetModelCustomizationJobMetricsRequest(input)
	return out, req.Send()
}

// GetModelCustomizationJobMetricsWithContext is the same as GetModelCustomizationJobMetrics with the addition of
// the ability to pass a context and additional request options.
//
// See GetModelCustomizationJobMetrics for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur.
// In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ARK) GetModelCustomizationJobMetricsWithContext(ctx volcengine.Context, input *GetModelCustomizationJobMetricsInput, opts ...request.Option) (*GetModelCustomizationJobMetricsOutput, error) {
	req, out := c.GetModelCustomizationJobMetricsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

type GetModelCustomizationJobMetricsInput struct {
	_ struct{} `type:"structure" json:",omitempty"`

	// ModelCustomizationJobId is a required field
	ModelCustomizationJobId *string `type:"string" json:",omitempty" required:"true"`
}

// String returns the string representation
func (s GetModelCustomizationJobMetricsInput) String() string {
	return volcengineutil.Prettify(s)
}

// GoString returns the string representation
func (s GetModelCustomizationJobMetricsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetModelCustomizationJobMetricsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetModelCustomizationJobMetricsInput"}
	if s.ModelCustomizationJobId == nil {
		invalidParams.Add(request.NewErrParamRequired("ModelCustomizationJobId"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetModelCustomizationJobId sets the ModelCustomizationJobId field's value.
func (s *GetModelCustomizationJobMetricsInput) SetModelCustomizationJobId(v string) *GetModelCustomizationJobMetricsInput {
	s.ModelCustomizationJobId = &v
	return s
}

type GetModelCustomizationJobMetricsOutput struct {
	_ struct{} `type:"structure" json:",omitempty"`

	Metadata *response.ResponseMetadata

	Metrics []*string `type:"list" json:",omitempty"`
}

// String returns the string representation
func (s GetModelCustomizationJobMetricsOutput) String() string {
	return volcengineutil.Prettify(s)
}

// GoString returns the string representation
func (s GetModelCustomizationJobMetricsOutput) GoString() string {
	return s.String()
}

// SetMetrics sets the Metrics field's value.
func (s *GetModelCustomizationJobMetricsOutput) SetMetrics(v []*string) *GetModelCustomizationJobMetricsOutput {
	s.Metrics = v
	return s
}
