// projectIdentifier computes the projected canonical media type identifier by adding the "view"
// param if the view is not the default view.
359220
func (m *MediaTypeDefinition) projectCanonical(view string) string {
	cano := CanonicalIdentifier(m.Identifier)
	base, params, _ := mime.ParseMediaType(cano)
	if params["view"] != "" {
		return cano // Already projected
	}
	params["view"] = view
	return mime.FormatMediaType(base, params)
}
1106773
func (o *PatchSkusIdentifierParams) WithIdentifier(identifier string) *PatchSkusIdentifierParams {
	o.Identifier = identifier
	return o
}
976947
func (s *AggregateEvaluationResult) SetEvaluationResultIdentifier(v *EvaluationResultIdentifier) *AggregateEvaluationResult {
	s.EvaluationResultIdentifier = v
	return s
}
1078315
func (o *GetNodesIdentifierCatalogsSourceParams) WithIdentifier(identifier string) *GetNodesIdentifierCatalogsSourceParams {
	o.Identifier = identifier
	return o
}
490901
func (s *GetAggregateResourceConfigInput) SetResourceIdentifier(v *AggregateResourceIdentifier) *GetAggregateResourceConfigInput {
	s.ResourceIdentifier = v
	return s
}
1063246
func (s *CopyProductInput) SetSourceProvisioningArtifactIdentifiers(v []map[string]*string) *CopyProductInput {
	s.SourceProvisioningArtifactIdentifiers = v
	return s
}
671186
func (s *CreateObjectOutput) SetObjectIdentifier(v string) *CreateObjectOutput {
	s.ObjectIdentifier = &v
	return s
}
257738
func (r *gceProjectRouter) ProjectID(ctx context.Context, version meta.Version, service string) string {
	switch service {
	case "Firewalls", "Routes":
		return r.gce.NetworkProjectID()
	default:
		return r.gce.projectID
	}
}
1160607
func (o *GetNodesIdentifierObmParams) WithIdentifier(identifier string) *GetNodesIdentifierObmParams {
	o.Identifier = identifier
	return o
}
224281
func (c *Client) ProjectID(label *string) (*manifold.ID, error) {
	if label == nil {
		return nil, nil
	}

	if v, ok := c.getCachedProjectID(*label); ok {
		return v, nil
	}

	projectList := c.Client.Projects.List(context.Background(), &manifold.ProjectsListOpts{
		Label:  label,
		TeamID: c.TeamID,
	})
	defer projectList.Close()

	for projectList.Next() {
		project, err := projectList.Current()
		if err != nil {
			return nil, err
		}

		if project.Body.Label == *label {
			c.setCachedProjectID(*label, &project.ID)
			return &project.ID, nil
		}
	}

	return nil, ErrProjectNotFound
}
464329
func (m *MediaTypeDefinition) projectTypeName(view string) string {
	typeName := m.TypeName
	if view != "default" {
		typeName += strings.Title(view)
	}
	return typeName
}
77078
func (s *persistentStorage) LookupByProject(c context.Context, project string) (*ProjectIdentity, error) {
	return s.lookup(c, &ProjectIdentity{Project: project})
}
266007
func (s *DescribeResourceServerInput) SetIdentifier(v string) *DescribeResourceServerInput {
	s.Identifier = &v
	return s
}
707560
func (o *GetNodesIdentifierWorkflowsActiveParams) WithIdentifier(identifier string) *GetNodesIdentifierWorkflowsActiveParams {
	o.Identifier = identifier
	return o
}
846640
func (a *Client) GetPollersIdentifier(params *GetPollersIdentifierParams, authInfo runtime.ClientAuthInfoWriter) (*GetPollersIdentifierOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetPollersIdentifierParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "GetPollersIdentifier",
		Method:             "GET",
		PathPattern:        "/pollers/{identifier}",
		ProducesMediaTypes: []string{"application/json", "application/x-gzip"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http", "https"},
		Params:             params,
		Reader:             &GetPollersIdentifierReader{formats: a.formats},
		AuthInfo:           authInfo,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetPollersIdentifierOK), nil
}
626833
func (o *GetNodesIdentifierParams) WithIdentifier(identifier string) *GetNodesIdentifierParams {
	o.Identifier = identifier
	return o
}
138433
func (o *PostNodesIdentifierObmParams) WithIdentifier(identifier string) *PostNodesIdentifierObmParams {
	o.Identifier = identifier
	return o
}