// SchemaForResourceType attempts to find a schema for the given mode and type.
// Returns nil if no such schema is available.
434311
func (ps *ProviderSchema) SchemaForResourceType(mode addrs.ResourceMode, typeName string) (schema *configschema.Block, version uint64) {
	switch mode {
	case addrs.ManagedResourceMode:
		return ps.ResourceTypes[typeName], ps.ResourceTypeSchemaVersions[typeName]
	case addrs.DataResourceMode:
		// Data resources don't have schema versions right now, since state is discarded for each refresh
		return ps.DataSources[typeName], 0
	default:
		// Shouldn't happen, because the above cases are comprehensive.
		return nil, 0
	}
}
231745
func (s *AwsSecurityFindingFilters) SetResourceType(v []*StringFilter) *AwsSecurityFindingFilters {
	s.ResourceType = v
	return s
}
113006
func (s *TagDescription) SetResourceType(v string) *TagDescription {
	s.ResourceType = &v
	return s
}
1127274
func (s *DescribeMaintenanceWindowsForTargetInput) SetResourceType(v string) *DescribeMaintenanceWindowsForTargetInput {
	s.ResourceType = &v
	return s
}
868956
func (s *LoadBalancerTlsCertificate) SetResourceType(v string) *LoadBalancerTlsCertificate {
	s.ResourceType = &v
	return s
}
1277346
func (s *ResourceCountFilters) SetResourceType(v string) *ResourceCountFilters {
	s.ResourceType = &v
	return s
}
668926
func (p *GRPCProvider) getResourceSchema(name string) providers.Schema {
	schema := p.getSchema()
	resSchema, ok := schema.ResourceTypes[name]
	if !ok {
		panic("unknown resource type " + name)
	}
	return resSchema
}
218791
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
	switch resource {
	// Group=example.apiserver.code-generator.k8s.io, Version=internalVersion
	case example.SchemeGroupVersion.WithResource("testtypes"):
		return &genericInformer{resource: resource.GroupResource(), informer: f.Example().InternalVersion().TestTypes().Informer()}, nil

		// Group=example.test.apiserver.code-generator.k8s.io, Version=internalVersion
	case example2.SchemeGroupVersion.WithResource("testtypes"):
		return &genericInformer{resource: resource.GroupResource(), informer: f.SecondExample().InternalVersion().TestTypes().Informer()}, nil

	}

	return nil, fmt.Errorf("no informer found for %v", resource)
}
616426
func (s *ListTagsForResourcesInput) SetResourceType(v string) *ListTagsForResourcesInput {
	s.ResourceType = &v
	return s
}
235976
func (s *ComplianceByResource) SetResourceType(v string) *ComplianceByResource {
	s.ResourceType = &v
	return s
}
538971
func (s *TaskFailedEventDetails) SetResourceType(v string) *TaskFailedEventDetails {
	s.ResourceType = &v
	return s
}
300165
func (s *ListDiscoveredResourcesInput) SetResourceType(v string) *ListDiscoveredResourcesInput {
	s.ResourceType = &v
	return s
}
77685
func (s *DescribeBackupJobOutput) SetResourceType(v string) *DescribeBackupJobOutput {
	s.ResourceType = &v
	return s
}
482459
func (s *ResourceIdentifier) SetResourceType(v string) *ResourceIdentifier {
	s.ResourceType = &v
	return s
}
749408
func (s *GetResourceConfigHistoryInput) SetResourceType(v string) *GetResourceConfigHistoryInput {
	s.ResourceType = &v
	return s
}
635869
func (s *CloudFormationStackRecord) SetResourceType(v string) *CloudFormationStackRecord {
	s.ResourceType = &v
	return s
}
1012813
func (s *StartImportInput) SetResourceType(v string) *StartImportInput {
	s.ResourceType = &v
	return s
}