// SetDefaultStorageClass sets the DefaultStorageClass field's value.
976617
func (s *UpdateSMBFileShareInput) SetDefaultStorageClass(v string) *UpdateSMBFileShareInput {
	s.DefaultStorageClass = &v
	return s
}
1370397
func (s *OrderableDBInstanceOption) SetStorageType(v string) *OrderableDBInstanceOption {
	s.StorageType = &v
	return s
}
666963
func (s *CreateStackInput) SetDefaultOs(v string) *CreateStackInput {
	s.DefaultOs = &v
	return s
}
429643
func (s *SigningImageFormat) SetDefaultFormat(v string) *SigningImageFormat {
	s.DefaultFormat = &v
	return s
}
209826
func (l *Logger) SetDefaults(d map[string]interface{}) error {
	for key := range d {
		if !IsValidKey(key) {
			return ErrInvalidKey
		}
	}

	l.defaults.Store(d)
	return nil
}
17745
func (s *Destination) SetStorageClass(v string) *Destination {
	s.StorageClass = &v
	return s
}
57261
func (a *AttributeDefinition) SetDefault(def interface{}) {
	switch actual := def.(type) {
	case HashVal:
		a.DefaultValue = actual.ToMap()
	case ArrayVal:
		a.DefaultValue = actual.ToSlice()
	default:
		a.DefaultValue = actual
	}
}
861004
func (s *S3Location) SetStorageClass(v string) *S3Location {
	s.StorageClass = &v
	return s
}
1303814
func (s *UpdateStackInput) SetDefaultOs(v string) *UpdateStackInput {
	s.DefaultOs = &v
	return s
}
255337
func (p *SdkPolicyManager) SetDefault(
	ctx context.Context,
	req *api.SdkOpenStoragePolicySetDefaultRequest,
) (*api.SdkOpenStoragePolicySetDefaultResponse, error) {
	if req.GetName() == "" {
		return nil, status.Error(codes.InvalidArgument, "Must supply a Storage Policy Name")
	}

	// verify policy exists, before setting it as default
	policy, err := p.Inspect(ctx,
		&api.SdkOpenStoragePolicyInspectRequest{
			Name: req.GetName(),
		},
	)
	if err != nil {
		return nil, err
	}

	// Only administrator can set policy as default storage
	// policy restriction
	user, _ := auth.NewUserInfoFromContext(ctx)
	if !policy.GetStoragePolicy().GetOwnership().IsAdminByUser(user) {
		return nil, status.Errorf(codes.PermissionDenied, "Only the storage system admin can set storage policy as default %v", req.GetName())
	}

	policyStr, err := json.Marshal(policy.GetStoragePolicy().GetName())
	if err != nil {
		return nil, status.Errorf(codes.Internal, "Json marshal failed for policy %s :%v", req.GetName(), err)
	}

	_, err = p.kv.Update(defaultPath, policyStr, 0)
	if err == kvdb.ErrNotFound {
		if _, err := p.kv.Create(defaultPath, policyStr, 0); err != nil {
			return nil, status.Errorf(codes.Internal, "Unable to save default policy details %v", err)
		}
	} else if err != nil {
		return nil, status.Errorf(codes.Internal, "Failed to set default policy: %v", err)
	}
	logrus.Infof("Storage Policy %v is set as default", policy.GetStoragePolicy().GetName())
	return &api.SdkOpenStoragePolicySetDefaultResponse{}, nil
}
1132056
func (s *DocumentDefaultVersionDescription) SetDefaultVersion(v string) *DocumentDefaultVersionDescription {
	s.DefaultVersion = &v
	return s
}
935934
func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
	s.StorageClass = &v
	return s
}
779183
func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
	s.StorageClass = &v
	return s
}
735884
func (s *DistributionConfig) SetDefaultRootObject(v string) *DistributionConfig {
	s.DefaultRootObject = &v
	return s
}
739617
func (s *DBInstance) SetStorageType(v string) *DBInstance {
	s.StorageType = &v
	return s
}
1265627
func (s *SMBFileShareInfo) SetDefaultStorageClass(v string) *SMBFileShareInfo {
	s.DefaultStorageClass = &v
	return s
}
688954
func (s *TypedLinkAttributeDefinition) SetDefaultValue(v *TypedAttributeValue) *TypedLinkAttributeDefinition {
	s.DefaultValue = v
	return s
}