// WithEndpointConfig injects a EndpointConfig interface to the SDK
// it accepts either a full interface of EndpointConfig or a list
// of sub interfaces each implementing one (or more) function(s) of EndpointConfig
7472
func WithEndpointConfig(endpointConfigs ...interface{}) Option {
	return func(opts *options) error {
		c, err := fabImpl.BuildConfigEndpointFromOptions(endpointConfigs...)
		if err != nil {
			return err
		}
		opts.endpointConfig = c
		return nil
	}
}
586796
func (o *GetEndpointIDLogParams) WithContext(ctx context.Context) *GetEndpointIDLogParams {
	o.SetContext(ctx)
	return o
}
1299949
func ServiceWithEndpoint(endpoint *swarmtypes.EndpointSpec) ServiceSpecOpt {
	return func(spec *swarmtypes.ServiceSpec) {
		spec.EndpointSpec = endpoint
	}
}
1262658
func (s *UpdateEndpointGroupInput) SetEndpointConfigurations(v []*EndpointConfiguration) *UpdateEndpointGroupInput {
	s.EndpointConfigurations = v
	return s
}
1044880
func (s *RestApi) SetEndpointConfiguration(v *EndpointConfiguration) *RestApi {
	s.EndpointConfiguration = v
	return s
}
1340716
func (s *CreateRestApiInput) SetEndpointConfiguration(v *EndpointConfiguration) *CreateRestApiInput {
	s.EndpointConfiguration = v
	return s
}
716046
func (a *Client) GetEndpointIDConfig(params *GetEndpointIDConfigParams) (*GetEndpointIDConfigOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetEndpointIDConfigParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "GetEndpointIDConfig",
		Method:             "GET",
		PathPattern:        "/endpoint/{id}/config",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &GetEndpointIDConfigReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetEndpointIDConfigOK), nil

}
92722
func (s *DBClusterEndpoint) SetEndpoint(v string) *DBClusterEndpoint {
	s.Endpoint = &v
	return s
}
1239171
func (l *linuxDatapath) WriteEndpointConfig(w io.Writer, e datapath.EndpointConfiguration) error {
	fw := bufio.NewWriter(w)

	writeIncludes(w)
	l.writeStaticData(fw, e)

	return l.writeTemplateConfig(fw, e)
}
106465
func (policylist *PolicyList) AddEndpoint(endpoint *HNSEndpoint) (*PolicyList, error) {
	operation := "AddEndpoint"
	title := "hcsshim::PolicyList::" + operation
	logrus.Debugf(title+" id=%s, endpointId:%s", policylist.ID, endpoint.Id)

	_, err := policylist.Delete()
	if err != nil {
		return nil, err
	}

	// Add Endpoint to the Existing List
	policylist.EndpointReferences = append(policylist.EndpointReferences, "/endpoints/"+endpoint.Id)

	return policylist.Create()
}
354577
func ConfigFromBackend(coreBackend ...core.ConfigBackend) (fab.EndpointConfig, error) {

	config := &EndpointConfig{
		backend: lookup.New(coreBackend...),
	}

	if err := config.loadEndpointConfiguration(); err != nil {
		return nil, errors.WithMessage(err, "network configuration load failed")
	}

	//print deprecated warning
	detectDeprecatedNetworkConfig(config)

	return config, nil
}
553582
func (s *DBClusterEndpoint) SetEndpointType(v string) *DBClusterEndpoint {
	s.EndpointType = &v
	return s
}
887958
func WithIdentityConfig(identityConfig msp.IdentityConfig) SDKContextParams {
	return func(ctx *Provider) {
		ctx.identityConfig = identityConfig
	}
}
1084469
func (s *CreateEndpointInput) SetEndpointConfigName(v string) *CreateEndpointInput {
	s.EndpointConfigName = &v
	return s
}
258166
func (s *ListEndpointConfigsOutput) SetEndpointConfigs(v []*EndpointConfigSummary) *ListEndpointConfigsOutput {
	s.EndpointConfigs = v
	return s
}
968015
func (r *Store) WithConfig(ctx context.Context, name string) context.Context {
	name = strings.TrimSuffix(name, "/")
	mp := r.MountPoint(name)
	if _, found := r.mounts[mp]; found {
		return r.cfg.Mounts[mp].WithContext(ctx)
	}
	return r.cfg.Root.WithContext(ctx)
}
1124810
func (s *ModifyDBClusterEndpointOutput) SetEndpointType(v string) *ModifyDBClusterEndpointOutput {
	s.EndpointType = &v
	return s
}