// Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid.
// Validate inspects the fields of the type to determine if they are valid .
func (s *DataCatalogInputDefinition) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DataCatalogInputDefinition"}
	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
	}
	if s.DatabaseName == nil {
		invalidParams.Add(request.NewErrParamRequired("DatabaseName"))
	}
	if s.DatabaseName != nil && len(*s.DatabaseName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1))
	}
	if s.TableName == nil {
		invalidParams.Add(request.NewErrParamRequired("TableName"))
	}
	if s.TableName != nil && len(*s.TableName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("TableName", 1))
	}
	if s.TempDirectory != nil {
		if err := s.TempDirectory.Validate(); err != nil {
			invalidParams.AddNested("TempDirectory", err.(request.ErrInvalidParams))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * DataCatalogInputDefinition ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . CatalogId != nil && len ( * s . CatalogId ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . DatabaseName == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . DatabaseName != nil && len ( * s . DatabaseName ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . TableName == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . TableName != nil && len ( * s . TableName ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . TempDirectory != nil { if err := s . TempDirectory . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , err . ( request . ErrInvalidParams ) ) } } if invalidParams . Len ( ) > 0 { return invalidParams } return nil }
Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid .